Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* XDP applications running in driver mode on mlx5_core can't access various helper functions
@ 2021-07-15 13:59 David Ramirez
2021-07-19 20:29 ` Saeed Mahameed
0 siblings, 1 reply; 2+ messages in thread
From: David Ramirez @ 2021-07-15 13:59 UTC (permalink / raw)
To: Saeed Mahameed, Leon Romanovsky; +Cc: netdev, linux-rdma
Hey all,
I am having issues with calling some bpf helper functions
when running my XDP program in driver on the mlx5_core driver.
Several of the helpers I've tried to use for ringbuf and maps always return 0.
While this may seem to imply that for functions that merely return null instead of
a pointer in case of an error are working as intended,
some functions which return negative on failure and 0 on success are are also affected,
as while they return 0, they do not result in the desired effect.
Observed examples:
- bpf_ringbuf_output always returns 0, but no data is pushed to the ringbuf
- bpf_map_update_elem always returns 0, but the element is not updated
- bpf_ringbuf_reserve always returns 0
- bpf_map_lookup_elem always returns 0
I'm uncertain if this is a driver specific issue or an ebpf issue.
Testing with xdp in driver mode on veth devices works as expected,
which suggests this is more likely a driver issue.
Additional Details:
Linux Distro: Ubuntu 21.04
Linux Kernel version: 5.11.0-18-generic
driver: mlx5_core
version: 5.11.0-18-generic
Thank you,
David Ramirez
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: XDP applications running in driver mode on mlx5_core can't access various helper functions
2021-07-15 13:59 XDP applications running in driver mode on mlx5_core can't access various helper functions David Ramirez
@ 2021-07-19 20:29 ` Saeed Mahameed
0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2021-07-19 20:29 UTC (permalink / raw)
To: David Ramirez, Leon Romanovsky; +Cc: netdev, linux-rdma
On Thu, 2021-07-15 at 13:59 +0000, David Ramirez wrote:
> Hey all,
>
> I am having issues with calling some bpf helper functions
> when running my XDP program in driver on the mlx5_core driver.
> Several of the helpers I've tried to use for ringbuf and maps always
> return 0.
> While this may seem to imply that for functions that merely return
> null instead of
> a pointer in case of an error are working as intended,
> some functions which return negative on failure and 0 on success are
> are also affected,
> as while they return 0, they do not result in the desired effect.
>
> Observed examples:
> - bpf_ringbuf_output always returns 0, but no data is pushed to the
> ringbuf
> - bpf_map_update_elem always returns 0, but the element is not
> updated
> - bpf_ringbuf_reserve always returns 0
> - bpf_map_lookup_elem always returns 0
>
> I'm uncertain if this is a driver specific issue or an ebpf issue.
this is purely ebpf issue or user prog issue.
1. the ebpf program/helpers are agnostic to run mode, driver/native
v.s. skb/generic modes.
2. the above helpers are pure bpf callbacks, the driver is not
involved.
> Testing with xdp in driver mode on veth devices works as expected,
> which suggests this is more likely a driver issue.
>
The driver or its implementation are not involved with the above
helpers, so further debug is required in the user prog or the helpers
logic themselves.
> Additional Details:
>
> Linux Distro: Ubuntu 21.04
> Linux Kernel version: 5.11.0-18-generic
> driver: mlx5_core
> version: 5.11.0-18-generic
>
> Thank you,
> David Ramirez
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-19 23:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 13:59 XDP applications running in driver mode on mlx5_core can't access various helper functions David Ramirez
2021-07-19 20:29 ` Saeed Mahameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).