diff mbox

[ovs-dev,net-next] openvswitch: allow output of MPLS packets on tunnel vports

Message ID 1458010362-17878-1-git-send-email-simon.horman@netronome.com
State Not Applicable
Headers show

Commit Message

Simon Horman March 15, 2016, 2:52 a.m. UTC
From: Simon Horman <horms@verge.net.au>

Currently output of MPLS packets on tunnel vports is not allowed by Open
vSwitch. This is because historically encapsulation was done in such a way
that the inner_protocol field of the skb needed to hold the inner protocol
for both MPLS and tunnel encapsulation in order for GSO segmentation to be
performed correctly.

Since b2acd1dc3949 ("openvswitch: Use regular GRE net_device instead of
vport") Open vSwitch makes use of lwt to output to tunnel netdevs which
perform encapsulation. As no drivers expose support for MPLS offloads this
means that GSO packets are segmented in software by validate_xmit_skb(),
which is called from __dev_queue_xmit(), before tunnel encapsulation occurs.
This means that the inner protocol of MPLS is no longer needed by the time
encapsulation occurs and the contention on the inner_protocol field of the
skb no longer occurs.

Thus it is now safe to output MPLS to tunnel vports.

Signed-off-by: Simon Horman <horms@verge.net.au>

---
Lightly tested with Geneve, GRE and VXLAN
---
 net/openvswitch/flow_netlink.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Simon Horman March 15, 2016, 3 a.m. UTC | #1
On Tue, Mar 15, 2016 at 11:52:42AM +0900, Simon Horman wrote:
> From: Simon Horman <horms@verge.net.au>

Sorry, I mixed up my own email address somehow.
I will repost.
diff mbox

Patch

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 58b8efc23668..689c17264221 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -2044,9 +2044,6 @@  static int validate_set(const struct nlattr *a,
 		break;
 
 	case OVS_KEY_ATTR_TUNNEL:
-		if (eth_p_mpls(eth_type))
-			return -EINVAL;
-
 		if (masked)
 			return -EINVAL; /* Masked tunnel set not supported. */