Subject: Re: [xdp-hints] Re: [PATCH bpf-next v2 2/8] bpf: XDP metadata RX kfuncs

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Mon, 28 Nov 2022 23:10:10 +0100

Stanislav Fomichev <[email-masked]> writes:

>  s
>
> On Fri, Nov 25, 2022 at 9:53 AM Toke Høiland-Jørgensen <[email-masked]> wrote:
>>
>> Stanislav Fomichev <[email-masked]> writes:
>>
>> > There is an ndo handler per kfunc, the verifier replaces a call to the
>> > generic kfunc with a call to the per-device one.
>> >
>> > For XDP, we define a new kfunc set (xdp_metadata_kfunc_ids) which
>> > implements all possible metatada kfuncs. Not all devices have to
>> > implement them. If kfunc is not supported by the target device,
>> > the default implementation is called instead.
>>
>> BTW, this "the default implementation is called instead" bit is not
>> included in this version... :)
>
> fixup_xdp_kfunc_call should return 0 when the device doesn't have a
> kfunc defined and should fallback to the default kfunc implementation,
> right?
> Or am I missing something?

Ohh, right. Maybe add a comment stating this (as I obviously missed it :))

-Toke