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 1C2D2A00C5; Thu, 7 May 2020 11:30:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C2401DB1B; Thu, 7 May 2020 11:30:06 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4FC2B1DB1A for ; Thu, 7 May 2020 11:30:04 +0200 (CEST) IronPort-SDR: 8phnuwhSIdNv3NiYww6tV0uJpNv/+uwJpRQzbY412dZOCZBRUA94rfCtVCBe8yNdX1iCQuRIj8 mK7jQzgiowow== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 02:30:02 -0700 IronPort-SDR: +DkM7KcrFhzNXjkQoPxsl1ZQehR62fUWG4p5Xb9fNy8cbTwvHqmoDQbkOaNrhZhLq2+MPbSg+C LsDZgRxgVdhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,363,1583222400"; d="scan'208";a="461780495" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by fmsmga005.fm.intel.com with ESMTP; 07 May 2020 02:30:00 -0700 From: Jeff Guo To: beilei.xing@intel.com, jingjing.wu@intel.com Cc: bernard.iremonger@intel.com, xiaolong.ye@intel.com, qi.z.zhang@intel.com, dev@dpdk.org, jia.guo@intel.com Date: Thu, 7 May 2020 17:29:43 -0400 Message-Id: <20200507212943.7858-1-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/iavf: fix input set for rss hash 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" Since some specific rss hash type need to combine with the protocol hash type when configure a rss hash rule, so add the corresponding input set to support these case for iavf hash. Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF") Signed-off-by: Jeff Guo --- drivers/net/iavf/iavf_hash.c | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index a1d0b8364..97370aa19 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -594,11 +594,19 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { /* IPV4 */ {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, + &hdrs_hint_eth_src}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY, + &hdrs_hint_eth_dst}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3}, @@ -620,6 +628,23 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv4_dst_gtpu_dwn}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_udp_src_port}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_src_udp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_GTPU, &hdrs_hint_ipv4_src_gtpu_up}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_dst_udp_src_port}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_dst_udp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_GTPU, &hdrs_hint_ipv4_dst_gtpu_dwn}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_udp_src_port}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_DST_ONLY, @@ -641,6 +666,21 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv4_dst_tcp_dst_port}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_tcp_src_port}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_port}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_tcp_src_port}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_DST_ONLY, @@ -660,6 +700,18 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv4_dst_sctp_dst_port}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_sctp_src_port}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_src_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_dst_sctp_src_port}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_dst_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_sctp_src_port}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_DST_ONLY, @@ -669,11 +721,19 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { /* IPV6 */ {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_SRC_ONLY, + &hdrs_hint_eth_src}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_DST_ONLY, + &hdrs_hint_eth_dst}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH, &hdrs_hint_eth}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN, &hdrs_hint_svlan}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP, &hdrs_hint_ipv6_esp}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH, &hdrs_hint_ipv6_ah}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3, &hdrs_hint_ipv6_l2tpv3}, @@ -691,6 +751,18 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv6_dst_udp_dst_port}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_udp_src_port}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_udp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_udp_src_port}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_udp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_udp_src_port}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_DST_ONLY, @@ -712,6 +784,18 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv6_dst_tcp_dst_port}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_tcp_src_port}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_tcp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_tcp_src_port}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_tcp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_tcp_src_port}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_DST_ONLY, @@ -731,6 +815,18 @@ struct iavf_hash_match_type iavf_hash_type_list[] = { &hdrs_hint_ipv6_dst_sctp_dst_port}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_sctp_src_port}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_sctp_src_port}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_sctp_src_port}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_DST_ONLY, -- 2.20.1