Skip to contentSkip to conversation

Support IPv6 flow label based RSS

PATCH Superseded Ajit Khaparde 2 participants 12 messages Feb 8, 2024 – Feb 9, 2024 Network drivers

lore
Share & tools
lore
#0 lore raw

cover Support IPv6 flow label based RSS

The use of 5-tuple of the source address, destination address, source port, destination port, and the transport protocol type may not be possible due to IP fragmentation, encryption, or inability to parse past IPv6 extensions headers.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Please apply.

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Ajit Khaparde (3):
ethdev: add support for RSS based on IPv6 flow label app/testpmd: add IPv6 flow label to RSS types net/bnxt: add IPv6 flow label based RSS support

 app/test-pmd/config.c          | 1 +
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 7 +++++++
 drivers/net/bnxt/bnxt_vnic.c   | 9 +++++++--
 lib/ethdev/rte_ethdev.h        | 1 +
 6 files changed, 19 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.2 (Apple Git-143)
#1 lore raw

PATCH 1/3 ethdev: add support for RSS based on IPv6 flow label

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

---
 lib/ethdev/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
lib/ethdev/rte_ethdev.h +1 -0
index 2687c23fa6..75a3f5f2c7 100644
@@ -587,6 +587,7 @@ struct rte_eth_rss_conf {
 #define RTE_ETH_RSS_L4_CHKSUM          RTE_BIT64(35)
 
 #define RTE_ETH_RSS_L2TPV2             RTE_BIT64(36)
+#define RTE_ETH_RSS_IPV6_FLOW_LABEL    RTE_BIT64(37)
 
 /*
  * We use the following macros to combine with above RTE_ETH_RSS_* for
Signature · 1 line
2.39.2 (Apple Git-143)
#2 lore raw

PATCH 2/3 app/testpmd: add IPv6 flow label to RSS types

In reply to Ajit Khaparde

Add IPv6 flow label to the list of RSS types.

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/config.c +1 -0
index 2c4dedd603..3c5c5bac67 100644
@@ -148,6 +148,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
 	{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
 	{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
+	{ "ipv6-flow-label", RTE_ETH_RSS_IPV6_FLOW_LABEL },
 	{ NULL, 0},
 };
 
Signature · 1 line
2.39.2 (Apple Git-143)
#3 lore raw

PATCH 3/3 net/bnxt: add IPv6 flow label based RSS support

In reply to Ajit Khaparde

P7 hardware family can support IPv6 flow label based RSS. Check if the firmware indicates capability bit to support IPv6 flow label based RSS and parse the RSS hash types appropriately.

---
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 7 +++++++
 drivers/net/bnxt/bnxt_vnic.c   | 9 +++++++--
 4 files changed, 17 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt.h +1 -0
index b604284256..42ecca35d7 100644
@@ -868,6 +868,7 @@ struct bnxt {
 #define BNXT_VNIC_CAP_OUTER_RSS_TRUSTED_VF	BIT(4)
 #define BNXT_VNIC_CAP_XOR_MODE		BIT(5)
 #define BNXT_VNIC_CAP_CHKSM_MODE	BIT(6)
+#define BNXT_VNIC_CAP_IPV6_FLOW_LABEL_MODE	BIT(7)
 #define BNXT_VNIC_CAP_L2_CQE_MODE	BIT(8)
 #define BNXT_VNIC_CAP_AH_SPI4_CAP	BIT(9)
 #define BNXT_VNIC_CAP_AH_SPI6_CAP	BIT(10)
drivers/net/bnxt/bnxt_ethdev.c +2 -0
index bc98594c2f..abe46e8004 100644
@@ -1086,6 +1086,8 @@ uint64_t bnxt_eth_rss_support(struct bnxt *bp)
 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_CHKSM_MODE)
 		support |= RTE_ETH_RSS_IPV4_CHKSUM |
 			   RTE_ETH_RSS_L4_CHKSUM;
+	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_IPV6_FLOW_LABEL_MODE)
+		support |= RTE_ETH_RSS_IPV6_FLOW_LABEL;
 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_AH_SPI_CAP)
 		support |= RTE_ETH_RSS_AH;
 	if (bp->vnic_cap_flags & BNXT_VNIC_CAP_ESP_SPI_CAP)
drivers/net/bnxt/bnxt_hwrm.c +7 -0
index 802973ba97..17527a3c4d 100644
@@ -1307,6 +1307,9 @@ int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)
 	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_TOEPLITZ_CHKSM_CAP)
 		bp->vnic_cap_flags |= BNXT_VNIC_CAP_CHKSM_MODE;
 
+	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPV6_FLOW_LABEL_CAP)
+		bp->vnic_cap_flags |= BNXT_VNIC_CAP_IPV6_FLOW_LABEL_MODE;
+
 	if (flags & HWRM_VNIC_QCAPS_OUTPUT_FLAGS_L2_CQE_MODE_CAP)
 		bp->vnic_cap_flags |= BNXT_VNIC_CAP_L2_CQE_MODE;
 
@@ -2772,6 +2775,10 @@ static uint32_t bnxt_sanitize_rss_type(struct bnxt *bp, uint32_t types)
 {
 	uint32_t hwrm_type = types;
 
+	if (types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL &&
+	    !(bp->vnic_cap_flags & BNXT_VNIC_CAP_IPV6_FLOW_LABEL_MODE))
+		hwrm_type &= ~HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL;
+
 	if (types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV4 &&
 	    !(bp->vnic_cap_flags & BNXT_VNIC_CAP_ESP_SPI4_CAP))
 		hwrm_type &= ~HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV4;
drivers/net/bnxt/bnxt_vnic.c +7 -2
index 5092a7d774..76905ebdd1 100644
@@ -280,6 +280,8 @@ uint32_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type)
 		hwrm_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6;
 	if (rte_type & RTE_ETH_RSS_NONFRAG_IPV6_UDP)
 		hwrm_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6;
+	if (rte_type & RTE_ETH_RSS_IPV6_FLOW_LABEL)
+		hwrm_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL;
 	if (rte_type & RTE_ETH_RSS_ESP)
 		hwrm_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV4 |
 			     HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV6;
@@ -302,6 +304,7 @@ int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl)
 	bool l3_and_l4 = l3 && l4;
 	bool cksum = !!(hash_f &
 			(RTE_ETH_RSS_IPV4_CHKSUM | RTE_ETH_RSS_L4_CHKSUM));
+	bool fl = !!(hash_f & RTE_ETH_RSS_IPV6_FLOW_LABEL);
 
 	/* If FW has not advertised capability to configure outer/inner
 	 * RSS hashing , just log a message. HW will work in default RSS mode.
@@ -317,12 +320,12 @@ int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl)
 	switch (lvl) {
 	case BNXT_RSS_LEVEL_INNERMOST:
 		/* Irrespective of what RTE says, FW always does 4 tuple */
-		if (l3_and_l4 || l4 || l3_only || cksum)
+		if (l3_and_l4 || l4 || l3_only || cksum || fl)
 			mode = BNXT_HASH_MODE_INNERMOST;
 		break;
 	case BNXT_RSS_LEVEL_OUTERMOST:
 		/* Irrespective of what RTE says, FW always does 4 tuple */
-		if (l3_and_l4 || l4 || l3_only || cksum)
+		if (l3_and_l4 || l4 || l3_only || cksum || fl)
 			mode = BNXT_HASH_MODE_OUTERMOST;
 		break;
 	default:
@@ -1415,6 +1418,8 @@ void bnxt_hwrm_rss_to_rte_hash_conf(struct bnxt_vnic_info *vnic,
 		*rss_conf |= RTE_ETH_RSS_NONFRAG_IPV6_TCP;
 	if (hash_types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6)
 		*rss_conf |= RTE_ETH_RSS_NONFRAG_IPV6_UDP;
+	if (hash_types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL)
+		*rss_conf |= RTE_ETH_RSS_IPV6_FLOW_LABEL;
 	if (hash_types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV6 ||
 	    hash_types & HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV4)
 		*rss_conf |= RTE_ETH_RSS_AH;
Signature · 1 line
2.39.2 (Apple Git-143)
#4 lore raw
In reply to Ajit Khaparde
Quoted 5 lines · Ajit Khaparde

The use of 5-tuple of the source address, destination address, source port, destination port, and the transport protocol type may not be possible due to IP fragmentation, encryption, or inability to parse past IPv6 extensions headers.

Quoted 9 lines

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Please apply.

Hi Ajit,

First two patch looks OK but can you please combine them into single patch?

There are two ways for RSS, config APIs and rte_flow based support, testpmd patch only adds flow based support, I don't know if old method support is required, but if you want to add you can check following sample:
'Commit 46914aa1c793 ("ethdev: add eCPRI RSS offload type")'

Third patch, bnxt one, doesn't apply. It looks like it is on top of different source code, if you prefer you can make it another patch and get your tree.

Quoted 17 lines

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Ajit Khaparde (3):
ethdev: add support for RSS based on IPv6 flow label app/testpmd: add IPv6 flow label to RSS types net/bnxt: add IPv6 flow label based RSS support

 app/test-pmd/config.c          | 1 +
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 7 +++++++
 drivers/net/bnxt/bnxt_vnic.c   | 9 +++++++--
 lib/ethdev/rte_ethdev.h        | 1 +
 6 files changed, 19 insertions(+), 2 deletions(-)
#5 lore raw
Quoted 11 lines · Ferruh Yigit
Quoted 9 lines · Ajit Khaparde

The use of 5-tuple of the source address, destination address, source port, destination port, and the transport protocol type may not be possible due to IP fragmentation, encryption, or inability to parse past IPv6 extensions headers.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

Quoted 8 lines
Quoted 5 lines

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Please apply.

Hi Ajit,

Thanks Ferruh.

Quoted 1 line

First two patch looks OK but can you please combine them into single patch?

Sure. Can do.

Quoted 5 lines

There are two ways for RSS, config APIs and rte_flow based support, testpmd patch only adds flow based support, I don't know if old method support is required, but if you want to add you can check following sample:
'Commit 46914aa1c793 ("ethdev: add eCPRI RSS offload type")'

Ok. Let me check.

Quoted 5 lines

Third patch, bnxt one, doesn't apply. It looks like it is on top of different source code, if you prefer you can make it another patch and get your tree.

Yes. That's right. I had used the brcm-next-net for that and wanted to have a driver patch to show usability of the code.

I think in v2, I will just send the ethdev + testpmd patch and add the driver patch in the PMD list/tree for cherry-pick.

Thanks
Ajit

Quoted 20 lines
Quoted 19 lines

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Ajit Khaparde (3):
ethdev: add support for RSS based on IPv6 flow label app/testpmd: add IPv6 flow label to RSS types net/bnxt: add IPv6 flow label based RSS support

 app/test-pmd/config.c          | 1 +
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 7 +++++++
 drivers/net/bnxt/bnxt_vnic.c   | 9 +++++++--
 lib/ethdev/rte_ethdev.h        | 1 +
 6 files changed, 19 insertions(+), 2 deletions(-)
#6 lore raw
Quoted 34 lines · Ajit Khaparde
Quoted 11 lines · Ferruh Yigit
Quoted 9 lines · Ajit Khaparde

The use of 5-tuple of the source address, destination address, source port, destination port, and the transport protocol type may not be possible due to IP fragmentation, encryption, or inability to parse past IPv6 extensions headers.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

Quoted 8 lines
Quoted 5 lines

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Please apply.

Hi Ajit,

Thanks Ferruh.

Quoted 1 line

First two patch looks OK but can you please combine them into single patch?

Sure. Can do.

Quoted 5 lines

There are two ways for RSS, config APIs and rte_flow based support, testpmd patch only adds flow based support, I don't know if old method support is required, but if you want to add you can check following sample:
'Commit 46914aa1c793 ("ethdev: add eCPRI RSS offload type")'

Ok. Let me check.

Quoted 2 lines
Quoted 8 lines
Quoted 3 lines

Third patch, bnxt one, doesn't apply. It looks like it is on top of different source code, if you prefer you can make it another patch and get your tree.

Yes. That's right. I had used the brcm-next-net for that and wanted to have a driver patch to show usability of the code.

I think in v2, I will just send the ethdev + testpmd patch

ack.

Quoted 25 lines

and add the driver patch in the PMD list/tree for cherry-pick.

Thanks
Ajit

Quoted 20 lines
Quoted 19 lines

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Ajit Khaparde (3):
ethdev: add support for RSS based on IPv6 flow label app/testpmd: add IPv6 flow label to RSS types net/bnxt: add IPv6 flow label based RSS support

 app/test-pmd/config.c          | 1 +
 drivers/net/bnxt/bnxt.h        | 1 +
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 drivers/net/bnxt/bnxt_hwrm.c   | 7 +++++++
 drivers/net/bnxt/bnxt_vnic.c   | 9 +++++++--
 lib/ethdev/rte_ethdev.h        | 1 +
 6 files changed, 19 insertions(+), 2 deletions(-)
#7 lore raw

PATCH v2 1/1 ethdev: add support for RSS based on IPv6 flow label

In reply to Ajit Khaparde

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

---
v1->v2:
Combined ethdev and testmd patches into single patch as suggested.

---
 app/test-pmd/cmdline.c  | 8 ++++----
 app/test-pmd/config.c   | 1 +
 lib/ethdev/rte_ethdev.h | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)
app/test-pmd/cmdline.c +4 -4
index d8ea2b76e6..ced4a762fc 100644
@@ -715,7 +715,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"port config all rss (all|default|level-default|level-outer|level-inner|"
 			"ip|tcp|udp|sctp|tunnel|vlan|none|"
 			"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-			"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+			"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 			"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
 			"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
 			"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2133,7 +2133,7 @@ static cmdline_parse_inst_t cmd_config_rss = {
 		"all|default|level-default|level-outer|level-inner|"
 		"ip|tcp|udp|sctp|tunnel|vlan|none|"
 		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 		"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
 		"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
 		"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2249,7 +2249,7 @@ static cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
 				 "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
 				 "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
-				 "ipv6-tcp-ex#ipv6-udp-ex#"
+				 "ipv6-tcp-ex#ipv6-udp-ex#ipv6-flow-label#"
 				 "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
 				 "l2-src-only#l2-dst-only#s-vlan#c-vlan#"
 				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri#mpls#l2tpv2");
@@ -2262,7 +2262,7 @@ static cmdline_parse_inst_t cmd_config_rss_hash_key = {
 	.help_str = "port config <port_id> rss-hash-key "
 		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
 		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
-		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 		"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
 		"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
 		"l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri|mpls|l2tpv2 "
app/test-pmd/config.c +1 -0
index 2c4dedd603..3c5c5bac67 100644
@@ -148,6 +148,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
 	{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
 	{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
+	{ "ipv6-flow-label", RTE_ETH_RSS_IPV6_FLOW_LABEL },
 	{ NULL, 0},
 };
 
lib/ethdev/rte_ethdev.h +1 -0
index 2687c23fa6..75a3f5f2c7 100644
@@ -587,6 +587,7 @@ struct rte_eth_rss_conf {
 #define RTE_ETH_RSS_L4_CHKSUM          RTE_BIT64(35)
 
 #define RTE_ETH_RSS_L2TPV2             RTE_BIT64(36)
+#define RTE_ETH_RSS_IPV6_FLOW_LABEL    RTE_BIT64(37)
 
 /*
  * We use the following macros to combine with above RTE_ETH_RSS_* for
Signature · 1 line
2.39.2 (Apple Git-143)
#8 lore raw

Re: [PATCH v2] ethdev: add support for RSS based on IPv6 flow label

Quoted 15 lines · Ajit Khaparde

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Quoted 9 lines

---
v1->v2:
Combined ethdev and testmd patches into single patch as suggested.

---
 app/test-pmd/cmdline.c  | 8 ++++----
 app/test-pmd/config.c   | 1 +
 lib/ethdev/rte_ethdev.h | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)

testpmd documentation needs to be updated for updated commands:
'doc/guides/testpmd_app_ug/testpmd_funcs.rst'

#9 lore raw

Re: [PATCH v2] ethdev: add support for RSS based on IPv6 flow label

Quoted 27 lines · Ferruh Yigit
Quoted 15 lines · Ajit Khaparde

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Example to configure IPv6 flow label based RSS:

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Quoted 9 lines

---
v1->v2:
Combined ethdev and testmd patches into single patch as suggested.

---
 app/test-pmd/cmdline.c  | 8 ++++----
 app/test-pmd/config.c   | 1 +
 lib/ethdev/rte_ethdev.h | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)
Quoted 2 lines

testpmd documentation needs to be updated for updated commands:
'doc/guides/testpmd_app_ug/testpmd_funcs.rst'

ACK.

Quoted 2 lines
#10 lore raw

PATCH v3 1/1 ethdev: add support for RSS based on IPv6 flow label

In reply to Ferruh Yigit

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

Example to configure IPv6 flow label based RSS:
flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

---
v1->v2: Merge ethdev and testpmd patches into one patch v2->v3: Update testpmd documentation

---
 app/test-pmd/cmdline.c                      | 8 ++++----
 app/test-pmd/config.c                       | 1 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 lib/ethdev/rte_ethdev.h                     | 1 +
 4 files changed, 7 insertions(+), 5 deletions(-)
app/test-pmd/cmdline.c +4 -4
index d8ea2b76e6..ced4a762fc 100644
@@ -715,7 +715,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"port config all rss (all|default|level-default|level-outer|level-inner|"
 			"ip|tcp|udp|sctp|tunnel|vlan|none|"
 			"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-			"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+			"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 			"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
 			"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
 			"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2133,7 +2133,7 @@ static cmdline_parse_inst_t cmd_config_rss = {
 		"all|default|level-default|level-outer|level-inner|"
 		"ip|tcp|udp|sctp|tunnel|vlan|none|"
 		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
-		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 		"l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan|"
 		"esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum|"
 		"l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32|"
@@ -2249,7 +2249,7 @@ static cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
 				 "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
 				 "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
-				 "ipv6-tcp-ex#ipv6-udp-ex#"
+				 "ipv6-tcp-ex#ipv6-udp-ex#ipv6-flow-label#"
 				 "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
 				 "l2-src-only#l2-dst-only#s-vlan#c-vlan#"
 				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri#mpls#l2tpv2");
@@ -2262,7 +2262,7 @@ static cmdline_parse_inst_t cmd_config_rss_hash_key = {
 	.help_str = "port config <port_id> rss-hash-key "
 		"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
 		"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
-		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label|"
 		"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
 		"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
 		"l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri|mpls|l2tpv2 "
app/test-pmd/config.c +1 -0
index 2c4dedd603..3c5c5bac67 100644
@@ -148,6 +148,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
 	{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
 	{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
+	{ "ipv6-flow-label", RTE_ETH_RSS_IPV6_FLOW_LABEL },
 	{ NULL, 0},
 };
 
doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -1
index 468f70b79b..917d01dd4f 100644
@@ -2114,7 +2114,7 @@ Set the RSS (Receive Side Scaling) mode on or off::
                                  ip|tcp|udp|sctp|tunnel|vlan|none| \
                                  ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other| \
                                  ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp| \
-                                 ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex| \
+                                 ipv6-other|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|ipv6-flow-label| \
                                  l2-payload|port|vxlan|geneve|nvgre|gtpu|eth|s-vlan|c-vlan| \
                                  esp|ah|l2tpv3|pfcp|pppoe|ecpri|mpls|ipv4-chksum|l4-chksum| \
                                  l2tpv2|l3-pre96|l3-pre64|l3-pre56|l3-pre48|l3-pre40|l3-pre32| \
lib/ethdev/rte_ethdev.h +1 -0
index 2687c23fa6..75a3f5f2c7 100644
@@ -587,6 +587,7 @@ struct rte_eth_rss_conf {
 #define RTE_ETH_RSS_L4_CHKSUM          RTE_BIT64(35)
 
 #define RTE_ETH_RSS_L2TPV2             RTE_BIT64(36)
+#define RTE_ETH_RSS_IPV6_FLOW_LABEL    RTE_BIT64(37)
 
 /*
  * We use the following macros to combine with above RTE_ETH_RSS_* for
Signature · 1 line
2.39.2 (Apple Git-143)
Acked-by on v3 1/1 Applied
#11 lore raw

Re: [PATCH v3] ethdev: add support for RSS based on IPv6 flow label

Quoted 12 lines · Ajit Khaparde

On supporting hardware, the 20-bit Flow Label field in the IPv6 header can be used to perform RSS in the ingress path.

Flow label values can be chosen such that they can be used as part of the input to a hash function used in a load distribution scheme.

Example to configure IPv6 flow label based RSS:
flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-flow-label end / end

Applied to dpdk-next-net/main, thanks.