| 6dd3286f | 11-Mar-2022 |
Ciara Loftus <[email protected]> |
net/af_xdp: fix shared UMEM fill queue reserve
Commit 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create") moves the fill queue reserve logic to before the creation of the socket in
net/af_xdp: fix shared UMEM fill queue reserve
Commit 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create") moves the fill queue reserve logic to before the creation of the socket in order to suppress kernel logs like:
XSK buffer pool does not provide enough addresses to fill 2047 buffers on Rx ring 0
However, for queues that share umem, the fill queue reserve must occur after the socket creation, because the fill queue is not valid until that point.
This commit uses the umem refcnt value to determine whether the queue is sharing a umem, and performs the fill queue reservation either before or after the socket creation, depending on the refcnt value.
The kernel logs will still be seen for the shared umem queues.
Fixes: 81fe6720f84f ("net/af_xdp: reserve fill queue before socket create")
Signed-off-by: Ciara Loftus <[email protected]>
show more ...
|
| 81fe6720 | 18-Feb-2022 |
Ciara Loftus <[email protected]> |
net/af_xdp: reserve fill queue before socket create
Some zero copy AF_XDP drivers eg. ice require that there are addresses already in the fill queue before the socket is created. Otherwise you may s
net/af_xdp: reserve fill queue before socket create
Some zero copy AF_XDP drivers eg. ice require that there are addresses already in the fill queue before the socket is created. Otherwise you may see log messages such as:
XSK buffer pool does not provide enough addresses to fill 2047 buffers on Rx ring 0
This commit ensures that the addresses are available before creating the socket, instead of after.
Signed-off-by: Ciara Loftus <[email protected]> Tested-by: Ferruh Yigit <[email protected]>
show more ...
|
| 8d3d9c72 | 17-Feb-2022 |
Ciara Loftus <[email protected]> |
net/af_xdp: make compatible with libbpf >= 0.7.0
libbpf v0.7.0 deprecates the bpf_prog_load function. Use meson to detect if libbpf >= v0.7.0 is linked and if so, use the recommended replacement fun
net/af_xdp: make compatible with libbpf >= 0.7.0
libbpf v0.7.0 deprecates the bpf_prog_load function. Use meson to detect if libbpf >= v0.7.0 is linked and if so, use the recommended replacement functions bpf_object__open_file and bpf_object__load.
Signed-off-by: Ciara Loftus <[email protected]>
show more ...
|
| 744fd412 | 17-Feb-2022 |
David Marchand <[email protected]> |
net/af_xdp: add missing trailing newline in logs
Caught while trying --in-memory mode, some log messages in this driver are not terminated with a newline: rte_pmd_af_xdp_probe(): net_af_xdp: Failed
net/af_xdp: add missing trailing newline in logs
Caught while trying --in-memory mode, some log messages in this driver are not terminated with a newline: rte_pmd_af_xdp_probe(): net_af_xdp: Failed to register multi-process IPC callback: Operation not supportedvdev_probe(): failed to initialize net_af_xdp device
Other locations in this driver had the same issue, fix all at once.
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Fixes: 9876cf8316b3 ("net/af_xdp: re-enable secondary process support") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Acked-by: Ciara Loftus <[email protected]>
show more ...
|
| 01fa83c9 | 12-Nov-2021 |
Ciara Loftus <[email protected]> |
net/af_xdp: workaround custom program loading
Since v0.4.0, if the underlying kernel supports it, libbpf uses 'bpf link' to manage the programs on the interfaces of the XDP sockets (xsks). This is n
net/af_xdp: workaround custom program loading
Since v0.4.0, if the underlying kernel supports it, libbpf uses 'bpf link' to manage the programs on the interfaces of the XDP sockets (xsks). This is not compatible with the PMD's custom XDP program loading feature which uses the netlink-based method for loading custom programs.
The conflict arises when libbpf searches for a custom program on the interface using bpf link, but doesn't find one because the netlink method was used. libbpf then proceeds to try to load the default program on the interface, but fails due to the presence of the custom program.
To work around this, the PMD now uses the XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag which prevents libbpf from attempting to search for or load a program. One repercussion is that DPDK must now insert the xsk into the xsks_map as this was previously handled by libbpf during the routines for program loading/probing.
Ideally, the PMD would use bpf link to load the custom program, however at present there is no convenient and reliable way of detecting whether the underlying kernel supports bpf link. Perhaps this may become available in a future libbpf release, at which point we can switch the PMD over to the new bpf link based method.
Signed-off-by: Ciara Loftus <[email protected]>
show more ...
|
| b42cffab | 20-Apr-2021 |
Ciara Loftus <[email protected]> |
net/af_xdp: use recvfrom only if busy polling enabled
The recvfrom() syscall is only supported by AF_XDP sockets since kernel 5.11. Only use it if busy polling is configured. We can assume a kernel
net/af_xdp: use recvfrom only if busy polling enabled
The recvfrom() syscall is only supported by AF_XDP sockets since kernel 5.11. Only use it if busy polling is configured. We can assume a kernel >= 5.11 is in use if busy polling is configured so we can safely call recvfrom() in that case.
Fixes: 63e8989fe5a4 ("net/af_xdp: use recvfrom instead of poll syscall")
Signed-off-by: Ciara Loftus <[email protected]>
show more ...
|