* [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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PV6_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_TC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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_SCT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LOW_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
* [dpdk-dev] [PATCH v2 0/3] add RSS support for IPv6 prefix
2020-06-12 8:07 [dpdk-dev] [PATCH] net/ice: add RSS support for IPv6 prefix Junfeng Guo
@ 2020-06-16 8:16 ` Junfeng Guo
2020-06-16 8:16 ` [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types " Junfeng Guo
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-06-16 8:16 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.
v2:
* Split previous patch into 3 independent ones to be more clear.
[PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
[PATCH v2 2/3] app/testpmd: support extended RSS offload types
[PATCH v2 3/3] net/ice: add RSS support for IPv6 prefix
Junfeng Guo (3):
ethdev: add new RSS types for IPv6 prefix
app/testpmd: support extended RSS offload types
net/ice: add RSS support for IPv6 prefix
app/test-pmd/cmdline.c | 6 +
app/test-pmd/config.c | 3 +
drivers/net/ice/ice_hash.c | 204 +++++++++++++++++++++++++++++++++
lib/librte_ethdev/rte_ethdev.h | 51 +++++++++
4 files changed, 264 insertions(+)
--
2.17.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-06-16 8:16 ` [dpdk-dev] [PATCH v2 0/3] " Junfeng Guo
@ 2020-06-16 8:16 ` Junfeng Guo
2020-07-06 11:59 ` Zhang, Qi Z
` (2 more replies)
2020-06-16 8:16 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
` (2 subsequent siblings)
3 siblings, 3 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-06-16 8:16 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 631b146bd..5a7ba36d8 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
* [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types
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-06-16 8:16 ` 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
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-06-16 8:16 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing; +Cc: dev, jia.guo, junfeng.guo, simei.su
This patch adds testpmd cmdline support for IPv6 prefix.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
app/test-pmd/cmdline.c | 6 ++++++
app/test-pmd/config.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 81c87c8c3..4d4612395 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 a79019f52..e51ef8b19 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -111,6 +111,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 },
--
2.17.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v2 3/3] net/ice: add RSS support for IPv6 prefix
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-06-16 8:16 ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
@ 2020-06-16 8:16 ` Junfeng Guo
2020-07-08 4:36 ` [dpdk-dev] [PATCH v3 0/3] " Junfeng Guo
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-06-16 8:16 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>
---
drivers/net/ice/ice_hash.c | 204 +++++++++++++++++++++++++++++++++++++
1 file changed, 204 insertions(+)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 0c1119129..f5c2879d0 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -415,6 +415,21 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_IPV6 | ETH_RSS_L2TPV3,
BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV3_SESS_ID)},
{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_IPV6_PROT) |
@@ -446,6 +461,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_UDP,
ICE_HASH_UDP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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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E64_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_IPV6_PROT) |
@@ -475,6 +553,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_TCP,
ICE_HASH_TCP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_FL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_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_IPV6_PROT) |
@@ -504,6 +645,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_SCTP,
ICE_HASH_SCTP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_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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 = {
--
2.17.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
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
2 siblings, 0 replies; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-06 11:59 UTC (permalink / raw)
To: Guo, Junfeng, Xing, Beilei; +Cc: dev, Guo, Jia, Su, Simei
> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo@intel.com>
> Sent: Tuesday, June 16, 2020 4:17 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
>
> This patch defines new RSS offload types for IPv6 prefix with 32, 48,
> 64 bits of both SRC and DST IPv6 address.
>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> lib/librte_ethdev/rte_ethdev.h | 51
> ++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 631b146bd..5a7ba36d8 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
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
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
2 siblings, 0 replies; 26+ messages in thread
From: Ferruh Yigit @ 2020-07-07 10:20 UTC (permalink / raw)
To: Junfeng Guo, qi.z.zhang, xiaolong.ye, beilei.xing
Cc: dev, jia.guo, simei.su, Thomas Monjalon, Andrew Rybchenko
On 6/16/2020 9:16 AM, Junfeng Guo wrote:
> This patch defines new RSS offload types for IPv6 prefix with 32, 48,
> 64 bits of both SRC and DST IPv6 address.
>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
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
2 siblings, 1 reply; 26+ messages in thread
From: Thomas Monjalon @ 2020-07-07 11:06 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing
Cc: dev, jia.guo, junfeng.guo, simei.su, Junfeng Guo, ferruh.yigit,
arybchenko, viacheslavo, jerinj, ajit.khaparde
16/06/2020 10:16, Junfeng Guo:
> This patch defines new RSS offload types for IPv6 prefix with 32, 48,
> 64 bits of both SRC and DST IPv6 address.
>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> ---
> lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 631b146bd..5a7ba36d8 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)
PRE32, 48 and 64 are not obvious.
Why is it needed?
At least, please add comments for the values of this API.
Do we want to continue with the RTE_ prefix missing?
Can't we add the prefix for the new values?
Note: ethdev maintainers were not Cc'ed.
This reason is enough to nack the patch.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v3 0/3] add RSS support for IPv6 prefix
2020-06-16 8:16 ` [dpdk-dev] [PATCH v2 0/3] " Junfeng Guo
` (2 preceding siblings ...)
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 ` Junfeng Guo
2020-07-08 4:36 ` [dpdk-dev] [PATCH v3 1/3] ethdev: add new RSS types " Junfeng Guo
` (3 more replies)
3 siblings, 4 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 4:36 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
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.
This feature is mainly for NAT64 scenarios.
v3:
* Code rebase.
v2:
* Split previous patch into 3 independent ones to be more clear.
[PATCH v3 1/3] ethdev: add new RSS types for IPv6 prefix
[PATCH v3 2/3] app/testpmd: support extended RSS offload types
[PATCH v3 3/3] net/ice: add RSS support for IPv6 prefix
Junfeng Guo (3):
ethdev: add new RSS types for IPv6 prefix
app/testpmd: support extended RSS offload types
net/ice: add RSS support for IPv6 prefix
app/test-pmd/cmdline.c | 6 +
app/test-pmd/config.c | 3 +
drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++
lib/librte_ethdev/rte_ethdev.h | 51 ++++++++
4 files changed, 267 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v3 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 4:36 ` [dpdk-dev] [PATCH v3 0/3] " Junfeng Guo
@ 2020-07-08 4:36 ` Junfeng Guo
2020-07-08 4:36 ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
` (2 subsequent siblings)
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 4:36 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
Cc: dev, jia.guo, junfeng.guo, simei.su
This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 631b146bd..5a7ba36d8 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.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v3 2/3] app/testpmd: support extended RSS offload types
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 ` 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
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 4:36 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
Cc: dev, jia.guo, junfeng.guo, simei.su
This patch adds testpmd cmdline support for IPv6 prefix.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
app/test-pmd/cmdline.c | 6 ++++++
app/test-pmd/config.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 81c87c8c3..4d4612395 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 a79019f52..e51ef8b19 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -111,6 +111,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 },
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v3 3/3] net/ice: add RSS support for IPv6 prefix
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 ` Junfeng Guo
2020-07-08 7:33 ` [dpdk-dev] [PATCH v4 0/3] " Junfeng Guo
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 4:36 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
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>
---
drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++++++
1 file changed, 207 insertions(+)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f23cc9517..62317182b 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -462,6 +462,21 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{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_IPV6_PROT) |
@@ -493,6 +508,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_UDP,
ICE_HASH_UDP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {ETH_RSS_IPV6_PRE32_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
+ BIT_ULL(ICE_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_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_IPV6_PROT) |
@@ -551,6 +692,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_SCTP,
ICE_HASH_SCTP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_ONL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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 = {
@@ -715,6 +919,9 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
uint64_t combine_type = ETH_RSS_L2_SRC_ONLY |
ETH_RSS_L2_DST_ONLY |
+ ETH_RSS_L3_PRE32 |
+ ETH_RSS_L3_PRE48 |
+ ETH_RSS_L3_PRE64 |
ETH_RSS_L3_SRC_ONLY |
ETH_RSS_L3_DST_ONLY |
ETH_RSS_L4_SRC_ONLY |
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v4 0/3] add RSS support for IPv6 prefix
2020-07-08 4:36 ` [dpdk-dev] [PATCH v3 0/3] " Junfeng Guo
` (2 preceding siblings ...)
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 ` Junfeng Guo
2020-07-08 7:33 ` [dpdk-dev] [PATCH v4 1/3] ethdev: add new RSS types " Junfeng Guo
` (3 more replies)
3 siblings, 4 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 7:33 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
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.
This feature is mainly for NAT64 scenarios.
v4:
* Code rebase.
v3:
* Code rebase.
v2:
* Split previous patch into 3 independent ones to be more clear.
[PATCH v4 1/3] ethdev: add new RSS types for IPv6 prefix
[PATCH v4 2/3] app/testpmd: support extended RSS offload types
[PATCH v4 3/3] net/ice: add RSS support for IPv6 prefix
Junfeng Guo (3):
ethdev: add new RSS types for IPv6 prefix
app/testpmd: support extended RSS offload types
net/ice: add RSS support for IPv6 prefix
app/test-pmd/cmdline.c | 6 +
app/test-pmd/config.c | 3 +
drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++
lib/librte_ethdev/rte_ethdev.h | 51 ++++++++
4 files changed, 267 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v4 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 7:33 ` [dpdk-dev] [PATCH v4 0/3] " Junfeng Guo
@ 2020-07-08 7:33 ` Junfeng Guo
2020-07-08 7:33 ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: support extended RSS offload types Junfeng Guo
` (2 subsequent siblings)
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 7:33 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
Cc: dev, jia.guo, junfeng.guo, simei.su
This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 631b146bd..5a7ba36d8 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.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v4 2/3] app/testpmd: support extended RSS offload types
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 ` 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
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 7:33 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
Cc: dev, jia.guo, junfeng.guo, simei.su
This patch adds testpmd cmdline support for IPv6 prefix.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
app/test-pmd/cmdline.c | 6 ++++++
app/test-pmd/config.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 81c87c8c3..4d4612395 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 75013100f..5837b9011 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -119,6 +119,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 },
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* [dpdk-dev] [PATCH v4 3/3] net/ice: add RSS support for IPv6 prefix
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 ` Junfeng Guo
2020-07-08 8:24 ` [dpdk-dev] [PATCH v4 0/3] " Zhang, Qi Z
3 siblings, 0 replies; 26+ messages in thread
From: Junfeng Guo @ 2020-07-08 7:33 UTC (permalink / raw)
To: qi.z.zhang, xiaolong.ye, beilei.xing, ferruh.yigit
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>
---
drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++++++
1 file changed, 207 insertions(+)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index a10734af0..9d455b262 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -462,6 +462,21 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{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_IPV6_PROT) |
@@ -493,6 +508,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_UDP,
ICE_HASH_UDP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_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P_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_IPV6_PROT) |
@@ -522,6 +600,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_TCP,
ICE_HASH_TCP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_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DX_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_IPV6_PROT) |
@@ -551,6 +692,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
{ETH_RSS_NONFRAG_IPV6_SCTP,
ICE_HASH_SCTP_IPV6 |
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT)},
+ {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_FL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ORT)},
+ {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 = {
@@ -716,6 +920,9 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
combine_type = ETH_RSS_L2_SRC_ONLY |
ETH_RSS_L2_DST_ONLY |
+ ETH_RSS_L3_PRE32 |
+ ETH_RSS_L3_PRE48 |
+ ETH_RSS_L3_PRE64 |
ETH_RSS_L3_SRC_ONLY |
ETH_RSS_L3_DST_ONLY |
ETH_RSS_L4_SRC_ONLY |
--
2.25.1
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v4 0/3] add RSS support for IPv6 prefix
2020-07-08 7:33 ` [dpdk-dev] [PATCH v4 0/3] " Junfeng Guo
` (2 preceding siblings ...)
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 ` Zhang, Qi Z
3 siblings, 0 replies; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-08 8:24 UTC (permalink / raw)
To: Guo, Junfeng, Ye, Xiaolong, Xing, Beilei, Yigit, Ferruh
Cc: dev, Guo, Jia, Su, Simei
> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo@intel.com>
> Sent: Wednesday, July 8, 2020 3:34 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong
> <xiaolong.ye@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>
> Subject: [PATCH v4 0/3] add RSS support for IPv6 prefix
>
> 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.
> This feature is mainly for NAT64 scenarios.
>
> v4:
> * Code rebase.
>
> v3:
> * Code rebase.
>
> v2:
> * Split previous patch into 3 independent ones to be more clear.
>
> [PATCH v4 1/3] ethdev: add new RSS types for IPv6 prefix [PATCH v4 2/3]
> app/testpmd: support extended RSS offload types [PATCH v4 3/3] net/ice:
> add RSS support for IPv6 prefix
>
> Junfeng Guo (3):
> ethdev: add new RSS types for IPv6 prefix
> app/testpmd: support extended RSS offload types
> net/ice: add RSS support for IPv6 prefix
>
> app/test-pmd/cmdline.c | 6 +
> app/test-pmd/config.c | 3 +
> drivers/net/ice/ice_hash.c | 207
> +++++++++++++++++++++++++++++++++
> lib/librte_ethdev/rte_ethdev.h | 51 ++++++++
> 4 files changed, 267 insertions(+)
>
> --
> 2.25.1
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-07 11:06 ` Thomas Monjalon
@ 2020-07-08 9:45 ` Zhang, Qi Z
2020-07-08 9:57 ` Thomas Monjalon
0 siblings, 1 reply; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-08 9:45 UTC (permalink / raw)
To: Thomas Monjalon, xiaolong.ye, beilei.xing
Cc: dev, jia.guo, junfeng.guo, simei.su, ferruh.yigit, arybchenko,
viacheslavo, jerinj, ajit.khaparde
Hi Thomas:
Sorry for late reply, see comment inline.
On 2020/7/7 19:06, Thomas Monjalon wrote:
> 16/06/2020 10:16, Junfeng Guo:
>> This patch defines new RSS offload types for IPv6 prefix with 32, 48,
>> 64 bits of both SRC and DST IPv6 address.
>>
>> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
>> ---
>> lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 51 insertions(+)
>>
>> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
>> index 631b146bd..5a7ba36d8 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)
> PRE32, 48 and 64 are not obvious.
> Why is it needed?
there is typical usage for NAT64, which use 32 bit prefix for IPv6
addresses, in this case flows over IPv4 and IPv6 will result in the same
hash value,
as well as 48, 64, which also have some corresponding use cases,
> At least, please add comments for the values of this API.
sure, we will add more comments.
> Do we want to continue with the RTE_ prefix missing?
> Can't we add the prefix for the new values?
32, 48, 64 are typical usage, and consider suffix pair we may add later,
it will cost 6 bits
so far we still have 27 bit left, so it looks like will not be a
problem in following couple releases.
but anyway use 64 bits to represent RSS inputset can't meet the coming
complex RSS usage, we may need to figure out some new APIs and abandon
the old one.
A stacked protocol layer with bit field selector in each layer is under
consideration, hope we can contribute some RFC at some moment. also feel
free let us know
your thought.
>
> Note: ethdev maintainers were not Cc'ed.
> This reason is enough to nack the patch.
sure, will send a new version to follow this
Thanks
Qi
>
>
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 9:45 ` Zhang, Qi Z
@ 2020-07-08 9:57 ` Thomas Monjalon
2020-07-08 11:10 ` Zhang, Qi Z
0 siblings, 1 reply; 26+ messages in thread
From: Thomas Monjalon @ 2020-07-08 9:57 UTC (permalink / raw)
To: xiaolong.ye, beilei.xing, Zhang, Qi Z
Cc: dev, jia.guo, junfeng.guo, simei.su, ferruh.yigit, arybchenko,
viacheslavo, jerinj, ajit.khaparde, orika
08/07/2020 11:45, Zhang, Qi Z:
> On 2020/7/7 19:06, Thomas Monjalon wrote:
> > 16/06/2020 10:16, Junfeng Guo:
> >> This patch defines new RSS offload types for IPv6 prefix with 32, 48,
> >> 64 bits of both SRC and DST IPv6 address.
> >>
> >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> >> ---
> >> lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
> >> 1 file changed, 51 insertions(+)
> >>
> >> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> >> index 631b146bd..5a7ba36d8 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)
> >
> > PRE32, 48 and 64 are not obvious.
> > Why is it needed?
>
> there is typical usage for NAT64, which use 32 bit prefix for IPv6
> addresses, in this case flows over IPv4 and IPv6 will result in the same
> hash value,
> as well as 48, 64, which also have some corresponding use cases,
> > At least, please add comments for the values of this API.
>
> sure, we will add more comments.
> > Do we want to continue with the RTE_ prefix missing?
> > Can't we add the prefix for the new values?
I think you misunderstood this question. I am asking to
change the name ETH_RSS_L3_PRE32 to RTE_ETH_RSS_L3_PRE32
> 32, 48, 64 are typical usage, and consider suffix pair we may add later,
> it will cost 6 bits
> so far we still have 27 bit left, so it looks like will not be a
> problem in following couple releases.
Having some space left is not a reason to waste it :)
If I understand well, there is no standard for this API.
You are assigning some bits to some usage.
I don't find it generic and flexible enough.
If you want to limit the size of the match, we should have
a generic syntax to choose how many bits of the IPv6 address
are taken into account for RSS. Or maybe an IPv6 mask.
> but anyway use 64 bits to represent RSS inputset can't meet the coming
> complex RSS usage, we may need to figure out some new APIs and abandon
> the old one.
> A stacked protocol layer with bit field selector in each layer is under
> consideration, hope we can contribute some RFC at some moment. also feel
> free let us know your thought.
My thought is to discuss how to fit this need in future
and avoid adding few bits of temporary workaround.
API definition is serious and we must avoid temporary half solutions.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 9:57 ` Thomas Monjalon
@ 2020-07-08 11:10 ` Zhang, Qi Z
2020-07-08 11:57 ` Thomas Monjalon
0 siblings, 1 reply; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-08 11:10 UTC (permalink / raw)
To: Thomas Monjalon, Xing, Beilei
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, July 8, 2020 5:58 PM
> To: Ye, Xiaolong <xiaolong.ye@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; arybchenko@solarflare.com;
> viacheslavo@mellanox.com; jerinj@marvell.com;
> ajit.khaparde@broadcom.com; orika@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6
> prefix
>
> 08/07/2020 11:45, Zhang, Qi Z:
> > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > 16/06/2020 10:16, Junfeng Guo:
> > >> This patch defines new RSS offload types for IPv6 prefix with 32,
> > >> 48,
> > >> 64 bits of both SRC and DST IPv6 address.
> > >>
> > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > >> ---
> > >> lib/librte_ethdev/rte_ethdev.h | 51
> ++++++++++++++++++++++++++++++++++
> > >> 1 file changed, 51 insertions(+)
> > >>
> > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 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)
> > >
> > > PRE32, 48 and 64 are not obvious.
> > > Why is it needed?
> >
> > there is typical usage for NAT64, which use 32 bit prefix for IPv6
> > addresses, in this case flows over IPv4 and IPv6 will result in the
> > same hash value, as well as 48, 64, which also have some corresponding
> > use cases,
> > > At least, please add comments for the values of this API.
> >
> > sure, we will add more comments.
> > > Do we want to continue with the RTE_ prefix missing?
> > > Can't we add the prefix for the new values?
>
> I think you misunderstood this question. I am asking to change the name
> ETH_RSS_L3_PRE32 to RTE_ETH_RSS_L3_PRE32
OK, we are going change all the ETH_RSS_xxx to RTE_ETH_RSS_xxx, or just the new values?
the first option looks make sense to me.
>
> > 32, 48, 64 are typical usage, and consider suffix pair we may add
> > later, it will cost 6 bits so far we still have 27 bit left, so it
> > looks like will not be a problem in following couple releases.
>
> Having some space left is not a reason to waste it :) If I understand well,
> there is no standard for this API.
> You are assigning some bits to some usage.
> I don't find it generic and flexible enough.
Actually IPv6 address prefix is in spec, please check below RFC.
https://tools.ietf.org/html/rfc6052#page-5
So probably we are not wasting bits here, since this is a typical usage that DPDK can provide.
Of cause more description is needed in the code here.
> If you want to limit the size of the match, we should have a generic syntax to
> choose how many bits of the IPv6 address are taken into account for RSS. Or
> maybe an IPv6 mask.
Yes, I believe at some moment, a more generic solution is mandatory,
And I think that will not work if we stick on the 64 bits, new API need to be introduced and old one should be abandoned
>
> > but anyway use 64 bits to represent RSS inputset can't meet the coming
> > complex RSS usage, we may need to figure out some new APIs and
> abandon
> > the old one.
> > A stacked protocol layer with bit field selector in each layer is
> > under consideration, hope we can contribute some RFC at some moment.
> > also feel free let us know your thought.
>
> My thought is to discuss how to fit this need in future and avoid adding few
> bits of temporary workaround.
> API definition is serious and we must avoid temporary half solutions.
>
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 11:10 ` Zhang, Qi Z
@ 2020-07-08 11:57 ` Thomas Monjalon
2020-07-08 12:05 ` Zhang, Qi Z
0 siblings, 1 reply; 26+ messages in thread
From: Thomas Monjalon @ 2020-07-08 11:57 UTC (permalink / raw)
To: Xing, Beilei, Zhang, Qi Z
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
08/07/2020 13:10, Zhang, Qi Z:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 08/07/2020 11:45, Zhang, Qi Z:
> > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > 16/06/2020 10:16, Junfeng Guo:
> > > >> This patch defines new RSS offload types for IPv6 prefix with 32,
> > > >> 48,
> > > >> 64 bits of both SRC and DST IPv6 address.
> > > >>
> > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > >> ---
> > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > ++++++++++++++++++++++++++++++++++
> > > >> 1 file changed, 51 insertions(+)
> > > >>
> > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 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)
> > > >
> > > > PRE32, 48 and 64 are not obvious.
> > > > Why is it needed?
> > >
> > > there is typical usage for NAT64, which use 32 bit prefix for IPv6
> > > addresses, in this case flows over IPv4 and IPv6 will result in the
> > > same hash value, as well as 48, 64, which also have some corresponding
> > > use cases,
> > > > At least, please add comments for the values of this API.
> > >
> > > sure, we will add more comments.
> > > > Do we want to continue with the RTE_ prefix missing?
> > > > Can't we add the prefix for the new values?
> >
> > I think you misunderstood this question. I am asking to change the name
> > ETH_RSS_L3_PRE32 to RTE_ETH_RSS_L3_PRE32
>
> OK, we are going change all the ETH_RSS_xxx to RTE_ETH_RSS_xxx, or just the new values?
> the first option looks make sense to me.
You cannot break compatibility with the existing values,
but you can provide an alias to preserve compatibility.
> > > 32, 48, 64 are typical usage, and consider suffix pair we may add
> > > later, it will cost 6 bits so far we still have 27 bit left, so it
> > > looks like will not be a problem in following couple releases.
> >
> > Having some space left is not a reason to waste it :) If I understand well,
> > there is no standard for this API.
> > You are assigning some bits to some usage.
> > I don't find it generic and flexible enough.
>
> Actually IPv6 address prefix is in spec, please check below RFC.
> https://tools.ietf.org/html/rfc6052#page-5
Quoting the RFC:
"
the prefix shall be either the "Well-Known Prefix"
or a "Network-Specific Prefix" unique to the organization
deploying the address translators.
The prefixes can only have one of the following lengths:
32, 40, 48, 56, 64, or 96.
(The Well-Known Prefix is 96 bits long, and can only be used
in the last form of the table.)
"
So 40 and 56 are missing.
> So probably we are not wasting bits here, since this is a typical usage
> that DPDK can provide.
> Of cause more description is needed in the code here.
>
> > If you want to limit the size of the match, we should have a generic syntax to
> > choose how many bits of the IPv6 address are taken into account for RSS. Or
> > maybe an IPv6 mask.
>
> Yes, I believe at some moment, a more generic solution is mandatory,
> And I think that will not work if we stick on the 64 bits, new API need to be introduced and old one should be abandoned
>
> >
> > > but anyway use 64 bits to represent RSS inputset can't meet the coming
> > > complex RSS usage, we may need to figure out some new APIs and
> > abandon
> > > the old one.
> > > A stacked protocol layer with bit field selector in each layer is
> > > under consideration, hope we can contribute some RFC at some moment.
> > > also feel free let us know your thought.
> >
> > My thought is to discuss how to fit this need in future and avoid adding few
> > bits of temporary workaround.
> > API definition is serious and we must avoid temporary half solutions.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 11:57 ` Thomas Monjalon
@ 2020-07-08 12:05 ` Zhang, Qi Z
2020-07-08 12:26 ` Thomas Monjalon
0 siblings, 1 reply; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-08 12:05 UTC (permalink / raw)
To: Thomas Monjalon, Xing, Beilei
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, July 8, 2020 7:57 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; arybchenko@solarflare.com;
> viacheslavo@mellanox.com; jerinj@marvell.com;
> ajit.khaparde@broadcom.com; orika@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6
> prefix
>
> 08/07/2020 13:10, Zhang, Qi Z:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 08/07/2020 11:45, Zhang, Qi Z:
> > > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > > 16/06/2020 10:16, Junfeng Guo:
> > > > >> This patch defines new RSS offload types for IPv6 prefix with
> > > > >> 32, 48,
> > > > >> 64 bits of both SRC and DST IPv6 address.
> > > > >>
> > > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > > >> ---
> > > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > > ++++++++++++++++++++++++++++++++++
> > > > >> 1 file changed, 51 insertions(+)
> > > > >>
> > > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8
> > > > >> 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)
> > > > >
> > > > > PRE32, 48 and 64 are not obvious.
> > > > > Why is it needed?
> > > >
> > > > there is typical usage for NAT64, which use 32 bit prefix for IPv6
> > > > addresses, in this case flows over IPv4 and IPv6 will result in
> > > > the same hash value, as well as 48, 64, which also have some
> > > > corresponding use cases,
> > > > > At least, please add comments for the values of this API.
> > > >
> > > > sure, we will add more comments.
> > > > > Do we want to continue with the RTE_ prefix missing?
> > > > > Can't we add the prefix for the new values?
> > >
> > > I think you misunderstood this question. I am asking to change the
> > > name
> > > ETH_RSS_L3_PRE32 to RTE_ETH_RSS_L3_PRE32
> >
> > OK, we are going change all the ETH_RSS_xxx to RTE_ETH_RSS_xxx, or just
> the new values?
> > the first option looks make sense to me.
>
> You cannot break compatibility with the existing values, but you can provide
> an alias to preserve compatibility.
I will prefer the rename / alias can be done in a seperate patch for a single purpose.
>
> > > > 32, 48, 64 are typical usage, and consider suffix pair we may add
> > > > later, it will cost 6 bits so far we still have 27 bit left, so
> > > > it looks like will not be a problem in following couple releases.
> > >
> > > Having some space left is not a reason to waste it :) If I
> > > understand well, there is no standard for this API.
> > > You are assigning some bits to some usage.
> > > I don't find it generic and flexible enough.
> >
> > Actually IPv6 address prefix is in spec, please check below RFC.
> > https://tools.ietf.org/html/rfc6052#page-5
>
> Quoting the RFC:
> "
> the prefix shall be either the "Well-Known Prefix"
> or a "Network-Specific Prefix" unique to the organization
> deploying the address translators.
> The prefixes can only have one of the following lengths:
> 32, 40, 48, 56, 64, or 96.
> (The Well-Known Prefix is 96 bits long, and can only be used
> in the last form of the table.)
> "
>
> So 40 and 56 are missing.
Yes, like to add and lets accelerate the progress to abandon the old APIs :)
>
> > So probably we are not wasting bits here, since this is a typical
> > usage that DPDK can provide.
> > Of cause more description is needed in the code here.
> >
> > > If you want to limit the size of the match, we should have a generic
> > > syntax to choose how many bits of the IPv6 address are taken into
> > > account for RSS. Or maybe an IPv6 mask.
> >
> > Yes, I believe at some moment, a more generic solution is mandatory,
> > And I think that will not work if we stick on the 64 bits, new API
> > need to be introduced and old one should be abandoned
> >
> > >
> > > > but anyway use 64 bits to represent RSS inputset can't meet the
> > > > coming complex RSS usage, we may need to figure out some new APIs
> > > > and
> > > abandon
> > > > the old one.
> > > > A stacked protocol layer with bit field selector in each layer is
> > > > under consideration, hope we can contribute some RFC at some
> moment.
> > > > also feel free let us know your thought.
> > >
> > > My thought is to discuss how to fit this need in future and avoid
> > > adding few bits of temporary workaround.
> > > API definition is serious and we must avoid temporary half solutions.
>
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 12:05 ` Zhang, Qi Z
@ 2020-07-08 12:26 ` Thomas Monjalon
2020-07-08 12:37 ` Zhang, Qi Z
0 siblings, 1 reply; 26+ messages in thread
From: Thomas Monjalon @ 2020-07-08 12:26 UTC (permalink / raw)
To: Xing, Beilei, Zhang, Qi Z
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
08/07/2020 14:05, Zhang, Qi Z:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 08/07/2020 13:10, Zhang, Qi Z:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > 08/07/2020 11:45, Zhang, Qi Z:
> > > > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > > > 16/06/2020 10:16, Junfeng Guo:
> > > > > >> This patch defines new RSS offload types for IPv6 prefix with
> > > > > >> 32, 48,
> > > > > >> 64 bits of both SRC and DST IPv6 address.
> > > > > >>
> > > > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > > > >> ---
> > > > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > > > ++++++++++++++++++++++++++++++++++
> > > > > >> 1 file changed, 51 insertions(+)
> > > > > >>
> > > > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8
> > > > > >> 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)
> > > > > >
> > > > > > PRE32, 48 and 64 are not obvious.
> > > > > > Why is it needed?
> > > > >
> > > > > there is typical usage for NAT64, which use 32 bit prefix for IPv6
> > > > > addresses, in this case flows over IPv4 and IPv6 will result in
> > > > > the same hash value, as well as 48, 64, which also have some
> > > > > corresponding use cases,
> > > > > > At least, please add comments for the values of this API.
> > > > >
> > > > > sure, we will add more comments.
[...]
> > > > > 32, 48, 64 are typical usage, and consider suffix pair we may add
> > > > > later, it will cost 6 bits so far we still have 27 bit left, so
> > > > > it looks like will not be a problem in following couple releases.
> > > >
> > > > Having some space left is not a reason to waste it :) If I
> > > > understand well, there is no standard for this API.
> > > > You are assigning some bits to some usage.
> > > > I don't find it generic and flexible enough.
> > >
> > > Actually IPv6 address prefix is in spec, please check below RFC.
> > > https://tools.ietf.org/html/rfc6052#page-5
> >
> > Quoting the RFC:
> > "
> > the prefix shall be either the "Well-Known Prefix"
> > or a "Network-Specific Prefix" unique to the organization
> > deploying the address translators.
> > The prefixes can only have one of the following lengths:
> > 32, 40, 48, 56, 64, or 96.
> > (The Well-Known Prefix is 96 bits long, and can only be used
> > in the last form of the table.)
> > "
> >
> > So 40 and 56 are missing.
>
> Yes, like to add and lets accelerate the progress to abandon the old APIs :)
Please could list which part of the existing API you would like
to deprecate in future?
> > > So probably we are not wasting bits here, since this is a typical
> > > usage that DPDK can provide.
> > > Of cause more description is needed in the code here.
> > >
> > > > If you want to limit the size of the match, we should have a generic
> > > > syntax to choose how many bits of the IPv6 address are taken into
> > > > account for RSS. Or maybe an IPv6 mask.
> > >
> > > Yes, I believe at some moment, a more generic solution is mandatory,
> > > And I think that will not work if we stick on the 64 bits, new API
> > > need to be introduced and old one should be abandoned
> > >
> > > >
> > > > > but anyway use 64 bits to represent RSS inputset can't meet the
> > > > > coming complex RSS usage, we may need to figure out some new APIs
> > > > > and
> > > > abandon
> > > > > the old one.
> > > > > A stacked protocol layer with bit field selector in each layer is
> > > > > under consideration, hope we can contribute some RFC at some
> > moment.
> > > > > also feel free let us know your thought.
> > > >
> > > > My thought is to discuss how to fit this need in future and avoid
> > > > adding few bits of temporary workaround.
> > > > API definition is serious and we must avoid temporary half solutions.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 12:26 ` Thomas Monjalon
@ 2020-07-08 12:37 ` Zhang, Qi Z
2020-07-08 14:29 ` Thomas Monjalon
0 siblings, 1 reply; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-08 12:37 UTC (permalink / raw)
To: Thomas Monjalon, Xing, Beilei
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, July 8, 2020 8:26 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; arybchenko@solarflare.com;
> viacheslavo@mellanox.com; jerinj@marvell.com;
> ajit.khaparde@broadcom.com; orika@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6
> prefix
>
> 08/07/2020 14:05, Zhang, Qi Z:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 08/07/2020 13:10, Zhang, Qi Z:
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > 08/07/2020 11:45, Zhang, Qi Z:
> > > > > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > > > > 16/06/2020 10:16, Junfeng Guo:
> > > > > > >> This patch defines new RSS offload types for IPv6 prefix
> > > > > > >> with 32, 48,
> > > > > > >> 64 bits of both SRC and DST IPv6 address.
> > > > > > >>
> > > > > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > > > > >> ---
> > > > > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > > > > ++++++++++++++++++++++++++++++++++
> > > > > > >> 1 file changed, 51 insertions(+)
> > > > > > >>
> > > > > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8
> > > > > > >> 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)
> > > > > > >
> > > > > > > PRE32, 48 and 64 are not obvious.
> > > > > > > Why is it needed?
> > > > > >
> > > > > > there is typical usage for NAT64, which use 32 bit prefix for
> > > > > > IPv6 addresses, in this case flows over IPv4 and IPv6 will
> > > > > > result in the same hash value, as well as 48, 64, which also
> > > > > > have some corresponding use cases,
> > > > > > > At least, please add comments for the values of this API.
> > > > > >
> > > > > > sure, we will add more comments.
> [...]
> > > > > > 32, 48, 64 are typical usage, and consider suffix pair we may
> > > > > > add later, it will cost 6 bits so far we still have 27 bit
> > > > > > left, so it looks like will not be a problem in following couple
> releases.
> > > > >
> > > > > Having some space left is not a reason to waste it :) If I
> > > > > understand well, there is no standard for this API.
> > > > > You are assigning some bits to some usage.
> > > > > I don't find it generic and flexible enough.
> > > >
> > > > Actually IPv6 address prefix is in spec, please check below RFC.
> > > > https://tools.ietf.org/html/rfc6052#page-5
> > >
> > > Quoting the RFC:
> > > "
> > > the prefix shall be either the "Well-Known Prefix"
> > > or a "Network-Specific Prefix" unique to the organization
> > > deploying the address translators.
> > > The prefixes can only have one of the following lengths:
> > > 32, 40, 48, 56, 64, or 96.
> > > (The Well-Known Prefix is 96 bits long, and can only be used
> > > in the last form of the table.)
> > > "
> > >
> > > So 40 and 56 are missing.
> >
> > Yes, like to add and lets accelerate the progress to abandon the old
> > APIs :)
>
> Please could list which part of the existing API you would like to deprecate in
> future?
I think it's a new version of rte_flow_action_rss, we need a more generic way to describe the RSS input set of a flow
But not just a 64 bits type, then all ETH_RSS_xxx will be decoupled from rte_flow.
>
>
> > > > So probably we are not wasting bits here, since this is a typical
> > > > usage that DPDK can provide.
> > > > Of cause more description is needed in the code here.
> > > >
> > > > > If you want to limit the size of the match, we should have a
> > > > > generic syntax to choose how many bits of the IPv6 address are
> > > > > taken into account for RSS. Or maybe an IPv6 mask.
> > > >
> > > > Yes, I believe at some moment, a more generic solution is
> > > > mandatory, And I think that will not work if we stick on the 64
> > > > bits, new API need to be introduced and old one should be
> > > > abandoned
> > > >
> > > > >
> > > > > > but anyway use 64 bits to represent RSS inputset can't meet
> > > > > > the coming complex RSS usage, we may need to figure out some
> > > > > > new APIs and
> > > > > abandon
> > > > > > the old one.
> > > > > > A stacked protocol layer with bit field selector in each layer
> > > > > > is under consideration, hope we can contribute some RFC at
> > > > > > some
> > > moment.
> > > > > > also feel free let us know your thought.
> > > > >
> > > > > My thought is to discuss how to fit this need in future and
> > > > > avoid adding few bits of temporary workaround.
> > > > > API definition is serious and we must avoid temporary half solutions.
>
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 12:37 ` Zhang, Qi Z
@ 2020-07-08 14:29 ` Thomas Monjalon
2020-07-09 0:33 ` Zhang, Qi Z
0 siblings, 1 reply; 26+ messages in thread
From: Thomas Monjalon @ 2020-07-08 14:29 UTC (permalink / raw)
To: Xing, Beilei, Zhang, Qi Z
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
08/07/2020 14:37, Zhang, Qi Z:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 08/07/2020 14:05, Zhang, Qi Z:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > 08/07/2020 13:10, Zhang, Qi Z:
> > > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > > 08/07/2020 11:45, Zhang, Qi Z:
> > > > > > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > > > > > 16/06/2020 10:16, Junfeng Guo:
> > > > > > > >> This patch defines new RSS offload types for IPv6 prefix
> > > > > > > >> with 32, 48,
> > > > > > > >> 64 bits of both SRC and DST IPv6 address.
> > > > > > > >>
> > > > > > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > > > > > >> ---
> > > > > > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > > > > > ++++++++++++++++++++++++++++++++++
> > > > > > > >> 1 file changed, 51 insertions(+)
> > > > > > > >>
> > > > > > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > > > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8
> > > > > > > >> 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)
> > > > > > > >
> > > > > > > > PRE32, 48 and 64 are not obvious.
> > > > > > > > Why is it needed?
> > > > > > >
> > > > > > > there is typical usage for NAT64, which use 32 bit prefix for
> > > > > > > IPv6 addresses, in this case flows over IPv4 and IPv6 will
> > > > > > > result in the same hash value, as well as 48, 64, which also
> > > > > > > have some corresponding use cases,
> > > > > > > > At least, please add comments for the values of this API.
> > > > > > >
> > > > > > > sure, we will add more comments.
> > [...]
> > > > > > > 32, 48, 64 are typical usage, and consider suffix pair we may
> > > > > > > add later, it will cost 6 bits so far we still have 27 bit
> > > > > > > left, so it looks like will not be a problem in following couple
> > releases.
> > > > > >
> > > > > > Having some space left is not a reason to waste it :) If I
> > > > > > understand well, there is no standard for this API.
> > > > > > You are assigning some bits to some usage.
> > > > > > I don't find it generic and flexible enough.
> > > > >
> > > > > Actually IPv6 address prefix is in spec, please check below RFC.
> > > > > https://tools.ietf.org/html/rfc6052#page-5
> > > >
> > > > Quoting the RFC:
> > > > "
> > > > the prefix shall be either the "Well-Known Prefix"
> > > > or a "Network-Specific Prefix" unique to the organization
> > > > deploying the address translators.
> > > > The prefixes can only have one of the following lengths:
> > > > 32, 40, 48, 56, 64, or 96.
> > > > (The Well-Known Prefix is 96 bits long, and can only be used
> > > > in the last form of the table.)
> > > > "
> > > >
> > > > So 40 and 56 are missing.
> > >
> > > Yes, like to add and lets accelerate the progress to abandon the old
> > > APIs :)
> >
> > Please could list which part of the existing API you would like to deprecate in
> > future?
>
> I think it's a new version of rte_flow_action_rss, we need a more generic way to describe the RSS input set of a flow
> But not just a 64 bits type, then all ETH_RSS_xxx will be decoupled from rte_flow.
I was asking what would you deprecate?
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix
2020-07-08 14:29 ` Thomas Monjalon
@ 2020-07-09 0:33 ` Zhang, Qi Z
0 siblings, 0 replies; 26+ messages in thread
From: Zhang, Qi Z @ 2020-07-09 0:33 UTC (permalink / raw)
To: Thomas Monjalon, Xing, Beilei
Cc: dev, Guo, Jia, Guo, Junfeng, Su, Simei, Yigit, Ferruh,
arybchenko, viacheslavo, jerinj, ajit.khaparde, orika
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, July 8, 2020 10:29 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; arybchenko@solarflare.com;
> viacheslavo@mellanox.com; jerinj@marvell.com;
> ajit.khaparde@broadcom.com; orika@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6
> prefix
>
> 08/07/2020 14:37, Zhang, Qi Z:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 08/07/2020 14:05, Zhang, Qi Z:
> > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > 08/07/2020 13:10, Zhang, Qi Z:
> > > > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > > > 08/07/2020 11:45, Zhang, Qi Z:
> > > > > > > > On 2020/7/7 19:06, Thomas Monjalon wrote:
> > > > > > > > > 16/06/2020 10:16, Junfeng Guo:
> > > > > > > > >> This patch defines new RSS offload types for IPv6
> > > > > > > > >> prefix with 32, 48,
> > > > > > > > >> 64 bits of both SRC and DST IPv6 address.
> > > > > > > > >>
> > > > > > > > >> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> > > > > > > > >> ---
> > > > > > > > >> lib/librte_ethdev/rte_ethdev.h | 51
> > > > > > > ++++++++++++++++++++++++++++++++++
> > > > > > > > >> 1 file changed, 51 insertions(+)
> > > > > > > > >>
> > > > > > > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h
> > > > > > > > >> b/lib/librte_ethdev/rte_ethdev.h index
> > > > > > > > >> 631b146bd..5a7ba36d8
> > > > > > > > >> 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)
> > > > > > > > >
> > > > > > > > > PRE32, 48 and 64 are not obvious.
> > > > > > > > > Why is it needed?
> > > > > > > >
> > > > > > > > there is typical usage for NAT64, which use 32 bit prefix
> > > > > > > > for
> > > > > > > > IPv6 addresses, in this case flows over IPv4 and IPv6 will
> > > > > > > > result in the same hash value, as well as 48, 64, which
> > > > > > > > also have some corresponding use cases,
> > > > > > > > > At least, please add comments for the values of this API.
> > > > > > > >
> > > > > > > > sure, we will add more comments.
> > > [...]
> > > > > > > > 32, 48, 64 are typical usage, and consider suffix pair we
> > > > > > > > may add later, it will cost 6 bits so far we still have 27
> > > > > > > > bit left, so it looks like will not be a problem in
> > > > > > > > following couple
> > > releases.
> > > > > > >
> > > > > > > Having some space left is not a reason to waste it :) If I
> > > > > > > understand well, there is no standard for this API.
> > > > > > > You are assigning some bits to some usage.
> > > > > > > I don't find it generic and flexible enough.
> > > > > >
> > > > > > Actually IPv6 address prefix is in spec, please check below RFC.
> > > > > > https://tools.ietf.org/html/rfc6052#page-5
> > > > >
> > > > > Quoting the RFC:
> > > > > "
> > > > > the prefix shall be either the "Well-Known Prefix"
> > > > > or a "Network-Specific Prefix" unique to the organization
> > > > > deploying the address translators.
> > > > > The prefixes can only have one of the following lengths:
> > > > > 32, 40, 48, 56, 64, or 96.
> > > > > (The Well-Known Prefix is 96 bits long, and can only be used
> > > > > in the last form of the table.) "
> > > > >
> > > > > So 40 and 56 are missing.
> > > >
> > > > Yes, like to add and lets accelerate the progress to abandon the
> > > > old APIs :)
> > >
> > > Please could list which part of the existing API you would like to
> > > deprecate in future?
> >
> > I think it's a new version of rte_flow_action_rss, we need a more
> > generic way to describe the RSS input set of a flow But not just a 64 bits
> type, then all ETH_RSS_xxx will be decoupled from rte_flow.
>
> I was asking what would you deprecate?
I think at least those ETH_RSS xxx modifiers from bottom can be deprecated, since they are only be used by rte_flow
>
^ 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).