From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 891845F4F for ; Mon, 26 Mar 2018 03:29:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Mar 2018 18:29:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,362,1517904000"; d="scan'208";a="41162181" Received: from dpdk6.bj.intel.com ([172.16.182.119]) by fmsmga001.fm.intel.com with ESMTP; 25 Mar 2018 18:29:52 -0700 From: Wei Zhao To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Wei Zhao Date: Mon, 26 Mar 2018 09:11:39 +0800 Message-Id: <1522026699-72770-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1521617103-4776-1-git-send-email-wei.zhao1@intel.com> References: <1521617103-4776-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v3] 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: Mon, 26 Mar 2018 01:29:56 -0000 I40e need a protection for rss rule flow configuration after one rule is set for a port. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao Tested-by: Peng Yuan --- Changes in v2: change fixes version number. Changes in v3: change ret default number. --- drivers/net/i40e/i40e_flow.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 16c47cf..69d1ba5 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 = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); + int ret; if (conf->queue_region_conf) { - i40e_flush_queue_region_all_conf(dev, hw, pf, 1); + ret = i40e_flush_queue_region_all_conf(dev, hw, pf, 1); conf->queue_region_conf = 0; } else { - i40e_config_rss_filter(pf, conf, 1); + ret = i40e_config_rss_filter(pf, conf, 1); } - return 0; + return ret; } static int @@ -4545,6 +4546,8 @@ i40e_flow_create(struct rte_eth_dev *dev, case RTE_ETH_FILTER_HASH: ret = i40e_config_rss_filter_set(dev, &cons_filter.rss_conf); + if (ret) + goto free_flow; flow->rule = &pf->rss_info; break; default: -- 2.7.5