From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 41B5A9AB2 for ; Thu, 19 May 2016 14:27:03 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1b3N4f-0000sS-Gu; Thu, 19 May 2016 14:29:10 +0200 To: Jingjing Wu , helin.zhang@intel.com References: <1462254672-6563-1-git-send-email-jingjing.wu@intel.com> <1462254672-6563-2-git-send-email-jingjing.wu@intel.com> Cc: dev@dpdk.org From: Olivier Matz Message-ID: <573DB10E.3050300@6wind.com> Date: Thu, 19 May 2016 14:26:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <1462254672-6563-2-git-send-email-jingjing.wu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2016 12:27:03 -0000 Hi Jingjing, On 05/03/2016 07:51 AM, Jingjing Wu wrote: > Signed-off-by: Jingjing Wu > --- > lib/librte_mbuf/rte_mbuf.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index 529debb..79edae3 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -274,6 +274,13 @@ extern "C" { > */ > #define RTE_PTYPE_L2_ETHER_LLDP 0x00000004 > /** > + * NSH (Network Service Header) packet type. > + * > + * Packet format: > + * <'ether type'=0x894F> > + */ > +#define RTE_PTYPE_L2_ETHER_NSH 0x00000005 > +/** > * Mask of layer 2 packet types. > * It is used for outer packet for tunneling cases. > */ > Acked-by: Olivier Matz I have no objection for this patch, but it makes me think about 2 things: - we have the room for 16 types for each layer, maybe we should start to be careful about which types should be supported to avoid running out of types in the future. - The types supported in outer and inner have diverged. It would have been better to have something like: #define RTE_PTYPE_INNER_$type (RTE_PTYPE_$type << 16) Because it would make the software using the packet types simpler. It's maybe a bit late now because it would break the ABI, but this is something we could keep in mind in case we change the ABI for another reason. Regards, Olivier