All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@netronome.com>
To: netdev@vger.kernel.org
Cc: Simon Horman <simon.horman@netronome.com>,
	Alexander Duyck <aduyck@mirantis.com>
Subject: [PATCH/RFC net] gre: set inner_protocol on xmit
Date: Fri, 12 Aug 2016 11:46:58 +0200	[thread overview]
Message-ID: <20160812094656.GA26953@penelope.isobedori.kobe.vergenet.net> (raw)

Ensure that the inner_protocol is set on transmit so that GSO segmentation,
which relies on that field, works correctly.

I have observed this is not the case when OvS transmits GRE using
lwtunnel metadata (which it always does).

Fixes: 38720352412a ("gre: Use inner_proto to obtain inner header protocol")
Cc: Alexander Duyck <aduyck@mirantis.com>
Reviewed-by: Dinan Gunawardena <dinan.gunawardena@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 net/ipv4/ip_gre.c | 1 +
 1 file changed, 1 insertion(+)
---
 Repost with correct domain vger address

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 5b1481be0282..1571b71448a0 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -451,6 +451,7 @@ static void gre_fb_xmit(struct sk_buff *skb, struct net_device *dev,
 
 	df = key->tun_flags & TUNNEL_DONT_FRAGMENT ?  htons(IP_DF) : 0;
 
+	skb_set_inner_protocol(skb, proto);
 	iptunnel_xmit(skb->sk, rt, skb, fl.saddr, key->u.ipv4.dst, IPPROTO_GRE,
 		      key->tos, key->ttl, df, false);
 	return;
-- 
2.7.0.rc3.207.g0ac5344

             reply	other threads:[~2016-08-12  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12  9:46 Simon Horman [this message]
2016-08-12 15:07 ` [PATCH/RFC net] gre: set inner_protocol on xmit Alexander Duyck
2016-08-12 15:15   ` Simon Horman

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=20160812094656.GA26953@penelope.isobedori.kobe.vergenet.net \
    --to=simon.horman@netronome.com \
    --cc=aduyck@mirantis.com \
    --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.