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/
Home Products Support Community News


[Xen-devel] Re: [3/11] [NET] front: Stop using rx->id

On 27 Jul 2006, at 14:30, Herbert Xu wrote:

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)?

That was the reason of having two loops instead of the one. In the first
loop, we're not moving entries so we don't assign rx_skbs/grant_rx_ref
at all.  In the second loop, we know that requeue_idx != i so we're
always moving entries forward in which case clearing the original position
is necessary.

It's not a time critical piece of code. I'd much rather have a single loop that wastes some small amount of time. That routine is confusing enough as it is. :-)

Also, what about putting the array-initialising loop back: reasonable?

 -- Keir

Xen-devel mailing list