Re: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Herbert Xu
Date: Thursday, June 17, 2010 - 4:20 am

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH v7 14/19] Add header file for mp device., xiaohui.xin, (Sat Jun 5, 3:14 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Herbert Xu, (Thu Jun 17, 4:20 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Michael S. Tsirkin, (Sun Jun 20, 3:06 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Michael S. Tsirkin, (Sun Jun 20, 3:39 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Michael S. Tsirkin, (Sun Jun 20, 4:47 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Michael S. Tsirkin, (Sun Jun 20, 5:48 am)
Re: [RFC PATCH v7 01/19] Add a new structure for skb buffe ..., Michael S. Tsirkin, (Fri Jun 25, 4:06 am)