Re: [PATCH v5 3/3] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-14 Thread Daniel Borkmann via
On 7/14/25 5:12 PM, Ilya Maximets wrote: On 7/11/25 11:44 AM, Daniel Borkmann wrote: Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \

Re: [PATCH v4 3/3] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-11 Thread Daniel Borkmann via
Hey Ilya, On 7/9/25 2:29 PM, Ilya Maximets wrote: [...] Thnaks, Daniel! I have just a couple of small nits below that I missed in v3, the rest looks good and is working fine. diff --git a/net/af-xdp.c b/net/af-xdp.c index 29c5ad16cd..005117c336 100644 --- a/net/af-xdp.c +++ b/net/af-xdp.c @@

[PATCH v5 1/3] net/af-xdp: Remove XDP program cleanup logic

2025-07-11 Thread Daniel Borkmann via
There are two issues with the XDP program removal in af_xdp_cleanup(): 1) Starting from libxdp 1.3.0 [0] the XDP program gets automatically detached when we call xsk_socket__delete() for the last successfully configured queue. libxdp internally keeps track of that. For QEMU we require lib

[PATCH v5 3/3] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-11 Thread Daniel Borkmann via
Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=enp2s0f0np0,id=net0,mode=native,queues=2,start-queue=14,inhibit

[PATCH v5 2/3] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-07-11 Thread Daniel Borkmann via
While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup functions instead of a scheme like: bool fn(..., Error **errp) { Error *

[PATCH v4 1/3] net/af-xdp: Remove XDP program cleanup logic

2025-07-04 Thread Daniel Borkmann via
There are two issues with the XDP program removal in af_xdp_cleanup(): 1) Starting from libxdp 1.3.0 [0] the XDP program gets automatically detached when we call xsk_socket__delete() for the last successfully configured queue. libxdp internally keeps track of that. For QEMU we require lib

[PATCH v4 2/3] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-07-04 Thread Daniel Borkmann via
While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup functions instead of a scheme like: bool fn(..., Error **errp) { Error *

[PATCH v4 3/3] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-07-04 Thread Daniel Borkmann via
Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=enp2s0f0np0,id=net0,mode=native,queues=2,start-queue=14,inhibit

Re: [PATCH v3 1/2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-06-17 Thread Daniel Borkmann via
On 6/17/25 1:59 PM, Ilya Maximets wrote: On 6/4/25 1:29 PM, Daniel Borkmann wrote: Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \

Re: [PATCH v3 2/2] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-06-17 Thread Daniel Borkmann via
On 6/17/25 1:59 PM, Ilya Maximets wrote: On 6/4/25 1:29 PM, Daniel Borkmann wrote: While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup fun

[PATCH v3 1/2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-06-04 Thread Daniel Borkmann via
Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=enp2s0f0np0,id=net0,mode=native,queues=2,start-queue=14,inhibit

[PATCH v3 2/2] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-06-04 Thread Daniel Borkmann via
While testing, it turned out that upon error in the queue creation loop, we never trigger the af_xdp_cleanup() handler. This is because we pass errp instead of a local err pointer into the various AF_XDP setup functions instead of a scheme like: bool fn(..., Error **errp) { Error *

Re: [PATCH v2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-30 Thread Daniel Borkmann via
Hi Ilya, On 5/27/25 10:51 PM, Ilya Maximets wrote: On 5/12/25 6:06 PM, Daniel Borkmann wrote: Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_6

Re: [PATCH] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-15 Thread Daniel Borkmann via
On 5/14/25 9:02 PM, Ilya Maximets wrote: On 5/12/25 4:23 PM, Daniel Borkmann wrote: On 5/12/25 2:03 PM, Ilya Maximets wrote: On 5/9/25 4:05 PM, Daniel Borkmann wrote: On 5/9/25 12:53 AM, Ilya Maximets wrote: On 5/8/25 2:34 PM, Daniel Borkmann wrote: Extend inhibit=on setting with the option

[PATCH v2] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-12 Thread Daniel Borkmann via
Extend 'inhibit=on' setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=enp2s0f0np0,id=net0,mode=native,queues=2,start-queue=14,inhibit

Re: [PATCH] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-12 Thread Daniel Borkmann via
On 5/12/25 2:03 PM, Ilya Maximets wrote: On 5/9/25 4:05 PM, Daniel Borkmann wrote: On 5/9/25 12:53 AM, Ilya Maximets wrote: On 5/8/25 2:34 PM, Daniel Borkmann wrote: Extend inhibit=on setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the c

Re: [PATCH] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-09 Thread Daniel Borkmann via
Hi Ilya, On 5/9/25 12:53 AM, Ilya Maximets wrote: On 5/8/25 2:34 PM, Daniel Borkmann wrote: Extend inhibit=on setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [.

[PATCH] net/af-xdp: Support pinned map path for AF_XDP sockets

2025-05-08 Thread Daniel Borkmann via
Extend inhibit=on setting with the option to specify a pinned XSK map path along with a starting index (default 0) to push the created XSK sockets into. Example usage: # ./build/qemu-system-x86_64 [...] \ -netdev af-xdp,ifname=eth0,id=net0,mode=native,queues=2,inhibit=on,map-path=/sys/fs/bp