<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p><span style="font-size: 11pt;">Hi,</span></p>
<p><span style="font-size: 11pt;">We are using dpdk-stable-22.11.6 version in our project.</span></p>
<pre><span style="font-size: 11pt;">We are facing an issue in our DPDK QoS scheduler example application, we notice that lower priority traffic (TC2) starves higher priority traffic <br />if the packet size of the lower priority traffic is smaller than the packet size of the higher priority traffic.

If the packet size of the lower priority traffic (TC2) is same or larger than the higher priority (TC0 or TC1), we dont see the problem.

Using q-index within the TC:
<br />Pipe 0 size is 20Mbps<br /><br />- Q0 (TC0), 1500 byte packets, 5Mbps configured and 
- Q1 (TC2), 1400 byte packets, 20Mbps configured 
- Total two pipes are configured and traffic is mapped to Pipe 0 TC0 and TC2
- Only on subport configured.
- TC period is set to 50ms (to support lower rates of around 256Kbps)

In this scenario TC2 consumes all the 20Mbps bandwidth, but as per priority, TC0 should get 5Mbps and TC2 should get 15Mbps.<br /><br />If we pump the same size byte packets, then TC0 is getting 5Mbps and TC1 is getting 15Mbps as per priority. <br /><br />If we stop the TC0 traffic, then the unused 5Mbps from TC0 is getting used by TC1 and is getting 20Mbps.(as expected).<br /><br /><br /></span></pre>
<p><span style="font-size: 11pt;">To further debug, we found in the qos scheduler documentation <strong>section </strong><strong>57.2.4.6.3. Traffic Shaping </strong></span></p>
<p><span style="font-size: 11pt;"><strong>"</strong></span></p>
<ul class="v1v1simple">
<li><span style="font-size: 11pt;">Full accuracy can be achieved by selecting the value for <em>tb_period</em> for which <em>tb_credits_per_period = 1</em>.</span></li>
<li><span style="font-size: 11pt;">When full accuracy is not required, better performance is achieved by setting <em>tb_credits</em> to a larger value.</span></li>
</ul>
<p><span style="font-size: 11pt;"><strong>"</strong></span></p>
<p><span style="font-size: 11pt;">In rte_sched.c file, <strong>rte_sched_pipe_profile_convert(), </strong>the <em><strong>tb_credits_per_period</strong> </em>is set to 1 and accordingly <em><strong>tb_period</strong> </em>is set according to the rate.</span></p>
<p><span style="font-size: 11pt;">We have increased the <em>tb_credits_per_period </em>and<em> tb_period </em>by 10000 times. So that 10000 credis are updated in the token bucket at a time. With this, TC0 and TC2 are working but not as much accurate as earlier.</span></p>
<p><span style="font-size: 11pt;">And we are having the doubt of how this change will behave for different rates and different packet sizes.</span></p>
<p><span style="font-size: 11pt;">Can you please help us in setting the optimal value for <em><strong>tb_credits_per_period</strong> and <strong>tb_period</strong>, </em>so that it works well for different traffic rates and different packet sizes.</span></p>
<pre><span style="font-size: 11pt;"><br /><br />Please help us in resolving this issue.</span></pre>
<div id="signature">-- <br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks & Regards<br /><br />Nagurvali sayyad<br /><br /></div>
</div>
</body></html>