From: Krzysztof Halasa <[EMAIL PROTECTED]>
Date: Wed, 02 Aug 2006 02:42:05 +0200

> Alexey Kuznetsov <[EMAIL PROTECTED]> writes:
> 
> > Actually, it is historical hole in design, inherited from ancient
> > times. Calling conventions of dev->hard_header() just did not allow
> > to reallocate. BTW in 2.6 it can, if it uses pskb_expand_head().
> 
> Does that mean that hard_header() and then hard_start_xmit()
> can use pskb_expand_head() instead of skb_realloc_headroom()
> without restrictions?

It is definitely the case that ->hard_start_xmit() can use
pskb_expand_head(), some ethernet drivers even use it when they need
to clobber the IP and TCP headers to implement TSO and another entity
has a reference to the packet headers.  Just be sure to pass
GFP_ATOMIC to it in such a context.

One example is drivers/net/tg3.c:tg3_start_xmit().
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to