]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: net_sched: Add a qdisc watchdog timer
authorAmery Hung <amery.hung@bytedance.com>
Wed, 9 Apr 2025 21:46:00 +0000 (14:46 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 17 Apr 2025 17:54:40 +0000 (10:54 -0700)
commit7a2dafda950b78611dc441c83d105dfdc7082681
treed55fed4ef1b8845e1868f895e6a5f80cfdbd58ef
parent870c28588afa20d786e2c26e8fcc14e2b9a55616
bpf: net_sched: Add a qdisc watchdog timer

Add a watchdog timer to bpf qdisc. The watchdog can be used to schedule
the execution of qdisc through kfunc, bpf_qdisc_schedule(). It can be
useful for building traffic shaping scheduling algorithm, where the time
the next packet will be dequeued is known.

The implementation relies on struct_ops gen_prologue/epilogue to patch bpf
programs provided by users. Operator specific prologue/epilogue kfuncs
are introduced instead of watchdog kfuncs so that it is easier to extend
prologue/epilogue in the future (writing C vs BPF bytecode).

Signed-off-by: Amery Hung <amery.hung@bytedance.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/20250409214606.2000194-5-ameryhung@gmail.com
net/sched/bpf_qdisc.c