[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOrHB_DBWCgDXNBry6SxTx3pe7brnYqOEiWHzbDtz6zy4d3HCQ@mail.gmail.com>
Date: Thu, 12 Dec 2019 19:16:54 -0800
From: Pravin Shelar <pshelar@....org>
To: Martin Varghese <martinvarghesenokia@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>, scott.drennan@...ia.com,
Jiri Benc <jbenc@...hat.com>,
"Varghese, Martin (Nokia - IN/Bangalore)" <martin.varghese@...ia.com>
Subject: Re: [PATCH net-next v2 3/3] openvswitch: New MPLS actions for layer 2 tunnelling
On Thu, Dec 12, 2019 at 6:35 AM Martin Varghese
<martinvarghesenokia@...il.com> wrote:
>
> From: Martin Varghese <martin.varghese@...ia.com>
>
> 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 PTAP_PUSH_MPLS inserts MPLS header at specified offset
> from the start of packet.
>
> A special handling is added for ethertype 0 in the existing POP MPLS action.
> Value 0 in ethertype indicates the tunnelled packet is ethernet.
>
> Signed-off-by: Martin Varghese <martin.varghese@...ia.com>
> ---
> include/uapi/linux/openvswitch.h | 21 ++++++++++++++++++++-
> net/openvswitch/actions.c | 26 ++++++++++++++++++++------
> net/openvswitch/flow_netlink.c | 15 +++++++++++++++
> 3 files changed, 55 insertions(+), 7 deletions(-)
>
> diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
> index a87b44c..aaf7d3a 100644
> --- a/include/uapi/linux/openvswitch.h
> +++ b/include/uapi/linux/openvswitch.h
> @@ -673,6 +673,23 @@ struct ovs_action_push_mpls {
> };
>
> /**
> + * struct ovs_action_ptap_push_mpls - %OVS_ACTION_ATTR_PTAP_PUSH_MPLS action
> + * argument.
> + * @mpls_lse: MPLS label stack entry to push.
> + * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame.
> + * @mac_len: Offset from start of packet at which MPLS header is pushed.
> + *
> + * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and
> + * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected.
> + */
> +struct ovs_action_ptap_push_mpls {
> + __be32 mpls_lse;
> + __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
> + __u16 mac_len;
> +};
> +
Can you make changes according to comments in other thread.
Powered by blists - more mailing lists