From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A50A7A00BE for ; Tue, 29 Oct 2019 07:30:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A4262BF5; Tue, 29 Oct 2019 07:30:54 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 7CCF02BF5 for ; Tue, 29 Oct 2019 07:30:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 23:30:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,242,1569308400"; d="scan'208";a="401049347" Received: from npg-dpdk-cvl-simeisu-118d193.sh.intel.com ([10.67.110.183]) by fmsmga006.fm.intel.com with ESMTP; 28 Oct 2019 23:30:50 -0700 From: Simei Su To: qi.z.zhang@intel.com Cc: Simei Su , stable@dpdk.org Date: Tue, 29 Oct 2019 14:30:48 +0800 Message-Id: <1572330648-441731-1-git-send-email-simei.su@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-stable] [PATCH] net/ice: correct key len check for RSS X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" This patch corrects key_len check. The key_len is 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 --- drivers/net/ice/ice_hash.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index f710b97..9da64db 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,10 @@ 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) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ACTION, action, - "RSS hash key_len mustn't be 0"); - - if (rss->queue_num > ICE_ACTION_RSS_MAX_QUEUE_NUM) + if (rss->key_len) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, - "too many queues for RSS context"); + "a nonzero RSS key_len is not supported"); /* Check hash function and save it to rss_meta. */ if (rss->func == -- 1.8.3.1