From: "Timo Teräs" <timo.teras@iki.fi>
To: netdev@vger.kernel.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
David Miller <davem@davemloft.net>
Subject: ip_gre headroom allocation
Date: Thu, 11 Jun 2009 11:22:34 +0300 [thread overview]
Message-ID: <4A30BECA.8030205@iki.fi> (raw)
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))) {
next reply other threads:[~2009-06-11 8:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 8:22 Timo Teräs [this message]
2009-06-11 10:09 ` ip_gre headroom allocation 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A30BECA.8030205@iki.fi \
--to=timo.teras@iki.fi \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.