From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7B011F6D2 for ; Fri, 13 Jan 2017 12:18:26 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 13 Jan 2017 03:18:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,221,1477983600"; d="scan'208";a="212924696" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by fmsmga004.fm.intel.com with ESMTP; 13 Jan 2017 03:18:24 -0800 To: Wei Zhao , dev@dpdk.org, Adrien Mazarguil 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> Cc: Wenzhuo Lu From: Ferruh Yigit Message-ID: <5ec71ba0-7572-632b-3a53-68b4beea2842@intel.com> Date: Fri, 13 Jan 2017 11:18:22 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484295192-34009-15-git-send-email-wei.zhao1@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Fri, 13 Jan 2017 11:18:26 -0000 On 1/13/2017 8:13 AM, 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(-) > <...> Hi Adrien, Can you please review rte_flow related part of the patch below? I am OK with rest of the patch, and planning to apply to next-net if you don't have any objection. Thanks, ferruh > > 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 >