aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-2.6.34/205-skb_padding.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-06-26 20:42:58 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-06-26 20:42:58 +0000
commitda1bb88a2b900f0392b731ec47c5e1bff956fd8f (patch)
tree597146471e3eeafb4ba55e802e80b896770808ff /target/linux/generic/patches-2.6.34/205-skb_padding.patch
parent6117c04c9416b295347fb45c37e430f01df1d0d9 (diff)
downloadupstream-da1bb88a2b900f0392b731ec47c5e1bff956fd8f.tar.gz
upstream-da1bb88a2b900f0392b731ec47c5e1bff956fd8f.tar.bz2
upstream-da1bb88a2b900f0392b731ec47c5e1bff956fd8f.zip
rename target/linux/generic-2.6 to generic
SVN-Revision: 21952
Diffstat (limited to 'target/linux/generic/patches-2.6.34/205-skb_padding.patch')
-rw-r--r--target/linux/generic/patches-2.6.34/205-skb_padding.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.34/205-skb_padding.patch b/target/linux/generic/patches-2.6.34/205-skb_padding.patch
new file mode 100644
index 0000000000..adbe7021df
--- /dev/null
+++ b/target/linux/generic/patches-2.6.34/205-skb_padding.patch
@@ -0,0 +1,56 @@
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
+@@ -1372,11 +1372,18 @@ static inline int skb_network_offset(con
+ *
+ * Various parts of the networking layer expect at least 32 bytes of
+ * headroom, you should not reduce this.
++ *
++ * This has been changed to 64 to acommodate for routing between ethernet
++ * and wireless, but only for new allocations
+ */
+ #ifndef NET_SKB_PAD
+ #define NET_SKB_PAD 32
+ #endif
+
++#ifndef NET_SKB_PAD_ALLOC
++#define NET_SKB_PAD_ALLOC 64
++#endif
++
+ extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
+
+ static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
+@@ -1466,9 +1473,9 @@ static inline void __skb_queue_purge(str
+ static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
+ gfp_t gfp_mask)
+ {
+- struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
++ struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD_ALLOC, gfp_mask);
+ if (likely(skb))
+- skb_reserve(skb, NET_SKB_PAD);
++ skb_reserve(skb, NET_SKB_PAD_ALLOC);
+ return skb;
+ }
+
+@@ -1551,7 +1558,7 @@ static inline int __skb_cow(struct sk_bu
+ delta = headroom - skb_headroom(skb);
+
+ if (delta || cloned)
+- return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0,
++ return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD_ALLOC), 0,
+ GFP_ATOMIC);
+ return 0;
+ }
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -339,9 +339,9 @@ struct sk_buff *__netdev_alloc_skb(struc
+ int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
+ struct sk_buff *skb;
+
+- skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node);
++ skb = __alloc_skb(length + NET_SKB_PAD_ALLOC, gfp_mask, 0, node);
+ if (likely(skb)) {
+- skb_reserve(skb, NET_SKB_PAD);
++ skb_reserve(skb, NET_SKB_PAD_ALLOC);
+ skb->dev = dev;
+ }
+ return skb;