From patchwork Fri Dec 18 06:18:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murphy Yang X-Patchwork-Id: 85388 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 dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C1F91A09F6; Fri, 18 Dec 2020 07:22:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 610E0CA2C; Fri, 18 Dec 2020 07:22:43 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 74CF0CA28 for ; Fri, 18 Dec 2020 07:22:40 +0100 (CET) IronPort-SDR: UhW6XNMQM7fZhIfWQtC2aiZ+FsCedyq6CmqpOBhwepK+eOJLHM39KN40isOkAGZyinLqaXg63e S9oHf3nsmsVA== X-IronPort-AV: E=McAfee;i="6000,8403,9838"; a="163122145" X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="163122145" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 22:22:38 -0800 IronPort-SDR: uhjapyP2LznpqUNuxicWIyw0txF8co1eSradC/mNWbShjz2rLGZ3U0NIZx2x8pMLG3erQfzvIb GnPQ/j+P/9+Q== X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="370387582" 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; 17 Dec 2020 22:22:36 -0800 From: Murphy Yang To: dev@dpdk.org Cc: qiming.yang@intel.com, stevex.yang@intel.com, jia.guo@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, Murphy Yang Date: Fri, 18 Dec 2020 06:18:43 +0000 Message-Id: <20201218061843.72422-1-murphyx.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201209071438.32419-1-murphyx.yang@intel.com> References: <20201209071438.32419-1-murphyx.yang@intel.com> Subject: [dpdk-dev] [PATCH v2] net/iavf: fix negative GTP-U flow rules create successfully 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 negative GTP-U rule, it will be created successfully. The list shows the impacted outer and inner 'ipv4' GTP-U patterns with 'ipv4' or 'gtpu' type: - iavf_pattern_eth_ipv4_gtpu_ipv4_udp - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp - iavf_pattern_eth_ipv4_gtpu_ipv4_tcp - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp - more impacted patterns with 'gtpu' type: > iavf_pattern_eth_ipv4_gtpu_ipv4 > iavf_pattern_eth_ipv4_gtpu_eh_ipv4 Same as the outer and inner 'ipv6' GTP-U patterns. So, this commit adds the invalid RSS combinations in 'invalid_rss_comb' array to make result correct. The list of added 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 Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") Signed-off-by: Murphy Yang --- 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