From patchwork Thu Jan 7 09:17:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murphy Yang X-Patchwork-Id: 86119 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 (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62681A09FF; Thu, 7 Jan 2021 10:20:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AEF7140F0D; Thu, 7 Jan 2021 10:20:57 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 9FC84140F0B for ; Thu, 7 Jan 2021 10:20:55 +0100 (CET) IronPort-SDR: J+Og/CljLcSTO2x0c8YulsHxZV914macrDlBAY1FCQy3qOLc9Qppk2OlE55Y/pbH44F8bIeg6m ozobBoxGrAeg== X-IronPort-AV: E=McAfee;i="6000,8403,9856"; a="164470312" X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="164470312" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2021 01:20:53 -0800 IronPort-SDR: b+FXyXIZQyn1DCmOWkw1ojhkkOl1dLwei4dxNiRMgi0/9IEZ4hbnol2m1IpNk0FoDNK4NYOvkZ WEPkMY6HIAcA== X-IronPort-AV: E=Sophos;i="5.79,329,1602572400"; d="scan'208";a="379648437" 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; 07 Jan 2021 01:20:49 -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 09:17:10 +0000 Message-Id: <20210107091710.84719-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210107075815.78873-1-murphyx.yang@intel.com> References: <20210107075815.78873-1-murphyx.yang@intel.com> Subject: [dpdk-dev] [PATCH v8] 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 with following invalid RSS type combination, it can be created successfully. 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 unsuccessful. Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") Signed-off-by: Murphy Yang Acked-by: Jeff Guo Tested-by: Huang, ZhiminX --- v8: - Update the comments. 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