1 --- a/include/linux/skbuff.h
2 +++ b/include/linux/skbuff.h
3 @@ -1270,11 +1270,18 @@ static inline int skb_network_offset(con
5 * Various parts of the networking layer expect at least 16 bytes of
6 * headroom, you should not reduce this.
8 + * This has been changed to 64 to acommodate for routing between ethernet
9 + * and wireless, but only for new allocations
12 #define NET_SKB_PAD 16
15 +#ifndef NET_SKB_PAD_ALLOC
16 +#define NET_SKB_PAD_ALLOC 64
19 extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
21 static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
22 @@ -1364,9 +1371,9 @@ static inline void __skb_queue_purge(str
23 static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
26 - struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
27 + struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD_ALLOC, gfp_mask);
29 - skb_reserve(skb, NET_SKB_PAD);
30 + skb_reserve(skb, NET_SKB_PAD_ALLOC);
34 @@ -1439,7 +1446,7 @@ static inline int __skb_cow(struct sk_bu
35 delta = headroom - skb_headroom(skb);
38 - return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0,
39 + return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD_ALLOC), 0,
43 --- a/net/core/skbuff.c
44 +++ b/net/core/skbuff.c
45 @@ -320,9 +320,9 @@ struct sk_buff *__netdev_alloc_skb(struc
46 int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
49 - skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node);
50 + skb = __alloc_skb(length + NET_SKB_PAD_ALLOC, gfp_mask, 0, node);
52 - skb_reserve(skb, NET_SKB_PAD);
53 + skb_reserve(skb, NET_SKB_PAD_ALLOC);