From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FKiYill/H3VEW+BYjZvZERXFqD1aCvKmDsaqHSsSoJM=; b=CGqN+FpdG4+iO4ch3qvUsOoEOYowvE3VOfqHDPmsJoDgcvFQ2k2Fpzz6hR22goI9m9 W6mQZcRsiLent3cn/6D0ERNO5474dnHyF2j9Mnx0a5RlDteqaOA9ThsnoGmWmvqRpkuq AVo+Cp31MTRKHZjlLemb7qFgX9U83BODwiSq0kX2Rc5s/XLYWLKwOXnMfgPxyG0Vyuo0 z+ldFL7YdTfEecx1w1Mv+yCo3xRFiIfiO5NozBptkOwwscDMEV8QQbrblCVihtUjnngQ LeZNj1Z9H1647NCGoRIz3Re24LJdHJpPR0dFEDSdPgPY4IXo6FSdF+Qrj6l013THAjo8 KOlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FKiYill/H3VEW+BYjZvZERXFqD1aCvKmDsaqHSsSoJM=; b=iwnGXJkqch2CuSa5B9XKEEwLXWjE+yMDdVqVXugYoh3RrPMr+N+2BPCsvxW3ZQx8u+ aLhcVx+y7HRNS0jWoCRQWLGNdexvoNVjGu1e0PVTLNPdD/YJBUPjVckA2XhhuM6qk/dj t/hH2Ck+U21mVY0jByQivt7H3mQ9I+/Ddi6Z7tO66Vfpd6cbETCN8gVHniqYIwyYgXx6 MCraGLo9XcQtk/fv6CS1tbX+qQpQTDwely1QM4MK8AOtK9y273/MIInPvpCNyOmVkEgu ujTuG8hBjPRtrP0N4XcB2RF/MinPXZlnpHVq/dF2VcWFA126SEZ6/Roqqpt9lbba51ma yLZA== X-Gm-Message-State: ALQs6tC2Wzt0hzTFAB7S3MqL74b3A8AX6Dm0yaZZkYXQwa0cS1e/pOuz c495c4Ses+vRr2yIOdjg9EB8XA== X-Google-Smtp-Source: AIpwx4+yzC1c6xw8xuoWV4wOiuTqDRF2nbIgVdvOXDlo/A9JCeCFEhZ8sICDPnuCLBmx7xW2Z5enXw== X-Received: by 10.28.66.90 with SMTP id p87mr2239060wma.58.1523440722108; Wed, 11 Apr 2018 02:58:42 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h190sm1339063wmd.22.2018.04.11.02.58.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 02:58:41 -0700 (PDT) Date: Wed, 11 Apr 2018 11:58:28 +0200 From: Adrien Mazarguil To: Xueming Li Cc: Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , Nelio Laranjeiro , Shahaf Shuler , dev@dpdk.org, Olivier Matz 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 Content-Disposition: inline In-Reply-To: <20180410130036.188819-4-xuemingl@mellanox.com> Subject: Re: [dpdk-dev] [PATCH v2 3/5] ethdev: introduce tunnel type MPLS-in-GRE and MPLS-in-UDP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 09:58:42 -0000 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