mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-04 07:39:07 +08:00
libbpf: Support creating and destroying qdisc
Extend struct bpf_tc_hook with handle, qdisc name and a new attach type, BPF_TC_QDISC, to allow users to add or remove any qdisc specified in addition to clsact. 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-8-ameryhung@gmail.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
52b9b38a22
commit
f580871b42
@@ -1289,6 +1289,7 @@ enum bpf_tc_attach_point {
|
||||
BPF_TC_INGRESS = 1 << 0,
|
||||
BPF_TC_EGRESS = 1 << 1,
|
||||
BPF_TC_CUSTOM = 1 << 2,
|
||||
BPF_TC_QDISC = 1 << 3,
|
||||
};
|
||||
|
||||
#define BPF_TC_PARENT(a, b) \
|
||||
@@ -1303,9 +1304,11 @@ struct bpf_tc_hook {
|
||||
int ifindex;
|
||||
enum bpf_tc_attach_point attach_point;
|
||||
__u32 parent;
|
||||
__u32 handle;
|
||||
const char *qdisc;
|
||||
size_t :0;
|
||||
};
|
||||
#define bpf_tc_hook__last_field parent
|
||||
#define bpf_tc_hook__last_field qdisc
|
||||
|
||||
struct bpf_tc_opts {
|
||||
size_t sz;
|
||||
|
||||
Reference in New Issue
Block a user