From: Jesper Dangaard Brouer <jbrouer@redhat.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Stanislav Fomichev" <sdf@google.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>
Cc: brouer@redhat.com, bpf@vger.kernel.org, netdev@vger.kernel.org,
martin.lau@kernel.org, ast@kernel.org, daniel@iogearbox.net,
alexandr.lobakin@intel.com, larysa.zaremba@intel.com,
xdp-hints@xdp-project.net
Subject: [xdp-hints] Re: [PATCH bpf-next V2] xdp: bpf_xdp_metadata use NODEV for no device support
Date: Sat, 18 Feb 2023 15:01:54 +0100 [thread overview]
Message-ID: <df48ff0b-d96b-7231-1b3d-02509a574c9b@redhat.com> (raw)
In-Reply-To: <87mt5cow4w.fsf@toke.dk>
On 17/02/2023 21.49, Toke Høiland-Jørgensen wrote:
> Stanislav Fomichev <sdf@google.com> writes:
>
>> On Fri, Feb 17, 2023 at 9:55 AM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>>>
>>> On 2/17/23 9:40 AM, Stanislav Fomichev wrote:
>>>> On Fri, Feb 17, 2023 at 9:39 AM Martin KaFai Lau <martin.lau@linux.dev> wrote:
>>>>>
>>>>> On 2/17/23 9:32 AM, Stanislav Fomichev wrote:
>>>>>> On 02/17, Jesper Dangaard Brouer wrote:
>>>>>>> With our XDP-hints kfunc approach, where individual drivers overload the
>>>>>>> default implementation, it can be hard for API users to determine
>>>>>>> whether or not the current device driver have this kfunc available.
>>>>>>
>>>>>>> Change the default implementations to use an errno (ENODEV), that
>>>>>>> drivers shouldn't return, to make it possible for BPF runtime to
>>>>>>> determine if bpf kfunc for xdp metadata isn't implemented by driver.
>>>>>>
>>>>>>> This is intended to ease supporting and troubleshooting setups. E.g.
>>>>>>> when users on mailing list report -19 (ENODEV) as an error, then we can
>>>>>>> immediately tell them their device driver is too old.
>>>>>>
>>>>>> I agree with the v1 comments that I'm not sure how it helps.
>>>>>> Why can't we update the doc in the same fashion and say that
>>>>>> the drivers shouldn't return EOPNOTSUPP?
Okay, lets go in this direction then.
I will update the drivers to not return EOPNOTSUPP.
What should drivers then return instead.
I will propose that driver return ENODATA instead?
--Jesper
prev parent reply other threads:[~2023-02-18 14:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 12:11 [xdp-hints] " Jesper Dangaard Brouer
2023-02-17 17:32 ` [xdp-hints] " Stanislav Fomichev
2023-02-17 17:38 ` Martin KaFai Lau
2023-02-17 17:40 ` Stanislav Fomichev
2023-02-17 17:55 ` Martin KaFai Lau
2023-02-17 18:01 ` Stanislav Fomichev
2023-02-17 20:49 ` Toke Høiland-Jørgensen
2023-02-18 14:01 ` Jesper Dangaard Brouer [this message]
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
List information: https://lists.xdp-project.net/postorius/lists/xdp-hints.xdp-project.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df48ff0b-d96b-7231-1b3d-02509a574c9b@redhat.com \
--to=jbrouer@redhat.com \
--cc=alexandr.lobakin@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=larysa.zaremba@intel.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=toke@redhat.com \
--cc=xdp-hints@xdp-project.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox