DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Support IPv6 flow label based RSS
@ 2024-02-08  5:43 Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 1/3] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08  5:43 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

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(-)

-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* [PATCH 1/3] ethdev: add support for RSS based on IPv6 flow label
  2024-02-08  5:43 [PATCH 0/3] Support IPv6 flow label based RSS Ajit Khaparde
@ 2024-02-08  5:43 ` Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 2/3] app/testpmd: add IPv6 flow label to RSS types Ajit Khaparde
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08  5:43 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 lib/ethdev/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 2687c23fa6..75a3f5f2c7 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -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
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* [PATCH 2/3] app/testpmd: add IPv6 flow label to RSS types
  2024-02-08  5:43 [PATCH 0/3] Support IPv6 flow label based RSS Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 1/3] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
@ 2024-02-08  5:43 ` Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 3/3] net/bnxt: add IPv6 flow label based RSS support Ajit Khaparde
  2024-02-08 18:47 ` [PATCH 0/3] Support IPv6 flow label based RSS Ferruh Yigit
  3 siblings, 0 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08  5:43 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 2c4dedd603..3c5c5bac67 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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},
 };
 
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* [PATCH 3/3] net/bnxt: add IPv6 flow label based RSS support
  2024-02-08  5:43 [PATCH 0/3] Support IPv6 flow label based RSS Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 1/3] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
  2024-02-08  5:43 ` [PATCH 2/3] app/testpmd: add IPv6 flow label to RSS types Ajit Khaparde
@ 2024-02-08  5:43 ` Ajit Khaparde
  2024-02-08 18:47 ` [PATCH 0/3] Support IPv6 flow label based RSS Ferruh Yigit
  3 siblings, 0 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08  5:43 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 4987 bytes --]

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.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 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(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index b604284256..42ecca35d7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -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)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index bc98594c2f..abe46e8004 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 802973ba97..17527a3c4d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -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;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 5092a7d774..76905ebdd1 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -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;
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH 0/3] Support IPv6 flow label based RSS
  2024-02-08  5:43 [PATCH 0/3] Support IPv6 flow label based RSS Ajit Khaparde
                   ` (2 preceding siblings ...)
  2024-02-08  5:43 ` [PATCH 3/3] net/bnxt: add IPv6 flow label based RSS support Ajit Khaparde
@ 2024-02-08 18:47 ` Ferruh Yigit
  2024-02-08 18:56   ` Ajit Khaparde
  3 siblings, 1 reply; 12+ messages in thread
From: Ferruh Yigit @ 2024-02-08 18:47 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: ferruh.yigit, andrew.rybchenko

On 2/8/2024 5:43 AM, Ajit Khaparde wrote:
> 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.
> 

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.


> 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(-)
> 


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

* Re: [PATCH 0/3] Support IPv6 flow label based RSS
  2024-02-08 18:47 ` [PATCH 0/3] Support IPv6 flow label based RSS Ferruh Yigit
@ 2024-02-08 18:56   ` Ajit Khaparde
  2024-02-08 21:31     ` Ferruh Yigit
  2024-02-08 22:06     ` [PATCH v2] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
  0 siblings, 2 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08 18:56 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

On Thu, Feb 8, 2024 at 10:47 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 2/8/2024 5:43 AM, Ajit Khaparde wrote:
> > 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.
> >
>
> Hi Ajit,
>
Thanks Ferruh.

> First two patch looks OK but can you please combine them into single patch?
Sure. Can do.

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

>
>
> 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

>
>
> > 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(-)
> >
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH 0/3] Support IPv6 flow label based RSS
  2024-02-08 18:56   ` Ajit Khaparde
@ 2024-02-08 21:31     ` Ferruh Yigit
  2024-02-08 22:06     ` [PATCH v2] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
  1 sibling, 0 replies; 12+ messages in thread
From: Ferruh Yigit @ 2024-02-08 21:31 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dev, ferruh.yigit, andrew.rybchenko

On 2/8/2024 6:56 PM, Ajit Khaparde wrote:
> On Thu, Feb 8, 2024 at 10:47 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>>
>> On 2/8/2024 5:43 AM, Ajit Khaparde wrote:
>>> 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.
>>>
>>
>> Hi Ajit,
>>
> Thanks Ferruh.
> 
>> First two patch looks OK but can you please combine them into single patch?
> Sure. Can do.
> 
>>
>> 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.
> 
>>
>>
>> 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.

> and add the driver patch in the PMD list/tree for cherry-pick.
> 
> Thanks
> Ajit
> 
>>
>>
>>> 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(-)
>>>
>>


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

* [PATCH v2] ethdev: add support for RSS based on IPv6 flow label
  2024-02-08 18:56   ` Ajit Khaparde
  2024-02-08 21:31     ` Ferruh Yigit
@ 2024-02-08 22:06     ` Ajit Khaparde
  2024-02-08 22:22       ` Ferruh Yigit
  1 sibling, 1 reply; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08 22:06 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 4155 bytes --]

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
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(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d8ea2b76e6..ced4a762fc 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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 "
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 2c4dedd603..3c5c5bac67 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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},
 };
 
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 2687c23fa6..75a3f5f2c7 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -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
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH v2] ethdev: add support for RSS based on IPv6 flow label
  2024-02-08 22:06     ` [PATCH v2] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
@ 2024-02-08 22:22       ` Ferruh Yigit
  2024-02-08 22:24         ` Ajit Khaparde
  2024-02-09 18:16         ` [PATCH v3] " Ajit Khaparde
  0 siblings, 2 replies; 12+ messages in thread
From: Ferruh Yigit @ 2024-02-08 22:22 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: andrew.rybchenko

On 2/8/2024 10:06 PM, Ajit Khaparde wrote:
> 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
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
> 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'



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

* Re: [PATCH v2] ethdev: add support for RSS based on IPv6 flow label
  2024-02-08 22:22       ` Ferruh Yigit
@ 2024-02-08 22:24         ` Ajit Khaparde
  2024-02-09 18:16         ` [PATCH v3] " Ajit Khaparde
  1 sibling, 0 replies; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-08 22:24 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

On Thu, Feb 8, 2024 at 2:23 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 2/8/2024 10:06 PM, Ajit Khaparde wrote:
> > 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
> >
> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> > ---
> > 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'
ACK.

>
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* [PATCH v3] ethdev: add support for RSS based on IPv6 flow label
  2024-02-08 22:22       ` Ferruh Yigit
  2024-02-08 22:24         ` Ajit Khaparde
@ 2024-02-09 18:16         ` Ajit Khaparde
  2024-02-09 22:45           ` Ferruh Yigit
  1 sibling, 1 reply; 12+ messages in thread
From: Ajit Khaparde @ 2024-02-09 18:16 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

[-- Attachment #1: Type: text/plain, Size: 5182 bytes --]

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
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(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d8ea2b76e6..ced4a762fc 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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 "
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 2c4dedd603..3c5c5bac67 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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},
 };
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 468f70b79b..917d01dd4f 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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| \
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 2687c23fa6..75a3f5f2c7 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -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
-- 
2.39.2 (Apple Git-143)


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

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

* Re: [PATCH v3] ethdev: add support for RSS based on IPv6 flow label
  2024-02-09 18:16         ` [PATCH v3] " Ajit Khaparde
@ 2024-02-09 22:45           ` Ferruh Yigit
  0 siblings, 0 replies; 12+ messages in thread
From: Ferruh Yigit @ 2024-02-09 22:45 UTC (permalink / raw)
  To: Ajit Khaparde, dev; +Cc: andrew.rybchenko

On 2/9/2024 6:16 PM, Ajit Khaparde wrote:
> 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
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>

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

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

end of thread, other threads:[~2024-02-09 22:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08  5:43 [PATCH 0/3] Support IPv6 flow label based RSS Ajit Khaparde
2024-02-08  5:43 ` [PATCH 1/3] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
2024-02-08  5:43 ` [PATCH 2/3] app/testpmd: add IPv6 flow label to RSS types Ajit Khaparde
2024-02-08  5:43 ` [PATCH 3/3] net/bnxt: add IPv6 flow label based RSS support Ajit Khaparde
2024-02-08 18:47 ` [PATCH 0/3] Support IPv6 flow label based RSS Ferruh Yigit
2024-02-08 18:56   ` Ajit Khaparde
2024-02-08 21:31     ` Ferruh Yigit
2024-02-08 22:06     ` [PATCH v2] ethdev: add support for RSS based on IPv6 flow label Ajit Khaparde
2024-02-08 22:22       ` Ferruh Yigit
2024-02-08 22:24         ` Ajit Khaparde
2024-02-09 18:16         ` [PATCH v3] " Ajit Khaparde
2024-02-09 22:45           ` Ferruh Yigit

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