summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-01-13 13:54:31 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-01-13 14:01:54 +0300
commitff420c568b4cda293d9ef516a85c2f29fafc41d6 (patch)
treec134e967586a7b1e721827df3459caf5da5a3cab /include
parentde746f8f53410a0e31d8e5d145745332ee77d321 (diff)
parent8d61f1a9f2541c6ef51d4997e6a4c5a1c0d8b27c (diff)
downloadlinux-ff420c568b4cda293d9ef516a85c2f29fafc41d6.tar.xz
Merge branch 'multi-queue-aware-sch_cake'
says: ==================== Multi-queue aware sch_cake This series adds a multi-queue aware variant of the sch_cake scheduler, called 'cake_mq'. Using this makes it possible to scale the rate shaper of sch_cake across multiple CPUs, while still enforcing a single global rate on the interface. The approach taken in this patch series is to implement a separate qdisc called 'cake_mq', which is based on the existing 'mq' qdisc, but differs in a couple of aspects: - It will always install a cake instance on each hardware queue (instead of using the default qdisc for each queue like 'mq' does). - The cake instances on the queues will share their configuration, which can only be modified through the parent cake_mq instance. Doing things this way simplifies user configuration by centralising all configuration through the cake_mq qdisc (which also serves as an obvious way of opting into the multi-queue aware behaviour). The cake_mq qdisc takes all the same configuration parameters as the cake qdisc. An earlier version of this work was presented at this year's Netdevconf: https://netdevconf.info/0x19/sessions/talk/mq-cake-scaling-software-rate-limiting-across-cpu-cores.html The patch series is structured as follows: - Patch 1 exports the mq qdisc functions for reuse. - Patch 2 factors out the sch_cake configuration variables into a separate struct that can be shared between instances. - Patch 3 adds the basic cake_mq qdisc, reusing the exported mq code - Patch 4 adds configuration sharing across the cake instances installed under cake_mq - Patch 5 adds the shared shaper state that enables the multi-core rate shaping - Patch 6 adds selftests for cake_mq A patch to iproute2 to make it aware of the cake_mq qdisc were submitted separately with a previous patch version: https://lore.kernel.org/r/20260105162902.1432940-1-toke@redhat.com ==================== Link: https://patch.msgid.link/20260109-mq-cake-sub-qdisc-v8-0-8d613fece5d8@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/sch_priv.h27
-rw-r--r--include/uapi/linux/pkt_sched.h1
2 files changed, 28 insertions, 0 deletions
diff --git a/include/net/sch_priv.h b/include/net/sch_priv.h
new file mode 100644
index 000000000000..4789f668ae87
--- /dev/null
+++ b/include/net/sch_priv.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __NET_SCHED_PRIV_H
+#define __NET_SCHED_PRIV_H
+
+#include <net/sch_generic.h>
+
+struct mq_sched {
+ struct Qdisc **qdiscs;
+};
+
+int mq_init_common(struct Qdisc *sch, struct nlattr *opt,
+ struct netlink_ext_ack *extack,
+ const struct Qdisc_ops *qdisc_ops);
+void mq_destroy_common(struct Qdisc *sch);
+void mq_attach(struct Qdisc *sch);
+void mq_dump_common(struct Qdisc *sch, struct sk_buff *skb);
+struct netdev_queue *mq_select_queue(struct Qdisc *sch,
+ struct tcmsg *tcm);
+struct Qdisc *mq_leaf(struct Qdisc *sch, unsigned long cl);
+unsigned long mq_find(struct Qdisc *sch, u32 classid);
+int mq_dump_class(struct Qdisc *sch, unsigned long cl,
+ struct sk_buff *skb, struct tcmsg *tcm);
+int mq_dump_class_stats(struct Qdisc *sch, unsigned long cl,
+ struct gnet_dump *d);
+void mq_walk(struct Qdisc *sch, struct qdisc_walker *arg);
+
+#endif
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index c2da76e78bad..66e8072f44df 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)