Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Tue, 22 Apr 2008 12:50:27 +1000 > But I was curious as to why the +2 in the MAX_SKB_FRAGS definition? To be honest I have no idea. When Alexey added the TSO changeset way back then, it had the "+2", from the history-2.6 tree: commit 80223d5186f73bf4

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Rusty Russell
On Tuesday 22 April 2008 06:04:18 David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Tue, 22 Apr 2008 05:06:16 +1000 > > > I'm not sure what the right number is here. Say worst case is header > > which goes over a page boundary then MAX_SKB_FRAGS in the skb, but for > > some rea

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Herbert Xu
On Mon, Apr 21, 2008 at 01:04:18PM -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Tue, 22 Apr 2008 05:06:16 +1000 > > > I'm not sure what the right number is here. Say worst case is header which > > goes over a page boundary then MAX_SKB_FRAGS in the skb, but for so

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Tue, 22 Apr 2008 05:06:16 +1000 > I'm not sure what the right number is here. Say worst case is header which > goes over a page boundary then MAX_SKB_FRAGS in the skb, but for some reason > that already has a +2: > > /* To allow 64K frame to be pac

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Rusty Russell
On Friday 18 April 2008 13:24:27 Herbert Xu wrote: > Finally this patch lets virtio_net receive GSO packets in addition > to sending them. ... > static void try_fill_recv(struct virtnet_info *vi) > { > struct sk_buff *skb; > - struct scatterlist sg[1+MAX_SKB_FRAGS]; > + struct scatt

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-18 Thread Herbert Xu
On Sat, Apr 19, 2008 at 12:08:04AM +1000, Rusty Russell wrote: > On Friday 18 April 2008 13:24:27 Herbert Xu wrote: > > Finally this patch lets virtio_net receive GSO packets in addition > > to sending them. This can definitely be optimised for the non-GSO > > case. For comparison the Xen approac

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-18 Thread Rusty Russell
On Friday 18 April 2008 13:24:27 Herbert Xu wrote: > Finally this patch lets virtio_net receive GSO packets in addition > to sending them. This can definitely be optimised for the non-GSO > case. For comparison the Xen approach stores one page in each skb > and uses subsequent skb's pages to cons

[6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-17 Thread Herbert Xu
Finally this patch lets virtio_net receive GSO packets in addition to sending them. This can definitely be optimised for the non-GSO case. For comparison the Xen approach stores one page in each skb and uses subsequent skb's pages to construct an SG skb instead of preallocating the maximum amount