From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A60A64589A for ; Thu, 29 Aug 2024 18:12:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E95040279; Thu, 29 Aug 2024 18:12:12 +0200 (CEST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mails.dpdk.org (Postfix) with ESMTP id 4CB3E4026A for ; Thu, 29 Aug 2024 18:12:11 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2f51b67e16dso8888261fa.3 for ; Thu, 29 Aug 2024 09:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1724947930; x=1725552730; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CVy3FbW6/PGVHycG3N7TpZSP2ohBFZyO2LRbYNLCZZU=; b=cV1QIIXRYrArzZAiQuhUW+k87yCAnWhOi+ptPB9Th5h0J7tGoW+nGi/dB12BDI1g0O CKDnklDIXJEwfvVrBHVXm8rE6ONn/tA6u2ZQwcW9QE2qNRu6IlKI5n2Jn47WKNAatFO/ DuhziczI3CConrutU0X/5Gnfxlbd+WCrkHx7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724947930; x=1725552730; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CVy3FbW6/PGVHycG3N7TpZSP2ohBFZyO2LRbYNLCZZU=; b=aWuPcSDx/k7VVhB8I6Z46jQg9eXou16H6ejNWTrKbvyL0hNHLc353V8ZWOYUL0kZKP ppf7dmUqEXzQL3HHLFg1r9xhLT9XkWqpEKu/VufgR65VRVmAFBmIhd6mV9GTGWGe0ZMz MuwV/xSW9YSuDHhB1/URc83VisnbvW/771bKr6HEqEfM6UXZTkmF3VvS5bYdNcPqRXVu IYMjf2O4MhSEnqJvmrZtZTS62RZif3hkhIjxv/mw+G4DJfkaCHF3TPk1AwK3mAWsMV/Y pnG+Ncyg3loa/fBr5S9z2ak3CDVmqmJ13kBmwFkjLTvBlXf0inr6WwVg0WOCSatQ8So9 rJpQ== X-Forwarded-Encrypted: i=1; AJvYcCVvDZHuEyvS//9huGX8CXTGTl/9a0/WI40/PpPpXBRBerFJtN44YIj9+HDDHFYZ2tTXrzjwHg==@dpdk.org X-Gm-Message-State: AOJu0Yxuii2gSsGSygbYHqh/qI2qr6F/2gQV44ZWnClCKuuIWgc16tN6 tkVq7wZsBa9m0GmpMzyuiDHy75qfS5pc8OCmYv3QQZyEc1TkLvqv4OunHRrZ1cvxZ+BdpMGa6aJ qc4r+d7pxbGJcQCX8h4+bwT/7WGdczruscIatkhb9icEFdtgQyECMBr3hkNErwgHMGCRh9FOJVy mQ5G2m6io= X-Google-Smtp-Source: AGHT+IEbGtABoNfDIR3xSGgZC0ofjHSTBed6fHvhM70jGcw0rA7k4UXl6gtdBRsIbqtAaIj2xJY+XCu+YY9bVMmUDWQ= X-Received: by 2002:a2e:97cb:0:b0:2f3:b76e:4983 with SMTP id 38308e7fff4ca-2f6106d52cdmr20639151fa.22.1724947930237; Thu, 29 Aug 2024 09:12:10 -0700 (PDT) MIME-Version: 1.0 References: <20240828120509.68d06992@hermes.local> In-Reply-To: <20240828120509.68d06992@hermes.local> From: Nandini Rangaswamy Date: Thu, 29 Aug 2024 09:11:58 -0700 Message-ID: Subject: Re: configuring RSS offloads with Netvsc PMD To: Stephen Hemminger Cc: Long Li , users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000a383550620d4bc47" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000a383550620d4bc47 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =3D NDIS_HASH_FUNCTION_TOEPLITZ; if (rss_conf->rss_hf & RTE_ETH_RSS_IPV4) hv->rss_hash |=3D NDIS_HASH_IPV4; if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP) hv->rss_hash |=3D NDIS_HASH_TCP_IPV4; if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6) hv->rss_hash |=3D NDIS_HASH_IPV6; if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX) hv->rss_hash |=3D NDIS_HASH_IPV6_EX; if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP) hv->rss_hash |=3D NDIS_HASH_TCP_IPV6; if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_TCP_EX) hv->rss_hash |=3D 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=E2=80=AFPM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Wed, 28 Aug 2024 10:32:17 -0700 > Nandini Rangaswamy 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. > --=20 This electronic communication and the information and any files transmitted= =20 with it, or attached to it, are confidential and are intended solely for=20 the use of the individual or entity to whom it is addressed and may contain= =20 information that is confidential, legally privileged, protected by privacy= =20 laws, or otherwise restricted from disclosure to anyone else. If you are=20 not the intended recipient or the person responsible for delivering the=20 e-mail to the intended recipient, you are hereby notified that any use,=20 copying, distributing, dissemination, forwarding, printing, or copying of= =20 this e-mail is strictly prohibited. If you received this e-mail in error,= =20 please return the e-mail to the sender, delete it from your computer, and= =20 destroy any printed copy of it. --000000000000a383550620d4bc47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Stephen,
It does not work because = the netvsc device is not initialized with=C2=A0RTE_ETH_RSS_NONFRAG_IPV6_UDP capability according to the below snipp= et.

static void hn= _rss_hash_init(struct hn_data *hv,
const st= ruct rte_eth_= rss_conf *rss_conf)
{
/* Con= vert from DPDK RSS hash flags to NDIS hash flags */
hv->rss_hash = =3D NDIS_HASH_FUNCTION_TOEPLITZ;

if (= rss_conf->rss_hf & RTE_ETH_RSS_IPV4)
hv-><= span style=3D"color:rgb(122,62,157)">rss_hash |=3D NDIS_HASH_IPV4;
if (r= ss_conf->rss_hf & RT= E_ETH_RSS_NONFRAG_IPV4_TCP)
hv->rss_hash |=3D NDIS_HASH_TCP_IPV4<= /span>;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
hv= ->rss_hash |=3D NDIS_HASH_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX)
hv->rss_hash |=3D<= /span> NDIS_HASH_IPV= 6_EX;
if (rss_conf->rss_hf &= RTE_ETH_RSS_NONFRAG_= IPV6_TCP)
= hv->rss_hash= |=3D NDIS_HASH_TCP_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_TCP_EX)
hv->rss_hash |=3D 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=C2=A0hn_vf_info_merge), = even though VF(MLX5) supports=C2=A0RTE_E= TH_RSS_NONFRAG_IPV6_UDP , the netvsc driver does not return this capability= support to the app.
Why is=C2=A0RTE_ETH_RSS_N= ONFRAG_IPV6_UDP capability not supported by the netvsc driver?
=

Regards,
Nand= ini


=
On Wed, Aug 28, 2024 at 12:= 05=E2=80=AFPM 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 fai= ling:
>
> 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 o= n 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 ele= ctronic communication and the information and any files transmitted with it= , or attached to it, are confidential and are intended solely for the use o= f the individual or entity to whom it is addressed and may contain informat= ion that is confidential, legally privileged, protected by privacy laws, or= otherwise restricted from disclosure to anyone else. If you are not the in= tended recipient or the person responsible for delivering the e-mail to the= intended recipient, you are hereby notified that any use, copying, distrib= uting, dissemination, forwarding, printing, or copying of this e-mail is st= rictly 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. --000000000000a383550620d4bc47--