WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] make protocol specific usage of shared sring exp

To: "Ian Campbell" <ian.campbell@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] make protocol specific usage of shared sring explicit
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 01 Jul 2010 10:58:56 +0100
Cc:
Delivery-date: Thu, 01 Jul 2010 02:59:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9fb06660a061dbb19ca0.1277976128@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9fb06660a061dbb19ca0.1277976128@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 01.07.10 at 11:22, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> --- a/xen/include/public/io/ring.h    Wed Jun 30 22:12:54 2010 +0100
> +++ b/xen/include/public/io/ring.h    Thu Jul 01 10:20:07 2010 +0100
> @@ -103,8 +103,16 @@
>  struct __name##_sring {                                                 \
>      RING_IDX req_prod, req_event;                                       \
>      RING_IDX rsp_prod, rsp_event;                                       \
> -    uint8_t  netfront_smartpoll_active;                                 \
> -    uint8_t  pad[47];                                                   \
> +    union {                                                             \
> +        struct {                                                        \
> +            uint8_t smartpoll_active;                                   \
> +        } netif;                                                        \
> +        struct {                                                        \
> +            uint8_t msg;                                                \
> +        } tapif_user;                                                   \
> +        uint8_t pvt_pad[4];                                             \
> +    } private;                                                          \
> +    uint8_t pad[44];                                                    \

Since this is source incompatible for consumers anyway, wouldn't
it be better to rename the new pad[] to e.g. _pad[], so that builds
of unchanged consumers fail instead of producing runtime
incompatible code?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel