iwl3945: better skb management in rx path
authorEric Dumazet <edumazet@google.com>
Fri, 28 Jun 2013 15:05:06 +0000 (08:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:57:36 +0000 (10:57 -0800)
commit2c4805f3ae216cfd6fc2a386ea523d5a6eee6fdc
tree19f5d5bf88f537a5050506234344ac831085d087
parentd4e937777fa1a97b21916eecd7d7d9dd8534d3d1
iwl3945: better skb management in rx path

commit 45fe142cefa864b685615bcb930159f6749c3667 upstream.

Steinar reported reallocations of skb->head with IPv6, leading to
a warning in skb_try_coalesce()

It turns out iwl3945 has several problems :

1) skb->truesize is underestimated.
   We really consume PAGE_SIZE bytes for a fragment,
   not the frame length.
2) 128 bytes of initial headroom is a bit low and forces reallocations.
3) We can avoid consuming a full page for small enough frames.

Reported-by: Steinar H. Gunderson <sesse@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paul Stewart <pstew@google.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlegacy/3945.c