DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH v3] net/i40e: fix flow RSS configuration error
Date: Mon, 26 Mar 2018 09:11:39 +0800	[thread overview]
Message-ID: <1522026699-72770-1-git-send-email-wei.zhao1@intel.com> (raw)
In-Reply-To: <1521617103-4776-1-git-send-email-wei.zhao1@intel.com>

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 <wei.zhao1@intel.com>
Tested-by: Peng Yuan <yuan.peng@intel.com>
---
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

  parent reply	other threads:[~2018-03-26  1:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21  7:25 [dpdk-dev] [PATCH v2] " Wei Zhao
2018-03-22 12:39 ` Zhang, Qi Z
2018-03-23  1:33   ` Zhao1, Wei
2018-03-26  1:11 ` Wei Zhao [this message]
2018-03-26  3:31   ` [dpdk-dev] [PATCH v3] " Zhang, Qi Z
2018-03-27 13:56     ` Zhang, Helin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522026699-72770-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).