On Tue, Feb 25, 2025 at 1:58 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > > On 2/25/25 1:29 PM, Amery Hung wrote: > > @@ -1411,6 +1496,13 @@ static void st_ops_unreg(void *kdata, struct bpf_link *link) > > > > static int st_ops_init(struct btf *btf) > > { > > + struct btf *kfunc_btf; > > + > > + bpf_cgroup_from_id_id = bpf_find_btf_id("bpf_cgroup_from_id", BTF_KIND_FUNC, &kfunc_btf); > > + bpf_cgroup_release_id = bpf_find_btf_id("bpf_cgroup_release", BTF_KIND_FUNC, &kfunc_btf); > > + if (!bpf_cgroup_from_id_id || !bpf_cgroup_release_id) > > Just noticed this. This should be "< 0" check. No need for "== 0" check because > "id == 0" is reserved for "void" which is not BTF_KIND_FUNC. > I should be more careful about this. I will send another version. Thank you, Amery > With that, > > Acked-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>