Thread (6 messages) 6 messages, 3 authors, 2023-08-02

Re: [PATCH bpf-next v5 1/2] bpf, xdp: Add tracepoint to xdp attaching failure

flat view

From: Leon Hwang <hidden>
Date: 2023-08-02 06:52:40
Also in: bpf, linux-kselftest, linux-trace-kernel, lkml


On 2/8/23 06:08, Jakub Kicinski wrote:
On Tue,  1 Aug 2023 22:26:20 +0800 Leon Hwang wrote:
quoted
When error happens in dev_xdp_attach(), it should have a way to tell
users the error message like the netlink approach.

To avoid breaking uapi, adding a tracepoint in bpf_xdp_link_attach() is
an appropriate way to notify users the error message.

Hence, bpf libraries are able to retrieve the error message by this
tracepoint, and then report the error message to users.
Whatevered-by: Jakub Kicinski [off-list ref] ?
Oh, it's not responsible for libraries to retrieve the error message. It
should be users' responsibility.

Sorry for the misguiding text.

In the previous patch[0], which changes uapi, it's able to back-propagate
the error message from dev_xdp_attach() to userspace through BPF syscall.
Then, tracepoint idea is suggested to avoid changing uapi. I do agree to
implement a tracepoint to avoid changing uapi.

[0] bpf: Introduce user log
https://lore.kernel.org/bpf/20230708040750.72570-1-hffilwlqm@gmail.com/ (local)

Thanks,
Leon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help