[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH bpf-next v2] riscv, bpf: Add kfunc support for RV64

On 2023/2/21 15:02, Björn Töpel wrote:
> Pu Lehui <> writes:
>> On 2023/2/20 22:34, Björn Töpel wrote:
>>> Pu Lehui <> writes:
>>>> From: Pu Lehui <>
>>>> As another important missing piece of RV64 JIT, kfunc allow bpf programs
>>>> call kernel functions. For now, RV64 is sufficient to enable it.
>>> Thanks Lehui!
>>> Maybe we can reword/massage the commit message a bit? What do you think
>>> about something like:
>>> "Now that the BPF trampoline is supported by RISC-V, it is possible to
>>> use BPF programs with kfunc calls.
>> kfunc and bpf trampoline are functionally independent. kfunc [1], like
>> bpf helper functions, allows bpf programs to call exported kernel
>> functions, while bpf trampoline provides a more efficient way than
>> kprobe to act as a mediator between kernel functions and bpf programs,
>> and between bpf programs.
>> In fact, it was already supported before the bpf trampoline
>> implementation, I just turned it on.
> Good point. I guess my (incorrect) kfunc mental model was that
> struct_ops and kfunc were tightly coupled. (Then again, w/o struct_ops
> working kfunc is a bit half-working in my view.)
> Fair enough. I'm still a bit confused about the commit message, but
> happy with the patch.
> > Acked-by: Björn Töpel <>

Thanks Bjorn, will rewrite commit message to make more sense, and send
new soon.

 \ /
  Last update: 2023-03-27 00:30    [W:0.025 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site