From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 3/5] ethdev: introduce tunnel type MPLS-in-GRE and MPLS-in-UDP Date: Wed, 11 Apr 2018 11:58:28 +0200 Message-ID: <20180411095828.GI4957@6wind.com> References: <20180226150947.107179-2-xuemingl@mellanox.com> <20180410130036.188819-4-xuemingl@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , Nelio Laranjeiro , Shahaf Shuler , dev@dpdk.org, Olivier Matz To: Xueming Li Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 53F951BB13 for ; Wed, 11 Apr 2018 11:58:42 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id r131so2666100wmb.2 for ; Wed, 11 Apr 2018 02:58:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180410130036.188819-4-xuemingl@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Apr 10, 2018 at 09:00:34PM +0800, Xueming Li wrote: > This patch adds new tunnel type for MPLS-in-GRE and MPLS-in-UDP. > > MPLS-in-GRE protocol link: > https://tools.ietf.org/html/rfc4023 > > MPLS-in-UDP protocol link: > https://tools.ietf.org/html/rfc7510 > > Signed-off-by: Xueming Li Minor comments below, otherwise: Acked-by: Adrien Mazarguil > --- > lib/librte_mbuf/rte_mbuf_ptype.c | 2 ++ > lib/librte_mbuf/rte_mbuf_ptype.h | 34 ++++++++++++++++++++++++++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c > index 49106c7df..10abfe89c 100644 > --- a/lib/librte_mbuf/rte_mbuf_ptype.c > +++ b/lib/librte_mbuf/rte_mbuf_ptype.c > @@ -66,6 +66,8 @@ const char *rte_get_ptype_tunnel_name(uint32_t ptype) > case RTE_PTYPE_TUNNEL_ESP: return "TUNNEL_ESP"; > case RTE_PTYPE_TUNNEL_L2TP: return "TUNNEL_L2TP"; > case RTE_PTYPE_TUNNEL_VXLAN_GPE: return "TUNNEL_VXLAN_GPE"; > + case RTE_PTYPE_TUNNEL_MPLS_IN_UDP: return "TUNNEL_MPLS-IN-UDP"; > + case RTE_PTYPE_TUNNEL_MPLS_IN_GRE: return "TUNNEL_MPLS-IN-GRE"; > default: return "TUNNEL_UNKNOWN"; > } > } > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h > index 7caf83312..a70cc7a4e 100644 > --- a/lib/librte_mbuf/rte_mbuf_ptype.h > +++ b/lib/librte_mbuf/rte_mbuf_ptype.h > @@ -436,6 +436,40 @@ extern "C" { > */ > #define RTE_PTYPE_TUNNEL_VXLAN_GPE 0x0000b000 > /** > + * MPLS-in-GRE tunneling packet type. How about mentioning "(RFC 4023)"? > + * > + * Packet format: > + * <'ether type'=0x0800 > + * | 'version'=4, 'protocol'=47 > + * | 'protocol'=0x8847> > + * or, > + * <'ether type'=0x0800 > + * | 'version'=4, 'protocol'=47 > + * | 'protocol'=0x8848> > + * or, > + * <'ether type'=0x86DD > + * | 'version'=6, 'protocol'=47 > + * | 'protocol'=0x8847> > + * or, > + * <'ether type'=0x86DD > + * | 'version'=6, 'next header'=47 > + * | 'protocol'=0x8848> > + */ > +#define RTE_PTYPE_TUNNEL_MPLS_IN_GRE 0x0000c000 > +/** > + * MPLS-in-UDP tunneling packet type. Here also with "(RFC 7510)". > + * > + * Packet format: > + * <'ether type'=0x0800 > + * | 'version'=4, 'protocol'=17 > + * | 'destination port'=6635> > + * or, > + * <'ether type'=0x86DD > + * | 'version'=6, 'next header'=17 > + * | 'destination port'=6635> > + */ > +#define RTE_PTYPE_TUNNEL_MPLS_IN_UDP 0x0000d000 > +/** > * Mask of tunneling packet types. > */ > #define RTE_PTYPE_TUNNEL_MASK 0x0000f000 > -- > 2.13.3 > -- Adrien Mazarguil 6WIND