netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ip_gre headroom allocation
@ 2009-06-11  8:22 Timo Teräs
  2009-06-11 10:09 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Timo Teräs @ 2009-06-11  8:22 UTC (permalink / raw)
  To: netdev; +Cc: Herbert Xu, Alexey Kuznetsov, David Miller

I'm not entirely sure about this, but shouldn't we do something like
the below to make ip_gre allocation enough headroom for paths where
e.g. xfrm transformations take place (as a speed optimization)?

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index e62510d..eb78dd9 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -812,7 +812,7 @@ static int 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))) {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-06-11 12:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11  8:22 ip_gre headroom allocation Timo Teräs
2009-06-11 10:09 ` David Miller
2009-06-11 10:17   ` Timo Teräs
2009-06-11 10:56     ` Herbert Xu
2009-06-11 11:29       ` Timo Teräs
2009-06-11 11:37         ` Herbert Xu
2009-06-11 11:51           ` Timo Teräs
2009-06-11 12:12             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).