Re: mac80211 truesize bugs

David Miller
2008-05-04T22:38:44Z

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sun, 4 May 2008 11:16:52 +0800

> On Sun, May 04, 2008 at 04:22:20AM +0200, Johannes Berg wrote:
> >
> > Yes, wireless always needs at least 24 bytes, but more likely 34
> > (encryption+QoS). However, I just increased LL_MAX_HEADER to 54 and that
> > doesn't seem to have helped.
>
> How did you test it?

I know what causes this problem, things like ARP.

They don't use LL_MAX_HEADER, and instead go:

skb = alloc_skb(arp_hdr_len(dev) + LL_RESERVED_SPACE(dev), GFP_ATOMIC);

because they are reasonably sure what exact device they
are sending out of :-)

As mentioned elsewhere, there is a disconnect between how some
of these values are used. But I'm pretty sure I know why some
of them are used this way.