Skip to content

Commit 04603b5

Browse files
chenyuan0001Kernel Patches Daemon
authored andcommitted
selftests: bpf: Add missing symbol declarations to common header
Fix implicit function declaration errors in bpf_qdisc_xxx.c by adding the required kernel symbol declarations to the shared header file bpf_qdisc_common.h. This ensures all qdisc BPF programs can properly resolve these kernel functions. The added declarations include: - bpf_qdisc_skb_drop - bpf_qdisc_bstats_update - bpf_kfree_skb - bpf_skb_get_hash - bpf_qdisc_watchdog_schedule Using a common header prevents duplication and ensures consistency across different qdisc implementations. Signed-off-by: Yuan Chen <[email protected]>
1 parent dbe33e3 commit 04603b5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/selftests/bpf/progs/bpf_qdisc_common.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414

1515
struct bpf_sk_buff_ptr;
1616

17+
extern void bpf_qdisc_skb_drop(struct sk_buff *skb,
18+
struct bpf_sk_buff_ptr *to_free_list) __ksym;
19+
extern void bpf_qdisc_bstats_update(struct Qdisc *sch,
20+
const struct sk_buff *skb) __ksym;
21+
extern void bpf_kfree_skb(struct sk_buff *skb) __ksym;
22+
extern u32 bpf_skb_get_hash(struct sk_buff *skb) __ksym;
23+
extern void bpf_qdisc_watchdog_schedule(struct Qdisc *sch, u64 expire,
24+
u64 delta_ns) __ksym;
25+
1726
static struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb)
1827
{
1928
return (struct qdisc_skb_cb *)skb->cb;

0 commit comments

Comments
 (0)