DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: add RSS support for IPv6 prefix
@ 2020-06-12  8:07 Junfeng Guo
  2020-06-16  8:16 ` [dpdk-dev] [PATCH v2 0/3] " Junfeng Guo
  0 siblings, 1 reply; 26+ messages in thread
From: Junfeng Guo @ 2020-06-12  8:07 UTC (permalink / raw)
  To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su

RSS for IPv6 prefix fields are supported in this patch, so that we
can use prefixes instead of full IPv6 address for RSS. These prefixes
include the first 32, 48, 64 bits of both SRC and DST IPv6 address.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 app/test-pmd/cmdline.c         |  6 +++
 app/test-pmd/config.c          |  3 ++
 drivers/net/ice/ice_hash.c     | 90 ++++++++++++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h | 51 +++++++++++++++++++
 4 files changed, 150 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 996a49876..a050f8da7 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2297,6 +2297,12 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_GENEVE;
 	else if (!strcmp(res->value, "nvgre"))
 		rss_conf.rss_hf = ETH_RSS_NVGRE;
+	else if (!strcmp(res->value, "l3-pre32"))
+		rss_conf.rss_hf = ETH_RSS_L3_PRE32;
+	else if (!strcmp(res->value, "l3-pre48"))
+		rss_conf.rss_hf = ETH_RSS_L3_PRE48;
+	else if (!strcmp(res->value, "l3-pre64"))
+		rss_conf.rss_hf = ETH_RSS_L3_PRE64;
 	else if (!strcmp(res->value, "l3-src-only"))
 		rss_conf.rss_hf = ETH_RSS_L3_SRC_ONLY;
 	else if (!strcmp(res->value, "l3-dst-only"))
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a7112c998..d9550a6f2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -110,6 +110,9 @@ const struct rss_type_info rss_type_table[] = {
 	{ "tcp", ETH_RSS_TCP },
 	{ "sctp", ETH_RSS_SCTP },
 	{ "tunnel", ETH_RSS_TUNNEL },
+	{ "l3-pre32", ETH_RSS_L3_PRE32 },
+	{ "l3-pre48", ETH_RSS_L3_PRE48 },
+	{ "l3-pre64", ETH_RSS_L3_PRE64 },
 	{ "l3-src-only", ETH_RSS_L3_SRC_ONLY },
 	{ "l3-dst-only", ETH_RSS_L3_DST_ONLY },
 	{ "l4-src-only", ETH_RSS_L4_SRC_ONLY },
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 3d58b7184..3d5effb78 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -186,6 +186,15 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 	{ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,					BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)},
 	{ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY,					BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA)},
 	{ETH_RSS_IPV6,								ICE_FLOW_HASH_IPV6},
+	{ETH_RSS_IPV6_PRE32 | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA)},
+	{ETH_RSS_IPV6_PRE32 | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA)},
+	{ETH_RSS_IPV6_PRE32,							ICE_FLOW_HASH_IPV6_PRE32},
+	{ETH_RSS_IPV6_PRE48 | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA)},
+	{ETH_RSS_IPV6_PRE48 | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA)},
+	{ETH_RSS_IPV6_PRE48,							ICE_FLOW_HASH_IPV6_PRE48},
+	{ETH_RSS_IPV6_PRE64 | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64 | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64,							ICE_FLOW_HASH_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)},
@@ -195,6 +204,33 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 	{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_UDP,						ICE_HASH_UDP_IPV6},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_UDP,						ICE_HASH_UDP_IPV6_PRE32},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_UDP,						ICE_HASH_UDP_IPV6_PRE48},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP,						ICE_HASH_UDP_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)},
@@ -204,6 +240,33 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_TCP,						ICE_HASH_TCP_IPV6},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_TCP,						ICE_HASH_TCP_IPV6_PRE32},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_TCP,						ICE_HASH_TCP_IPV6_PRE48},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP,						ICE_HASH_TCP_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA)},
@@ -213,6 +276,33 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY,			BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
 	{ETH_RSS_NONFRAG_IPV6_SCTP,						ICE_HASH_SCTP_IPV6},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE32_SCTP,						ICE_HASH_SCTP_IPV6_PRE32},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_SA)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE48_DA)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE48_SCTP,						ICE_HASH_SCTP_IPV6_PRE48},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,	BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) | BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_SRC_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_DST_ONLY,				BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP,						ICE_HASH_SCTP_IPV6_PRE64},
 };
 
 static struct ice_flow_engine ice_hash_engine = {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index a49242bcd..58530bf74 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -538,6 +538,9 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_L4_DST_ONLY        (1ULL << 60)
 #define ETH_RSS_L2_SRC_ONLY        (1ULL << 59)
 #define ETH_RSS_L2_DST_ONLY        (1ULL << 58)
+#define ETH_RSS_L3_PRE32           (1ULL << 57)
+#define ETH_RSS_L3_PRE48           (1ULL << 56)
+#define ETH_RSS_L3_PRE64           (1ULL << 55)
 
 /**
  * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
@@ -561,6 +564,54 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
 	return rss_hf;
 }
 
+#define ETH_RSS_IPV6_PRE32 ( \
+	ETH_RSS_IPV6 | \
+	ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48 ( \
+	ETH_RSS_IPV6 | \
+	ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64 ( \
+	ETH_RSS_IPV6 | \
+	ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_UDP ( \
+	ETH_RSS_NONFRAG_IPV6_UDP | \
+	ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_UDP ( \
+	ETH_RSS_NONFRAG_IPV6_UDP | \
+	ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_UDP ( \
+	ETH_RSS_NONFRAG_IPV6_UDP | \
+	ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_TCP ( \
+	ETH_RSS_NONFRAG_IPV6_TCP | \
+	ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_TCP ( \
+	ETH_RSS_NONFRAG_IPV6_TCP | \
+	ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_TCP ( \
+	ETH_RSS_NONFRAG_IPV6_TCP | \
+	ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_SCTP ( \
+	ETH_RSS_NONFRAG_IPV6_SCTP | \
+	ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_SCTP ( \
+	ETH_RSS_NONFRAG_IPV6_SCTP | \
+	ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_SCTP ( \
+	ETH_RSS_NONFRAG_IPV6_SCTP | \
+	ETH_RSS_L3_PRE64)
+
 #define ETH_RSS_IP ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_FRAG_IPV4 | \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-07-09  0:33 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12  8:07 [dpdk-dev] [PATCH] net/ice: add RSS support for IPv6 prefix Junfeng Guo
2020-06-16  8:16 ` [dpdk-dev] [PATCH v2 0/3] " Junfeng Guo
2020-06-16  8:16   ` [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types " Junfeng Guo
2020-07-06 11:59     ` Zhang, Qi Z
2020-07-07 10:20     ` Ferruh Yigit
2020-07-07 11:06     ` Thomas Monjalon
2020-07-08  9:45       ` Zhang, Qi Z
2020-07-08  9:57         ` Thomas Monjalon
2020-07-08 11:10           ` Zhang, Qi Z
2020-07-08 11:57             ` Thomas Monjalon
2020-07-08 12:05               ` Zhang, Qi Z
2020-07-08 12:26                 ` Thomas Monjalon
2020-07-08 12:37                   ` Zhang, Qi Z
2020-07-08 14:29                     ` Thomas Monjalon
2020-07-09  0:33                       ` Zhang, Qi Z
2020-06-16  8:16   ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
2020-06-16  8:16   ` [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for IPv6 prefix Junfeng Guo
2020-07-08  4:36   ` [dpdk-dev] [PATCH v3 0/3] " Junfeng Guo
2020-07-08  4:36     ` [dpdk-dev] [PATCH v3 1/3] ethdev: add new RSS types " Junfeng Guo
2020-07-08  4:36     ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
2020-07-08  4:36     ` [dpdk-dev] [PATCH v3 3/3] net/ice: add RSS support for IPv6 prefix Junfeng Guo
2020-07-08  7:33     ` [dpdk-dev] [PATCH v4 0/3] " Junfeng Guo
2020-07-08  7:33       ` [dpdk-dev] [PATCH v4 1/3] ethdev: add new RSS types " Junfeng Guo
2020-07-08  7:33       ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
2020-07-08  7:33       ` [dpdk-dev] [PATCH v4 3/3] net/ice: add RSS support for IPv6 prefix Junfeng Guo
2020-07-08  8:24       ` [dpdk-dev] [PATCH v4 0/3] " Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).