From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5422DA0471 for ; Fri, 21 Jun 2019 07:48:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11CF51D50A; Fri, 21 Jun 2019 07:48:00 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9D6EB1D509 for ; Fri, 21 Jun 2019 07:47:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 22:47:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,399,1557212400"; d="scan'208";a="311895956" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 20 Jun 2019 22:47:55 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Jun 2019 22:47:55 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 20 Jun 2019 22:47:55 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.87]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.185]) with mapi id 14.03.0439.000; Fri, 21 Jun 2019 13:47:53 +0800 From: "Yang, Qiming" To: "Wang, Xiao W" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Xing, Beilei" Thread-Topic: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API Thread-Index: AQHVJype8yN6vuKliEaqVPsHlbvAlaajwbUAgAHYX8A= Date: Fri, 21 Jun 2019 05:47:53 +0000 Message-ID: References: <1559552722-8970-1-git-send-email-qiming.yang@intel.com> <20190620053449.32959-1-qiming.yang@intel.com> <20190620053449.32959-3-qiming.yang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Xiao Other comments are all fixed. Left this one. "fields & (~inset)" can't replace it.=20 Qiming -----Original Message----- From: Wang, Xiao W=20 Sent: Thursday, June 20, 2019 5:32 PM To: Yang, Qiming ; dev@dpdk.org Cc: Zhang, Qi Z ; Xing, Beilei Subject: RE: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API Hi, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang > Sent: Thursday, June 20, 2019 1:35 PM > To: dev@dpdk.org > Cc: Yang, Qiming > Subject: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API >=20 > This patch adds ice_flow_create, ice_flow_destroy, ice_flow_flush and=20 > ice_flow_validate support, these are used to handle all the generic=20 > filters. >=20 > Signed-off-by: Qiming Yang > --- > drivers/net/ice/Makefile | 1 + > drivers/net/ice/ice_ethdev.c | 44 +++ > drivers/net/ice/ice_ethdev.h | 5 + > drivers/net/ice/ice_generic_flow.c | 682 > +++++++++++++++++++++++++++++++++++++ > drivers/net/ice/ice_generic_flow.h | 654 > +++++++++++++++++++++++++++++++++++ > drivers/net/ice/meson.build | 1 + > 6 files changed, 1387 insertions(+) > create mode 100644 drivers/net/ice/ice_generic_flow.c > create mode 100644 drivers/net/ice/ice_generic_flow.h >=20 [...] > + > +static int ice_flow_valid_inset(const struct rte_flow_item pattern[], > + uint64_t inset, struct rte_flow_error *error) { > + uint64_t fields; > + > + /* get valid field */ > + fields =3D ice_get_flow_field(pattern, error); > + if ((!fields) || (fields && (!inset))) { Maybe the intention is to : fields & (~inset), checking if the user's input= set exceeds support scope. > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM_SPEC, > + pattern, > + "Invalid input set"); > + return -rte_errno; > + } > + > + return 0;