From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 11DED1B34A; Fri, 26 Jan 2018 08:32:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2018 23:32:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,415,1511856000"; d="scan'208";a="25606105" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 25 Jan 2018 23:32:57 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Jan 2018 23:32:57 -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; Thu, 25 Jan 2018 23:32:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Fri, 26 Jan 2018 15:32:55 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH v2] net/i40e: fix issue for RSS flow API Thread-Index: AQHTllQKR/GyKlJFP0e8QXU6GX9Oo6OFwtfQ Date: Fri, 26 Jan 2018 07:32:54 +0000 Message-ID: <039ED4275CED7440929022BC67E706115313C36B@shsmsx102.ccr.corp.intel.com> References: <20180123064302.118082-1-wei.zhao1@intel.com> <20180126030817.38021-1-wei.zhao1@intel.com> In-Reply-To: <20180126030817.38021-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 v2] net/i40e: fix issue 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 07:32:59 -0000 > -----Original Message----- > From: Zhao1, Wei > Sent: Friday, January 26, 2018 11:08 AM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; stable@dpdk.org; Zhao1, Wei > > Subject: [PATCH v2] net/i40e: fix issue for RSS flow API >=20 > This patch fix issue check from DPDK coverity issues. >=20 > Fixes: ecad87d22383e ("net/i40e: move RSS to flow API") Coverity issue: > 257020 257024 257037 >=20 > Signed-off-by: Wei Zhao >=20 > --- >=20 > v2: > -fix an error introduced in v1 patch. > --- > drivers/net/i40e/i40e_ethdev.c | 2 +- > drivers/net/i40e/i40e_flow.c | 7 +++++-- > 2 files changed, 6 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..2cb9c64 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,9 > +4314,11 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, > } >=20 > rss_config->queue_region_conf =3D TRUE; > - return 0; > } >=20 > + if (rss_config->queue_region_conf) > + return 0; > + > if (!rss || !rss->num) { > rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > -- > 2.9.3 Acked-by: Qi Zhang