From: Ian Campbell Subject: Re: [PATCH] make protocol specific usage of shared sring explicit Date: Thu, 1 Jul 2010 11:09:39 +0100 Message-ID: <1277978979.28432.17.camel@zakaz.uk.xensource.com> References: <9fb06660a061dbb19ca0.1277976128@localhost.localdomain> <4C2C830002000078000090DD@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C2C830002000078000090DD@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, 2010-07-01 at 10:58 +0100, Jan Beulich wrote: > >>> On 01.07.10 at 11:22, Ian Campbell 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? Yes, that's a good idea. I'll follow up with a patch to use __pad (I think the single _ namespace is reserved for libc or some such) Ian.