From: Keir Fraser Subject: Re: [3/11] [NET] front: Stop using rx->id Date: Thu, 27 Jul 2006 14:28:48 +0100 Message-ID: References: <20060707141634.GA12031@gondor.apana.org.au> <20060707141814.GD12031@gondor.apana.org.au> <1c6ca61a39886933a523840193ff31a8@cl.cam.ac.uk> <20060727131234.GA17367@gondor.apana.org.au> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060727131234.GA17367@gondor.apana.org.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Herbert Xu Cc: Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org On 27 Jul 2006, at 14:12, Herbert Xu wrote: > Had we used the body of the second loop for the initial segment we > would > end up wiping out the values of rx_skbs and grant_rx_ref when we do the > assignments > > skb = np->rx_skbs[requeue_idx] = xennet_get_rx_skb(np, i); > ref = np->grant_rx_ref[requeue_idx] = xennet_get_rx_ref(np, i); > > because for the initial segment requeue_idx is always the same as i. But wouldn't the xennet_get_* functions wipe the entries, only to be immediately filled in again by the assignment to e.g., np->rx_skbs[requeue_idx], so it would all work out okay (except a needless wipe-then-rewrite)? -- Keir