From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 513471B1AF for ; Fri, 26 Jan 2018 04:17:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2018 19:17:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,414,1511856000"; d="scan'208";a="22656314" Received: from pgsmsx112-dag.png.intel.com (HELO PGSMSX112.gar.corp.intel.com) ([10.108.55.234]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jan 2018 19:17:56 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.108]) by PGSMSX112.gar.corp.intel.com ([169.254.3.86]) with mapi id 14.03.0319.002; Fri, 26 Jan 2018 11:17:55 +0800 From: "Zhao1, Wei" To: "Zhang, Qi Z" , "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix issues for RSS flow API Thread-Index: AQHTlBagiOXP4qzTFUa8jy+4bMDqj6ODj6eAgAHwdAA= Date: Fri, 26 Jan 2018 03:17:55 +0000 Message-ID: References: <20180123064302.118082-1-wei.zhao1@intel.com> <039ED4275CED7440929022BC67E7061153133847@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061153133847@SHSMSX103.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: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix issues for RSS 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: , X-List-Received-Date: Fri, 26 Jan 2018 03:17:58 -0000 Hi, zhang qi V2 for this patch. Thanks. https://dpdk.org/dev/patchwork/patch/34533/ > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, January 25, 2018 1:40 PM > To: Zhao1, Wei ; dev@dpdk.org > Subject: RE: [PATCH] net/i40e: fix issues for RSS flow API >=20 > Hi Wei: >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Tuesday, January 23, 2018 2:43 PM > > To: dev@dpdk.org > > Cc: Zhang, Qi Z ; Zhao1, Wei > > > > Subject: [PATCH] net/i40e: fix issues for RSS flow API > > > > This patch fix issues check from DPDK coverity issues. > > > > Fixes: ecad87d22383e ("net/i40e: move RSS to flow API") Coverity issues= : > > 257020 257024 257037 > > > > Signed-off-by: Wei Zhao > > --- > > drivers/net/i40e/i40e_ethdev.c | 2 +- > > drivers/net/i40e/i40e_flow.c | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index 5ea9f99..b0db458 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -11681,7 +11681,7 @@ i40e_config_rss_filter(struct i40e_pf *pf, > > sizeof(uint32_t); > > } > > > > - return i40e_hw_rss_hash_set(pf, &rss_conf); > > + i40e_hw_rss_hash_set(pf, &rss_conf); > > > > rte_memcpy(rss_info, > > conf, sizeof(struct i40e_rte_flow_rss_conf)); diff --git > > a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index > > cd9a9b6..a23f485 100644 > > --- a/drivers/net/i40e/i40e_flow.c > > +++ b/drivers/net/i40e/i40e_flow.c > > @@ -4201,6 +4201,7 @@ i40e_flow_parse_rss_action(struct rte_eth_dev > > *dev, > > struct i40e_rte_flow_rss_conf *rss_info =3D &pf->rss_info; > > uint16_t i, j, n, tmp; > > uint32_t index =3D 0; > > + uint64_t hf_bit =3D 1; > > > > NEXT_ITEM_OF_ACTION(act, actions, index); > > rss =3D (const struct rte_flow_action_rss *)act->conf; @@ -4219,7 > > +4220,7 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > > > > if (action_flag) { > > for (n =3D 0; n < 64; n++) { > > - if (rss->rss_conf->rss_hf & (1 << n)) { > > + if (rss->rss_conf->rss_hf & (hf_bit << n)) { > > conf_info->region[0].hw_flowtype[0] =3D n; > > conf_info->region[0].flowtype_num =3D 1; > > conf_info->queue_region_number =3D 1; @@ - > 4313,7 > > +4314,6 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > > } > > > > rss_config->queue_region_conf =3D TRUE; > > - return 0; > > } >=20 > Seems if you remove return 0, rss_config->queue_region_conf will be > overwrite by FALSE at end, right? > > > > if (!rss || !rss->num) { > > -- > > 2.9.3