From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 653FCA00BE for ; Mon, 11 Apr 2022 19:19:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A94541611; Mon, 11 Apr 2022 19:19:23 +0200 (CEST) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mails.dpdk.org (Postfix) with ESMTP id BED95415D7 for ; Mon, 11 Apr 2022 19:19:21 +0200 (CEST) Received: by mail-ed1-f50.google.com with SMTP id z12so6736542edl.2 for ; Mon, 11 Apr 2022 10:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0QCv+foIc0H2+8f7eNeGUH87vriILM9tMgyCFlRXBKg=; b=k2lPiA7haAzL//pfPNsh9GwNFBgZNZJjToY3RyhkstqJ9IolLfv6kYpNPJryqW5InE Ae5jxMnBHlODLG61L6ThXw+nMKSqb+/Dv3JL08kRKh06qxSj+7HGWv4PbmX3EuVU7OWS ArnCpzFHH+kRVIidqh4yIlhEdcbKsXWbe7piFuLwcHGyS6H5fEQpFplgXEyc/Ly1HTmx iF1+pPHP7GPHm7SvWxaTL0KyG/F0do2nUe2gyVtiEyj+7Zx8YM+3S9h0/rtp7bkSN3hB hL0BKzgOlKLMzLX5ZwFE0lvrg6JylmeayGtAKjvHzDLv4AE8Mq+/NnkGJTMlp9xkiblU NnEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0QCv+foIc0H2+8f7eNeGUH87vriILM9tMgyCFlRXBKg=; b=sDN+UQIhNlymo6q82zYyRRs621iBleLVCcgv7r2nFqZiAZ66TeYZY1Cp9u1aBMzh6j IXIqmbXT0FRoFl1HnefdGTtiEjHWwynKj9W2avEMJR1BnbCoO5BJ02pjmH7K0Y+N/Xjn 9I1YrhnG5YeLUI0dkFZut9/0YW1R557GLNZAtoqB3k6XaqUpisWdKhraxMgf5MrHs+NZ jecUVCZu21UxMuugAQ9DR1ZeLA+74ECCgY5mp4ujs6xCeRyIPszFjiF29E1ldMCt2KIc vAav2Ul8M430zNfTV+JLUxuO/u6UYFWNNUxzwOOA7Ye4WwcGqBMvGdl/61UtI2R8L8vq FaGw== X-Gm-Message-State: AOAM532NwsMx9ftvjDy4Yv2dad/iz/+j1RKf4Zgy+P/eWZfNp05TmE14 xwV7Z2UPU2d16Piay5ytZ81HAi8JgdjlTFuTpsg= X-Google-Smtp-Source: ABdhPJyx5zzXqbK5T+3rGmtr28bnZDfSTvQIFvpDEMBEGiej1ncDy9Ege+GDkhhmTR5i391/CtCzKwRKJM6yApw+fR4= X-Received: by 2002:a50:9eaa:0:b0:418:f708:f59c with SMTP id a39-20020a509eaa000000b00418f708f59cmr33995304edf.333.1649697561332; Mon, 11 Apr 2022 10:19:21 -0700 (PDT) MIME-Version: 1.0 References: <10708365.BaYr0rKQ5T@thomas> In-Reply-To: From: satish amara Date: Mon, 11 Apr 2022 13:19:10 -0400 Message-ID: Subject: Re: Fwd: QOS sample example. To: "Singh, Jasvinder" Cc: Thomas Monjalon , "users@dpdk.org" , "Dumitrescu, Cristian" Content-Type: multipart/alternative; boundary="000000000000214fa505dc6425ff" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --000000000000214fa505dc6425ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the info, I have a question, is there any hard limit on how many supports can be configured on port? The default seems to be 8. LevelSiblings per ParentFunctional Description1Port - 1. Output Ethernet port 1/10/40 GbE. 2. Multiple ports are scheduled in round robin order with all ports having equal priority. 2SubportConfigurable (default: 8) 1. Traffic shaping using token bucket algorithm (one token bucket per subport). 2. Upper limit enforced per Traffic Class (TC) at the subport level. 3. Lower priority TCs able to reuse subport bandwidth currently unused by higher priority TCs. 3PipeConfigurable (default: 4K) 1. Traffic shaping using the token bucket algorithm (one token bucket per pipe. 4Traffic Class (TC)13 1. TCs of the same pipe handled in strict priority order. 2. Upper limit enforced per TC at the pipe level. 3. Lower priority TCs able to reuse pipe bandwidth currently unused by higher priority TCs. 4. When subport TC is oversubscribed (configuration time event), pipe TC upper limit is capped to a dynamically adjusted value that is shared by = all the subport pipes. 5QueueHigh priority TCs: 1, Lowest priority TC: 4 1. All the high priority TCs (TC0, TC1, =E2=80=A6,TC11) have exactly 1 q= ueue, while the lowest priority TC (TC12), called Best Effort (BE), has 4 queu= es. 2. Queues of the lowest priority TC (BE) are serviced using Weighted Round Robin (WRR) according to predefined weights weights. On Thu, Apr 7, 2022 at 1:29 PM Singh, Jasvinder wrote: > Hi Satish, > > > > I would encourage you to have a look at library code especially around > dequeue operation to understand the scheduling behaviour. > > > > Some of the answers are inline; > > > > Thanks, > > Jasvinder > > > > > > *From:* satish amara > *Sent:* Wednesday, April 6, 2022 7:06 PM > *To:* Singh, Jasvinder > *Cc:* Thomas Monjalon ; users@dpdk.org; Dumitrescu, > Cristian > *Subject:* Re: Fwd: QOS sample example. > > > > Thank you. I have a question about how the active Traffic class is > selected in a pipe. > > Let's say I have confugured only one Subport and one Pipe on interface= . > > If the highest priority traffic class in a pipe has exhausted it's rate > limit can lower traffic class in the same pipe be dequeued. > > > > Yes.once highest priority TC has consumed its allocated credits, and at > the pipe level, there are credits available, then packets from next > priority tc will be scheduled. > > > > Can I have profile for Pipe where bandwidth for Pipe is shared among > multiple TC's > > Here is an example how I want to configure pipe so bandwidth allocated to > Pipe is shared among 13 classes giving priority to highest queue provided > it didn't exceed the rate limit. > > > > pipe_profile 0 { > > tb_rate 1300000 /* Pipe level token bucket rate (bytes per second) */ > > tb_size 1000000 /* Pipe level token bucket size (bytes) */ > > tc0_rate 100000 /* Pipe level token bucket rate for traffic class 0 (byte= s > per second) */ > > tc1_rate 100000 /* Pipe level token bucket rate for traffic class 1 (byte= s > per second) */ > > tc2_rate 100000 /* Pipe level token bucket rate for traffic class 2 (byte= s > per second) */ > > tc3_rate 100000 > > ..... /* Pipe level token bucket rate for traffic class 3 (bytes per > second) */ > > tc13_rate 100000 > > tc_period 40 /* Time int > > } > > > > DPDK QoS sample app has such profile defined if that helps. > > > > > > The scheduling decision to send next packet from (subport S, pipe P, > traffic class TC, queue Q) is favorable (packet is sent) when all the > conditions below are met: > > =C2=B7 Pipe P of subport S is currently selected by one of the po= rt > grinders; > > =C2=B7 Traffic class TC is the highest priority active traffic cl= ass > of pipe P; > > =C2=B7 Queue Q is the next queue selected by WRR within traffic c= lass > TC of pipe P; > > =C2=B7 Subport S has enough credits to send the packet; > > =C2=B7 Subport S has enough credits for traffic class TC to send = the > packet; > > =C2=B7 Pipe P has enough credits to send the packet; > > =C2=B7 Pipe P has enough credits for traffic class TC to send the > packet. > > If all the above conditions are met, then the packet is selected for > transmission and the necessary credits are subtracted from subport S, > subport S traffic class TC, pipe P, pipe P traffic class TC. > > Yes, have a look at the grinder_credits_check () function in the library > code. > > > > > > On Wed, Apr 6, 2022 at 12:34 PM Singh, Jasvinder < > jasvinder.singh@intel.com> wrote: > > Yes, it is fixed. The tc_credits_per_period is updated after tc_period > duration. Note that tc credits don=E2=80=99t get accumulated if tc queue = is visited > after multiple tc_period due to rate limiting mechanism at the traffic > class level. > > > > *From:* satish amara > *Sent:* Wednesday, April 6, 2022 4:32 PM > *To:* Singh, Jasvinder > *Cc:* Thomas Monjalon ; users@dpdk.org; Dumitrescu, > Cristian > *Subject:* Re: Fwd: QOS sample example. > > > > Jasvinder, > > I have a few more questions. > > Can you provide some clarity on > > tc_credits_per_period > > tc_period is for how often the credits for traffic need to be updated. Is > tc_credits_per_period is fixed based on tc_rate. > > > > Regards, > > Satish Amara > > > > On Fri, Apr 1, 2022 at 9:34 AM satish amara > wrote: > > 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. > > > > Regards, > > Satish Amara > > > > On Fri, Apr 1, 2022 at 4:36 AM Singh, Jasvinder > wrote: > > Hi Satish, > > > > 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. > > > > Thanks, > > Jasvinder > > > > > > > > *From:* satish amara > *Sent:* Thursday, March 31, 2022 9:27 PM > *To:* Thomas Monjalon > *Cc:* users@dpdk.org; Singh, Jasvinder ; > Dumitrescu, Cristian > *Subject:* Re: Fwd: QOS sample example. > > > > Thanks, Thomas for forwarding this to the group. > > I have one more question. Does DPDK QOS uses any internal threads/timers > for the token bucket implementation?. The token > > buckets can be implemented in different ways. When are the tokens are > filled, I see there is tb_period? > > It looks like the tokens are filled when the HQOS thread is trying to fin= d > the next active pipe? > > > > Regards, > > Satish Amara > > > > > > > > On Thu, Mar 31, 2022 at 3:39 PM Thomas Monjalon > wrote: > > +Cc QoS scheduler maintainers (see file MAINTAINERS) > > 31/03/2022 18:59, satish amara: > > Hi, > > I am trying to understand the QOS sample scheduler application code= . > > Trying to understand what is tc_period in the config. > > 30. QoS Scheduler Sample Application =E2=80=94 Data Plane Development K= it 21.05.0 > > documentation (dpdk.org) > > Is > > tc_period same as tb_period > > tb_period Bytes Time period that should elapse since the last credit > update > > in order for the bucket to be awarded tb_credits_per_period worth or > > credits. > > Regards, > > Satish Amara > > > > > --000000000000214fa505dc6425ff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the info,
I have a question, is there any h= ard limit=C2=A0on how many supports can be configured on port?
Th= e default seems to be=C2=A0 8.
=C2=A0 LevelSiblings per ParentFunct= ional Description1Port
  1. Output Ethernet port = 1/10/40 GbE.
  2. Multiple ports are scheduled in round robin= order with all ports having equal priority.
2SubportConfigurable = (default: 8)
  1. Traffic shaping using token bucket algorithm (one tok= en bucket per subport).
  2. Upper limit enforced per Traffic Class (TC) at the= subport level.
  3. Lower priority TCs able to reuse subport= bandwidth currently unused by higher priority TCs.
3PipeConfigura= ble (default: 4K)
  1. Traffic shaping using the toke= n bucket algorithm (one token bucket per pipe.
4Traffic Class (TC)= 13
  1. TCs of the same pipe handled in strict priority order.
  2. Upper l= imit enforced per TC at the pipe level.
  3. Lower priority TCs able to reuse p= ipe bandwidth currently unused by higher priority TCs.
  4. W= hen subport TC is oversubscribed (configuration time event), pipe TC upper = limit is capped to a dynamically adjusted value that is shared by all the s= ubport pipes.
5QueueHigh priority TCs: 1, Lowest priority TC: 4
  • All the high priority TCs (TC0, TC1, =E2=80=A6,TC11) have exactly 1 = queue, while the lowest priority TC (TC12), called Best Effort (BE), has 4 = queues.
  • Queues of the lowest priority TC (BE) are servic= ed using Weighted Round Robin (WRR) according to predefined weights weights= .

  • On Thu, Apr 7, 2022 at 1:29 PM Singh, Jasvinder <= jasvinder.singh@intel.com&= gt; wrote:

    Hi Satish,

    =C2=A0

    I would encourage you to have a look at librar= y code especially around dequeue operation to understand the scheduling beh= aviour.

    =C2=A0

    Some of the answers are inline;

    =C2=A0

    Thanks,

    Jasvinder

    =C2=A0

    =C2=A0

    From: satish amara <satishkamara@gmail.com>
    Sent: Wednesday, April 6, 2022 7:06 PM
    To: Singh, Jasvinder <jasvinder.singh@intel.com>
    Cc: Thomas Monjalon <thomas@monjalon.net>; users@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu= @intel.com>
    Subject: Re: Fwd: QOS sample example.

    =C2=A0

    Thank you. I have a question about how the active Tr= affic class is selected=C2=A0in a pipe.=C2=A0

    Let's say I have=C2=A0 confugured only one Subpo= rt and=C2=A0 one=C2=A0 Pipe on interface.

    If the highest=C2=A0priority=C2=A0traffic class in a= pipe has exhausted=C2=A0it's rate limit can lower traffic class in the= same pipe=C2=A0 be dequeued.

    =C2=A0

    Yes.once highes= t priority TC has consumed its allocated credits, and at the pipe level, th= ere are credits available, then packets from next priority tc will be scheduled. =C2=A0=C2=A0

    =C2=A0

    Can I have profile=C2=A0for Pipe where bandwidth=C2= =A0for Pipe is shared among multiple TC's=C2=A0

    Here is an example how I want to configure pipe so b= andwidth=C2=A0allocated to Pipe is shared among 13 classes giving priority= =C2=A0to highest queue provided it didn't exceed the rate limit.=

    =C2=A0

    pipe_profile 0 {

    tb_rate 1300000 /* Pipe level token bucket rate (bytes per seco= nd) */

    tb_size 1000000 /* Pipe level token bucket size (bytes) */

    tc0_rate 100000 /* Pipe level token bucket rate for traffic cla= ss 0 (bytes per second) */

    tc1_rate 100000 /* Pipe level token bucket rate for traffic cla= ss 1 (bytes per second) */

    tc2_rate 100000 /* Pipe level token bucket rate for traffic cla= ss 2 (bytes per second) */

    tc3_rate 100000

    ..... /* Pipe level token bucket rate for traffic class 3 (byte= s per second) */

    tc13_rate 100000

    tc_period 40 /* Time int

    =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

    =C2=A0

    DPDK QoS sample= app has such profile defined if that helps.

    =C2=A0

    =C2=A0

    =C2=A0The scheduling= decision to send next packet from (subport S, pipe P, traffic class TC, qu= eue Q) is favorable (packet is sent) when all the conditions below are met:

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Pipe P of subport S is currently selected b= y one of the port grinders;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Traffic class TC is the highest priority ac= tive traffic class of pipe P;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Queue Q is the next queue selected by WRR w= ithin traffic class TC of pipe P;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Subport S has enough credits to send the pa= cket;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Subport S has enough credits for traffic cl= ass TC to send the packet;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Pipe P has enough credits to send the packe= t;

    =C2=B7=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Pipe P has enough credits for traffic class= TC to send the packet.

    If all the above conditions are met, then the packet is selected for tr= ansmission and the necessary credits are subtracted from subport S, subport= S traffic class TC, pipe P, pipe P traffic class TC.

    Yes, have a look at the grinder_credit= s_check () function in the library code.

    =C2=A0

    =C2=A0

    On Wed, Apr 6, 2022 at 12:34 PM Singh, Jasvinder <= ;jasvinder.s= ingh@intel.com> wrote:

    Yes, it is fixed. The tc_credits_per_period is updat= ed after tc_period duration. Note that tc credits don=E2=80=99t get accumul= ated if tc queue is visited after multiple tc_period due to rate limiting mechanism at the traffic class level. =C2=A0=C2=A0=

    =C2=A0

    From: satish amara <satishkamara@gmail.com>
    Sent: Wednesday, April 6, 2022 4:32 PM
    To: Singh, Jasvinder <jasvinder.singh@intel.com>
    Cc: Thomas Monjalon <thomas@monjalon.net>; users@dpdk.org; Dum= itrescu, Cristian <cristian.dumitrescu@intel.com>
    Subject: Re: Fwd: QOS sample example.

    =C2=A0

    Jasvinder,

    =C2=A0 =C2=A0I have a few more questions.<= /u>

    Can you provide=C2=A0 some clarity=C2=A0on=C2=A0<= /u>

    tc_credits_per_period

    tc_period is for how often the credits for traffic n= eed to be updated. Is tc_credits_per_period is fixed based on tc_rate.

    =C2=A0

    Regards,

    Satish Amara

    =C2=A0

    On Fri, Apr 1, 2022 at 9:34 AM satish amara <satishkamara@gmail.= com> wrote:

    Thanks for the info Jasvinder. I see there is an int= ernal timer to see when to refill the token buckets and credits.=C2=A0 I ha= ve read the=C2=A0QOS=C2=A0 document.=C2=A0 My understanding is that the DPDK code is using the same HQOS thread CPU context to implement=C2=A0time= r functionality during the pipe selection and not leveraging on Linux=C2=A0= timers or other timers.=C2=A0=C2=A0

    =C2=A0

    Regards,

    Satish Amara

    =C2=A0

    On Fri, Apr 1, 2022 at 4:36 AM Singh, Jasvinder <= jasvinder.si= ngh@intel.com> wrote:

    Hi Satish,

    =C2=A0

    DPDK HQoS scheduler has internal timer to compute th= e credits. The time difference between the two consecutive visit to the sam= e pipe is used to compute the number of tb_periods elapsed and based on that, the available credits in the token bucket is co= mputed. Each pipe has its own context which stores the timestamp of the las= t visit =C2=A0and it is used when pipe is visited to schedule the packets f= rom its queues.

    =C2=A0

    Thanks,

    Jasvinder

    =C2=A0

    =C2=A0

    =C2=A0

    From: satish amara <satishkamara@gmail.com= >
    Sent: Thursday, March 31, 2022 9:27 PM
    To: Thomas Monjalon <
    thomas@monjalon.net>
    Cc: users@dpdk.org; Singh, Jasv= inder <jasvinder.singh@intel.com>; Dumitrescu, Cristian <cristian.dumitrescu@intel.com= >
    Subject: Re: Fwd: QOS sample example.

    =C2=A0

    Thanks, Thomas for forwarding this to the group.=C2= =A0

    I have one more question. Does DPDK QOS=C2=A0 uses a= ny internal threads/timers for the token bucket implementation?. The token<= u>

    =C2=A0buckets can be implemented in different ways.= =C2=A0 When are the=C2=A0tokens are filled, I see there is tb_period?

    It looks like the=C2=A0tokens are filled when the HQ= OS thread is trying to find the next active pipe?

    =C2=A0

    Regards,

    Satish Amara

    =C2=A0

    =C2=A0

    =C2=A0

    On Thu, Mar 31, 2022 at 3:39 PM Thomas Monjalon <= thomas@monjalon.ne= t> wrote:

    +Cc QoS scheduler maint= ainers (see file MAINTAINERS)

    31/03/2022 18:59, satish amara:
    > Hi,
    >=C2=A0 =C2=A0 =C2=A0I am trying to understand the QOS sample scheduler = application code.
    > Trying to understand what is tc_period in the config.
    > 30. QoS Scheduler Sample Application =E2=80=94 Data Plane Development = Kit 21.05.0
    > documentation (dpdk.org<= /a>)
    > <
    https://doc.dpdk.org/guides-21.05/sample_app= _ug/qos_scheduler.html> Is
    > tc_period same as=C2=A0 tb_period
    > tb_period Bytes Time period that should elapse since the last credit u= pdate
    > in order for the bucket to be awarded tb_credits_per_period worth or > credits.
    > Regards,
    > Satish Amara
    >


    --000000000000214fa505dc6425ff--