<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
{mso-style-name:x_msonormal;
margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal-compose;
font-family:"Times New Roman",serif;
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
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="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black">It seems that in the Linux kernel some locking has been added with this commit:
<a href="https://github.com/torvalds/linux/commit/83d0feffc5695d7dc24c6b8dac9ab265533beb78">
https://github.com/torvalds/linux/commit/83d0feffc5695d7dc24c6b8dac9ab265533beb78</a>:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><i><span lang="EN-US">spin_lock_irqsave(&adapter->cmd_lock, flags);<o:p></o:p></span></i></b></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i><span style="display:none"><o:p> </o:p></span></i></p>
<table class="MsoNormalTable" border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><i><span lang="EN-US">VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);<o:p></o:p></span></i></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><i><span style="display:none"><o:p> </o:p></span></i></p>
<table class="MsoNormalTable" border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><i><span lang="EN-US">ret = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);<o:p></o:p></span></i></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><b><i><span lang="EN-US">spin_unlock_irqrestore(&adapter->cmd_lock, flags);</span></i></b><b><i><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black">Ciprian.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">Lähettäjä:</span></b><span style="color:black"> Ciprian Pascu (Nokia)<br>
<b>Lähetetty:</b> keskiviikko 7. joulukuuta 2022 15.57<br>
<b>Vastaanottaja:</b> users@dpdk.org <users@dpdk.org>; bruce.richardson@intel.com <bruce.richardson@intel.com><br>
<b>Aihe:</b> DPDK issue with reading the eth interface status?</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif">Hi,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif">I encountered an issue while using dpdk-20.05 in our VMware based VMs: at times, when sysstat data is collected, dpdk signals that some eth interface is down; this happens occasionally;
after sysstat data has been collected, eth interface is signaled as up; I was wondering about these lines in ‘__vmxnet3_dev_link_update’ function:</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">1251 »·······VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_LINK);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">1252 »·······ret = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif">Is this atomic? Could this lead to problems if some other module tries to read something else at about the same time and overwrites the command?</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US" style="font-family:"Arial",sans-serif"> </span><span lang="EN-US"><o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="xmsonormal"><span lang="EN-US">Thanks,</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-US" style="font-size:12.0pt">Ciprian.</span><o:p></o:p></p>
<p class="xmsonormal"><span lang="EN-US"> </span><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>