Skip to content

Commit 07e3223

Browse files
committed
Martin KaFai Lau says: ==================== pull-request: bpf-next 2025-04-17 We've added 12 non-merge commits during the last 9 day(s) which contain a total of 18 files changed, 1748 insertions(+), 19 deletions(-). The main changes are: 1) bpf qdisc support, from Amery Hung. A qdisc can be implemented in bpf struct_ops programs and can be used the same as other existing qdiscs in the "tc qdisc" command. 2) Add xsk tail adjustment tests, from Tushar Vyavahare. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: selftests/bpf: Test attaching bpf qdisc to mq and non root selftests/bpf: Add a bpf fq qdisc to selftest selftests/bpf: Add a basic fifo qdisc test libbpf: Support creating and destroying qdisc bpf: net_sched: Disable attaching bpf qdisc to non root bpf: net_sched: Support updating bstats bpf: net_sched: Add a qdisc watchdog timer bpf: net_sched: Add basic bpf qdisc kfuncs bpf: net_sched: Support implementation of Qdisc_ops in bpf bpf: Prepare to reuse get_ctx_arg_idx selftests/xsk: Add tail adjustment tests and support check selftests/xsk: Add packet stream replacement function ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 59af38c + fd23ce3 commit 07e3223

File tree

18 files changed

+1748
-19
lines changed

18 files changed

+1748
-19
lines changed

include/linux/btf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ bool btf_param_match_suffix(const struct btf *btf,
522522
const char *suffix);
523523
int btf_ctx_arg_offset(const struct btf *btf, const struct btf_type *func_proto,
524524
u32 arg_no);
525+
u32 btf_ctx_arg_idx(struct btf *btf, const struct btf_type *func_proto, int off);
525526

526527
struct bpf_verifier_log;
527528

kernel/bpf/btf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6391,8 +6391,8 @@ static bool is_int_ptr(struct btf *btf, const struct btf_type *t)
63916391
return btf_type_is_int(t);
63926392
}
63936393

6394-
static u32 get_ctx_arg_idx(struct btf *btf, const struct btf_type *func_proto,
6395-
int off)
6394+
u32 btf_ctx_arg_idx(struct btf *btf, const struct btf_type *func_proto,
6395+
int off)
63966396
{
63976397
const struct btf_param *args;
63986398
const struct btf_type *t;
@@ -6672,7 +6672,7 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type,
66726672
tname, off);
66736673
return false;
66746674
}
6675-
arg = get_ctx_arg_idx(btf, t, off);
6675+
arg = btf_ctx_arg_idx(btf, t, off);
66766676
args = (const struct btf_param *)(t + 1);
66776677
/* if (t == NULL) Fall back to default BPF prog with
66786678
* MAX_BPF_FUNC_REG_ARGS u64 arguments.

net/sched/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,18 @@ config NET_SCH_ETS
403403

404404
If unsure, say N.
405405

406+
config NET_SCH_BPF
407+
bool "BPF-based Qdisc"
408+
depends on BPF_SYSCALL && BPF_JIT && DEBUG_INFO_BTF
409+
help
410+
This option allows BPF-based queueing disiplines. With BPF struct_ops,
411+
users can implement supported operators in Qdisc_ops using BPF programs.
412+
The queue holding skb can be built with BPF maps or graphs.
413+
414+
Say Y here if you want to use BPF-based Qdisc.
415+
416+
If unsure, say N.
417+
406418
menuconfig NET_SCH_DEFAULT
407419
bool "Allow override default queue discipline"
408420
help

net/sched/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ obj-$(CONFIG_NET_SCH_FQ_PIE) += sch_fq_pie.o
6262
obj-$(CONFIG_NET_SCH_CBS) += sch_cbs.o
6363
obj-$(CONFIG_NET_SCH_ETF) += sch_etf.o
6464
obj-$(CONFIG_NET_SCH_TAPRIO) += sch_taprio.o
65+
obj-$(CONFIG_NET_SCH_BPF) += bpf_qdisc.o
6566

6667
obj-$(CONFIG_NET_CLS_U32) += cls_u32.o
6768
obj-$(CONFIG_NET_CLS_ROUTE4) += cls_route.o

0 commit comments

Comments
 (0)