Skip to contentSkip to conversation

bpf: support BPF_PROG_QUERY for progs attached to sockmap

PATCH zhudi (E) 1 participant 1 message Oct 23, 2021 BPF

lore
Share & tools
lore

zhudi (E)

author
#0 lore raw
Quoted 5 lines · Di Zhu
Quoted 4 lines

Right now there is no way to query whether BPF programs are attached to a sockmap or not.

Quoted 7 lines
Quoted 5 lines

we can use the standard interface in libbpf to query, such as:
bpf_prog_query(mapFd, BPF_SK_SKB_STREAM_PARSER, 0, NULL, ...); the mapFd is the fd of sockmap.

The feature looks fine, but it needs a selftest.

I will add it in my patch, thanks