netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <therbert@google.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net-next 5/5] vxlan: Set inner protocol before transmit
Date: Fri, 26 Sep 2014 09:22:34 -0700	[thread overview]
Message-ID: <1411748554-7346-6-git-send-email-therbert@google.com> (raw)
In-Reply-To: <1411748554-7346-1-git-send-email-therbert@google.com>

Call skb_set_inner_protocol to set inner Ethernet protocol to
ETH_P_TEB before transmit. This is needed for GSO with UDP tunnels.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 drivers/net/vxlan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 34e102e..2af795d 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1610,6 +1610,8 @@ static int vxlan6_xmit_skb(struct vxlan_sock *vs,
 	vxh->vx_flags = htonl(VXLAN_FLAGS);
 	vxh->vx_vni = vni;
 
+	skb_set_inner_protocol(skb, htons(ETH_P_TEB));
+
 	udp_tunnel6_xmit_skb(vs->sock, dst, skb, dev, saddr, daddr, prio,
 			     ttl, src_port, dst_port);
 	return 0;
@@ -1652,6 +1654,8 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
 	vxh->vx_flags = htonl(VXLAN_FLAGS);
 	vxh->vx_vni = vni;
 
+	skb_set_inner_protocol(skb, htons(ETH_P_TEB));
+
 	return udp_tunnel_xmit_skb(vs->sock, rt, skb, src, dst, tos,
 				   ttl, df, src_port, dst_port, xnet);
 }
-- 
2.1.0.rc2.206.gedb03e5

  parent reply	other threads:[~2014-09-26 16:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 16:22 [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 1/5] udp: Generalize skb_udp_segment Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 2/5] sit: Set inner IP protocol in sit Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 3/5] ipip: Set inner IP protocol in ipip Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 4/5] gre: Set inner protocol in v4 and v6 GRE transmit Tom Herbert
2014-09-30  5:02   ` Simon Horman
2014-09-26 16:22 ` Tom Herbert [this message]
2014-09-26 20:16 ` [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Or Gerlitz
2014-09-26 23:04   ` Tom Herbert
2014-09-27 19:26     ` Or Gerlitz
2014-09-29  3:59       ` Tom Herbert
2014-09-29 20:43 ` David Miller

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=1411748554-7346-6-git-send-email-therbert@google.com \
    --to=therbert@google.com \
    --cc=davem@davemloft.net \
    --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 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).