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 296B6A00BE for ; Wed, 30 Oct 2019 03:52:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D9341BEBD; Wed, 30 Oct 2019 03:52:39 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E81F41BE94; Wed, 30 Oct 2019 03:52:34 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 19:52:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,245,1569308400"; d="scan'208";a="203054103" Received: from unknown (HELO npg-dpdk-cvl-simeisu-118d193.sh.intel.com) ([10.67.110.183]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2019 19:52:32 -0700 From: Simei Su 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 Date: Wed, 30 Oct 2019 10:52:25 +0800 Message-Id: <1572403945-192506-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 and queues 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 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 --- 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