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 72B53458F4 for ; Tue, 3 Sep 2024 18:28:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 054984042C; Tue, 3 Sep 2024 18:28:29 +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 A480F402D0 for ; Tue, 3 Sep 2024 18:28:26 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2f4f2cda058so57959421fa.1 for ; Tue, 03 Sep 2024 09:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1725380906; x=1725985706; 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=QnmmQmS2864qAe3BfFS864xZ9YzlEm6wj0Gi6dVJ7oE=; b=PjPXWlhUshP4vbpEVULQSw9YWPQPqfeMhj/psYe7ZtuJt1+bhZypkLBk49DoHUP5f/ YkvnKc162zjt8SqxtJTCSSnkiUPnXiLyFG2zML818xhDSSZQXV7w2T4ykrFjbVeps57g 7eDKp30qRRaU3qpgMu1hoGbTv4qOfYyDMvFtU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725380906; x=1725985706; 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=QnmmQmS2864qAe3BfFS864xZ9YzlEm6wj0Gi6dVJ7oE=; b=T5fW0EWIOtx9757VC6X6C5yRLwlF0BCu2OIVdeSRYHQbieIDYQphXibFvBuTzSJc+V vqqSFqAHGmtmIY1X1LWYcRBTjX9r2EqBEF7nUZcpGACW8daSGo+eREGJN0T2clVrBPhy smKlHreair1Bg8caDB60qMxi07ivwG8jKeKJn+1xZxruxB6H5eCnXAIIYnW+PZX0XkYq L6bUcnZbQy93l5dN0kopsMgBgaOnsfvaHDaV97Kp3di2wM+1MVNkMAqeRc2M1uHL1s7w Ls4cLABrQH03t+sriSaP4A+xjEHUmgiHWno16Mh/mi8qSrkZKsYPU5EHo0WMybmJBob0 YyAw== X-Forwarded-Encrypted: i=1; AJvYcCVKw23GN5RtUSL0NHbfZnBgfBqf0PkE2OocD2kR69RVMvn9Yxy7THyaBcBQM9+DbvGlpqhn3A==@dpdk.org X-Gm-Message-State: AOJu0YyoSFmkLzgMZiKgymljEDXYwU0EdOrROy/gTjGam/HfVL3vexXb Rf38lOnr6uVDIIeAvQGPzCvhiU6dWPZCoWu0wPfm/VzdarjDycra8YYcJb/cmKKxRheiO758RwG 69E+eIGmUcPPEnCRdrfUbjO5INP2fXqfczt1HRsyszJq04fgKns7Xxbk8sDHH3/uYl1kjyCuvAF boGzYixJw= X-Google-Smtp-Source: AGHT+IHZmHhyDquKeq9FqkTyhcmEfE5dS5WakpbuhYkHSnDEStuZmLZYh4Dmp4EuZcTNuhRGgKCSUmCrMrQzJuRJNIE= X-Received: by 2002:a2e:b8d1:0:b0:2ef:32b5:1de0 with SMTP id 38308e7fff4ca-2f61e05caabmr50314071fa.7.1725380905615; Tue, 03 Sep 2024 09:28:25 -0700 (PDT) MIME-Version: 1.0 References: <20240828120509.68d06992@hermes.local> In-Reply-To: From: Nandini Rangaswamy Date: Tue, 3 Sep 2024 09:28:14 -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="000000000000fba0e10621398b5d" 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 --000000000000fba0e10621398b5d 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 Thu, Aug 29, 2024 at 9:11=E2=80=AFAM Nandini Rangaswamy < nandini.rangaswamy@broadcom.com> wrote: > Hi Stephen, > It does not work because the netvsc device is not initialized with RTE_ET= H_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 V= F > using AND operation(in hn_vf_info_merge), even though VF(MLX5) supports R= TE_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 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. >> > --=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. --000000000000fba0e10621398b5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Stephen<= /span>,
It does not work because the netvsc device is not initialized w= ith=C2=A0RTE_ETH_RSS_NONFRAG_IPV6_UDP ca= pability 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_TOEPL= ITZ;

= if (rss_conf<= span style=3D"color:rgb(119,119,119)">->rss_hf & RTE_ETH_RSS_IPV4<= /span>)
hv->rss_hash <= span style=3D"color:rgb(119,119,119)">|=3D NDIS_HASH_IPV4;
= if (rss_conf-= >rss_hf & RTE_ETH_RSS_NONFRAG_IPV4_TCP)
hv->rss_hash |=3D NDIS_HASH_TCP_IPV4;=
if (r= ss_conf->rss_hf & RT= E_ETH_RSS_IPV6)
<= div> hv->rs= s_hash |=3D NDIS_HASH_IPV6;
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6_EX)
hv->= rss_hash |=3D NDIS_HASH_IPV6_EX;<= /span>
if (rss_conf->rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
hv->rss_hash |=3D<= /span> 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_TOEPLI= TZ);
}

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=A0R= TE_ETH_RSS_NONFRAG_IPV6_UDP , the netvsc driver does not return this capabi= lity support to the app.
Why is=C2=A0RTE_ETH_= RSS_NONFRAG_IPV6_UDP capability not supported by the netvsc driver?<= /div>

Regard= s,
Nandini

On Thu, Aug 29, 2024 at 9:11=E2=80=AFAM Nandini = Rangaswamy <nandini.r= angaswamy@broadcom.com> wrote:
Hi Stephen,
It = does not work because the netvsc device is not initialized with=C2=A0RTE_ETH_RSS_NONFRAG_IPV6_UDP capability accord= ing 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 flag= s */
hv->rss_hash =3D NDIS_HASH_FUNCTION= _TOEPLITZ;

if (rss_conf->rss_hf &am= p; 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;<= /span>
if (rss_conf->rss_hf & RTE_ETH_RSS_IPV6)
hv->rss_hash |=3D NDIS_HASH_IPV6;
if (rss_conf->rss_h= f & RTE_ETH_RSS_IPV6_EX)
hv->rss_hash |=3D NDIS_HASH_IPV6_EX;
if <= span style=3D"color:rgb(119,119,119)">(rss_conf->= rss_hf & RTE_ETH_RSS_NONFRAG_IPV6_TCP)
hv<= /span>->rss_hash = |=3D NDIS_HASH= _TCP_IPV6;
= if (rss_conf->rss_hf & RTE_ETH_RSS_IPV= 6_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_TO= EPLITZ);
}

Since hn_dev_info_get mer= ges the configuration of the netvsc device and VF using AND operation(in=C2=A0hn_vf_info_merge), even though VF(MLX5) supports=C2=A0RTE_ETH_RSS_NONFRAG_IPV6_UDP , the netvsc driver do= es not return this capability support to the app.
Why is=C2=A0RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by th= e netvsc driver?

Regards,
Nandini



On Wed, Aug 28, 2024 at 12:05=E2=80=AFPM Stephen Hemminger <stephen@networkplu= mber.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. --000000000000fba0e10621398b5d--