From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09CCBC2D0C3 for ; Sat, 21 Dec 2019 17:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D80342070C for ; Sat, 21 Dec 2019 17:26:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfLUR0R (ORCPT ); Sat, 21 Dec 2019 12:26:17 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:39695 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbfLUR0R (ORCPT ); Sat, 21 Dec 2019 12:26:17 -0500 X-Originating-IP: 209.85.217.51 Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) (Authenticated sender: pshelar@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id CA7F3C0004 for ; Sat, 21 Dec 2019 17:26:15 +0000 (UTC) Received: by mail-vs1-f51.google.com with SMTP id b79so8147500vsd.9 for ; Sat, 21 Dec 2019 09:26:15 -0800 (PST) X-Gm-Message-State: APjAAAUwprhMlIF6bFOnsR1ODNuFwhMDsfpU11ALMN0ZwT5rXXDmdlBI /LIhiLp+/6OVZvVSqzFAuR7ozbcVr+CjBh6wQGU= X-Google-Smtp-Source: APXvYqyzJnXpORZc8zNY2BbbNUGad2VRouiB5tgfb8A40hbv1fY4kA+EthH2zpKGbbZgQg0XEO0Navglppe1jOhIsLY= X-Received: by 2002:a67:2701:: with SMTP id n1mr12102497vsn.103.1576949174666; Sat, 21 Dec 2019 09:26:14 -0800 (PST) MIME-Version: 1.0 References: <4cb29736c3fad6d660df246ef75623db0bd4a864.1576896417.git.martin.varghese@nokia.com> In-Reply-To: <4cb29736c3fad6d660df246ef75623db0bd4a864.1576896417.git.martin.varghese@nokia.com> From: Pravin Shelar Date: Sat, 21 Dec 2019 09:26:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v5 3/3] openvswitch: New MPLS actions for layer 2 tunnelling To: Martin Varghese Cc: Linux Kernel Network Developers , "David S. Miller" , scott.drennan@nokia.com, Jiri Benc , "Varghese, Martin (Nokia - IN/Bangalore)" Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Dec 20, 2019 at 7:21 PM Martin Varghese wrote: > > From: Martin Varghese > > The existing PUSH MPLS action inserts MPLS header between ethernet header > and the IP header. Though this behaviour is fine for L3 VPN where an IP > packet is encapsulated inside a MPLS tunnel, it does not suffice the L2 > VPN (l2 tunnelling) requirements. In L2 VPN the MPLS header should > encapsulate the ethernet packet. > > The new mpls action ADD_MPLS inserts MPLS header at the start of the > packet or at the start of the l3 header depending on the value of l3 tunnel > flag in the ADD_MPLS arguments. > > POP_MPLS action is extended to support ethertype 0x6558. > > Signed-off-by: Martin Varghese > --- > Changes in v2: > - PTAP_POP_MPLS action removed. > - Special handling for ethertype 0 added in PUSH_MPLS. > - Refactored push_mpls function to cater existing push_mpls and > ptap_push_mpls actions. > - mac len to specify the MPLS header location added in PTAP_PUSH_MPLS > arguments. > > Changes in v3: > - Special handling for ethertype 0 removed. > - Added support for ether type 0x6558. > - Removed mac len from PTAP_PUSH_MPLS argument list > - used l2_tun flag to distinguish l2 and l3 tunnelling. > - Extended PTAP_PUSH_MPLS handling to cater PUSH_MPLS action also. > > Changes in v4: > - Removed extra blank lines. > - Replaced bool l2_tun with u16 tun flags in > struct ovs_action_ptap_push_mpls. > > Changes in v5: > - Renamed PTAP_PUSH_MPLS action to ADD_MPLS. > - Replaced l2 tunnel flag with l3 tunnel flag. > - In ADD_MPLS configuration, the code to check for l2 header is > changed from (mac_proto != MAC_PROTO_NONE) to > (mac_proto == MAC_PROTO_ETHERNET). > > include/uapi/linux/openvswitch.h | 31 +++++++++++++++++++++++++++++++ > net/openvswitch/actions.c | 30 ++++++++++++++++++++++++------ > net/openvswitch/flow_netlink.c | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 89 insertions(+), 6 deletions(-) > Looks good to me. Acked-by: Pravin B Shelar Thanks.