From patchwork Wed Jul 13 05:26:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pravin Shelar X-Patchwork-Id: 647721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rq6lk5KFdz9sBX for ; Wed, 13 Jul 2016 15:27:14 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B9FD8109D1; Tue, 12 Jul 2016 22:27:12 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 0E25C10925 for ; Tue, 12 Jul 2016 22:27:10 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 8F199162C8A for ; Tue, 12 Jul 2016 23:27:09 -0600 (MDT) X-ASG-Debug-ID: 1468387629-0b32370ec6023a0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar6.cudamail.com with ESMTP id 0vlKvKkzfoab9EK1 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Jul 2016 23:27:09 -0600 (MDT) X-Barracuda-Envelope-From: pshelar@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO relay5-d.mail.gandi.net) (217.70.183.197) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 13 Jul 2016 05:27:08 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at ovn.org designates 217.70.183.197 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.197 X-Barracuda-RBL-IP: 217.70.183.197 Received: from mfilter47-d.gandi.net (mfilter47-d.gandi.net [217.70.178.178]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id B3AE941C095; Wed, 13 Jul 2016 07:27:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter47-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter47-d.gandi.net (mfilter47-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id YsLiFGW7lSWs; Wed, 13 Jul 2016 07:27:06 +0200 (CEST) X-Originating-IP: 24.130.10.65 Received: from localhost.localdomain.localdomain (c-24-130-10-65.hsd1.ca.comcast.net [24.130.10.65]) (Authenticated sender: pshelar@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9D61841C08B; Wed, 13 Jul 2016 07:27:05 +0200 (CEST) X-CudaMail-Envelope-Sender: pshelar@ovn.org From: Pravin B Shelar To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-711093950 X-CudaMail-DTE: 071216 X-CudaMail-Originating-IP: 217.70.183.197 Date: Tue, 12 Jul 2016 22:26:34 -0700 X-ASG-Orig-Subj: [##CM-E2-711093950##][PATCH 11/24] datapath: backport: allow output of MPLS packets on tunnel vports Message-Id: <1468387602-61955-2-git-send-email-pshelar@ovn.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1468387602-61955-1-git-send-email-pshelar@ovn.org> References: <1468387602-61955-1-git-send-email-pshelar@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1468387629 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 11/24] datapath: backport: allow output of MPLS packets on tunnel vports X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Upstream commit: commit fe3a5f6c795810edb1646a840fec3c8c350c2a4e Author: Simon Horman openvswitch: allow output of MPLS packets on tunnel vports 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 Reviewed-by: Jesse Gross Signed-off-by: David S. Miller Signed-off-by: Pravin B Shelar --- datapath/flow_netlink.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 0d9daa5..b8e8799 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -2048,9 +2048,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. */