From: Wei Liu Subject: Re: [PATCH V4 2/3] xen-netback: switch to NAPI + kthread 1:1 model Date: Tue, 6 Aug 2013 16:47:30 +0100 Message-ID: <20130806154730.GJ1631@zion.uk.xensource.com> References: <1375779963-24090-3-git-send-email-wei.liu2@citrix.com> <20130806133355.GD1631@zion.uk.xensource.com> <1375797004.10281.9.camel@kazak.uk.xensource.com> <20130806145015.GF1631@zion.uk.xensource.com> <1375801006.10281.21.camel@kazak.uk.xensource.com> <20130806150548.GG1631@zion.uk.xensource.com> <1375802498.10281.26.camel@kazak.uk.xensource.com> <20130806152410.GH1631@zion.uk.xensource.com> <20130806153339.GI1631@zion.uk.xensource.com> <1375803536.10281.29.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1375803536.10281.29.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Wei Liu , xen-devel@lists.xen.org, annie.li@oracle.com, david.vrabel@citrix.com, msw@amazon.com, andrew.bennieston@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, Aug 06, 2013 at 04:38:56PM +0100, Ian Campbell wrote: [...] > > * An example sequence of head fields (I = INVALID_PENDING_RING_IDX): > > * > > * ...|0 I I I|5 I|9 I I I|... > > * -->|<-INUSE---------------- > > * > > * After consuming the first slot(s) we have: > > * > > * ...|V V V V|5 I|9 I I I|... > > * -----FREE->|<-INUSE-------- > > * > > * where V stands for "valid pending ring index". Any number other > > * than INVALID_PENDING_RING_IDX is OK. In practice we use 0. > > Perhaps add "These entries are considered free and can contain any > number other than INVALID_PENDING_RING_IDX" ? > > Do you have a #define, like FREE_PENDING_RING_IDX for this value? Should > mention it if so I think. > Unfortunately no. This can be fixed later with separate patch? Or just have that change in this patch? Wei. > > * > > * The non-INVALID_PENDING_RING_IDX (say 0, 5 and 9 in the above > ^ add "in use"? > > > * example) number is the index into pending_tx_info and mmap_pages > > * arrays. > > */ > > > > > > > > Wei. > > > > > > > Ian. >