DPDK usage discussions
 help / color / mirror / Atom feed
* configuring RSS offloads with Netvsc PMD
@ 2024-08-28 17:32 Nandini Rangaswamy
  2024-08-28 19:05 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Nandini Rangaswamy @ 2024-08-28 17:32 UTC (permalink / raw)
  To: Long Li, Stephen Hemminger, users

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

Hi Long and Stephen,
I am trying to configure RSS offloads from my DPDK App with netvsc PMD.
Netvsc seems to be supporting the following offloads:
RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_TCP
RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_ETH_RSS_IPV4
RTE_ETH_RSS_IPV6

However, the app is trying to configure the following offloads and failing:

RTE_ETH_RSS_NONFRAG_IPV4_UDP
RTE_ETH_RSS_NONFRAG_IPV4_TCP
RTE_ETH_RSS_NONFRAG_IPV6_TCP
RTE_ETH_RSS_NONFRAG_IPV6_UDP

Is it possible to bypass the netvsc PMD and configure these offloads on VF
? I am aware that app should not directly program the VF interface
but for performance sake, I want the above offloads to be supported on VF.

 Regards,
Nandini

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: Type: text/html, Size: 3592 bytes --]

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

* Re: configuring RSS offloads with Netvsc PMD
  2024-08-28 17:32 configuring RSS offloads with Netvsc PMD Nandini Rangaswamy
@ 2024-08-28 19:05 ` Stephen Hemminger
  2024-08-29 16:11   ` Nandini Rangaswamy
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2024-08-28 19:05 UTC (permalink / raw)
  To: Nandini Rangaswamy; +Cc: Long Li, users

On Wed, 28 Aug 2024 10:32:17 -0700
Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote:

> Hi Long and Stephen,
> I am trying to configure RSS offloads from my DPDK App with netvsc PMD.
> Netvsc seems to be supporting the following offloads:
> RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_TCP
> RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_ETH_RSS_IPV4
> RTE_ETH_RSS_IPV6
> 
> However, the app is trying to configure the following offloads and failing:
> 
> RTE_ETH_RSS_NONFRAG_IPV4_UDP
> RTE_ETH_RSS_NONFRAG_IPV4_TCP
> RTE_ETH_RSS_NONFRAG_IPV6_TCP
> RTE_ETH_RSS_NONFRAG_IPV6_UDP

Confusing, both of these overlap should work.
Please instrument the configure code in netvsc to see why it is complaining.

> 
> Is it possible to bypass the netvsc PMD and configure these offloads on VF
> ? I am aware that app should not directly program the VF interface
> but for performance sake, I want the above offloads to be supported on VF.

No can't bypass driver.

You do need to configure multiqueue and enable RSS in configure
to get anything.

If you look at hn_rss_hash_init, the driver needs to convert the
requested flags into NDIS flags to tell the host what to do.

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

* Re: configuring RSS offloads with Netvsc PMD
  2024-08-28 19:05 ` Stephen Hemminger
@ 2024-08-29 16:11   ` Nandini Rangaswamy
  2024-09-03 16:28     ` Nandini Rangaswamy
  0 siblings, 1 reply; 5+ messages in thread
From: Nandini Rangaswamy @ 2024-08-29 16:11 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Long Li, users

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

Hi Stephen,
It does not work because the netvsc device is not initialized with
RTE_ETH_RSS_NONFRAG_IPV6_UDP
capability according to the below snippet.

static void hn_rss_hash_init(struct hn_data *hv,
const struct rte_eth_rss_conf *rss_conf)
{
/* Convert from DPDK RSS hash flags to NDIS hash flags */
hv->rss_hash = NDIS_HASH_FUNCTION_TOEPLITZ;

if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4)
hv->rss_hash |= NDIS_HASH_IPV4;
if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP)
hv->rss_hash |= NDIS_HASH_TCP_IPV4;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
hv->rss_hash |= NDIS_HASH_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX)
hv->rss_hash |= NDIS_HASH_IPV6_EX;
if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
hv->rss_hash |= NDIS_HASH_TCP_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_TCP_EX)
hv->rss_hash |= NDIS_HASH_TCP_IPV6_EX;

memcpy(hv->rss_key, rss_conf->rss_key ? : rss_default_key,
NDIS_HASH_KEYSIZE_TOEPLITZ);
}

Since hn_dev_info_get merges the configuration of the netvsc device and VF
using AND operation(in hn_vf_info_merge), even though VF(MLX5)
supports RTE_ETH_RSS_NONFRAG_IPV6_UDP
, the netvsc driver does not return this capability support to the app.
Why is RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by the netvsc
driver?

Regards,
Nandini



On Wed, Aug 28, 2024 at 12:05 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Wed, 28 Aug 2024 10:32:17 -0700
> Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote:
>
> > Hi Long and Stephen,
> > I am trying to configure RSS offloads from my DPDK App with netvsc PMD.
> > Netvsc seems to be supporting the following offloads:
> > RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_TCP
> > RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_ETH_RSS_IPV4
> > RTE_ETH_RSS_IPV6
> >
> > However, the app is trying to configure the following offloads and
> failing:
> >
> > RTE_ETH_RSS_NONFRAG_IPV4_UDP
> > RTE_ETH_RSS_NONFRAG_IPV4_TCP
> > RTE_ETH_RSS_NONFRAG_IPV6_TCP
> > RTE_ETH_RSS_NONFRAG_IPV6_UDP
>
> Confusing, both of these overlap should work.
> Please instrument the configure code in netvsc to see why it is
> complaining.
>
> >
> > Is it possible to bypass the netvsc PMD and configure these offloads on
> VF
> > ? I am aware that app should not directly program the VF interface
> > but for performance sake, I want the above offloads to be supported on
> VF.
>
> No can't bypass driver.
>
> You do need to configure multiqueue and enable RSS in configure
> to get anything.
>
> If you look at hn_rss_hash_init, the driver needs to convert the
> requested flags into NDIS flags to tell the host what to do.
>

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: Type: text/html, Size: 11028 bytes --]

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

* Re: configuring RSS offloads with Netvsc PMD
  2024-08-29 16:11   ` Nandini Rangaswamy
@ 2024-09-03 16:28     ` Nandini Rangaswamy
  2024-09-03 17:10       ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Nandini Rangaswamy @ 2024-09-03 16:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Long Li, users

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

Hi Stephen,
It does not work because the netvsc device is not initialized with
RTE_ETH_RSS_NONFRAG_IPV6_UDP
capability according to the below snippet.

static void hn_rss_hash_init(struct hn_data *hv,
const struct rte_eth_rss_conf *rss_conf)
{
/* Convert from DPDK RSS hash flags to NDIS hash flags */
hv->rss_hash = NDIS_HASH_FUNCTION_TOEPLITZ;

if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4)
hv->rss_hash |= NDIS_HASH_IPV4;
if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP)
hv->rss_hash |= NDIS_HASH_TCP_IPV4;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
hv->rss_hash |= NDIS_HASH_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX)
hv->rss_hash |= NDIS_HASH_IPV6_EX;
if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
hv->rss_hash |= NDIS_HASH_TCP_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_TCP_EX)
hv->rss_hash |= NDIS_HASH_TCP_IPV6_EX;

memcpy(hv->rss_key, rss_conf->rss_key ? : rss_default_key,
NDIS_HASH_KEYSIZE_TOEPLITZ);
}

Since hn_dev_info_get merges the configuration of the netvsc device and VF
using AND operation(in hn_vf_info_merge), even though VF(MLX5)
supports RTE_ETH_RSS_NONFRAG_IPV6_UDP
, the netvsc driver does not return this capability support to the app.
Why is RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by the netvsc
driver?

Regards,
Nandini

On Thu, Aug 29, 2024 at 9:11 AM Nandini Rangaswamy <
nandini.rangaswamy@broadcom.com> wrote:

> Hi Stephen,
> It does not work because the netvsc device is not initialized with RTE_ETH_RSS_NONFRAG_IPV6_UDP
> capability according to the below snippet.
>
> static void hn_rss_hash_init(struct hn_data *hv,
> const struct rte_eth_rss_conf *rss_conf)
> {
> /* Convert from DPDK RSS hash flags to NDIS hash flags */
> hv->rss_hash = NDIS_HASH_FUNCTION_TOEPLITZ;
>
> if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4)
> hv->rss_hash |= NDIS_HASH_IPV4;
> if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP)
> hv->rss_hash |= NDIS_HASH_TCP_IPV4;
> if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
> hv->rss_hash |= NDIS_HASH_IPV6;
> if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX)
> hv->rss_hash |= NDIS_HASH_IPV6_EX;
> if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
> hv->rss_hash |= NDIS_HASH_TCP_IPV6;
> if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_TCP_EX)
> hv->rss_hash |= NDIS_HASH_TCP_IPV6_EX;
>
> memcpy(hv->rss_key, rss_conf->rss_key ? : rss_default_key,
> NDIS_HASH_KEYSIZE_TOEPLITZ);
> }
>
> Since hn_dev_info_get merges the configuration of the netvsc device and VF
> using AND operation(in hn_vf_info_merge), even though VF(MLX5) supports RTE_ETH_RSS_NONFRAG_IPV6_UDP
> , the netvsc driver does not return this capability support to the app.
> Why is RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by the
> netvsc driver?
>
> Regards,
> Nandini
>
>
>
> On Wed, Aug 28, 2024 at 12:05 PM Stephen Hemminger <
> stephen@networkplumber.org> wrote:
>
>> On Wed, 28 Aug 2024 10:32:17 -0700
>> Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote:
>>
>> > Hi Long and Stephen,
>> > I am trying to configure RSS offloads from my DPDK App with netvsc PMD.
>> > Netvsc seems to be supporting the following offloads:
>> > RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_TCP
>> > RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_ETH_RSS_IPV4
>> > RTE_ETH_RSS_IPV6
>> >
>> > However, the app is trying to configure the following offloads and
>> failing:
>> >
>> > RTE_ETH_RSS_NONFRAG_IPV4_UDP
>> > RTE_ETH_RSS_NONFRAG_IPV4_TCP
>> > RTE_ETH_RSS_NONFRAG_IPV6_TCP
>> > RTE_ETH_RSS_NONFRAG_IPV6_UDP
>>
>> Confusing, both of these overlap should work.
>> Please instrument the configure code in netvsc to see why it is
>> complaining.
>>
>> >
>> > Is it possible to bypass the netvsc PMD and configure these offloads on
>> VF
>> > ? I am aware that app should not directly program the VF interface
>> > but for performance sake, I want the above offloads to be supported on
>> VF.
>>
>> No can't bypass driver.
>>
>> You do need to configure multiqueue and enable RSS in configure
>> to get anything.
>>
>> If you look at hn_rss_hash_init, the driver needs to convert the
>> requested flags into NDIS flags to tell the host what to do.
>>
>

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: Type: text/html, Size: 19680 bytes --]

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

* Re: configuring RSS offloads with Netvsc PMD
  2024-09-03 16:28     ` Nandini Rangaswamy
@ 2024-09-03 17:10       ` Stephen Hemminger
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2024-09-03 17:10 UTC (permalink / raw)
  To: Nandini Rangaswamy; +Cc: Long Li, users

On Tue, 3 Sep 2024 09:28:14 -0700
Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> wrote:

> Hi Stephen,
> It does not work because the netvsc device is not initialized with
> RTE_ETH_RSS_NONFRAG_IPV6_UDP
> capability according to the below snippet.

That looks like a bug, the bits in ndis.h came from Linux and FreeBSD
driver includes.  Looks like the UDP stuff isn't defined there.

The MANA driver does have bits defined for UDP for NDIS, but the
bits are different. I suspect that maybe it uses a different NDIS
version.

Long maybe able to look into this more.



Note: I don't work for Microsoft anymore, and don't have free/easy way
to use/test netvsc PMD anymore.

Also, lack of access to Windows/Hyper-V source makes things more difficult.

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

end of thread, other threads:[~2024-09-03 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-28 17:32 configuring RSS offloads with Netvsc PMD Nandini Rangaswamy
2024-08-28 19:05 ` Stephen Hemminger
2024-08-29 16:11   ` Nandini Rangaswamy
2024-09-03 16:28     ` Nandini Rangaswamy
2024-09-03 17:10       ` Stephen Hemminger

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