<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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* 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:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1233734560;
        mso-list-type:hybrid;
        mso-list-template-ids:307532604 -1877204384 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        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 l0: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 l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0: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 l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0: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 l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        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><!--[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="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal">I hit the exact same problem reported by Yan.<o:p></o:p></p>
<p class="MsoNormal">I’m using:<o:p></o:p></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">2 Mellanox CX5 MT28800 installed on 2 different servers, connected together
<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Device FW (as reported by DPDK): 16.31.1014<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">DPDK 19.11.5 (from 6WindGate actually)<o:p></o:p></li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I sent roughly 360M packets from one server to the other using “testpmd” (in –forward-mode=txonly).<o:p></o:p></p>
<p class="MsoNormal">My DPDK application on the other server is reporting the following xstats counters (:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">CounterName                      PORT0        PORT1        TOTAL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_good_packets:              76727920,           0,    76727920<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_good_packets:                     0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_good_bytes:              4910586880,           0,  4910586880<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_good_bytes:                       0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_missed_errors:                    0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_errors:                           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_errors:                           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_mbuf_allocation_errors:           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q0packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q0bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q0errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q1packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q1bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q1errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q2packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q2bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q2errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q3packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q3bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q3errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q4packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q4bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q4errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q5packets:                 76727920,           0,    76727920<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q5bytes:                 4910586880,           0,  4910586880<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q5errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q6packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q6bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q6errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q7packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q7bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q7errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q8packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q8bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q8errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q9packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q9bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q9errors:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q10packets:                       0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q10bytes:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q10errors:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q11packets:                       0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q11bytes:                         0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_q11errors:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_q0packets:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_q0bytes:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_wqe_err:                          0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_unicast_packets:     360316064,           0,   360316064<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_unicast_bytes:     23060228096,           0, 23060228096<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_unicast_packets:             0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_unicast_bytes:               0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_multicast_packets:           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_multicast_bytes:             0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_multicast_packets:           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_multicast_bytes:             0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_broadcast_packets:           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_broadcast_bytes:             0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_broadcast_packets:           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_port_broadcast_bytes:             0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_packets_phy:                      0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_packets_phy:                      0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_crc_errors_phy:                   0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_bytes_phy:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_bytes_phy:                        0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_in_range_len_errors_phy           0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_symbol_err_phy:                   0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_discards_phy:                     0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_discards_phy:                     0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">tx_errors_phy:                       0,           0,           0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_out_of_buffer:                    0,           0,           0</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So <span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">
rx_good_packets is roughly 76M pkts, while rx_port_unicast_packets has counted correctly all 360M pkts sent by testpmd.<o:p></o:p></span></p>
<p class="MsoNormal">Of course my application layer has been able to dequeue from the DPDK port only 76M pkts so the remaining (<span style="font-size:10.5pt;font-family:Consolas;color:#172B4D;background:#F4F5F7">rx_port_unicast_packets- rx_good_packets</span>)
 got lost but are not reported in the “imissed” counter or “ierrors” counter of rte_eth_stats…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It would be not so easy for me to test against latest DPDK… also from what Yan has reported, the issue is still there in DPDK stable 20.11.3…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Mellanox maintainers: any update on this issue? Is there a workaround to get the dropped packet back into the rte_eth_stats counters?<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"><o:p> </o:p></p>
<p class="MsoNormal">Francesco Montorsi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Yan, Xiaoping (NSB - CN/Hangzhou) <xiaoping.yan@nokia-sbell.com>
<br>
<b>Sent:</b> Friday, October 29, 2021 2:44 AM<br>
<b>To:</b> Gerry Wan <gerryw@stanford.edu>; Asaf Penso <asafp@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com><br>
<b>Cc:</b> Martin Weiser <martin.weiser@allegro-packets.com>; David Marchand <david.marchand@redhat.com>; users@dpdk.org<br>
<b>Subject:</b> RE: mlx5 VF packet lost between rx_port_unicast_packets and rx_good_packets<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yes, it’s always zero…<o:p></o:p></p>
<p class="MsoNormal">It seems dpdk-stable-20.11-3 already include this patch.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[xiaopiya@fedora30 dpdk-stable-20.11.3]$ patch -p1 < ./4-4-net-mlx5-fix-imissed-statistics.diff<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">patching file drivers/net/mlx5/linux/mlx5_os.c<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Reversed (or previously applied) patch detected!  Assume -R? [n] n<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Apply anyway? [n] ^C<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">[xiaopiya@fedora30 dpdk-stable-20.11.3]$ grep -r "mlx5_queue_counter_id_prepare" ./<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./drivers/net/mlx5/linux/mlx5_os.c:mlx5_queue_counter_id_prepare(struct rte_eth_dev *dev)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./drivers/net/mlx5/linux/mlx5_os.c:             mlx5_queue_counter_id_prepare(eth_dev);<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./drivers/net/mlx5/linux/mlx5_os.c.rej:+mlx5_queue_counter_id_prepare(struct rte_eth_dev *dev)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./drivers/net/mlx5/linux/mlx5_os.c.rej:+                mlx5_queue_counter_id_prepare(eth_dev);<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./4-4-net-mlx5-fix-imissed-statistics.diff:+mlx5_queue_counter_id_prepare(struct rte_eth_dev *dev)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">./4-4-net-mlx5-fix-imissed-statistics.diff:+            mlx5_queue_counter_id_prepare(eth_dev);<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards<o:p></o:p></p>
<p class="MsoNormal">Yan Xiaoping<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Gerry Wan <<a href="mailto:gerryw@stanford.edu">gerryw@stanford.edu</a>>
<br>
<b>Sent:</b> 2021<span lang="ZH-CN" style="font-family:SimSun;mso-fareast-language:ZH-CN">年</span>10<span lang="ZH-CN" style="font-family:SimSun;mso-fareast-language:ZH-CN">月</span>28<span lang="ZH-CN" style="font-family:SimSun;mso-fareast-language:ZH-CN">日</span>
 9:58<br>
<b>To:</b> Yan, Xiaoping (NSB - CN/Hangzhou) <<a href="mailto:xiaoping.yan@nokia-sbell.com">xiaoping.yan@nokia-sbell.com</a>><br>
<b>Cc:</b> Martin Weiser <<a href="mailto:martin.weiser@allegro-packets.com">martin.weiser@allegro-packets.com</a>>; David Marchand <<a href="mailto:david.marchand@redhat.com">david.marchand@redhat.com</a>>; Asaf Penso <<a href="mailto:asafp@nvidia.com">asafp@nvidia.com</a>>;
 Slava Ovsiienko <<a href="mailto:viacheslavo@nvidia.com">viacheslavo@nvidia.com</a>>; Matan Azrad <<a href="mailto:matan@nvidia.com">matan@nvidia.com</a>>; Raslan Darawsheh <<a href="mailto:rasland@nvidia.com">rasland@nvidia.com</a>>;
<a href="mailto:users@dpdk.org">users@dpdk.org</a><br>
<b>Subject:</b> Re: mlx5 VF packet lost between rx_port_unicast_packets and rx_good_packets<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Are the rx_missed_errors/rx_out_of_buffer counters always showing 0 no matter how fast you push your generator?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">I had a similar issue with missing counters on DPDK 20.11 that was fixed on 21.05 by applying this patch:<o:p></o:p></p>
<div>
<p class="MsoNormal"><a href="http://patchwork.dpdk.org/project/dpdk/patch/1614249901-307665-5-git-send-email-matan@nvidia.com/">http://patchwork.dpdk.org/project/dpdk/patch/1614249901-307665-5-git-send-email-matan@nvidia.com/</a><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Potentially relevant thread:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><a href="https://inbox.dpdk.org/users/CAAcwi38rs2Vk9MKhRGS3kAK+=dYAnDdECT7f+Ts-f13cANYB+Q@mail.gmail.com/">https://inbox.dpdk.org/users/CAAcwi38rs2Vk9MKhRGS3kAK+=dYAnDdECT7f+Ts-f13cANYB+Q@mail.gmail.com/</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Oct 27, 2021 at 6:39 PM Yan, Xiaoping (NSB - CN/Hangzhou) <<a href="mailto:xiaoping.yan@nokia-sbell.com">xiaoping.yan@nokia-sbell.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
I checked the counter from PF with ethtool -S, there is no counter named 'rx_prio0_buf_discard'<br>
Anyway, I checked all counters from ethtool output, there is not any counter reflects the dropped packets.<br>
<br>
Any suggestion from mlx maintainer? @Matan Azrad @Asaf Penso @Slava Ovsiienko @Raslan Darawsheh<br>
<br>
Thank you.<br>
<br>
<br>
Best regards<br>
Yan Xiaoping<br>
<br>
-----Original Message-----<br>
From: Martin Weiser <<a href="mailto:martin.weiser@allegro-packets.com" target="_blank">martin.weiser@allegro-packets.com</a>>
<br>
Sent: 2021<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">年</span>10<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">月</span>27<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">日</span>
 15:54<br>
To: Yan, Xiaoping (NSB - CN/Hangzhou) <<a href="mailto:xiaoping.yan@nokia-sbell.com" target="_blank">xiaoping.yan@nokia-sbell.com</a>>; David Marchand <<a href="mailto:david.marchand@redhat.com" target="_blank">david.marchand@redhat.com</a>><br>
Cc: Asaf Penso <<a href="mailto:asafp@nvidia.com" target="_blank">asafp@nvidia.com</a>>;
<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>; Slava Ovsiienko <<a href="mailto:viacheslavo@nvidia.com" target="_blank">viacheslavo@nvidia.com</a>>; Matan Azrad <<a href="mailto:matan@nvidia.com" target="_blank">matan@nvidia.com</a>>; Raslan
 Darawsheh <<a href="mailto:rasland@nvidia.com" target="_blank">rasland@nvidia.com</a>><br>
Subject: Re: mlx5 VF packet lost between rx_port_unicast_packets and rx_good_packets<br>
<br>
Hi,<br>
<br>
you may want to check the counter 'rx_prio0_buf_discard' with ethtool (which is not available in DPDK xstats as it seems that this counter is global for the card and not available per port).<br>
I opened a ticket a while ago regarding this issue: <br>
<a href="https://bugs.dpdk.org/show_bug.cgi?id=749" target="_blank">https://bugs.dpdk.org/show_bug.cgi?id=749</a><br>
<br>
Best regards,<br>
Martin<br>
<br>
<br>
Am 27.10.21 um 08:17 schrieb Yan, Xiaoping (NSB - CN/Hangzhou):<br>
> Hi,<br>
><br>
> I tried with dpdk 20.11-3 downloaded from <br>
> <a href="https://fast.dpdk.org/rel/dpdk-20.11.3.tar.xz" target="_blank">https://fast.dpdk.org/rel/dpdk-20.11.3.tar.xz</a><br>
> Problem still exist:<br>
> 1. there is packet loss with 2mpps (small packet), 2. no counter for <br>
> the dropped packet in NIC.<br>
><br>
> traffic generator stats: sends 41990938, receives back 41986105, lost <br>
> 4833 testpmd fwd stats: RX-packets: 41986110, TX-packets: 41986110 <br>
> port xstats: rx_unicast_packets: 41990938  (all packets reached to the NIC port), rx_good_packets: 41986111 (some is lost), but there is not any counter of the lost packet.<br>
><br>
> Here is the log:<br>
> [root@up-0 /]# dpdk-testpmd -l "2,3" --legacy-mem --socket-mem <br>
> "5000,0" -a 0000:03:06.7  -- -i --nb-cores=1 --portmask=0x1 --rxd=512 <br>
> --txd=512<br>
> EAL: Detected 28 lcore(s)<br>
> EAL: Detected 2 NUMA nodes<br>
> EAL: Detected static linkage of DPDK<br>
> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>
> EAL: Selected IOVA mode 'VA'<br>
> EAL: No available hugepages reported in hugepages-2048kB<br>
> EAL: Probing VFIO support...<br>
> EAL: Probe PCI driver: mlx5_pci (15b3:1018) device: 0000:03:06.7 <br>
> (socket 0)<br>
> mlx5_pci: cannot bind mlx5 socket: Read-only file system<br>
> mlx5_pci: Cannot initialize socket: Read-only file system<br>
> EAL: No legacy callbacks, legacy socket not created Interactive-mode <br>
> selected<br>
> testpmd: create a new mbuf pool <mb_pool_0>: n=155456, size=2176, <br>
> socket=0<br>
> testpmd: preferred mempool ops selected: ring_mp_mc<br>
><br>
> Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.<br>
><br>
> Configuring Port 0 (socket 0)<br>
> Port 0: 7A:9A:8A:A6:86:93<br>
> Checking link statuses...<br>
> Done<br>
> testpmd> port stop 0<br>
> Stopping ports...<br>
> Checking link statuses...<br>
> Done<br>
> testpmd> vlan set filter on 0<br>
> testpmd> rx_vlan add 767 0<br>
> testpmd> port start 0<br>
> Port 0: 7A:9A:8A:A6:86:93<br>
> Checking link statuses...<br>
> Done<br>
> testpmd> set fwd 5tswap<br>
> Set 5tswap packet forwarding mode<br>
> testpmd> start<br>
> 5tswap packet forwarding - ports=1 - cores=1 - streams=1 - NUMA <br>
> support enabled, MP allocation mode: native Logical Core 3 (socket 0) forwards packets on 1 streams:<br>
>    RX P=0/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) <br>
> peer=02:00:00:00:00:00<br>
><br>
>    5tswap packet forwarding packets/burst=32<br>
>    nb forwarding cores=1 - nb forwarding ports=1<br>
>    port 0: RX queue number: 1 Tx queue number: 1<br>
>      Rx offloads=0x200 Tx offloads=0x0<br>
>      RX queue: 0<br>
>        RX desc=512 - RX free threshold=64<br>
>        RX threshold registers: pthresh=0 hthresh=0  wthresh=0<br>
>        RX Offloads=0x200<br>
>      TX queue: 0<br>
>        TX desc=512 - TX free threshold=0<br>
>        TX threshold registers: pthresh=0 hthresh=0  wthresh=0<br>
>        TX offloads=0x0 - TX RS bit threshold=0<br>
><br>
> testpmd> show fwd stats all<br>
><br>
>    ---------------------- Forward statistics for port 0  ----------------------<br>
>    RX-packets: 41986110       RX-dropped: 0             RX-total: 41986110<br>
>    TX-packets: 41986110       TX-dropped: 0             TX-total: 41986110<br>
>    <br>
> ----------------------------------------------------------------------<br>
> ------<br>
><br>
> testpmd> show port xstats 0<br>
> ###### NIC extended statistics for port 0<br>
> rx_good_packets: 41986111<br>
> tx_good_packets: 41986111<br>
> rx_good_bytes: 3106973594<br>
> tx_good_bytes: 3106973594<br>
> rx_missed_errors: 0<br>
> rx_errors: 0<br>
> tx_errors: 0<br>
> rx_mbuf_allocation_errors: 0<br>
> rx_q0_packets: 41986111<br>
> rx_q0_bytes: 3106973594<br>
> rx_q0_errors: 0<br>
> tx_q0_packets: 41986111<br>
> tx_q0_bytes: 3106973594<br>
> rx_wqe_errors: 0<br>
> rx_unicast_packets: 41990938<br>
> rx_unicast_bytes: 3107329412<br>
> tx_unicast_packets: 41986111<br>
> tx_unicast_bytes: 3106973594<br>
> rx_multicast_packets: 1<br>
> rx_multicast_bytes: 114<br>
> tx_multicast_packets: 0<br>
> tx_multicast_bytes: 0<br>
> rx_broadcast_packets: 5<br>
> rx_broadcast_bytes: 1710<br>
> tx_broadcast_packets: 0<br>
> tx_broadcast_bytes: 0<br>
> tx_phy_packets: 0<br>
> rx_phy_packets: 0<br>
> rx_phy_crc_errors: 0<br>
> tx_phy_bytes: 0<br>
> rx_phy_bytes: 0<br>
> rx_phy_in_range_len_errors: 0<br>
> rx_phy_symbol_errors: 0<br>
> rx_phy_discard_packets: 0<br>
> tx_phy_discard_packets: 0<br>
> tx_phy_errors: 0<br>
> rx_out_of_buffer: 0<br>
> tx_pp_missed_interrupt_errors: 0<br>
> tx_pp_rearm_queue_errors: 0<br>
> tx_pp_clock_queue_errors: 0<br>
> tx_pp_timestamp_past_errors: 0<br>
> tx_pp_timestamp_future_errors: 0<br>
> tx_pp_jitter: 0<br>
> tx_pp_wander: 0<br>
> tx_pp_sync_lost: 0<br>
> testpmd> q<br>
> Command not found<br>
> testpmd> exit<br>
> Command not found<br>
> testpmd> quit<br>
> Telling cores to stop...<br>
> Waiting for lcores to finish...<br>
><br>
>    ---------------------- Forward statistics for port 0  ----------------------<br>
>    RX-packets: 41986112       RX-dropped: 0             RX-total: 41986112<br>
>    TX-packets: 41986112       TX-dropped: 0             TX-total: 41986112<br>
>    <br>
> ----------------------------------------------------------------------<br>
> ------<br>
><br>
> Best regards<br>
> Yan Xiaoping<br>
><br>
> -----Original Message-----<br>
> From: David Marchand <<a href="mailto:david.marchand@redhat.com" target="_blank">david.marchand@redhat.com</a>><br>
> Sent: 2021<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">年</span>10<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">月</span>18<span lang="ZH-CN" style="font-family:DengXian;mso-fareast-language:ZH-CN">日</span>
 18:45<br>
> To: Yan, Xiaoping (NSB - CN/Hangzhou) <<a href="mailto:xiaoping.yan@nokia-sbell.com" target="_blank">xiaoping.yan@nokia-sbell.com</a>><br>
> Cc: Asaf Penso <<a href="mailto:asafp@nvidia.com" target="_blank">asafp@nvidia.com</a>>;
<a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>; Slava Ovsiienko
<br>
> <<a href="mailto:viacheslavo@nvidia.com" target="_blank">viacheslavo@nvidia.com</a>>; Matan Azrad <<a href="mailto:matan@nvidia.com" target="_blank">matan@nvidia.com</a>>; Raslan
<br>
> Darawsheh <<a href="mailto:rasland@nvidia.com" target="_blank">rasland@nvidia.com</a>><br>
> Subject: Re: mlx5 VF packet lost between rx_port_unicast_packets and <br>
> rx_good_packets<br>
><br>
> On Mon, Oct 18, 2021 at 11:28 AM Yan, Xiaoping (NSB - CN/Hangzhou) <<a href="mailto:xiaoping.yan@nokia-sbell.com" target="_blank">xiaoping.yan@nokia-sbell.com</a>> wrote:<br>
>> I have cloned dpdk code from github<br>
>><br>
>> [xiaopiya@fedora30 dpdk]$ git remote -v origin <br>
>> <a href="https://github.com/DPDK/dpdk.git" target="_blank">https://github.com/DPDK/dpdk.git</a> (fetch) origin
<br>
>> <a href="https://github.com/DPDK/dpdk.git" target="_blank">https://github.com/DPDK/dpdk.git</a> (push)<br>
>><br>
>> which tag should I use?<br>
>><br>
>> Or do I have to download 20.11.3 from <a href="http://git.dpdk.org" target="_blank">
git.dpdk.org</a>?<br>
>><br>
>> Sorry, I don’t know the relation between <a href="https://github.com/DPDK" target="_blank">
https://github.com/DPDK</a> and  <a href="http://git.dpdk.org" target="_blank">git.dpdk.org</a>?<br>
> Github DPDK/dpdk repo is a replication of the main repo hosted on <a href="http://dpdk.org" target="_blank">
dpdk.org</a> servers.<br>
><br>
> The official git repos and releases tarballs are on <a href="http://dpdk.org" target="_blank">
dpdk.org</a> servers.<br>
> The list of official releases tarballs is at: <br>
> <a href="http://core.dpdk.org/download/" target="_blank">http://core.dpdk.org/download/</a> The main repo git is at:
<br>
> <a href="https://git.dpdk.org/dpdk/" target="_blank">https://git.dpdk.org/dpdk/</a> The LTS/stable releases repo git is at:
<br>
> <a href="https://git.dpdk.org/dpdk-stable/" target="_blank">https://git.dpdk.org/dpdk-stable/</a><br>
><br>
><br>
> --<br>
> David Marchand<br>
><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>