All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com, beilei.xing@intel.com, qiming.yang@intel.com
Cc: dev@dpdk.org, xiaolong.ye@intel.com, simei.su@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ice: correct key len and queues check for RSS
Date: Wed, 30 Oct 2019 10:52:25 +0800	[thread overview]
Message-ID: <1572403945-192506-1-git-send-email-simei.su@intel.com> (raw)

This patch corrects key_len and queues check. The key_len and queues
are not supported to configure for RSS in rte_flow.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org

Signed-off-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/ice_hash.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f710b97..f78fe42 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -25,8 +25,6 @@
 #include "ice_ethdev.h"
 #include "ice_generic_flow.h"
 
-#define ICE_ACTION_RSS_MAX_QUEUE_NUM 32
-
 struct rss_type_match_hdr {
 	uint32_t hdr_mask;
 	uint64_t eth_rss_hint;
@@ -333,15 +331,15 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 					RTE_FLOW_ERROR_TYPE_ACTION, action,
 					"a nonzero RSS encapsulation level is not supported");
 
-			if (rss->key_len == 0)
+			if (rss->key_len)
 				return rte_flow_error_set(error, ENOTSUP,
 					RTE_FLOW_ERROR_TYPE_ACTION, action,
-					"RSS hash key_len mustn't be 0");
+					"a nonzero RSS key_len is not supported");
 
-			if (rss->queue_num > ICE_ACTION_RSS_MAX_QUEUE_NUM)
+			if (rss->queue)
 				return rte_flow_error_set(error, ENOTSUP,
 					RTE_FLOW_ERROR_TYPE_ACTION, action,
-					"too many queues for RSS context");
+					"a non-NULL RSS queue is not supported");
 
 			/* Check hash function and save it to rss_meta. */
 			if (rss->func ==
-- 
1.8.3.1


             reply	other threads:[~2019-10-30  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  2:52 Simei Su [this message]
2019-10-30  3:13 ` [dpdk-dev] [PATCH] net/ice: correct key len and queues check for RSS Zhang, Qi Z
2019-10-30  5:16 ` Ye Xiaolong

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=1572403945-192506-1-git-send-email-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.