DPDK usage discussions
 help / color / mirror / Atom feed
From: Nandini Rangaswamy <nandini.rangaswamy@broadcom.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Long Li <longli@microsoft.com>, users@dpdk.org
Subject: Re: configuring RSS offloads with Netvsc PMD
Date: Tue, 3 Sep 2024 09:28:14 -0700	[thread overview]
Message-ID: <CAAkQrK9p3AXBdZU5--9FnEGNgvZXNAAwNRfRRQQWmj8W6AF3EA@mail.gmail.com> (raw)
In-Reply-To: <CAAkQrK9DwuTmKQ5gcxYtHdVUbV98_LcXatzzhkynyymoSKWZeg@mail.gmail.com>

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

  reply	other threads:[~2024-09-03 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 17:32 Nandini Rangaswamy
2024-08-28 19:05 ` Stephen Hemminger
2024-08-29 16:11   ` Nandini Rangaswamy
2024-09-03 16:28     ` Nandini Rangaswamy [this message]
2024-09-03 17:10       ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAkQrK9p3AXBdZU5--9FnEGNgvZXNAAwNRfRRQQWmj8W6AF3EA@mail.gmail.com \
    --to=nandini.rangaswamy@broadcom.com \
    --cc=longli@microsoft.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).