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 8ECDF5F2B for ; Thu, 22 Mar 2018 13:39:31 +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; 22 Mar 2018 05:39:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,344,1517904000"; d="scan'208";a="40247482" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 22 Mar 2018 05:39:29 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 22 Mar 2018 05:39:29 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 22 Mar 2018 05:39:29 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.235]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.166]) with mapi id 14.03.0319.002; Thu, 22 Mar 2018 20:39:27 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "dev@dpdk.org" Thread-Topic: [PATCH v2] net/i40e: fix flow RSS configuration error Thread-Index: AQHTwOhErPO9VUE20km1Y8z+IaHyA6PcMQBg Date: Thu, 22 Mar 2018 12:39:27 +0000 Message-ID: <039ED4275CED7440929022BC67E70611531711B0@SHSMSX103.ccr.corp.intel.com> References: <1521617103-4776-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1521617103-4776-1-git-send-email-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 flow RSS configuration error 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, 22 Mar 2018 12:39:32 -0000 > -----Original Message----- > From: Zhao1, Wei > Sent: Wednesday, March 21, 2018 3:25 PM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Zhao1, Wei > Subject: [PATCH v2] net/i40e: fix flow RSS configuration error >=20 > I40e need a protection for rss rule flow configuration after one rule is = set for a > port. >=20 > Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") > Signed-off-by: Wei Zhao > Tested-by: Peng Yuan > --- > Changes in v2: >=20 > change fixes version number. > --- > drivers/net/i40e/i40e_flow.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c = index > 16c47cf..7268426 100644 > --- a/drivers/net/i40e/i40e_flow.c > +++ b/drivers/net/i40e/i40e_flow.c > @@ -4385,14 +4385,15 @@ i40e_config_rss_filter_set(struct rte_eth_dev > *dev, { > struct i40e_pf *pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); > struct i40e_hw *hw =3D > I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + int ret =3D -ENOTSUP; Why ret be initialized to -ENOTSUP?, there is no default behavior needed he= re. >=20 > if (conf->queue_region_conf) { > - i40e_flush_queue_region_all_conf(dev, hw, pf, 1); > + ret =3D i40e_flush_queue_region_all_conf(dev, hw, pf, 1); > conf->queue_region_conf =3D 0; > } else { > - i40e_config_rss_filter(pf, conf, 1); > + ret =3D i40e_config_rss_filter(pf, conf, 1); > } > - return 0; > + return ret; > } >=20 > static int > @@ -4545,6 +4546,8 @@ i40e_flow_create(struct rte_eth_dev *dev, > case RTE_ETH_FILTER_HASH: > ret =3D i40e_config_rss_filter_set(dev, > &cons_filter.rss_conf); > + if (ret) > + goto free_flow; > flow->rule =3D &pf->rss_info; > break; > default: > -- > 2.7.5