From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <users-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A60A64589A for <public@inbox.dpdk.org>; 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 <users@dpdk.org>; Thu, 29 Aug 2024 18:12:11 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2f51b67e16dso8888261fa.3 for <users@dpdk.org>; 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: <CAAkQrK9tfe7BOOz2S0JsVmyCQC30hLYHpvS7mXC13Z+CkaWp3w@mail.gmail.com> <20240828120509.68d06992@hermes.local> In-Reply-To: <20240828120509.68d06992@hermes.local> From: Nandini Rangaswamy <nandini.rangaswamy@broadcom.com> Date: Thu, 29 Aug 2024 09:11:58 -0700 Message-ID: <CAAkQrK9DwuTmKQ5gcxYtHdVUbV98_LcXatzzhkynyymoSKWZeg@mail.gmail.com> Subject: Re: configuring RSS offloads with Netvsc PMD To: Stephen Hemminger <stephen@networkplumber.org> Cc: Long Li <longli@microsoft.com>, 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 <users.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/users>, <mailto:users-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/users/> List-Post: <mailto:users@dpdk.org> List-Help: <mailto:users-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/users>, <mailto:users-request@dpdk.org?subject=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 <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. > --=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 <div dir=3D"ltr"><div dir=3D"ltr">Hi Stephen,<div>It does not work because = the netvsc device is not initialized with=C2=A0<span style=3D"color:rgb(80,= 0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP capability according to the below snipp= et</span>.</div><div><br></div><div><div style=3D"color:rgb(51,51,51);backg= round-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New&quo= t;,monospace;font-size:12px;line-height:18px;white-space:pre"><div><span st= yle=3D"color:rgb(75,105,198)">static</span> <span style=3D"color:rgb(122,62= ,157)">void</span> <span style=3D"color:rgb(170,55,49);font-weight:bold">hn= _rss_hash_init</span><span style=3D"color:rgb(119,119,119)">(</span><span s= tyle=3D"color:rgb(122,62,157)">struct</span> <span style=3D"color:rgb(122,6= 2,157);font-weight:bold">hn_data</span> <span style=3D"color:rgb(119,119,11= 9)">*</span><span style=3D"color:rgb(122,62,157)">hv</span><span style=3D"c= olor:rgb(119,119,119)">,</span></div><div> <span style=3D"c= olor:rgb(75,105,198)">const</span> <span style=3D"color:rgb(122,62,157)">st= ruct</span> <span style=3D"color:rgb(122,62,157);font-weight:bold">rte_eth_= rss_conf</span> <span style=3D"color:rgb(119,119,119)">*</span><span style= =3D"color:rgb(122,62,157)">rss_conf</span><span style=3D"color:rgb(119,119,= 119)">)</span></div><div><span style=3D"color:rgb(119,119,119)">{</span></d= iv><div><span style=3D"color:rgb(170,170,170);font-style:italic"> /* Con= vert from DPDK RSS hash flags to NDIS hash flags */</span></div><div> <s= pan style=3D"color:rgb(122,62,157)">hv</span><span style=3D"color:rgb(119,1= 19,119)">-></span><span style=3D"color:rgb(122,62,157)">rss_hash</span> = <span style=3D"color:rgb(119,119,119)">=3D</span> <span style=3D"color:rgb(= 170,55,49);font-weight:bold">NDIS_HASH_FUNCTION_TOEPLITZ</span><span style= =3D"color:rgb(119,119,119)">;</span></div><br><div> <span style=3D"color= :rgb(75,105,198)">if</span> <span style=3D"color:rgb(119,119,119)">(</span>= <span style=3D"color:rgb(122,62,157)">rss_conf</span><span style=3D"color:r= gb(119,119,119)">-></span><span style=3D"color:rgb(122,62,157)">rss_hf</= span> <span style=3D"color:rgb(119,119,119)">&</span> <span style=3D"co= lor:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV4</span><span style=3D"= color:rgb(119,119,119)">)</span></div><div> <span style=3D"color:rgb= (122,62,157)">hv</span><span style=3D"color:rgb(119,119,119)">-></span><= span style=3D"color:rgb(122,62,157)">rss_hash</span> <span style=3D"color:r= gb(119,119,119)">|=3D</span> <span style=3D"color:rgb(170,55,49);font-weigh= t:bold">NDIS_HASH_IPV4</span><span style=3D"color:rgb(119,119,119)">;</span= ></div><div> <span style=3D"color:rgb(75,105,198)">if</span> <span style= =3D"color:rgb(119,119,119)">(</span><span style=3D"color:rgb(122,62,157)">r= ss_conf</span><span style=3D"color:rgb(119,119,119)">-></span><span styl= e=3D"color:rgb(122,62,157)">rss_hf</span> <span style=3D"color:rgb(119,119,= 119)">&</span> <span style=3D"color:rgb(170,55,49);font-weight:bold">RT= E_ETH_RSS_NONFRAG_IPV4_TCP</span><span style=3D"color:rgb(119,119,119)">)</= span></div><div> <span style=3D"color:rgb(122,62,157)">hv</span><spa= n style=3D"color:rgb(119,119,119)">-></span><span style=3D"color:rgb(122= ,62,157)">rss_hash</span> <span style=3D"color:rgb(119,119,119)">|=3D</span= > <span style=3D"color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV4<= /span><span style=3D"color:rgb(119,119,119)">;</span></div><div> <span s= tyle=3D"color:rgb(75,105,198)">if</span> <span style=3D"color:rgb(119,119,1= 19)">(</span><span style=3D"color:rgb(122,62,157)">rss_conf</span><span sty= le=3D"color:rgb(119,119,119)">-></span><span style=3D"color:rgb(122,62,1= 57)">rss_hf</span> <span style=3D"color:rgb(119,119,119)">&</span> <spa= n style=3D"color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6</span><s= pan style=3D"color:rgb(119,119,119)">)</span></div><div> <span style= =3D"color:rgb(122,62,157)">hv</span><span style=3D"color:rgb(119,119,119)">= -></span><span style=3D"color:rgb(122,62,157)">rss_hash</span> <span sty= le=3D"color:rgb(119,119,119)">|=3D</span> <span style=3D"color:rgb(170,55,= 49);font-weight:bold">NDIS_HASH_IPV6</span><span style=3D"color:rgb(119,119= ,119)">;</span></div><div> <span style=3D"color:rgb(75,105,198)">if</spa= n> <span style=3D"color:rgb(119,119,119)">(</span><span style=3D"color:rgb(= 122,62,157)">rss_conf</span><span style=3D"color:rgb(119,119,119)">-></s= pan><span style=3D"color:rgb(122,62,157)">rss_hf</span> <span style=3D"colo= r:rgb(119,119,119)">&</span> <span style=3D"color:rgb(170,55,49);font-w= eight:bold">RTE_ETH_RSS_IPV6_EX</span><span style=3D"color:rgb(119,119,119)= ">)</span></div><div> <span style=3D"color:rgb(122,62,157)">hv</span= ><span style=3D"color:rgb(119,119,119)">-></span><span style=3D"color:rg= b(122,62,157)">rss_hash</span> <span style=3D"color:rgb(119,119,119)">|=3D<= /span> <span style=3D"color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV= 6_EX</span><span style=3D"color:rgb(119,119,119)">;</span></div><div> <s= pan style=3D"color:rgb(75,105,198)">if</span> <span style=3D"color:rgb(119,= 119,119)">(</span><span style=3D"color:rgb(122,62,157)">rss_conf</span><spa= n style=3D"color:rgb(119,119,119)">-></span><span style=3D"color:rgb(122= ,62,157)">rss_hf</span> <span style=3D"color:rgb(119,119,119)">&</span>= <span style=3D"color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_NONFRAG_= IPV6_TCP</span><span style=3D"color:rgb(119,119,119)">)</span></div><div> = <span style=3D"color:rgb(122,62,157)">hv</span><span style=3D"color:r= gb(119,119,119)">-></span><span style=3D"color:rgb(122,62,157)">rss_hash= </span> <span style=3D"color:rgb(119,119,119)">|=3D</span> <span style=3D"c= olor:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV6</span><span style= =3D"color:rgb(119,119,119)">;</span></div><div> <span style=3D"color:rgb= (75,105,198)">if</span> <span style=3D"color:rgb(119,119,119)">(</span><spa= n style=3D"color:rgb(122,62,157)">rss_conf</span><span style=3D"color:rgb(1= 19,119,119)">-></span><span style=3D"color:rgb(122,62,157)">rss_hf</span= > <span style=3D"color:rgb(119,119,119)">&</span> <span style=3D"color:= rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6_TCP_EX</span><span style= =3D"color:rgb(119,119,119)">)</span></div><div> <span style=3D"color= :rgb(122,62,157)">hv</span><span style=3D"color:rgb(119,119,119)">-></sp= an><span style=3D"color:rgb(122,62,157)">rss_hash</span> <span style=3D"col= or:rgb(119,119,119)">|=3D</span> <span style=3D"color:rgb(170,55,49);font-w= eight:bold">NDIS_HASH_TCP_IPV6_EX</span><span style=3D"color:rgb(119,119,11= 9)">;</span></div><br><div> <span style=3D"color:rgb(170,55,49);font-wei= ght:bold">memcpy</span><span style=3D"color:rgb(119,119,119)">(</span><span= style=3D"color:rgb(122,62,157)">hv</span><span style=3D"color:rgb(119,119,= 119)">-></span><span style=3D"color:rgb(122,62,157)">rss_key</span><span= style=3D"color:rgb(119,119,119)">,</span> <span style=3D"color:rgb(122,62,= 157)">rss_conf</span><span style=3D"color:rgb(119,119,119)">-></span><sp= an style=3D"color:rgb(122,62,157)">rss_key</span> <span style=3D"color:rgb(= 119,119,119)">?</span> <span style=3D"color:rgb(119,119,119)">:</span> <spa= n style=3D"color:rgb(122,62,157)">rss_default_key</span><span style=3D"colo= r:rgb(119,119,119)">,</span></div><div> <span style=3D"color:rgb(= 170,55,49);font-weight:bold">NDIS_HASH_KEYSIZE_TOEPLITZ</span><span style= =3D"color:rgb(119,119,119)">);</span></div><div><span style=3D"color:rgb(11= 9,119,119)">}</span></div></div></div></div><br><div class=3D"gmail_quote">= <div class=3D"gmail_attr">Since hn_dev_info_get merges the configuration of= the netvsc device and VF using AND operation(<span style=3D"color:rgb(80,0= ,80)">in=C2=A0</span><span style=3D"color:rgb(170,55,49);font-weight:bold;b= ackground-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New= ",monospace;font-size:12px;white-space:pre">hn_vf_info_merge</span>), = even though VF(MLX5) supports=C2=A0<span style=3D"color:rgb(80,0,80)">RTE_E= TH_RSS_NONFRAG_IPV6_UDP , the netvsc driver does not return this capability= support to the app.</span></div><div class=3D"gmail_attr"><font color=3D"#= 500050">Why is=C2=A0</font><span style=3D"color:rgb(80,0,80)">RTE_ETH_RSS_N= ONFRAG_IPV6_UDP capability not supported by the netvsc driver?</span></div>= <div class=3D"gmail_attr"><span style=3D"color:rgb(80,0,80)"><br></span></d= iv><div class=3D"gmail_attr"><span style=3D"color:rgb(80,0,80)">Regards,</s= pan></div><div class=3D"gmail_attr"><span style=3D"color:rgb(80,0,80)">Nand= ini</span></div><div dir=3D"ltr" class=3D"gmail_attr"><br></div><div dir=3D= "ltr" class=3D"gmail_attr"><br></div><div dir=3D"ltr" class=3D"gmail_attr">= <br></div><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Aug 28, 2024 at 12:= 05=E2=80=AFPM Stephen Hemminger <<a href=3D"mailto:stephen@networkplumbe= r.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">On Wed, 28 Aug 2024 10:32:17 -0700<br> Nandini Rangaswamy <<a href=3D"mailto:nandini.rangaswamy@broadcom.com" t= arget=3D"_blank">nandini.rangaswamy@broadcom.com</a>> wrote:<br> <br> > Hi Long and Stephen,<br> > I am trying to configure RSS offloads from my DPDK App with netvsc PMD= .<br> > Netvsc seems to be supporting the following offloads:<br> > RTE_ETH_RSS_NONFRAG_IPV4_UDP RTE_ETH_RSS_NONFRAG_IPV4_TCP<br> > RTE_ETH_RSS_NONFRAG_IPV6_TCP RTE_ETH_RSS_IPV4<br> > RTE_ETH_RSS_IPV6<br> > <br> > However, the app is trying to configure the following offloads and fai= ling:<br> > <br> > RTE_ETH_RSS_NONFRAG_IPV4_UDP<br> > RTE_ETH_RSS_NONFRAG_IPV4_TCP<br> > RTE_ETH_RSS_NONFRAG_IPV6_TCP<br> > RTE_ETH_RSS_NONFRAG_IPV6_UDP<br> <br> Confusing, both of these overlap should work.<br> Please instrument the configure code in netvsc to see why it is complaining= .<br> <br> > <br> > Is it possible to bypass the netvsc PMD and configure these offloads o= n VF<br> > ? I am aware that app should not directly program the VF interface<br> > but for performance sake, I want the above offloads to be supported on= VF.<br> <br> No can't bypass driver.<br> <br> You do need to configure multiqueue and enable RSS in configure<br> to get anything.<br> <br> If you look at hn_rss_hash_init, the driver needs to convert the<br> requested flags into NDIS flags to tell the host what to do.<br> </blockquote></div></div> <br> <span style=3D"background-color:rgb(255,255,255)"><font size=3D"2">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.</font></span> --000000000000a383550620d4bc47--