From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30DB5A09FF; Thu, 7 Jan 2021 09:03:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07399140EFC; Thu, 7 Jan 2021 09:02:50 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 2E24F140EC5 for ; Thu, 7 Jan 2021 09:02:46 +0100 (CET) IronPort-SDR: xYBM3kjsyQCEDeiYLCtYy1/Aa+0cQaoY6f3MszfSU+o3j8LLI6ZvqtxMRyuP/iJRF2vy7wF+oT 3uF3lJVcaI+A== X-IronPort-AV: E=McAfee;i="6000,8403,9856"; a="156579059" X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="156579059" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 00:02:45 -0800 IronPort-SDR: uJADRh7ctNP4hTgSVznhQ9Tx/ysjOgqpbVpyirgmvtg+4aKx+gwMnRK5latJuGKQlW5nkq3seG YnyktB4Pe1Ug== X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="462958432" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 00:02:43 -0800 From: Murphy Yang To: dev@dpdk.org Cc: qiming.yang@intel.com, jia.guo@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, Murphy Yang Date: Thu, 7 Jan 2021 07:58:15 +0000 Message-Id: <20210107075815.78873-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201228022836.41870-1-murphyx.yang@intel.com> References: <20201228022836.41870-1-murphyx.yang@intel.com> Subject: [dpdk-dev] [PATCH v7] net/iavf: fix invalid RSS combinations rule can be created 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" Currently, when use 'flow' command to create a rule that combine with several RSS types, even the RSS type combination is invalid, it also be created successfully. Here list some invalid RSS combinations: - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP For 'ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP' (same as IPV6), this pathch adds these combinations in 'invalid_rss_comb' array to do valid check, if the combination check failed, the rule will be created unsuccessful. Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") Signed-off-by: Murphy Yang --- v7: - Remove unsupported RSS combinations array. - Restored 'ETH_RSS_GTPU' in input set mask. v6: - Add unsupported RSS combinations array. v5: - Remove 'ETH_RSS_GTPU' from input set mask. v4: - Use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX' v3: - Update the comments. v2: - Add invalid RSS combinations. drivers/net/iavf/iavf_hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 7620876b58..ebaac58254 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs, 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_PRE32 | RTE_ETH_RSS_L3_PRE40 | RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 | RTE_ETH_RSS_L3_PRE96 -- 2.17.1