From: Simei Su Date: Wed, 30 Oct 2019 02:52:25 +0000 (+0800) Subject: net/ice: correct key length and queues check for RSS X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=16e255c4b9daff83ee1e7993107539af2e05da44;p=dpdk.git net/ice: correct key length and queues check for RSS 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") Signed-off-by: Simei Su Acked-by: Qi Zhang Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 346d6cfcc3..3381b4584e 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 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, 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 ==