On Wed, Jan 28, 2026 at 7:02 AM Leon Hwang <[email protected]> wrote:
>
> +       cookie_bargs_off = (bargs_off - cookie_off) / 8;
> +       for (i = 0; i < fentry->nr_links; i++) {
> +               if (bpf_link_prog_session_cookie(fentry->links[i])) {
> +                       u64 meta = func_meta | (cookie_bargs_off << 
> BPF_TRAMP_COOKIE_INDEX_SHIFT);
> +
> +                       store_func_meta(ctx, meta, func_meta_off);
> +                       cookie_bargs_off--;
> +               }

I think the name could use an improvement.

> +static inline bool bpf_link_prog_session_cookie(struct bpf_tramp_link *link)
> +{
> +       return link->link.prog->call_session_cookie;
> +}

reading the first hunk without looking at the body isn't trivial.

How about
bpf_prog_calls_session_cookie() ?
Then it's obvious that return is boolean.

pw-bot: cr

Reply via email to