<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: Stephen Hemminger <stephen@networkplumber.org> <br>
Sent: Friday, March 10, 2023 10:15 PM<br>
To: Ferruh Yigit <ferruh.yigit@amd.com><br>
Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Jangra, Yogesh <yogesh.jangra@intel.com>; Singh, Aman Deep <aman.deep.singh@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>; dev@dpdk.org; R, Kamalakannan <kamalakannan.r@intel.com>; Suresh Narayane,
 Harshad <harshad.suresh.narayane@intel.com><br>
Subject: Re: [PATCH] app/testpmd: fix closing softnic port before ethdev ports</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">On Fri, 10 Mar 2023 13:58:52 +0000<o:p></o:p></p>
<p class="MsoPlainText">Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com"><span style="color:windowtext;text-decoration:none">ferruh.yigit@amd.com</span></a>> wrote:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">> >><o:p></o:p></p>
<p class="MsoPlainText">> >> Why not fix the misbehaving drivers, instead of working around for
<o:p></o:p></p>
<p class="MsoPlainText">> >> softnic, as Stephen suggested?<o:p></o:p></p>
<p class="MsoPlainText">> >><o:p></o:p></p>
<p class="MsoPlainText">> >> Is there a list of problematic drivers?<o:p></o:p></p>
<p class="MsoPlainText">> >>  <o:p></o:p></p>
<p class="MsoPlainText">> > <o:p></o:p></p>
<p class="MsoPlainText">> > Ferruh, I think this is not a reasonable request. We don't have the expertise to fix all drivers, not the hardware to test all drivers.<o:p></o:p></p>
<p class="MsoPlainText">> >   <o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Please don't make it over dramatic ;), this is not about having
<o:p></o:p></p>
<p class="MsoPlainText">> expertise in all drivers or having their hardware to test.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> You claim some drivers does free up their resources on stop() and
<o:p></o:p></p>
<p class="MsoPlainText">> continue to polling from them cause segfault. Action is move resource
<o:p></o:p></p>
<p class="MsoPlainText">> free from stop() to close().<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> And my intention was not request a fix from you, if you have any
<o:p></o:p></p>
<p class="MsoPlainText">> particular misbehaving drivers, I can facilitate a fix from those
<o:p></o:p></p>
<p class="MsoPlainText">> driver maintainers.<o:p></o:p></p>
<p class="MsoPlainText">> Eventually drivers freeing resources in stop() is a bigger problem and
<o:p></o:p></p>
<p class="MsoPlainText">> can hit other applications too, this is not just testpmd problem.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Lets all work together to resolve this.<o:p></o:p></p>
<p class="MsoPlainText">I and others are willing to review and fix drivers you identify as problematic.<o:p></o:p></p>
<p class="MsoPlainText">If this is a common problem, ideally we can update CI infrastructure to test shutdown and resource issues more thoroughly via ASAN builds etc.<o:p></o:p></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">Hi Stephen,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">I am getting segmentation error while stopping only the physical port .<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black">I run testpmd application using Soft NIC driver. I used one physical port and Soft NIC is running on the top of that.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">In my scenario, I started the traffic on the port and when I stop the port I am getting segmentation error in rte_eth_rx_burst api.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black">This shows the order of stopping the port is casing the issue. As stopping the port is not handling the service thread stop.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">Please refer screenshot for reference.<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><img border="0" width="868" height="194" style="width:9.0416in;height:2.0166in" id="Picture_x0020_1" src="cid:image001.png@01D958CD.BE580600"><span style="color:black"><o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="color:black">Thanks & Regards,<o:p></o:p></span></p>
<p class="MsoPlainText"><span style="color:black">Yogesh<o:p></o:p></span></p>
</div>
</body>
</html>