[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251124150350.492522-1-toke@redhat.com>
Date: Mon, 24 Nov 2025 16:03:50 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>
Cc: cake@...ts.bufferbloat.net,
netdev@...r.kernel.org,
Jonas Köppeler <j.koeppeler@...berlin.de>
Subject: [PATCH iproute2-next] tc: cake: add cake_mq support
From: Jonas Köppeler <j.koeppeler@...berlin.de>
This adds support for the cake_mq variant of sch_cake to tc.
Signed-off-by: Jonas Köppeler <j.koeppeler@...berlin.de>
---
include/uapi/linux/pkt_sched.h | 1 +
tc/q_cake.c | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 15d1a37ac6d8..fb07a8898225 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -1036,6 +1036,7 @@ enum {
TCA_CAKE_STATS_DROP_NEXT_US,
TCA_CAKE_STATS_P_DROP,
TCA_CAKE_STATS_BLUE_TIMER_US,
+ TCA_CAKE_STATS_ACTIVE_QUEUES,
__TCA_CAKE_STATS_MAX
};
#define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)
diff --git a/tc/q_cake.c b/tc/q_cake.c
index e2b8de55e5a2..1c143e766888 100644
--- a/tc/q_cake.c
+++ b/tc/q_cake.c
@@ -525,7 +525,6 @@ static int cake_print_opt(const struct qdisc_util *qu, FILE *f, struct rtattr *o
RTA_PAYLOAD(tb[TCA_CAKE_FWMARK]) >= sizeof(__u32)) {
fwmark = rta_getattr_u32(tb[TCA_CAKE_FWMARK]);
}
-
if (wash)
print_string(PRINT_FP, NULL, "wash ", NULL);
else
@@ -667,6 +666,11 @@ static int cake_print_xstats(const struct qdisc_util *qu, FILE *f,
" /%8u\n", GET_STAT_U32(MAX_ADJLEN));
}
+ if (st[TCA_CAKE_STATS_ACTIVE_QUEUES])
+ print_uint(PRINT_ANY, "active_queues",
+ " active queues: %25u\n",
+ GET_STAT_U32(ACTIVE_QUEUES));
+
if (st[TCA_CAKE_STATS_AVG_NETOFF])
print_uint(PRINT_ANY, "avg_hdr_offset",
" average network hdr offset: %12u\n\n",
@@ -827,3 +831,10 @@ struct qdisc_util cake_qdisc_util = {
.print_qopt = cake_print_opt,
.print_xstats = cake_print_xstats,
};
+
+struct qdisc_util cake_mq_qdisc_util = {
+ .id = "cake_mq",
+ .parse_qopt = cake_parse_opt,
+ .print_qopt = cake_print_opt,
+ .print_xstats = cake_print_xstats,
+};
--
2.51.2
Powered by blists - more mailing lists