From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D843F11D4 for ; Thu, 25 Jan 2018 06:40:17 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 21:40:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="22160142" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 24 Jan 2018 21:40:16 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 Jan 2018 21:40:16 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 Jan 2018 21:40:15 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Thu, 25 Jan 2018 13:40:13 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix issues for RSS flow API Thread-Index: AQHTlBaasPqn5PtebEGJutTC2tX33aOEFRtQ Date: Thu, 25 Jan 2018 05:40:13 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153133847@SHSMSX103.ccr.corp.intel.com> References: <20180123064302.118082-1-wei.zhao1@intel.com> In-Reply-To: <20180123064302.118082-1-wei.zhao1@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: [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] 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: Thu, 25 Jan 2018 05:40:18 -0000 Hi Wei: =09 > -----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 >=20 > This patch fix issues check from DPDK coverity issues. >=20 > Fixes: ecad87d22383e ("net/i40e: move RSS to flow API") Coverity issues: > 257020 257024 257037 >=20 > 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(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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); > } >=20 > - return i40e_hw_rss_hash_set(pf, &rss_conf); > + i40e_hw_rss_hash_set(pf, &rss_conf); >=20 > 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; >=20 > 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, >=20 > 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, > } >=20 > rss_config->queue_region_conf =3D TRUE; > - return 0; > } Seems if you remove return 0, rss_config->queue_region_conf will be overwri= te by FALSE at end, right? >=20 > if (!rss || !rss->num) { > -- > 2.9.3