configuring RSS offloads with Netvsc PMD

Nandini Rangaswamy nandini.rangaswamy at broadcom.com
Tue Sep 3 18:28:14 CEST 2024


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 at 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 at networkplumber.org> wrote:
>
>> On Wed, 28 Aug 2024 10:32:17 -0700
>> Nandini Rangaswamy <nandini.rangaswamy at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20240903/bed4338c/attachment.htm>


More information about the users mailing list