<div dir="ltr">Hi Vikas,<div><br></div><div>If you don't limit the queue rate in simple_switch, congestion will happen at the interface before the ingress pipeline instead of at the bmv2 queue between ingress & egress, and you will not be able to observe any congestion with the standard_metadata.</div><div>You can set the queue rate with the CLI command "set_queue_rate". You want to make sure that the rate is set to something smaller than what the ingress pipeline can support. This will depend on how you compile bmv2 / which P4 program you are running / which machine you are running bmv2 on. I suggest you start with a conservative number, like 100pps. If you compiled bmv2 with O2 and you disabled the logging macros, you could use something between 1,000pps and 10,000pps.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 17, 2018 at 1:24 PM, Vikas Kumar <span dir="ltr"><<a href="mailto:mailvikasnow@gmail.com" target="_blank">mailvikasnow@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><img width="0" height="0" class="m_3127964270301921107mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/6190b2ac691c73940dcf68d9b7b1c29e32ba1f73.png?u=2029748"><div></div><div>Hello Everyone,</div><div><br></div><div>I am trying to collect switch statistics for INT from each switch. I am successfully able to collect some metrics like ingress port,egress port, hop latency. But for some queuing metadata like enq_qdepth and deq_qdepth I am getting 0 value always. However these metadta are declared in v1model.p4 (<a href="https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4" target="_blank">https://github.com/p4lang/<wbr>p4c/blob/master/p4include/<wbr>v1model.p4</a> ). Is it that bmv2 still does not expose these intrinsic queueing metadata mentioned here ( <a href="https://github.com/p4lang/behavioral-model/blob/master/docs/simple_switch.md" target="_blank">https://github.com/p4lang/<wbr>behavioral-model/blob/master/<wbr>docs/simple_switch.md</a>)?</div><div><br></div><div><table class="m_3127964270301921107gmail-highlight m_3127964270301921107gmail-tab-size m_3127964270301921107gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-LC31" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_3127964270301921107gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">action</span> <span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">int_set_header_3</span>() {</td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L32" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_3127964270301921107gmail-LC32" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"><span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">hdr</span>.<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">int_q_occupancy</span>.<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">setValid</span>()<wbr>;</td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L33" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top">    </td><td id="m_3127964270301921107gmail-LC33" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"><span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">hdr</span>.<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">int_q_occupancy</span>.<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">q_id</span> = 0; //assuming there is only 1 queue</td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L34" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top">  </td><td id="m_3127964270301921107gmail-LC34" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"><br></td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L35" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_3127964270301921107gmail-LC35" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap"><span class="m_3127964270301921107gmail-pl-c1" style="color:rgb(0,92,197);box-sizing:border-box">hdr</span>.<span class="m_3127964270301921107gmail-pl-c1" style="color:rgb(0,92,197);box-sizing:border-box">int_q_occupancy</span>.<span class="m_3127964270301921107gmail-pl-c1" style="color:rgb(0,92,197);box-sizing:border-box">q_<wbr>occupancy</span> =</td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L36" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_3127964270301921107gmail-LC36" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap">                (<span class="m_3127964270301921107gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">bit</span><<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">24</span>>) <span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">standard_metadata</span>.<span class="m_3127964270301921107gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">deq_qdepth</span>;</td></tr><tr style="box-sizing:border-box"><td id="m_3127964270301921107gmail-L37" class="m_3127964270301921107gmail-blob-num m_3127964270301921107gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_3127964270301921107gmail-LC37" class="m_3127964270301921107gmail-blob-code m_3127964270301921107gmail-blob-code-inner m_3127964270301921107gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap">}</td></tr></tbody></table><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I observed that while sending burst traffic from source to destination the hop latency changes from switch to switch but the enq_qdepth always remains 0.</span><br></div>-- <br><div class="m_3127964270301921107gmail_signature"><div dir="ltr"><br></div><div dir="ltr"><br><table border="0" cellspacing="0" cellpadding="0" style="font-size:small"><tbody><tr valign="top"><td style="text-align:initial;vertical-align:top;padding:0px 10px"><div style="font-size:12.8px"><div dir="ltr"></div></div><div style="font-size:12.8px"><div></div></div></td><td style="text-align:initial;vertical-align:top"><div><br></div><div><div style="font-size:12.8px"><div dir="ltr"><div dir="ltr"><table border="0" cellspacing="0" cellpadding="0" width="470" style="color:rgb(136,136,136);font-size:small;width:470px"><tbody><tr valign="top"><td style="padding-right:10px;border-right:1px solid rgb(198,194,194);width:10px"><a href="http://moodi.org/" style="color:rgb(17,85,204)" target="_blank"><img src="https://docs.google.com/uc?export=download&id=0B67JgO2AhKxkaXBQS2gzT2E1RE0&revid=0B67JgO2AhKxkTzhvbkYwdHNSSFRpUVdaL2M1VkRxWFcyZTFNPQ"></a><font color="#888888"><br></font></td><td style="padding-left:10px;font-stretch:normal"><div style="border-style:none;border-color:rgb(100,100,100);width:349px;outline:rgb(100,100,100) none 0px"><div style="text-transform:capitalize;width:349px;outline:rgb(100,100,100) none 0px;border-style:none;border-color:rgb(100,100,100)"><font face="tahoma, sans-serif" style="text-transform:none"><b><font color="#222222">Vikas Kumar </font><font color="#073763">|</font><font style="color:rgb(34,34,34)"> </font></b></font><b style="color:rgb(34,34,34);text-transform:none;font-family:tahoma,sans-serif"><font color="#0b5394"> Hospitality & PR Coordinator</font></b></div><div style="width:349px;outline:rgb(100,100,100) none 0px;border-style:none;border-color:rgb(100,100,100)"><div style="color:rgb(34,34,34)"><b style="color:rgb(68,68,68);font-family:tahoma,sans-serif">Mood Indigo, IIT Bombay</b><br></div><div style="color:rgb(34,34,34)"><b style="color:rgb(102,102,102);font-family:tahoma,sans-serif;font-size:x-small"><a href="tel:+91%2096945%2032954" value="+919694532954" target="_blank">+91-9694532954</a> | <a href="mailto:mailvikasnow@gmail.com" style="color:rgb(17,85,204)" target="_blank">mailvikasnow@gmail.com</a></b></div><div><a href="https://www.facebook.com/vikas.cse.iitb" rel="nofollow" style="color:rgb(102,17,204);white-space:nowrap;margin:0px;padding:0px;border:0px;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px" target="_blank"><img width="16" height="16" alt="Facebook" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/facebook.png" style="margin:0px;padding:0px 0px 5px;border:0px;vertical-align:middle"></a> <span style="white-space:nowrap;margin:0px;padding:0px;border:0px;color:rgb(34,34,34);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px"> </span></div><div><span style="white-space:nowrap;margin:0px;padding:0px;border:0px;color:rgb(34,34,34);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px"><br></span></div></div></div></td></tr></tbody></table></div></div></div></div></td></tr></tbody></table></div></div>
<br><br><br>‌<div class="m_3127964270301921107mt-signature">
        <a href="https://mailtrack.io/" class="m_3127964270301921107mt-signature-logo" style="text-decoration:none" target="_blank"><img src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png" height="14"></a>
        <font style="color:#999">Sent with <a href="https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&" class="m_3127964270301921107mt-install" target="_blank">Mailtrack</a></font>
        
    
    </div></div>
<br>______________________________<wbr>_________________<br>
P4-dev mailing list<br>
<a href="mailto:P4-dev@lists.p4.org">P4-dev@lists.p4.org</a><br>
<a href="http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org" rel="noreferrer" target="_blank">http://lists.p4.org/mailman/<wbr>listinfo/p4-dev_lists.p4.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Antonin<br></div></div>
</div>