[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH net] xen-netback: fix guest-receive-side array sizes



On Fri, Dec 20, 2013 at 01:16:07PM +0000, Paul Durrant wrote:
> The sizes chosen for the metadata and grant_copy_op arrays on the guest
> receive size are wrong;
> 
> - The meta array is needlessly twice the ring size, when we only ever
>   consume a single array element per RX ring slot

This makes sense.

> - The grant_copy_op array is way too small. It's sized based on a bogus
>   assumption: that at most two copy ops will be used per ring slot. This
>   may have been true at some point in the past but it's clear from looking
>   at start_new_rx_buffer() that a new ring slot is only consumed if a frag
>   would overflow the current slot (plus some other conditions) so the actual
>   limit is MAX_SKB_FRAGS grant_copy_ops per ring slot.
> 

It takes me quite some time to get the idea straight. I think you're
correct on this.

This gigantic array makes me think if we should ditch the idea to
consolidate data into a single slot, just to make all the counting in
netback a bit easier to understand and less error-prone. We can instead
use multiple page ring if the size of the ring becomes a problem. In any
case switching the scheme is still just a vague thought and should be
material for net-next so:

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Thanks
Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.