From patchwork Thu Apr 8 15:54:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liu, Lingyu" X-Patchwork-Id: 90859 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9D65A0579; Thu, 8 Apr 2021 11:19:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B3A141058; Thu, 8 Apr 2021 11:19:32 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id EA03F141047 for ; Thu, 8 Apr 2021 11:19:29 +0200 (CEST) IronPort-SDR: CnNuWCF4IUw4RarBnlRUnsi88o0jZc6Tot+EIIsXitZeSZxXJMmmAw132Tmmy5WjuYFCPr86Bv a+Y9dsows5xg== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="278768880" X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="278768880" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 02:19:27 -0700 IronPort-SDR: 4M7pIxxDY3IY72sveve1d2dBz9P3WZJsdknJ8/QusddYlzXu/eS1pLdWNr/uKdByasmgIuyPHr YNf9skgJn9eQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="422155011" Received: from dpdk-liulingy-1.sh.intel.com ([10.67.118.243]) by orsmga008.jf.intel.com with ESMTP; 08 Apr 2021 02:19:25 -0700 From: Liulingyu To: dev@dpdk.org, qi.z.zhang@intel.com, beilei.xing@intel.com Cc: Liulingyu Date: Thu, 8 Apr 2021 15:54:36 +0000 Message-Id: <20210408155436.544590-1-lingyu.liu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] net/ice: add invalid RSS combinations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When create a rule with following invalid RSS type combinations, it should fails. Invalid RSS combinations list: - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP This patch adds these combinations in 'invalid_rss_comb' array to do valid check, if the combination check failed, the rule will be created failed. Signed-off-by: Liulingyu --- drivers/net/ice/ice_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 7d7e7052da..e56cdf9941 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -826,7 +826,9 @@ static void ice_refine_hash_cfg(struct ice_rss_hash_cfg *hash_cfg, static uint64_t invalid_rss_comb[] = { ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP, + ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP, ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP, + ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP, RTE_ETH_RSS_L3_PRE40 | RTE_ETH_RSS_L3_PRE56 | RTE_ETH_RSS_L3_PRE96