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 A62657CDF for ; Mon, 5 Jun 2017 04:40:08 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2017 19:40:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,298,1493708400"; d="scan'208";a="1137960010" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by orsmga001.jf.intel.com with ESMTP; 04 Jun 2017 19:40:06 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.82]) by PGSMSX102.gar.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0319.002; Mon, 5 Jun 2017 10:39:34 +0800 From: "Zhao1, Wei" To: "Lu, Wenzhuo" , "dev@dpdk.org" Thread-Topic: [PATCH v2 05/11] net/e1000: parse n-tuple filter Thread-Index: AQHS22vd2KnQWMicLkG97rsCWmHhoKIU9xuAgACN+oD//4ccgIAAhkGw Date: Mon, 5 Jun 2017 02:39:34 +0000 Message-ID: References: <1495523581-56027-1-git-send-email-wei.zhao1@intel.com> <1496385391-12445-1-git-send-email-wei.zhao1@intel.com> <1496385391-12445-6-git-send-email-wei.zhao1@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B5CBA66@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B5CBAAE@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B5CBAAE@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 05/11] net/e1000: parse n-tuple 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, 05 Jun 2017 02:40:09 -0000 Hi, wenzhuo > -----Original Message----- > From: Lu, Wenzhuo > Sent: Monday, June 5, 2017 10:37 AM > To: Zhao1, Wei ; dev@dpdk.org > Subject: RE: [PATCH v2 05/11] net/e1000: parse n-tuple filter >=20 > Hi Wei, >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Monday, June 5, 2017 9:55 AM > > To: Lu, Wenzhuo; dev@dpdk.org > > Subject: RE: [PATCH v2 05/11] net/e1000: parse n-tuple filter > > > > HI, wenzhuo > > > > > -----Original Message----- > > > From: Lu, Wenzhuo > > > Sent: Monday, June 5, 2017 9:21 AM > > > To: Zhao1, Wei ; dev@dpdk.org > > > Subject: RE: [PATCH v2 05/11] net/e1000: parse n-tuple filter > > > > > > Hi Wei, > > > > > > > -----Original Message----- > > > > From: Zhao1, Wei > > > > Sent: Friday, June 2, 2017 2:36 PM > > > > To: dev@dpdk.org > > > > Cc: Lu, Wenzhuo; Zhao1, Wei > > > > Subject: [PATCH v2 05/11] net/e1000: parse n-tuple filter > > > > > > > > Add rule validate function and check if the rule is a n-tuple > > > > rule, and get the n-tuple info. > > > > > > > > Signed-off-by: Wei Zhao > > > > --- > > > > drivers/net/e1000/Makefile | 1 + > > > > drivers/net/e1000/e1000_ethdev.h | 9 + > > > > drivers/net/e1000/igb_ethdev.c | 14 +- > > > > drivers/net/e1000/igb_flow.c | 505 > > > > +++++++++++++++++++++++++++++++++++++++ > > > > 4 files changed, 521 insertions(+), 8 deletions(-) create mode > > > > 100644 > > > > > > > + > > > > + if (hw->mac.type =3D=3D e1000_82576) { > > > > + if (filter->queue >=3D IGB_MAX_RX_QUEUE_NUM_82576) { > > > > + memset(filter, 0, sizeof(struct > > > rte_eth_ntuple_filter)); > > > > + rte_flow_error_set(error, EINVAL, > > > > + RTE_FLOW_ERROR_TYPE_ITEM, > > > > + NULL, "queue number not " > > > > + "supported by ntuple filter"); > > > > + return -rte_errno; > > > > + } > > > > + filter->flags |=3D RTE_5TUPLE_FLAGS; > > > To my opinion, that the filter is 5-tuple or 2-tuple should depend > > > on the input pattern. I don't understand why it's set based on the NI= C > type. > > > > This is because i350 and 82580 nic only support 2 tuple filter, But > > 82576 support 5 tuple filter. > > This is list in function igb_add_del_ntuple_filter(). > I mean the tuple is only related to the input. > For example, APP can input a 5-tuple pattern, driver should know it's a 5= - > tuple. Then the driver checks the NIC type, if it's i350, driver can retu= rn > unsupported. >=20 Ok, this request is reasonable, I will change as this requirement in v3 lat= er. > > > > > > > > > > > + } else { > > > > + if (filter->queue >=3D IGB_MAX_RX_QUEUE_NUM) { > > > > + memset(filter, 0, sizeof(struct > > > rte_eth_ntuple_filter)); > > > > + rte_flow_error_set(error, EINVAL, > > > > + RTE_FLOW_ERROR_TYPE_ITEM, > > > > + NULL, "queue number not " > > > > + "supported by ntuple filter"); > > > > + return -rte_errno; > > > > + } > > > > + filter->flags |=3D RTE_2TUPLE_FLAGS; > > > > + }