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 6DE02A052A; Wed, 23 Dec 2020 07:25:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C752CA39; Wed, 23 Dec 2020 07:25:35 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B8BB9CA36 for ; Wed, 23 Dec 2020 07:25:32 +0100 (CET) IronPort-SDR: N0xQSe+2zJhC7yhg9r2kA1zsuknKLsRb6I8hYTEZoxCiTFBvjg6UsskLMnEL6Kf3uO8W16heKI 0eBsYix2S/hg== X-IronPort-AV: E=McAfee;i="6000,8403,9843"; a="176116374" X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="176116374" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 22:25:30 -0800 IronPort-SDR: R2Hu9LFUR8vjI9XK6eydXf4/burkJMYAN+QS/QQceEbAN9RZ/hmDi2hG4TC0zJ9NIa0uB5D2Rc J3gS0t0Z77Zw== X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="373843039" Received: from unknown (HELO intel-npg-odc-srv02.cd.intel.com) ([10.240.178.186]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 22:25:27 -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: Wed, 23 Dec 2020 06:21:20 +0000 Message-Id: <20201223062120.76293-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201218061843.72422-1-murphyx.yang@intel.com> References: <20201218061843.72422-1-murphyx.yang@intel.com> Subject: [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP So, this patch 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 --- v3: - update the comments. v2: - add invalid RSS combinations. drivers/net/iavf/iavf_hash.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index c4c73e6644..8393d8535b 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -806,7 +806,15 @@ 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, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP, + ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_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