[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260211170725.1514427-4-victor@mojatatu.com>
Date: Wed, 11 Feb 2026 14:07:25 -0300
From: Victor Nogueira <victor@...atatu.com>
To: dsahern@...nel.org,
stephen@...workplumber.org
Cc: jhs@...atatu.com,
deren.teo@...look.com,
andrew@...n.ch,
netdev@...r.kernel.org
Subject: [PATCH iproute2 3/3] tc: Add JSON output support to multiq
Since qdisc core already assumes all qdiscs are able to output JSON,
add JSON output support to multiq.
Fixes: c91d262f414d ("tc: jsonify qdisc core")
Signed-off-by: Victor Nogueira <victor@...atatu.com>
---
tc/q_multiq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tc/q_multiq.c b/tc/q_multiq.c
index 63fffed4..08a2a3b0 100644
--- a/tc/q_multiq.c
+++ b/tc/q_multiq.c
@@ -51,6 +51,7 @@ static int multiq_parse_opt(const struct qdisc_util *qu, int argc, char **argv,
static int multiq_print_opt(const struct qdisc_util *qu, FILE *f, struct rtattr *opt)
{
struct tc_multiq_qopt *qopt;
+ SPRINT_BUF(b1);
if (opt == NULL)
return 0;
@@ -59,7 +60,8 @@ static int multiq_print_opt(const struct qdisc_util *qu, FILE *f, struct rtattr
qopt = RTA_DATA(opt);
- fprintf(f, "bands %u/%u ", qopt->bands, qopt->max_bands);
+ snprintf(b1, SPRINT_BSIZE, "%u/%u", qopt->bands, qopt->max_bands);
+ print_string(PRINT_ANY, "bands", "bands %s ", b1);
return 0;
}
--
2.52.0
Powered by blists - more mailing lists