[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080422011354.GB14994@gondor.apana.org.au>
Date: Tue, 22 Apr 2008 09:13:55 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: David Miller <davem@...emloft.net>
Cc: rusty@...tcorp.com.au, virtualization@...ts.linux-foundation.org,
virtualization@...ts.osdl.org, netdev@...r.kernel.org
Subject: Re: [6/6] [VIRTIO] net: Allow receiving SG packets
On Mon, Apr 21, 2008 at 01:04:18PM -0700, David Miller wrote:
> From: Rusty Russell <rusty@...tcorp.com.au>
> 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:
The +2 (i.e., extra +1) is for the virtio GSO header.
> skb->data is linear, therefore it's not possible to need
> more than one scatterlist entry for it.
Theoretically yes :) But for virtualisation the underlying transport
may present meta-physically contiguous memory that is physically
discrete. So we may actually need to have multiple SG entries for
skb->data. However, no current code path should generate packets
with both long skb->data areas *and* skb page frags so we could
just drop them if they show up.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists