diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2010-08-31 10:36:58 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2010-08-31 10:36:58 +0000 |
commit | 9cd0d4d3bb901316c42602264cca1fd5386407b0 (patch) | |
tree | 58d26171cc9970dbd013227b1ad02815833a26d8 /main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch | |
parent | 757c8a87bf6b5812a3b4d669603fb4d8c793bc75 (diff) | |
parent | 930dadc2e00d672f403b3a565d4f1bd3cb2663f2 (diff) | |
download | aports-9cd0d4d3bb901316c42602264cca1fd5386407b0.tar.bz2 aports-9cd0d4d3bb901316c42602264cca1fd5386407b0.tar.xz |
Merge remote branch 'ncopa/master'
Diffstat (limited to 'main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch')
-rw-r--r-- | main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch b/main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch new file mode 100644 index 0000000000..61d7c9a6c1 --- /dev/null +++ b/main/linux-pae/0003-ip_gre-include-route-header_len-in-max_headroom-calc.patch @@ -0,0 +1,39 @@ +From cd0e9d08480e1e0648e17d099ecf50f6fd8714e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Sat, 20 Mar 2010 02:27:58 +0000 +Subject: [PATCH 03/18] ip_gre: include route header_len in max_headroom calculation + +Taking route's header_len into account, and updating gre device +needed_headroom will give better hints on upper bound of required +headroom. This is useful if the gre traffic is xfrm'ed. + +Signed-off-by: Timo Teras <timo.teras@iki.fi> +Acked-by: Herbert Xu <herbert@gondor.apana.org.au> +Signed-off-by: David S. Miller <davem@davemloft.net> +(cherry picked from commit 243aad830e8a4cdda261626fbaeddde16b08d04a) +--- + net/ipv4/ip_gre.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c +index ac88ce5..7f1ff73 100644 +--- a/net/ipv4/ip_gre.c ++++ b/net/ipv4/ip_gre.c +@@ -803,11 +803,13 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev + tunnel->err_count = 0; + } + +- max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen; ++ max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen + rt->u.dst.header_len; + + if (skb_headroom(skb) < max_headroom || skb_shared(skb)|| + (skb_cloned(skb) && !skb_clone_writable(skb, 0))) { + struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom); ++ if (max_headroom > dev->needed_headroom) ++ dev->needed_headroom = max_headroom; + if (!new_skb) { + ip_rt_put(rt); + stats->tx_dropped++; +-- +1.7.0.2 + |