Skip to content
Commit 748cd572 authored by Di Zhu's avatar Di Zhu Committed by Alexei Starovoitov
Browse files

bpf: support BPF_PROG_QUERY for progs attached to sockmap



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

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.

Signed-off-by: default avatarDi Zhu <zhudi2@huawei.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Reviewed-by: default avatarJakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/r/20220119014005.1209-1-zhudi2@huawei.com
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 3f712d46
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment