All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Emil Tsalapatis" <emil@etsalapatis.com>, <bpf@vger.kernel.org>
Cc: <andrii@kernel.org>, <eddyz87@gmail.com>, <memxor@gmail.com>,
	<daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next v4 6/7] bpf: Support call-site kfunc specialization for far calls
Date: Sat, 26 Sep 2026 08:26:53 +0000	[thread overview]
Message-ID: <DLP3T0UY2CTZ.1MF50P0C32UU2@gmail.com> (raw)
In-Reply-To: <20260925233538.5708-7-emil@etsalapatis.com>

On Fri, Sep 25, 2026 at 11:35 PM Emil Tsalapatis <emil@etsalapatis.com> wrote:
> -	ret = sort_kfunc_descs_by_imm_off(env);
> -	if (ret)
> -		return ret;
> +	/*
> +	 * Do not change kfunc desc position into the table for far JIT.
> +	 * because we use the indices in the instructions.
> +	 */
> +	if (bpf_jit_supports_far_kfunc_call())
> +		return 0;
>
> -	return 0;
> +	return sort_kfunc_descs_by_imm_off(env);

can we store the index in insn->off for near calls too ?
Near call JITs take the address from insn->imm and need only
func_model from the desc.
Then all JITs do the same lookup in bpf_jit_find_kfunc_model()
and no need for sort_kfunc_descs_by_imm_off(), desc->imm and bsearch.

as you mentioned in the other thread pls target bpf-next.
We're too far into -rc to do such large changes in bpf tree.

pw-bot: cr


  reply	other threads:[~2026-09-26  8:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 23:35 [PATCH bpf v4 0/7] Make sleepable arena paths use sleepable alloc_pages Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 1/7] bpf: Use an llist for page allocations Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 2/7] bpf: Add sleepable argument to bpf_alloc_pages() Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 3/7] bpf: Add sleepable arena page allocation path Emil Tsalapatis
2026-09-25 23:46   ` sashiko-bot
2026-09-26  4:17     ` Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 4/7] selftests/bpf: Test large allocations for both sleepable/nonsleepable arena users Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 5/7] bpf: Support call-site kfunc specialization for near calls Emil Tsalapatis
2026-09-25 23:35 ` [PATCH bpf-next v4 6/7] bpf: Support call-site kfunc specialization for far calls Emil Tsalapatis
2026-09-26  8:26   ` Alexei Starovoitov [this message]
2026-09-25 23:35 ` [PATCH bpf-next v4 7/7] selftests/bpf: Test per-call site function specialization Emil Tsalapatis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DLP3T0UY2CTZ.1MF50P0C32UU2@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=memxor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.