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 DC992A0C45 for ; Sat, 20 Nov 2021 10:38:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 637F140395; Sat, 20 Nov 2021 10:38:14 +0100 (CET) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mails.dpdk.org (Postfix) with ESMTP id 55DD740143 for ; Sat, 20 Nov 2021 10:38:13 +0100 (CET) Received: by mail-lf1-f42.google.com with SMTP id b1so54679741lfs.13 for ; Sat, 20 Nov 2021 01:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=H9KjkKekVkFaUXT9mh+0cNh/eMrxGGJeQXIEKcSajsM=; b=PCR3G+MSUamHUj0KquoHG/y7JsktRojUaP+3Kwv0j/bv7GM15m9ifuz2B+tIbfD6Sl mH5uQ8Yn350dtbPwjJK1LtVISZRI8UX8XxBq3Zts6UzOwfOtroEuUppeO9K5LNUaHLig 1/2EKqTS49giteAJeDw298sqYXaEg1/PDjzMdOdh78XhhSJ9f5L4QexBR+kypF5D9hz9 /U0DBHAroIxyevHMbioi4l7u8uRIm8BNSYlr9RJB/dO+0mvYDb2uG2NSjchCvd1+SjFT grXfjJQwtU7GfQYtauUSZe9D8A/zAQ/NLB+Hoe+cdAsLOn4PRtnHTG/IFHKd06UygBHM QSUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=H9KjkKekVkFaUXT9mh+0cNh/eMrxGGJeQXIEKcSajsM=; b=MtGSgu1G8s715JcABE/incY7hWQj4RkvBK/i61BNZ+kOaQR/Cx5kYcxv30fFJt6afh 6AFXC1hWw87yinDFUkyFNY8Q17d+w3TNoe7iS4KAPYhF9/hSHlizxZTeY7z716qIC8XS IEQ28GZRmNZmsXGaVkhmnKLy7cMndabYnDTttjU1Yv2jGSuAdIKKDkf+Q/FzZue4VRon JqPUiFYyAc5hR3KSVty4Tjo7mNNlbd2KOYaY8p/DlSXqowxRaaZow2sbpWP01QneSNQq mzvCjT2ameTdbwpkR9/7djGPfezfNpG/YHgTYBfRIJaj9XXfLYEBOmdwR41iuGl9fV9U 7eOA== X-Gm-Message-State: AOAM531kpOuAlHb3+TKsumv/u7nQjAW4CFyQFydl372/bpJGxXVjNr39 kvJUNKig1ZFT6eAtI+V4XrfzFyqdX5LMACz/5dCeIjJYZj4= X-Google-Smtp-Source: ABdhPJyIrS6EGrA1erFdww1Y4Hc1KM9vFHNHM2o7Q0Zyv0M7g7dNwTDDsck2pB44Dth5d3E6cIGDBG8daIGzc7idtGE= X-Received: by 2002:ac2:491e:: with SMTP id n30mr41610374lfi.97.1637401092360; Sat, 20 Nov 2021 01:38:12 -0800 (PST) MIME-Version: 1.0 From: waqas ahmed Date: Sat, 20 Nov 2021 14:37:58 +0500 Message-ID: Subject: hierarchical QoS traffic class and queue association problem To: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000770e8505d135268c" 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 --000000000000770e8505d135268c Content-Type: text/plain; charset="UTF-8" G,day we are writing traffic shaping application on top of dpdk hierarchical QoS application. Each subscriber is assigned with a distinct pipe where its downstream traffic is shaped using pipes's 13 priority traffic classes. in app_rx_thread we classify the traffic and determine its pipe, traffic_class and queue and path write into pkt descriptor by rte_sched_port_pkt_write() api. in app_worker_thread we enqueue and dequeue into/from qos scheduler where our custom code calculates the bits/sec stats on each of the pipe tc right after dequeue from scheduler. rte_sched_port_pkt_read_tree_path() is used on dequeue mbufs to see its association with port, subport, traffic class and queue. our expectations are to see the same values of traffic class and queue that we assigned at app_rx_thread() but its behavior is unexpected. below is our program output by app_rx_thread and app_worker_thread for different runs. other than traffic class = 0 and queue 0 assignment not other queue and traffic class reads back correctly in worker thread. for example when we classify and write traffic class = 1 and queue = 1 for a packet, it will be read back after dequeue from scheduler as traffic class = 2 and queue = 0. can any one explain this behavior? i hope i made my question clear. thanks for reading and waiting for your valuable comments. BR rx_thread write: traffic class = 0, queue = 0 worker_thread reads: traffic class = 0, queue = 0 rx_thread write: traffic class = 1, queue = 1 worker_thread reads: traffic class = 2, queue = 0 rx_thread write: traffic class = 2, queue = 2 worker_thread reads: traffic class = 4, queue = 0 rx_thread write: traffic class = 3, queue = 3 worker_thread reads: traffic class = 6, queue = 0 rx_thread write: traffic class = 4, queue = 4 worker_thread reads: traffic class = 8, queue = 0 rx_thread write: traffic class = 5, queue = 5 worker_thread reads: traffic class = 10, queue = 0 rx_thread write: traffic class = 6, queue = 6 worker_thread reads: traffic class = 12, queue = 0 rx_thread write: traffic class = 7, queue = 7 worker_thread reads: traffic class = 12, queue = 2 rx_thread write: traffic class = 8, queue = 8 worker_thread reads: traffic class = 0, queue = 0 rx_thread write: traffic class = 9, queue = 9 worker_thread reads: traffic class = 2, queue = 0 rx_thread write: traffic class = 10, queue = 10 worker_thread reads: traffic class = 4, queue = 0 rx_thread write: traffic class = 11, queue = 11 worker_thread reads: traffic class = 6, queue = 0 rx_thread write: traffic class = 12, queue = 12 worker_thread reads: traffic class = 8, queue = 0 --000000000000770e8505d135268c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
G,day
we are writing traffic shaping applic= ation on top of dpdk hierarchical QoS application. Each subscriber is assig= ned with a distinct pipe where its downstream traffic is shaped using pipes= 's 13 priority traffic classes.
in app_rx_thread we clas= sify the traffic and determine its pipe, traffic_class and queue and path w= rite into pkt descriptor by rte_sched_port_pkt_write() api.
in ap= p_worker_thread we enqueue and dequeue into/from qos scheduler where our cu= stom code calculates the bits/sec stats on each of the pipe tc right after = dequeue from scheduler.
rte_sched_port_pkt_read_tree_path() is u= sed on dequeue mbufs to see its association with port, subport, traffic cla= ss=C2=A0 and queue. our expectations are to see the same values of traffic = class and queue that we assigned at app_rx_thread() but its behavior is une= xpected. below is our program output by app_rx_thread and app_worker_thread= for different runs.
other than traffic class =3D 0 and queu= e 0 assignment not other queue and traffic class reads back correctly in wo= rker thread. for example when we classify and write traffic class =3D 1 and= queue =3D 1 for a packet, it will be read back after dequeue from schedule= r as traffic class =3D 2 and queue =3D 0. can any one explain this behavior= ?
i hope i made my question clear. thanks for reading and wa= iting for your valuable comments. BR=C2=A0 =C2=A0
rx_thread = write: =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 traffic class =3D 0, queue =3D 0=
worker_thread reads: traffic class =3D 0, =C2=A0queue =3D 0

rx_= thread write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic cl= ass =3D 1, queue =3D 1
worker_thread reads: traffic class =3D 2, =C2=A0q= ueue =3D 0

rx_thread write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 traffic class =3D 2, queue =3D 2
worker_thread reads: traff= ic class =3D 4, =C2=A0queue =3D 0

rx_thread write: =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D 3, queue =3D 3
wo= rker_thread reads: traffic class =3D 6, =C2=A0queue =3D 0

rx_thread= write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class = =3D 4, queue =3D 4
worker_thread reads: traffic class =3D 8, =C2=A0queue= =3D 0

rx_thread write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 traffic class =3D 5, queue =3D 5
worker_thread reads: traffic = class =3D 10, =C2=A0queue =3D 0

rx_thread write: =C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D 6, queue =3D 6
worke= r_thread reads: traffic class =3D 12, =C2=A0queue =3D 0

rx_thread w= rite: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D = 7, queue =3D 7
worker_thread reads: traffic class =3D 12, =C2=A0queue = =3D 2

rx_thread write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 traffic class =3D 8, queue =3D 8
worker_thread reads: traffic cla= ss =3D 0, =C2=A0queue =3D 0

rx_thread write: =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D 9, queue =3D 9
worker_t= hread reads: traffic class =3D 2, =C2=A0queue =3D 0

rx_thread write= : =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D 10, = queue =3D 10
worker_thread reads: traffic class =3D 4, =C2=A0queue =3D 0=

rx_thread write: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 traffic class =3D 11, queue =3D 11
worker_thread reads: traffic clas= s =3D 6, =C2=A0queue =3D 0

rx_thread write: =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 traffic class =3D 12, queue =3D 12
worker_th= read reads: traffic class =3D 8, =C2=A0queue =3D 0 =C2=A0
--000000000000770e8505d135268c--