{"action":"created","issue":{"url":"https://api.github.com/repos/p4lang/behavioral-model/issues/493","repository_url":"https://api.github.com/repos/p4lang/behavioral-model","labels_url":"https://api.github.com/repos/p4lang/behavioral-model/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/p4lang/behavioral-model/issues/493/comments","events_url":"https://api.github.com/repos/p4lang/behavioral-model/issues/493/events","html_url":"https://github.com/p4lang/behavioral-model/issues/493","id":281364857,"number":493,"title":"Always be Zero(0) - standard_metadata's (enq_qdepth) (deq_qdepth)","user":{"login":"MaoJianwei","id":12800168,"avatar_url":"https://avatars2.githubusercontent.com/u/12800168?v=4","gravatar_id":"","url":"https://api.github.com/users/MaoJianwei","html_url":"https://github.com/MaoJianwei","followers_url":"https://api.github.com/users/MaoJianwei/followers","following_url":"https://api.github.com/users/MaoJianwei/following{/other_user}","gists_url":"https://api.github.com/users/MaoJianwei/gists{/gist_id}","starred_url":"https://api.github.com/users/MaoJianwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaoJianwei/subscriptions","organizations_url":"https://api.github.com/users/MaoJianwei/orgs","repos_url":"https://api.github.com/users/MaoJianwei/repos","events_url":"https://api.github.com/users/MaoJianwei/events{/privacy}","received_events_url":"https://api.github.com/users/MaoJianwei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-12T12:22:43Z","updated_at":"2017-12-12T17:51:50Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\n\r\nI got a problem, wish your help, thanks!\r\n\r\nIn P4-16, egress control's _apply{}_\r\n\r\ndirectly do this:\r\n```\r\nhdr.maoTelemetryLabels[0].queue_length_in = standard_metadata.enq_qdepth;\r\nhdr.maoTelemetryLabels[0].queue_length_out = standard_metadata.deq_qdepth;\r\n```\r\n\r\n\r\nThe bmv2 log is in the first picture below, I can see it actually reads the **_enq_qdepth_** and **_deq_qdepth_** to hdr.maoTelemetryLabels\r\n\r\nBut, in the second picture below, we can see the corresponding **_queue_length_in_** and **_queue_length_out_** is always zero (0).\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/12800168/33884171-a26a0308-df79-11e7-93e3-676f2b5a875f.png)\r\n\r\n![image](https://user-images.githubusercontent.com/12800168/33883693-af648e54-df77-11e7-83c6-990ee3539194.png)\r\n"},"comment":{"url":"https://api.github.com/repos/p4lang/behavioral-model/issues/comments/351130743","html_url":"https://github.com/p4lang/behavioral-model/issues/493#issuecomment-351130743","issue_url":"https://api.github.com/repos/p4lang/behavioral-model/issues/493","id":351130743,"user":{"login":"antoninbas","id":2495809,"avatar_url":"https://avatars1.githubusercontent.com/u/2495809?v=4","gravatar_id":"","url":"https://api.github.com/users/antoninbas","html_url":"https://github.com/antoninbas","followers_url":"https://api.github.com/users/antoninbas/followers","following_url":"https://api.github.com/users/antoninbas/following{/other_user}","gists_url":"https://api.github.com/users/antoninbas/gists{/gist_id}","starred_url":"https://api.github.com/users/antoninbas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoninbas/subscriptions","organizations_url":"https://api.github.com/users/antoninbas/orgs","repos_url":"https://api.github.com/users/antoninbas/repos","events_url":"https://api.github.com/users/antoninbas/events{/privacy}","received_events_url":"https://api.github.com/users/antoninbas/received_events","type":"User","site_admin":false},"created_at":"2017-12-12T17:51:50Z","updated_at":"2017-12-12T17:51:50Z","author_association":"OWNER","body":"How are you creating congestion? Try setting the queue rate to something smaller than the ingress packet rate with the `set_queue_rate` (https://github.com/p4lang/behavioral-model/blob/master/targets/simple_switch/sswitch_CLI.py#L50) CLI command.\r\nThere are several things to take into account if you want to observe something:\r\n- if your packet arrival rate is greater than what the bmv2 ingress pipeline can process, packets will be dropped before ingress, and there will be no queue buildup\r\n- if your queue rate is not bounded, you will not observe a queue build-up either, since the egress pipeline is usually faster than the ingress one in bmv2\r\nI don't know the performance of bmv2 on your machine for your specific program, but given that you have enabled logging, you need to use some very conservative numbers. Try the following:\r\n- arrival rate of 100 packets per second\r\n- queue rate of 40 packets per second\r\nYou should observe a queue buildup and eventually packet drops.\r\n\r\nThis was assuming that you were not using regular TCP traffic and that you could control the rate of the sender. If you cannot control the rate of the sender, you need to set the max bandwidth of the link, which is easy to do with Mininet for example."}}
{"actor":{"display_login":"antoninbas"}}