<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-ligatures:none;
mso-fareast-language:#2000;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-DE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<pre><span lang="EN-US" style="color:black">Hi all, Hi Dariusz,<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">Thanks a lot for your help so far. We really appreciate it.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">I just want to touch base with this question which was asked by my colleague Tao a while back.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">Our question is actually quite simple. Issuing the commands listed below on a ConnectX-6 Dx Card breaks the <o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">bifurcated nature of the mlx5 driver in linux kernel for PF1. (No traffic is forwarded to linux kernel anymore on PF1)<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">You don’t need to start any testpmd or dpdk application. Just issuing the following commands below breaks the PF1 <o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">in linux kernel already.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">sudo devlink dev eswitch set pci/0000:</span><span lang="EN-GB" style="color:black">8a</span><span style="color:black">:00.0 mode switchdev<o:p></o:p></span></pre>
<pre><span style="color:black">sudo devlink dev eswitch set pci/0000:</span><span lang="EN-GB" style="color:black">8a</span><span style="color:black">:00.</span><span lang="EN-GB" style="color:black">1</span><span style="color:black"> mode switchdev<o:p></o:p></span></pre>
<pre><span style="color:black">sudo devlink dev param set pci/0000:</span><span lang="EN-GB" style="color:black">8a</span><span style="color:black">:00.0 name esw_multiport value true cmode runtime<o:p></o:p></span></pre>
<pre><span style="color:black">sudo devlink dev param set pci/0000:</span><span lang="EN-GB" style="color:black">8a</span><span style="color:black">:00.</span><span lang="EN-GB" style="color:black">1</span><span style="color:black"> name esw_multiport value true cmode runtime<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><i><span style="color:black">----<test environment>-----<o:p></o:p></span></i></pre>
<pre><i><span style="color:black">pci/0000:8a:00.0:<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> driver mlx5_core<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> versions:<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> fixed:<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> fw.psid MT_0000000359<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> running:<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> fw.version 22.39.2048<o:p></o:p></span></i></pre>
<pre><i><span style="color:black"> fw 22.39.2048<o:p></o:p></span></i></pre>
<pre><i><span style="color:black">Linux kernel version: 6.6.16<o:p></o:p></span></i></pre>
<pre><i><span style="color:black">DPDK: 23.11</span></i><i><span lang="EN-GB" style="color:black"> (But not really needed to reproduce the issue)<o:p></o:p></span></i></pre>
<pre><i><span style="color:black">----</test environment>------</span></i><span style="color:black"><o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">This makes the eswitch multiport feature for us unusable. Could you please advise whether we are missing smt here ?<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">As we are really keen to use this feature.<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">Thanks & Regards<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">Guvenc Gulce<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span lang="EN-US" style="color:black">-------------------- previous email exchange -------------------------------<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Hi Dariusz,<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">It is very appreciated that you took a look at the issue and provided suggestions. This time, we again performed tests using two directly connected machines and focused on ICMP (IPv4) packets in addition to ICMPv6 packets mentioned in the original problem description. The issue remains the same. I would like to highlight two points in our setup:<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"> 1. ICMP packets immediately cannot be captured on PF1 right after setting the nic into the multiport eswitch mode. And if I switch off the multiport eswitch mode by using following two commands, ICMP communication is resumed immediately, which shall prove that configs, such as firewall, on the system are correct. I would also assume it has little to do with a running DPDK application, as communication is already broken before starting an application like testpmd.<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">sudo devlink dev param set pci/0000:3b:00.0 name esw_multiport value false cmode runtime<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">sudo devlink dev param set pci/0000:3b:00.1 name esw_multiport value false cmode runtime<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black"> 1. In this setup, we do not use MLNX_OFED drivers but rely on the upstream Mellanox drivers from Linux kernel 6.5.0 (which is greater than the suggested kernel version 6.3). Would that make a difference? Could you share some more detailed information regarding the environment setup on your side? The firmware version we are using for Mellanox ConnectX-6 is 22.39.1002.<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Looking forward to your further reply. Thanks in advance.<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Best regards,<o:p></o:p></span></pre>
<pre><span style="color:black">Tao Li<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">From: Dariusz Sosnowski <<a href="https://mails.dpdk.org/listinfo/users">dsosnowski at nvidia.com</a>><o:p></o:p></span></pre>
<pre><span style="color:black">Date: Friday, 19. April 2024 at 19:30<o:p></o:p></span></pre>
<pre><span style="color:black">To: Tao Li <<a href="https://mails.dpdk.org/listinfo/users">byteocean at hotmail.com</a>>, <a href="https://mails.dpdk.org/listinfo/users">users at dpdk.org</a> <<a href="https://mails.dpdk.org/listinfo/users">users at dpdk.org</a>><o:p></o:p></span></pre>
<pre><span style="color:black">Cc: <a href="https://mails.dpdk.org/listinfo/users">tao.li06 at sap.com</a> <<a href="https://mails.dpdk.org/listinfo/users">tao.li06 at sap.com</a>><o:p></o:p></span></pre>
<pre><span style="color:black">Subject: RE: Packets cannot reach host's kernel in multiport e-switch mode (mlx5 driver)<o:p></o:p></span></pre>
<pre><span style="color:black">Hi,<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">I could not reproduce the issue locally with testpmd, with flow isolation enabled. I can see ICMP packets passing both ways to kernel interfaces of PF0 and PF1.<o:p></o:p></span></pre>
<pre><span style="color:black">Without flow isolation, it is expected that traffic coming to the host will be hijacked by DPDK (depending on the MAC address, multicast config and promiscuous mode).<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Could you please run testpmd with the following command line parameters and execute the following commands?<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Testpmd command line:<o:p></o:p></span></pre>
<pre><span style="color:black"> dpdk-testpmd -a 3b:00.0,dv_flow_en=2,representor=pf0-1vf0 -- --flow-isolate-all -i<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Testpmd commands:<o:p></o:p></span></pre>
<pre><span style="color:black"> port stop all<o:p></o:p></span></pre>
<pre><span style="color:black"> flow configure 0 queues_number 4 queues_size 64<o:p></o:p></span></pre>
<pre><span style="color:black"> flow configure 1 queues_number 4 queues_size 64<o:p></o:p></span></pre>
<pre><span style="color:black"> flow configure 2 queues_number 4 queues_size 64<o:p></o:p></span></pre>
<pre><span style="color:black"> flow configure 3 queues_number 4 queues_size 64<o:p></o:p></span></pre>
<pre><span style="color:black"> port start 0<o:p></o:p></span></pre>
<pre><span style="color:black"> port start 1<o:p></o:p></span></pre>
<pre><span style="color:black"> port start 2<o:p></o:p></span></pre>
<pre><span style="color:black"> port start 3<o:p></o:p></span></pre>
<pre><span style="color:black"> set verbose 1<o:p></o:p></span></pre>
<pre><span style="color:black"> set fwd rxonly<o:p></o:p></span></pre>
<pre><span style="color:black"> start<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">With this testpmd running, could you please test if both PF0 and PF1 kernel interfaces are reachable and all packets pass?<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Best regards,<o:p></o:p></span></pre>
<pre><span style="color:black">Dariusz Sosnowski<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="en-DE"><o:p> </o:p></span></p>
</div>
</body>
</html>