From: Stephen Hemminger <stephen@networkplumber.org>
To: chia-yu.chang@nokia-bell-labs.com
Cc: netdev@vger.kernel.org, dave.taht@gmail.com, pabeni@redhat.com,
jhs@mojatatu.com, kuba@kernel.org, xiyou.wangcong@gmail.com,
jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, andrew+netdev@lunn.ch, donald.hunter@gmail.com,
ast@fiberby.net, liuhangbin@gmail.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org, ij@kernel.org,
ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com,
g.white@cablelabs.com, ingemar.s.johansson@ericsson.com,
mirja.kuehlewind@ericsson.com, cheshire@apple.com,
rs.ietf@gmx.at, Jason_Livingood@comcast.com,
vidhi_goel@apple.com, Olga Albisser <olga@albisser.org>,
Oliver Tilmans <olivier.tilmans@nokia.com>,
Bob Briscoe <research@bobbriscoe.net>,
Henrik Steen <henrist@henrist.net>
Subject: Re: [PATCH v4 iproute2-next 1/1] tc: add dualpi2 scheduler module
Date: Mon, 17 Mar 2025 06:36:20 -0700 [thread overview]
Message-ID: <20250317063620.30d24269@hermes.local> (raw)
In-Reply-To: <20250316153917.21005-2-chia-yu.chang@nokia-bell-labs.com>
On Sun, 16 Mar 2025 16:39:17 +0100
chia-yu.chang@nokia-bell-labs.com wrote:
> +static int dualpi2_print_xstats(struct qdisc_util *qu, FILE *f,
> + struct rtattr *xstats)
> +{
> + struct tc_dualpi2_xstats *st;
> +
> + if (xstats == NULL)
> + return 0;
> +
> + if (RTA_PAYLOAD(xstats) < sizeof(*st))
> + return -1;
> +
> + st = RTA_DATA(xstats);
> + fprintf(f, "prob %f delay_c %uus delay_l %uus\n",
> + (double)st->prob / (double)MAX_PROB, st->delay_c, st->delay_l);
> + fprintf(f, "pkts_in_c %u pkts_in_l %u maxq %u\n",
> + st->packets_in_c, st->packets_in_l, st->maxq);
> + fprintf(f, "ecn_mark %u step_marks %u\n", st->ecn_mark, st->step_marks);
> + fprintf(f, "credit %d (%c)\n", st->credit, st->credit > 0 ? 'C' : 'L');
> + fprintf(f, "memory used %u (max %u) of memory limit %u\n",
> + st->memory_used, st->max_memory_used, st->memory_limit);
> + return 0;
> +
You should support JSON for the stats as well.
next prev parent reply other threads:[~2025-03-17 13:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-16 15:39 [PATCH v4 iproute2-next 0/1] DualPI2 iproute2 patch chia-yu.chang
2025-03-16 15:39 ` [PATCH v4 iproute2-next 1/1] tc: add dualpi2 scheduler module chia-yu.chang
2025-03-17 13:33 ` Stephen Hemminger
2025-03-18 12:55 ` Chia-Yu Chang (Nokia)
2025-03-17 13:36 ` Stephen Hemminger [this message]
2025-03-18 12:55 ` Chia-Yu Chang (Nokia)
2025-03-17 13:40 ` Stephen Hemminger
2025-03-18 12:51 ` Chia-Yu Chang (Nokia)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250317063620.30d24269@hermes.local \
--to=stephen@networkplumber.org \
--cc=Jason_Livingood@comcast.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@fiberby.net \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=henrist@henrist.net \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=olga@albisser.org \
--cc=olivier.tilmans@nokia.com \
--cc=pabeni@redhat.com \
--cc=research@bobbriscoe.net \
--cc=rs.ietf@gmx.at \
--cc=shuah@kernel.org \
--cc=vidhi_goel@apple.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).