]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: net_sched: Make some Qdisc_ops ops mandatory
authorAmery Hung <ameryhung@gmail.com>
Fri, 2 May 2025 20:16:22 +0000 (13:16 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 2 May 2025 22:35:37 +0000 (15:35 -0700)
commit64d6e3b9df1b12e35181e886d771d8920118e742
tree23ba0b4e9edf3f2b1ff258f65e802379f5705f04
parent6d080362c3218b92b98a17eb4132e0e5a7ed30d4
bpf: net_sched: Make some Qdisc_ops ops mandatory

The patch makes all currently supported Qdisc_ops (i.e., .enqueue,
.dequeue, .init, .reset, and .destroy) mandatory.

Make .init, .reset and .destroy mandatory as bpf qdisc relies on prologue
and epilogue to check attach points and correctly initialize/cleanup
resources. The prologue/epilogue will only be generated for an struct_ops
operator only if users implement the operator.

Make .enqueue and .dequeue mandatory as bpf qdisc infra does not provide
a default data path.

Fixes: c8240344956e ("bpf: net_sched: Support implementation of Qdisc_ops in bpf")
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
net/sched/bpf_qdisc.c