netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next repost] openvswitch: allow output of MPLS packets on tunnel vports
@ 2016-03-15  3:00 Simon Horman
       [not found] ` <1458010835-18555-1-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
  2016-03-18 22:27 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Horman @ 2016-03-15  3:00 UTC (permalink / raw)
  To: Pravin Shelar, David Miller; +Cc: Jesse Gross, netdev, dev, Simon Horman

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 <simon.horman@netronome.com>

---
* Lightly tested with Geneve, GRE and VXLAN
* Reposted with my desired email for this work
---
 net/openvswitch/flow_netlink.c | 3 ---
 1 file changed, 3 deletions(-)

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. */
 
-- 
2.1.4

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

* Re: [PATCH net-next repost] openvswitch: allow output of MPLS packets on tunnel vports
       [not found] ` <1458010835-18555-1-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
@ 2016-03-15 17:05   ` Jesse Gross
  0 siblings, 0 replies; 3+ messages in thread
From: Jesse Gross @ 2016-03-15 17:05 UTC (permalink / raw)
  To: Simon Horman; +Cc: ovs dev, Linux Kernel Network Developers, David Miller

On Mon, Mar 14, 2016 at 8:00 PM, Simon Horman
<simon.horman@netronome.com> wrote:
> 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 <simon.horman@netronome.com>

Reviewed-by: Jesse Gross <jesse@kernel.org>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

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

* Re: [PATCH net-next repost] openvswitch: allow output of MPLS packets on tunnel vports
  2016-03-15  3:00 [PATCH net-next repost] openvswitch: allow output of MPLS packets on tunnel vports Simon Horman
       [not found] ` <1458010835-18555-1-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
@ 2016-03-18 22:27 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-03-18 22:27 UTC (permalink / raw)
  To: simon.horman; +Cc: pshelar, jesse, netdev, dev

From: Simon Horman <simon.horman@netronome.com>
Date: Tue, 15 Mar 2016 12:00:35 +0900

> 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 <simon.horman@netronome.com>

Applied, thanks.

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

end of thread, other threads:[~2016-03-18 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15  3:00 [PATCH net-next repost] openvswitch: allow output of MPLS packets on tunnel vports Simon Horman
     [not found] ` <1458010835-18555-1-git-send-email-simon.horman-wFxRvT7yatFl57MIdRCFDg@public.gmane.org>
2016-03-15 17:05   ` Jesse Gross
2016-03-18 22:27 ` David Miller

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).