<div dir="ltr"><div dir="ltr">Hi <span class="gmail-il">Stephen</span>,<div>It does not work because the netvsc device is not initialized with <span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP capability according to the below snippet</span>.</div><div><br></div><div><div style="color:rgb(51,51,51);background-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px"><div><span style="color:rgb(75,105,198)">static</span> <span style="color:rgb(122,62,157)">void</span> <span style="color:rgb(170,55,49);font-weight:bold">hn_rss_hash_init</span><span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">struct</span> <span style="color:rgb(122,62,157);font-weight:bold">hn_data</span> <span style="color:rgb(119,119,119)">*</span><span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">,</span></div><div> <span style="color:rgb(75,105,198)">const</span> <span style="color:rgb(122,62,157)">struct</span> <span style="color:rgb(122,62,157);font-weight:bold">rte_eth_rss_conf</span> <span style="color:rgb(119,119,119)">*</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">)</span></div><div><span style="color:rgb(119,119,119)">{</span></div><div><span style="color:rgb(170,170,170);font-style:italic"> /* Convert from DPDK RSS hash flags to NDIS hash flags */</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_FUNCTION_TOEPLITZ</span><span style="color:rgb(119,119,119)">;</span></div><br><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV4</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV4</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_NONFRAG_IPV4_TCP</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV4</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV6</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6_EX</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV6_EX</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_NONFRAG_IPV6_TCP</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV6</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6_TCP_EX</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV6_EX</span><span style="color:rgb(119,119,119)">;</span></div><br><div> <span style="color:rgb(170,55,49);font-weight:bold">memcpy</span><span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_key</span><span style="color:rgb(119,119,119)">,</span> <span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_key</span> <span style="color:rgb(119,119,119)">?</span> <span style="color:rgb(119,119,119)">:</span> <span style="color:rgb(122,62,157)">rss_default_key</span><span style="color:rgb(119,119,119)">,</span></div><div> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_KEYSIZE_TOEPLITZ</span><span style="color:rgb(119,119,119)">);</span></div><div><span style="color:rgb(119,119,119)">}</span></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr">Since hn_dev_info_get merges the configuration of the netvsc device and VF using AND operation(<span style="color:rgb(80,0,80)">in </span><span style="color:rgb(170,55,49);font-weight:bold;background-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px">hn_vf_info_merge</span>), even though VF(MLX5) supports <span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP , the netvsc driver does not return this capability support to the app.</span></div><div class="gmail_attr"><font color="#500050">Why is </font><span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by the netvsc driver?</span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)"><br></span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)">Regards,</span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)">Nandini</span></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2024 at 9:11 AM Nandini Rangaswamy <<a href="mailto:nandini.rangaswamy@broadcom.com">nandini.rangaswamy@broadcom.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Stephen,<div>It does not work because the netvsc device is not initialized with <span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP capability according to the below snippet</span>.</div><div><br></div><div><div style="color:rgb(51,51,51);background-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><div><span style="color:rgb(75,105,198)">static</span> <span style="color:rgb(122,62,157)">void</span> <span style="color:rgb(170,55,49);font-weight:bold">hn_rss_hash_init</span><span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">struct</span> <span style="color:rgb(122,62,157);font-weight:bold">hn_data</span> <span style="color:rgb(119,119,119)">*</span><span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">,</span></div><div> <span style="color:rgb(75,105,198)">const</span> <span style="color:rgb(122,62,157)">struct</span> <span style="color:rgb(122,62,157);font-weight:bold">rte_eth_rss_conf</span> <span style="color:rgb(119,119,119)">*</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">)</span></div><div><span style="color:rgb(119,119,119)">{</span></div><div><span style="color:rgb(170,170,170);font-style:italic"> /* Convert from DPDK RSS hash flags to NDIS hash flags */</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_FUNCTION_TOEPLITZ</span><span style="color:rgb(119,119,119)">;</span></div><br><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV4</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV4</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_NONFRAG_IPV4_TCP</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV4</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV6</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6_EX</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_IPV6_EX</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_NONFRAG_IPV6_TCP</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV6</span><span style="color:rgb(119,119,119)">;</span></div><div> <span style="color:rgb(75,105,198)">if</span> <span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hf</span> <span style="color:rgb(119,119,119)">&</span> <span style="color:rgb(170,55,49);font-weight:bold">RTE_ETH_RSS_IPV6_TCP_EX</span><span style="color:rgb(119,119,119)">)</span></div><div> <span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_hash</span> <span style="color:rgb(119,119,119)">|=</span> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_TCP_IPV6_EX</span><span style="color:rgb(119,119,119)">;</span></div><br><div> <span style="color:rgb(170,55,49);font-weight:bold">memcpy</span><span style="color:rgb(119,119,119)">(</span><span style="color:rgb(122,62,157)">hv</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_key</span><span style="color:rgb(119,119,119)">,</span> <span style="color:rgb(122,62,157)">rss_conf</span><span style="color:rgb(119,119,119)">-></span><span style="color:rgb(122,62,157)">rss_key</span> <span style="color:rgb(119,119,119)">?</span> <span style="color:rgb(119,119,119)">:</span> <span style="color:rgb(122,62,157)">rss_default_key</span><span style="color:rgb(119,119,119)">,</span></div><div> <span style="color:rgb(170,55,49);font-weight:bold">NDIS_HASH_KEYSIZE_TOEPLITZ</span><span style="color:rgb(119,119,119)">);</span></div><div><span style="color:rgb(119,119,119)">}</span></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr">Since hn_dev_info_get merges the configuration of the netvsc device and VF using AND operation(<span style="color:rgb(80,0,80)">in </span><span style="color:rgb(170,55,49);font-weight:bold;background-color:rgb(245,245,245);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">hn_vf_info_merge</span>), even though VF(MLX5) supports <span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP , the netvsc driver does not return this capability support to the app.</span></div><div class="gmail_attr"><font color="#500050">Why is </font><span style="color:rgb(80,0,80)">RTE_ETH_RSS_NONFRAG_IPV6_UDP capability not supported by the netvsc driver?</span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)"><br></span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)">Regards,</span></div><div class="gmail_attr"><span style="color:rgb(80,0,80)">Nandini</span></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2024 at 12:05 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 28 Aug 2024 10:32:17 -0700<br>
Nandini Rangaswamy <<a href="mailto:nandini.rangaswamy@broadcom.com" target="_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 failing:<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 on 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>
</blockquote></div>
<br>
<span style="background-color:rgb(255,255,255)"><font size="2">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.</font></span>