On Sat, Jun 12, 2010 at 05:31:10PM +0800, Xin, Xiaohui wrote:
Well if you were doing this then the driver won't be generating
skbs at all. So you don't need to change netdev_alloc_skb.
The driver would currently do alloc_page, so you would replace
that with netdev_alloc_page, which can call your new function
to allocate an external page where appropriate.
IOW you just need one change in the driver if it already uses
the skbless interface, to replace with alloc_page.
If the driver doesn't use the skbless interface then you need
to make a few more changes but it isn't too hard either, it'll
also mean that the driver will have less overhead even for normal
use which is a win-win situation.
Yes.
We could keep track whether the stack has modified the header,
since you can simply ignore it if it doesn't modify it, which
should be the common case for virt.
If it does anything like that, then we're not in the fast-path
case so you can just fall back to copying.
I don't see why this would be a problem, since as far as what
the driver is putting onto the physical RX ring nothing has
changed. IOW if you want to designate a certain page as special,
or the first page, you can still do so.
So can you explain which bits of your patches would be affected
by this?
While I don't like that very much I guess I can live with that
if nobody else objects.
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--