Re: [PATCH bpf-next v5 1/2] bpf: support BPF_PROG_QUERY for progs attached to sockmap

From: Yonghong Song
Date: Fri Nov 05 2021 - 00:24:35 EST




On 11/4/21 6:57 PM, Di Zhu wrote:
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: Di Zhu <zhudi2@xxxxxxxxxx>

Acked-by: Yonghong Song <yhs@xxxxxx>