<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:270672203;
mso-list-template-ids:-1053679382;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1
{mso-list-id:1107238141;
mso-list-type:hybrid;
mso-list-template-ids:-794662840 2120893932 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l1:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l1:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l1:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7 ;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<div id="mail-editor-reference-message-container">
<div>
<p class="MsoNormal">Hi Maxime,</p>
<p class="MsoNormal">This email is regarding the following commit:</p>
<p class="MsoNormal" style="text-indent:.5in"><a href="https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657">https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A query had been sent previously on this topic (see below) indicating this commit appears to have broken the 32-bit testpmd app and impacted one of our products that runs as a 32-bit DPDK application. We consequently backed the commit
out of our product but would prefer to get a fix for it. In the earlier exchange, you had asked if we were using virtio-pci or virtio-user (we are using virtio-pci) and asked for logs which Sampath provided. It’s been a while, so let me now if you need me
to send resend those logs or need any other information.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">FWIW, I reproduced this using testpmd and noticed that this part of the change seems to be the interesting part (in drivers/net/virtio/virtqueue.h):</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">/**<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* Return the IOVA (or virtual address in case of virtio-user) of mbuf<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* data buffer.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* The address is firstly casted to the word size (sizeof(uintptr_t))<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* before casting it to uint64_t. This is to make it work with different<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* combination of word size (64 bit and 32 bit) and virtio device<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">* (virtio-pci and virtio-user).<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">#define VIRTIO_MBUF_ADDR(mb, vq) \<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New""> ((uint64_t)(*(uintptr_t *)((uintptr_t)(mb) + (vq)->mbuf_addr_offset))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal">If I revert just this part of the changeset (by re-using the VIRTIO_MBUF_ADDR to return buf_iova which matches what it had used previously), then 32-bit testpmd is able to receive traffic again:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">#define VIRTIO_MBUF_ADDR(mb, vq) (mb->buf_iova)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Looking at the address produced by each of these, I see the address is the same except that the casting results in the upper bits getting cleared:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address from patch (nonworking case) = 0x58e7c900<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address using buf_iova (working case) = 0x158e7c900<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">::<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address from patch (nonworking case) = 0x58e7bfc0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address using buf_iova (working case) = 0x158e7bfc0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">::<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address from patch (nonworking case) = 0x58e7b680<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Address using buf_iova (working case) = 0x158e7b680<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">::<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal">Regards, Dave</p>
<p class="MsoNormal"> <o:p></o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Sampath Peechu (speechu) <speechu@cisco.com><br>
<b>Date: </b>Monday, January 30, 2023 at 3:29 PM<br>
<b>To: </b>Maxime Coquelin <maxime.coquelin@redhat.com>, chenbo.xia@intel.com <chenbo.xia@intel.com>, dev@dpdk.org <dev@dpdk.org><br>
<b>Cc: </b>Roger Melton (rmelton) <rmelton@cisco.com>, Malcolm Bumgardner (mbumgard) <mbumgard@cisco.com><br>
<b>Subject: </b>Re: Commit broke 32-bit testpmd app</span><o:p></o:p></p>
</div>
<p class="MsoNormal">Hi Maxime,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Could you please let us know if you got a chance to look at the debugs logs I provided?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Sampath<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Sampath Peechu (speechu) <speechu@cisco.com><br>
<b>Date: </b>Tuesday, December 6, 2022 at 1:08 PM<br>
<b>To: </b>Maxime Coquelin <maxime.coquelin@redhat.com>, chenbo.xia@intel.com <chenbo.xia@intel.com>, dev@dpdk.org <dev@dpdk.org><br>
<b>Cc: </b>Roger Melton (rmelton) <rmelton@cisco.com><br>
<b>Subject: </b>Re: Commit broke 32-bit testpmd app</span><o:p></o:p></p>
</div>
<p class="MsoNormal">Hi Maxime,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Did you get a chance to look into this?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Please let me know if you need anything else.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Sampath<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Sampath Peechu (speechu) <speechu@cisco.com><br>
<b>Date: </b>Wednesday, November 23, 2022 at 5:15 PM<br>
<b>To: </b>Maxime Coquelin <maxime.coquelin@redhat.com>, chenbo.xia@intel.com <chenbo.xia@intel.com>, dev@dpdk.org <dev@dpdk.org><br>
<b>Cc: </b>Roger Melton (rmelton) <rmelton@cisco.com><br>
<b>Subject: </b>Re: Commit broke 32-bit testpmd app</span><o:p></o:p></p>
</div>
<p class="MsoNormal">Hi Maxime,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I’m attaching the following for reference.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo3"><span style="font-size:11.0pt">Instructions for Centos8 test setup<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo3"><span style="font-size:11.0pt">Diffs between the working and non-working versions (working version has the problem commit backed out)<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo3"><span style="font-size:11.0pt">Working logs (stats show that ping packets from neighbor VM can be seen with both 64-bit and 32-bit apps)<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo3"><span style="font-size:11.0pt">Non-working logs (stats show that ping packets from neighbor VM are seen with 64-bit app but NOT seen with 32-bit app)<o:p></o:p></span></li></ul>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">============================ <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">$ sudo ./usertools/dpdk-devbind.py --status<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Network devices using DPDK-compatible driver<o:p></o:p></p>
<p class="MsoNormal">============================================<o:p></o:p></p>
<p class="MsoNormal">0000:07:00.0 'Virtio network device 1041' drv=igb_uio unused=<o:p></o:p></p>
<p class="MsoNormal">0000:08:00.0 'Virtio network device 1041' drv=igb_uio unused=<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Network devices using kernel driver<o:p></o:p></p>
<p class="MsoNormal">===================================<o:p></o:p></p>
<p class="MsoNormal">0000:01:00.0 'Virtio network device 1041' if=enp1s0 drv=virtio-pci unused=igb_uio *Active*<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal">===========================<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Sampath<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Maxime Coquelin <maxime.coquelin@redhat.com><br>
<b>Date: </b>Tuesday, November 22, 2022 at 4:24 AM<br>
<b>To: </b>Sampath Peechu (speechu) <speechu@cisco.com>, chenbo.xia@intel.com <chenbo.xia@intel.com>, dev@dpdk.org <dev@dpdk.org><br>
<b>Cc: </b>Roger Melton (rmelton) <rmelton@cisco.com><br>
<b>Subject: </b>Re: Commit broke 32-bit testpmd app</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
In my initial reply (see below), I also asked if you had logs to share.<br>
And wondered whether it happens with Virtio PCI or Virtio-user?<br>
<br>
Regards,<br>
Maxime<br>
<br>
On 11/16/22 00:30, Sampath Peechu (speechu) wrote:<br>
> ++ dev@dpdk.org <<a href="mailto:dev@dpdk.org">mailto:dev@dpdk.org</a>><br>
> <br>
> *From: *Maxime Coquelin <maxime.coquelin@redhat.com><br>
> *Date: *Tuesday, November 15, 2022 at 3:19 AM<br>
> *To: *Sampath Peechu (speechu) <speechu@cisco.com>, chenbo.xia@intel.com <br>
> <chenbo.xia@intel.com><br>
> *Cc: *Roger Melton (rmelton) <rmelton@cisco.com><br>
> *Subject: *Re: Commit broke 32-bit testpmd app<br>
> <br>
> Hi Sampath,<br>
> <br>
> <br>
> Please add dev@dpdk.org, the upstream mailing list, if this is related<br>
> to the upstream DPDK project.If it is using RHEL DPDK package, please<br>
> use the appropriate support channels.<br>
> <br>
> On 11/14/22 23:55, Sampath Peechu (speechu) wrote:<br>
> > Hi Virtio Maintainers team,<br>
> ><br>
> > This email is regarding the following commit.<br>
> ><br>
> > <br>
> <a href="https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657">
https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657</a> <<a href="https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657">https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657</a>> <https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657
<<a href="https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657">https://github.com/DPDK/dpdk/commit/ba55c94a7ebc386d2288d6578ed57aad6cb92657</a>>><br>
> ><br>
> > The above commit appears to have broken the 32-bit testpmd app (and<br>
> > consequently impacted one of our products that runs as a 32-bit DPDK<br>
> > app). The 64-bit testpmd app does not appear to be impacted though.<br>
> <br>
> We'll need some logs to understand what is going on.<br>
> Does it happen with virtio-pci or virtio-user?<br>
> <br>
> Regards,<br>
> Maxime<br>
> <br>
> > With the commit in place, we didn’t see any packets going through at<br>
> > all. After backing out the commit and rebuilding the 32-bit testpmd app<br>
> > in our test setup, we were able to pass traffic as expected.<br>
> ><br>
> > Could you please let us know if this is a known issue? And if there is a<br>
> > fix available for it?<br>
> ><br>
> > Thank you,<br>
> ><br>
> > Sampath Peechu<br>
> ><br>
> > Cisco Systems<br>
> ><br>
> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>