<div dir="ltr">Thanks for the info Jasvinder. I see there is an internal timer to see when to refill the token buckets and credits.  I have read the QOS  document.  My understanding is that the DPDK code is using the same HQOS thread CPU context to implement timer functionality during the pipe selection and not leveraging on Linux timers or other timers.  <div><br></div><div>Regards,</div><div>Satish Amara</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 1, 2022 at 4:36 AM Singh, Jasvinder <<a href="mailto:jasvinder.singh@intel.com" target="_blank">jasvinder.singh@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-IE">
<div>
<p class="MsoNormal"><span>Hi Satish,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal">DPDK HQoS scheduler has internal timer to compute the credits. The time difference between the two consecutive visit to the same pipe is used to compute the number of tb_periods elapsed and based on that, the available credits in the token
 bucket is computed. Each pipe has its own context which stores the timestamp of the last visit  and it is used when pipe is visited to schedule the packets from its queues.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Jasvinder<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0cm 0cm 0cm 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> satish amara <<a href="mailto:satishkamara@gmail.com" target="_blank">satishkamara@gmail.com</a>>
<br>
<b>Sent:</b> Thursday, March 31, 2022 9:27 PM<br>
<b>To:</b> Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>><br>
<b>Cc:</b> <a href="mailto:users@dpdk.org" target="_blank">users@dpdk.org</a>; Singh, Jasvinder <<a href="mailto:jasvinder.singh@intel.com" target="_blank">jasvinder.singh@intel.com</a>>; Dumitrescu, Cristian <<a href="mailto:cristian.dumitrescu@intel.com" target="_blank">cristian.dumitrescu@intel.com</a>><br>
<b>Subject:</b> Re: Fwd: QOS sample example.<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thanks, Thomas for forwarding this to the group. <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">I have one more question. Does DPDK QOS  uses any internal threads/timers for the token bucket implementation?. The token<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> buckets can be implemented in different ways.  When are the tokens are filled, I see there is tb_period?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">It looks like the tokens are filled when the HQOS thread is trying to find the next active pipe?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Satish Amara<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Mar 31, 2022 at 3:39 PM Thomas Monjalon <<a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="margin-bottom:12pt">+Cc QoS scheduler maintainers (see file MAINTAINERS)<br>
<br>
31/03/2022 18:59, satish amara:<br>
> Hi,<br>
>     I am trying to understand the QOS sample scheduler application code.<br>
> Trying to understand what is tc_period in the config.<br>
> 30. QoS Scheduler Sample Application — Data Plane Development Kit 21.05.0<br>
> documentation (<a href="http://dpdk.org" target="_blank">dpdk.org</a>)<br>
> <<a href="https://doc.dpdk.org/guides-21.05/sample_app_ug/qos_scheduler.html" target="_blank">https://doc.dpdk.org/guides-21.05/sample_app_ug/qos_scheduler.html</a>> Is<br>
> tc_period same as  tb_period<br>
> tb_period Bytes Time period that should elapse since the last credit update<br>
> in order for the bucket to be awarded tb_credits_per_period worth or<br>
> credits.<br>
> Regards,<br>
> Satish Amara<br>
> <br>
<br>
<br>
<br>
<br>
<u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>

</blockquote></div>