Skip to contentSkip to conversation

net/ice: add RSS support for IPv6 prefix

PATCH Superseded Junfeng Guo 4 participants 26 messages Jun 12, 2020 – Jul 9, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: 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.

---
 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(+)
app/test-pmd/cmdline.c +6 -0
index 996a49876..a050f8da7 100644
@@ -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"))
app/test-pmd/config.c +3 -0
index a7112c998..d9550a6f2 100644
@@ -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 },
drivers/net/ice/ice_hash.c +90 -0

114 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev.h +51 -0

63 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

v2 cover 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.

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(+)
Signature · 1 line
2.17.1
#2 lore raw

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.

---
 lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
lib/librte_ethdev/rte_ethdev.h +51 -0
index 631b146bd..5a7ba36d8 100644
@@ -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 | \
Signature · 1 line
2.17.1
Reviewed-by on v2 1/3
#3 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 11 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Tuesday, June 16, 2020 4:17 PM
To: Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>
Subject: [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 4 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48, 64 bits of both SRC and DST IPv6 address.

Quoted 76 lines
---
 lib/librte_ethdev/rte_ethdev.h | 51
++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
lib/librte_ethdev/rte_ethdev.h +51 -2
index 631b146bd..5a7ba36d8 100644
@@ -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

#5 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

In reply to Junfeng Guo

16/06/2020 10:16, Junfeng Guo:

Quoted 13 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48, 64 bits of both SRC and DST IPv6 address.

---
 lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
lib/librte_ethdev/rte_ethdev.h +0 -0
index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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.

#6 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Hi Thomas:

Sorry for late reply, see comment inline.

Quoted 9 lines · Thomas Monjalon

16/06/2020 10:16, Junfeng Guo:

Quoted 8 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48, 64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
  1 file changed, 51 insertions(+)
Quoted 13 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
index 631b146bd..5a7ba36d8 100644
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

Quoted 2 lines

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.

Quoted 3 lines

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

Quoted 3 lines
#7 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 11:45, Zhang, Qi Z:

Quoted 25 lines · Thomas Monjalon
Quoted 9 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 8 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48, 64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
  1 file changed, 51 insertions(+)
Quoted 14 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
index 631b146bd..5a7ba36d8 100644
@@ -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?

Quoted 9 lines

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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

Quoted 2 lines

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

Quoted 4 lines

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.

Quoted 6 lines

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.

#8 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 47 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, July 8, 2020 5:58 PM
To: Ye, Xiaolong <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 21 lines
Quoted 16 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 13 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

Quoted 2 lines

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.

Quoted 9 lines
Quoted 4 lines

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.

Quoted 3 lines

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

Quoted 14 lines
Quoted 3 lines

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

Quoted 4 lines

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.

#9 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 13:10, Zhang, Qi Z:

Quoted 36 lines

From: Thomas Monjalon <[email protected]>

Quoted 35 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 24 lines
Quoted 16 lines

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 13 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

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.

Quoted 11 lines
Quoted 8 lines
Quoted 3 lines

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.

Quoted 23 lines

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.

Quoted 3 lines

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

Quoted 12 lines
Quoted 3 lines

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

Quoted 4 lines

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.

#10 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 59 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, July 8, 2020 7:57 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 13:10, Zhang, Qi Z:

Quoted 44 lines

From: Thomas Monjalon <[email protected]>

Quoted 42 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 18 lines
Quoted 17 lines
Quoted 8 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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?

Quoted 9 lines

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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

Quoted 2 lines

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

Quoted 6 lines
Quoted 1 line

OK, we are going change all the ETH_RSS_xxx to RTE_ETH_RSS_xxx, or just

the new values?

Quoted 1 line

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.

Quoted 24 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

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.

Quoted 7 lines
Quoted 4 lines

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.)
"

Quoted 1 line

So 40 and 56 are missing.

Yes, like to add and lets accelerate the progress to abandon the old APIs :)

Quoted 29 lines
Quoted 5 lines

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.

Quoted 16 lines
Quoted 3 lines

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

Quoted 8 lines
Quoted 4 lines

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

Quoted 3 lines

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.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

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.

#11 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 14:05, Zhang, Qi Z:

Quoted 39 lines

From: Thomas Monjalon <[email protected]>

Quoted 38 lines

08/07/2020 13:10, Zhang, Qi Z:

Quoted 37 lines

From: Thomas Monjalon <[email protected]>

Quoted 36 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 25 lines
Quoted 17 lines
Quoted 8 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

[...]

Quoted 23 lines
Quoted 23 lines
Quoted 11 lines
Quoted 8 lines
Quoted 3 lines

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.)
"

Quoted 3 lines
Quoted 1 line

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?

Quoted 26 lines
Quoted 26 lines
Quoted 4 lines

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.

Quoted 16 lines
Quoted 3 lines

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

Quoted 8 lines
Quoted 4 lines

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

Quoted 3 lines

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.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

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.

#12 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 79 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, July 8, 2020 8:26 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 14:05, Zhang, Qi Z:

Quoted 39 lines

From: Thomas Monjalon <[email protected]>

Quoted 38 lines

08/07/2020 13:10, Zhang, Qi Z:

Quoted 37 lines

From: Thomas Monjalon <[email protected]>

Quoted 36 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 25 lines
Quoted 17 lines
Quoted 8 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

[...]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

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.

Quoted 20 lines
Quoted 20 lines
Quoted 8 lines
Quoted 5 lines

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.)
"

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 32 lines
Quoted 30 lines
Quoted 30 lines
Quoted 6 lines

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.

Quoted 18 lines
Quoted 3 lines

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

Quoted 9 lines
Quoted 4 lines

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

Quoted 4 lines

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.

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

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.

#13 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 14:37, Zhang, Qi Z:

Quoted 68 lines

From: Thomas Monjalon <[email protected]>

Quoted 67 lines

08/07/2020 14:05, Zhang, Qi Z:

Quoted 39 lines

From: Thomas Monjalon <[email protected]>

Quoted 38 lines

08/07/2020 13:10, Zhang, Qi Z:

Quoted 37 lines

From: Thomas Monjalon <[email protected]>

Quoted 36 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 25 lines
Quoted 17 lines
Quoted 8 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

[...]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

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.

Quoted 22 lines
Quoted 21 lines
Quoted 8 lines
Quoted 5 lines

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.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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?

#14 lore raw

Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

Quoted 88 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, July 8, 2020 10:29 PM
To: Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>; Yigit, Ferruh <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix

08/07/2020 14:37, Zhang, Qi Z:

Quoted 73 lines

From: Thomas Monjalon <[email protected]>

Quoted 72 lines

08/07/2020 14:05, Zhang, Qi Z:

Quoted 41 lines

From: Thomas Monjalon <[email protected]>

Quoted 40 lines

08/07/2020 13:10, Zhang, Qi Z:

Quoted 39 lines

From: Thomas Monjalon <[email protected]>

Quoted 38 lines

08/07/2020 11:45, Zhang, Qi Z:

Quoted 9 lines · Thomas Monjalon
Quoted 8 lines

16/06/2020 10:16, Junfeng Guo:

Quoted 7 lines

This patch defines new RSS offload types for IPv6
prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

---
  lib/librte_ethdev/rte_ethdev.h | 51

++++++++++++++++++++++++++++++++++

Quoted 27 lines
Quoted 18 lines
Quoted 9 lines
  1 file changed, 51 insertions(+)
(quoted diff) +0 -0

b/lib/librte_ethdev/rte_ethdev.h index
631b146bd..5a7ba36d8
100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 543

Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +3 -0
@@ -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,

Quoted 1 line

At least, please add comments for the values of this API.

sure, we will add more comments.

[...]

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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.

Quoted 23 lines
Quoted 19 lines
Quoted 8 lines
Quoted 5 lines

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.) "

Quoted 1 line

So 40 and 56 are missing.

Yes, like to add and lets accelerate the progress to abandon the old APIs :)

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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

Quoted 1 line
#15 lore raw

PATCH v2 2/3 app/testpmd: support extended RSS offload types

In reply to Junfeng Guo

This patch adds testpmd cmdline support for IPv6 prefix.

---
 app/test-pmd/cmdline.c | 6 ++++++
 app/test-pmd/config.c  | 3 +++
 2 files changed, 9 insertions(+)
app/test-pmd/cmdline.c +6 -0
index 81c87c8c3..4d4612395 100644
@@ -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"))
app/test-pmd/config.c +3 -0
index a79019f52..e51ef8b19 100644
@@ -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 },
Signature · 1 line
2.17.1
#16 lore raw

PATCH v2 3/3 net/ice: add RSS support for IPv6 prefix

In reply to Junfeng Guo

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.

---
 drivers/net/ice/ice_hash.c | 204 +++++++++++++++++++++++++++++++++++++
 1 file changed, 204 insertions(+)
drivers/net/ice/ice_hash.c +204 -0
index 0c1119129..f5c2879d0 100644
@@ -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_ONL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L(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_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_PR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ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP, ICE_HASH_TCP_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
 		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) |
 		BIT_ULL(ICE_FLOW_FIELD_IDX_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_D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FLOW_FIELD_IDX_IPV6_PRE64_SA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP, ICE_HASH_SCTP_IPV6_PRE64},
 };
 
 static struct ice_flow_engine ice_hash_engine = {
Signature · 1 line
2.17.1
#17 lore raw

v3 cover add RSS support for IPv6 prefix

In reply to Junfeng Guo

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(+)
Signature · 1 line
2.25.1
#18 lore raw

PATCH v3 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.

---
 lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
lib/librte_ethdev/rte_ethdev.h +51 -0
index 631b146bd..5a7ba36d8 100644
@@ -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 | \
Signature · 1 line
2.25.1
#19 lore raw

PATCH v3 2/3 app/testpmd: support extended RSS offload types

In reply to Junfeng Guo

This patch adds testpmd cmdline support for IPv6 prefix.

---
 app/test-pmd/cmdline.c | 6 ++++++
 app/test-pmd/config.c  | 3 +++
 2 files changed, 9 insertions(+)
app/test-pmd/cmdline.c +6 -0
index 81c87c8c3..4d4612395 100644
@@ -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"))
app/test-pmd/config.c +3 -0
index a79019f52..e51ef8b19 100644
@@ -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 },
Signature · 1 line
2.25.1
#20 lore raw

PATCH v3 3/3 net/ice: add RSS support for IPv6 prefix

In reply to Junfeng Guo

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.

---
 drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)
drivers/net/ice/ice_hash.c +207 -0
index f23cc9517..62317182b 100644
@@ -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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Y | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L3_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_UDP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_UDP, ICE_HASH_UDP_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
 		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) |
 		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT) |
@@ -522,6 +600,69 @@ struct ice_hash_match_type ice_hash_type_list[] = {
 	{ETH_RSS_NONFRAG_IPV6_TCP,
 		ICE_H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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_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_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PV6_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 |
Signature · 1 line
2.25.1
#21 lore raw

v4 cover add RSS support for IPv6 prefix

In reply to Junfeng Guo

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(+)
Signature · 1 line
2.25.1
#22 lore raw

PATCH v4 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.

---
 lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
lib/librte_ethdev/rte_ethdev.h +51 -0
index 631b146bd..5a7ba36d8 100644
@@ -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 | \
Signature · 1 line
2.25.1
#23 lore raw

PATCH v4 2/3 app/testpmd: support extended RSS offload types

In reply to Junfeng Guo

This patch adds testpmd cmdline support for IPv6 prefix.

---
 app/test-pmd/cmdline.c | 6 ++++++
 app/test-pmd/config.c  | 3 +++
 2 files changed, 9 insertions(+)
app/test-pmd/cmdline.c +6 -0
index 81c87c8c3..4d4612395 100644
@@ -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"))
app/test-pmd/config.c +3 -0
index 75013100f..5837b9011 100644
@@ -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 },
Signature · 1 line
2.25.1
#24 lore raw

PATCH v4 3/3 net/ice: add RSS support for IPv6 prefix

In reply to Junfeng Guo

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.

---
 drivers/net/ice/ice_hash.c | 207 +++++++++++++++++++++++++++++++++++++
 1 file changed, 207 insertions(+)
drivers/net/ice/ice_hash.c +207 -0
index a10734af0..9d455b262 100644
@@ -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_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W_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_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_UL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TCP | ETH_RSS_L3_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L3_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_TCP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_TCP, ICE_HASH_TCP_IPV6_PRE64},
 	{ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
 		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) |
 		BIT_ULL(ICE_FLOW_FIELD_IDX_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,
+		BI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X_IPV6_PRE64_SA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_SA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA) |
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L3_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE64_DA)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_SRC_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP | ETH_RSS_L4_DST_ONLY,
+		BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)},
+	{ETH_RSS_IPV6_PRE64_SCTP, ICE_HASH_SCTP_IPV6_PRE64},
 };
 
 static struct ice_flow_engine ice_hash_engine = {
@@ -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 |
Signature · 1 line
2.25.1
Acked-by on the v4 series Applied
#25 lore raw

Re: [dpdk-dev] [PATCH v4 0/3] add RSS support for IPv6 prefix

In reply to Junfeng Guo
Quoted 42 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Wednesday, July 8, 2020 3:34 PM
To: Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>; Xing, Beilei <[email protected]>; Yigit, Ferruh <[email protected]>
Cc: [email protected]; Guo, Jia <[email protected]>; Guo, Junfeng <[email protected]>; Su, Simei <[email protected]>
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(+)
Quoted 2 lines

--
2.25.1

Applied to dpdk-next-net-intel.

Thanks
Qi