Re: [RFC v2] mac80211: assign needed_headroom/tailroom for netdevs

Johannes Berg
2008-05-05T22:44:56Z

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

On Mon, 2008-05-05 at 15:37 -0700, David Miller wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> Date: Mon, 05 May 2008 22:57:46 +0200
>
> > But I cannot modify the ethernet header that'll live on in the skb data
> > so that's not useful.
>
> Actually, you can, if skb_header_cloned() returns false.
>
> When skb_header_cloned() returns false you can change the
> headers however you like.
>
> I'm not sure if it helps the bridging case or not, but in
> any event, the following patch should work and reduce the
> number of cases where pskb_expand_head() is necessary on
> TX.

Right, that makes sense. But will it ever return false? skb_cloned()
returns true often enough, and we only accept linear skbs, but I think I
don't understand yet what skb_header_cloned() vs. skb_cloned() refers
to. Which exactly is the header space I'm allowed to modify when
skb_header_cloned() returns false?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]