From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id C8727DE3 for ; Mon, 16 Jan 2017 14:04:01 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id c206so174395063wme.0 for ; Mon, 16 Jan 2017 05:04:01 -0800 (PST) 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=FCQzz+8WTEtoJR4DpXVlosdLNTUxQy4gjetpK8rQ0xg=; b=bpBq5BbPV/uM85XfQ1IWvEa6AlyfWLDoxuCV1pjDhgghvK4/YeDt2nTWIglNglJ3cA FjZsuo6oGmhRijv318ocCvKc1FlTc1osYmyUBDOcEoKBY/lBcayiZaGbDhrZv6yBgVxP y1NR70nHdq+WibrkZHQT0e3kURqRGk9YinBsTL916wAyuMw8GSxa/eXBiCZGbJwyx+bD +wRgThYFsKwdsuCjdfLRRQI01gKhmHmgNyeJPIRlV4z7tColruM2yGi1l4IInm8DTlVX hHxJ1BoHna5IE9u+EAvvtObooB7KCRfaABV0zeDZ077ofYoeFFpyL1jPVtioier1aOez dOLw== 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=FCQzz+8WTEtoJR4DpXVlosdLNTUxQy4gjetpK8rQ0xg=; b=ATiyjsxowVwkjCz8xNbeWRqGbxSVwXbqUVpXTjhR4c8lhrM0Rqr6uxRcnwcwbKwXKI ruidOtjMF2jvLtKX+3wT3pToupHb51jkozxlG1po9YEniQZoHZyE0CsIVbo/Qs09JfYo QTK6aljkuoSDA2sySamSaDeXpMwJEOSpvPsfUaaUyO45pswSPt06NAfk8GjMZcPaWG5z 2CFeg60XlYYZN0kerZAhwunoAm0fMjost0PFU1FlPFLGn++FCVUGLiX6yRcS8ekSIYGA ZPYdj6bx23loY/U4LrxqMmcAxCowPwlu5bs9jnNenXggJ5V+E+6ZbwNF/rS9pwTuUxN7 kjAw== X-Gm-Message-State: AIkVDXLAHwqjr+76Xr50u/ZBOIuxmLqqcaaA51QNwzZug6wfmEfMDCNDCxBz89RUh2bevUsi X-Received: by 10.28.206.199 with SMTP id e190mr12612019wmg.98.1484571841377; Mon, 16 Jan 2017 05:04:01 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id w197sm28643515wmd.11.2017.01.16.05.03.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 05:03:59 -0800 (PST) Date: Mon, 16 Jan 2017 14:03:48 +0100 From: Adrien Mazarguil To: Wei Zhao Cc: dev@dpdk.org, Wenzhuo Lu Message-ID: <20170116130348.GA3779@6wind.com> References: <1484212665-1635-1-git-send-email-wei.zhao1@intel.com> <1484295192-34009-1-git-send-email-wei.zhao1@intel.com> <1484295192-34009-15-git-send-email-wei.zhao1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484295192-34009-15-git-send-email-wei.zhao1@intel.com> Subject: Re: [dpdk-dev] [PATCH v6 14/18] net/ixgbe: parse L2 tunnel filter 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: Mon, 16 Jan 2017 13:04:01 -0000 Hi, On Fri, Jan 13, 2017 at 04:13:08PM +0800, Wei Zhao wrote: > check if the rule is a L2 tunnel rule, and get the L2 tunnel info. > > Signed-off-by: Wei Zhao > Signed-off-by: Wenzhuo Lu > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 3 +- > drivers/net/ixgbe/ixgbe_flow.c | 216 +++++++++++++++++++++++++++++++++++++++ > lib/librte_ether/rte_flow.h | 48 +++++++++ > 3 files changed, 266 insertions(+), 1 deletion(-) [...] > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index 98084ac..7142479 100644 > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > @@ -268,6 +268,20 @@ enum rte_flow_item_type { > * See struct rte_flow_item_vxlan. > */ > RTE_FLOW_ITEM_TYPE_VXLAN, > + > + /** > + * Matches a E_TAG header. > + * > + * See struct rte_flow_item_e_tag. > + */ > + RTE_FLOW_ITEM_TYPE_E_TAG, > + > + /** > + * Matches a NVGRE header. > + * > + * See struct rte_flow_item_nvgre. > + */ > + RTE_FLOW_ITEM_TYPE_NVGRE, > }; > > /** > @@ -454,6 +468,40 @@ struct rte_flow_item_vxlan { > }; > > /** > + * RTE_FLOW_ITEM_TYPE_E_TAG. > + * > + * Matches a E-tag header. > + */ > +struct rte_flow_item_e_tag { > + uint16_t tpid; /**< Tag protocol identifier (0x893F). */ > + /** E-Tag control information (E-TCI). */ > + /**< E-PCP (3b), E-DEI (1b), ingress E-CID base (12b). */ > + uint16_t epcp_edei_in_ecid_b; > + /**< Reserved (2b), GRP (2b), E-CID base (12b). */ > + uint16_t rsvd_grp_ecid_b; > + uint8_t in_ecid_e; /**< Ingress E-CID ext. */ > + uint8_t ecid_e; /**< E-CID ext. */ > +}; > + > +/** > + * RTE_FLOW_ITEM_TYPE_NVGRE. > + * > + * Matches a NVGRE header. > + */ > +struct rte_flow_item_nvgre { > + /** > + * Checksum (1b), undefined (1b), key bit (1b), sequence number (1b), > + * reserved 0 (9b), version (3b). > + * > + * \c_k_s_rsvd0_ver must have value 0x2000 according to RFC 7637. > + */ > + uint16_t c_k_s_rsvd0_ver; > + uint16_t protocol; /**< Protocol type (0x6558). */ > + uint8_t tni[3]; /**< Virtual subnet ID. */ > + uint8_t flow_id; /**< Flow ID. */ > +}; > + > +/** > * Matching pattern item definition. > * > * A pattern is formed by stacking items starting from the lowest protocol > -- > 2.5.5 > OK for these definitions, however API documentation (doc/guides/prog_guide/rte_flow.rst) must be kept up to date, and it would be great if testpmd support for these new items was added simultaneously (changes in app/test-pmd/cmdline.c, app/test-pmd/cmdline_flow.c and doc/guides/testpmd_app_ug/testpmd_funcs.rst). How about putting all rte_flow changes (API & testpmd) in their own separate patch? You could use VLAN PCP/DEI/VID definitions as an example to expose partial bit-fields (e.g. epcp_edei_in_ecid_b) in testpmd, see: 1419fd5a6c9f ("app/testpmd: add protocol fields to flow command") Now if re-spinning this series yet again is too much work, you can go ahead with this commit as long as you do not forget to submit the rest later, thanks. -- Adrien Mazarguil 6WIND