[PATCH net-next v4 6/6] Revert "bnxt_en: bring back rtnl_lock() in the bnxt_open() path"

2025-06-13 Thread Stanislav Fomichev
This reverts commit 325eb217e41fa14f307c7cc702bd18d0bb38fe84. udp_tunnel infra doesn't need RTNL, should be safe to get back to only netdev instance lock. Cc: Michael Chan Reviewed-by: Aleksandr Loktionov Signed-off-by: Stanislav Fomichev --- drivers/net/ethernet/broadcom/bnxt/bnxt.c

[PATCH net-next v4 5/6] netdevsim: remove udp_ports_sleep

2025-06-13 Thread Stanislav Fomichev
Now that there is only one path in udp_tunnel, there is no need to have udp_ports_sleep knob. Remove it and adjust the test. Cc: Michael Chan Reviewed-by: Aleksandr Loktionov Signed-off-by: Stanislav Fomichev --- drivers/net/netdevsim/netdevsim.h | 2 -- drivers/net/netdevsim

[PATCH net-next v4 4/6] net: remove redundant ASSERT_RTNL() in queue setup functions

2025-06-13 Thread Stanislav Fomichev
The existing netdev_ops_assert_locked() already asserts that either the RTNL lock or the per-device lock is held, making the explicit ASSERT_RTNL() redundant. Cc: Michael Chan Signed-off-by: Stanislav Fomichev --- net/core/dev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/core

[PATCH net-next v4 3/6] udp_tunnel: remove rtnl_lock dependency

2025-06-13 Thread Stanislav Fomichev
- triggers NETDEV_UDP_TUNNEL_PUSH_INFO - triggers NETDEV_UDP_TUNNEL_DROP_INFO - ethnl_tunnel_info_reply_size - udp_tunnel_nic_set_port_priv (two intel drivers) Cc: Michael Chan Suggested-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- .../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 +

[PATCH net-next v4 2/6] vxlan: drop sock_lock

2025-06-13 Thread Stanislav Fomichev
We won't be able to sleep soon in vxlan_offload_rx_ports and won't be able to grab sock_lock. Instead of having separate spinlock to manage sockets, rely on rtnl lock. This is similar to how geneve manages its sockets. Signed-off-by: Stanislav Fomichev --- drivers/net/vxlan/vx

[PATCH net-next v4 1/6] geneve: rely on rtnl lock in geneve_offload_rx_ports

2025-06-13 Thread Stanislav Fomichev
rtnl lock as well (when adding or removing a tunneling device). Signed-off-by: Stanislav Fomichev --- drivers/net/geneve.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index ffc15a432689..9efedc6758bf 100644 --- a/driver

[PATCH net-next v4 0/6] udp_tunnel: remove rtnl_lock dependency

2025-06-13 Thread Stanislav Fomichev
- fix 2 test failures (Jakub NIPA) v2: - move the lock into udp_tunnel_nic (Jakub) - reorder the lock ordering (Jakub) - move udp_ports_sleep removal into separate patch and update the test (Jakub) Cc: Michael Chan Stanislav Fomichev (6): geneve: rely on rtnl lock in geneve_offload_rx_ports

Re: [PATCH net-next v3 1/4] udp_tunnel: remove rtnl_lock dependency

2025-06-11 Thread Stanislav Fomichev
On 06/11, Jakub Kicinski wrote: > On Tue, 10 Jun 2025 10:15:19 -0700 Stanislav Fomichev wrote: > > Drivers that are using ops lock and don't depend on RTNL lock > > still need to manage it because udp_tunnel's RTNL dependency. > > Introduce new udp_tunnel

[PATCH net-next v3 4/4] Revert "bnxt_en: bring back rtnl_lock() in the bnxt_open() path"

2025-06-10 Thread Stanislav Fomichev
This reverts commit 325eb217e41fa14f307c7cc702bd18d0bb38fe84. udp_tunnel infra doesn't need RTNL, should be safe to get back to only netdev instance lock. Cc: Michael Chan Reviewed-by: Aleksandr Loktionov Signed-off-by: Stanislav Fomichev --- drivers/net/ethernet/broadcom/bnxt/bnxt.c

[PATCH net-next v3 3/4] netdevsim: remove udp_ports_sleep

2025-06-10 Thread Stanislav Fomichev
Now that there is only one path in udp_tunnel, there is no need to have udp_ports_sleep knob. Remove it and adjust the test. Cc: Michael Chan Reviewed-by: Aleksandr Loktionov Signed-off-by: Stanislav Fomichev --- drivers/net/netdevsim/netdevsim.h | 2 -- drivers/net/netdevsim

[PATCH net-next v3 2/4] net: remove redundant ASSERT_RTNL() in queue setup functions

2025-06-10 Thread Stanislav Fomichev
The existing netdev_ops_assert_locked() already asserts that either the RTNL lock or the per-device lock is held, making the explicit ASSERT_RTNL() redundant. Cc: Michael Chan Signed-off-by: Stanislav Fomichev --- net/core/dev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/core

[PATCH net-next v3 1/4] udp_tunnel: remove rtnl_lock dependency

2025-06-10 Thread Stanislav Fomichev
k needs to grab udp_tunnel_nic_lock mutex and might sleep). Cc: Michael Chan Reviewed-by: Cosmin Ratiu Suggested-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- .../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++-- drivers/ne

[PATCH net-next v3 0/4] udp_tunnel: remove rtnl_lock dependency

2025-06-10 Thread Stanislav Fomichev
sleep removal into separate patch and update the test (Jakub) Cc: Michael Chan Stanislav Fomichev (4): udp_tunnel: remove rtnl_lock dependency net: remove redundant ASSERT_RTNL() in queue setup functions netdevsim: remove udp_ports_sleep Revert "bnxt_en: bring back rtnl_lock() in the

Re: [PATCH net-next v2 0/4] udp_tunnel: remove rtnl_lock dependency

2025-06-09 Thread Stanislav Fomichev
On 06/09, Jakub Kicinski wrote: > On Mon, 9 Jun 2025 09:25:37 -0700 Stanislav Fomichev wrote: > > Recently bnxt had to grow back a bunch of rtnl dependencies because > > of udp_tunnel's infra. Add separate (global) mutext to protect > > udp_tunnel state. > &g

[PATCH net-next v2 1/4] udp_tunnel: remove rtnl_lock dependency

2025-06-09 Thread Stanislav Fomichev
k needs to grab udp_tunnel_nic_lock mutex and might sleep). Cc: Michael Chan Suggested-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev --- .../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++-- drivers/net/ethernet/emulex/benet

[PATCH net-next v2 3/4] netdevsim: remove udp_ports_sleep

2025-06-09 Thread Stanislav Fomichev
Now that there is only one path in udp_tunnel, there is no need to have udp_ports_sleep knob. Remove it and adjust the test. Cc: Michael Chan Signed-off-by: Stanislav Fomichev --- drivers/net/netdevsim/netdevsim.h | 2 -- drivers/net/netdevsim/udp_tunnels.c

[PATCH net-next v2 4/4] Revert "bnxt_en: bring back rtnl_lock() in the bnxt_open() path"

2025-06-09 Thread Stanislav Fomichev
This reverts commit 325eb217e41fa14f307c7cc702bd18d0bb38fe84. udp_tunnel infra doesn't need RTNL, should be safe to get back to only netdev instance lock. Cc: Michael Chan Reviewed-by: Aleksandr Loktionov Signed-off-by: Stanislav Fomichev --- drivers/net/ethernet/broadcom/bnxt/bnxt.c

[PATCH net-next v2 2/4] net: remove redundant ASSERT_RTNL() in queue setup functions

2025-06-09 Thread Stanislav Fomichev
The existing netdev_ops_assert_locked() already asserts that either the RTNL lock or the per-device lock is held, making the explicit ASSERT_RTNL() redundant. Cc: Michael Chan Signed-off-by: Stanislav Fomichev --- net/core/dev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/core

[PATCH net-next v2 0/4] udp_tunnel: remove rtnl_lock dependency

2025-06-09 Thread Stanislav Fomichev
pdate the test (Jakub) Cc: Michael Chan Stanislav Fomichev (4): udp_tunnel: remove rtnl_lock dependency net: remove redundant ASSERT_RTNL() in queue setup functions netdevsim: remove udp_ports_sleep Revert "bnxt_en: bring back rtnl_lock() in the bnxt_open() path" .../net/et

Re: [PATCH net-next v2 3/8] net: devmem: preserve sockc_err

2025-05-27 Thread Stanislav Fomichev
On 05/23, Mina Almasry wrote: > Preserve the error code returned by sock_cmsg_send and return that on > err. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v2 1/8] net: devmem: move list_add to net_devmem_bind_dmabuf.

2025-05-27 Thread Stanislav Fomichev
gt; Signed-off-by: Mina Almasry > Tested-by: Taehee Yoo Acked-by: Stanislav Fomichev

Re: [PATCH net-next v2 2/8] page_pool: fix ugly page_pool formatting

2025-05-27 Thread Stanislav Fomichev
On 05/23, Mina Almasry wrote: > Minor cleanup; this line is badly formatted. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v2 4/8] net: devmem: ksft: add ipv4 support

2025-05-27 Thread Stanislav Fomichev
On 05/23, Mina Almasry wrote: > ncdevmem supports both ipv4 and ipv6, but the ksft is currently > ipv6-only. Propagate the ipv4 support to the ksft, so that folks that > are limited to these networks can also test. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v2 6/8] net: devmem: ksft: add 5 tuple FS support

2025-05-27 Thread Stanislav Fomichev
On 05/23, Mina Almasry wrote: > ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple > FS support, but the ksft is currently 3-tuple only. Support drivers that > have 5-tuple FS supported by adding a ksft arg. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next 3/3] selftests: ncdevmem: add tx test with multiple IOVs

2025-05-21 Thread Stanislav Fomichev
On 05/21, Mina Almasry wrote: > On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev > wrote: > > > > Use prime 3 for length to make offset slowly drift away. > > > > Signed-off-by: Stanislav Fomichev > > --- > > .../testing/selftests/drivers/net/hw/dev

Re: [PATCH net-next 2/3] selftests: ncdevmem: make chunking optional

2025-05-21 Thread Stanislav Fomichev
On 05/21, Mina Almasry wrote: > On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev > wrote: > > > > Add new -z argument to specify max IOV size. By default, use > > single large IOV. > > > > Signed-off-by: Stanislav Fomichev > > --- > > ..

Re: [PATCH net-next 1/3] net: devmem: support single IOV with sendmsg

2025-05-21 Thread Stanislav Fomichev
On 05/21, Mina Almasry wrote: > On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev > wrote: > > > > sendmsg() with a single iov becomes ITER_UBUF, sendmsg() with multiple > > iovs becomes ITER_IOVEC. iter_iov_len does not return correct > > value for UBUF, so t

[PATCH net-next 3/3] selftests: ncdevmem: add tx test with multiple IOVs

2025-05-20 Thread Stanislav Fomichev
Use prime 3 for length to make offset slowly drift away. Signed-off-by: Stanislav Fomichev --- .../testing/selftests/drivers/net/hw/devmem.py | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing

[PATCH net-next 2/3] selftests: ncdevmem: make chunking optional

2025-05-20 Thread Stanislav Fomichev
Add new -z argument to specify max IOV size. By default, use single large IOV. Signed-off-by: Stanislav Fomichev --- .../selftests/drivers/net/hw/ncdevmem.c | 49 +++ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw

[PATCH net-next 1/3] net: devmem: support single IOV with sendmsg

2025-05-20 Thread Stanislav Fomichev
t;) Signed-off-by: Stanislav Fomichev --- include/linux/uio.h | 8 +++- net/core/datagram.c | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/linux/uio.h b/include/linux/uio.h index 49ece9e1888f..393d0622cc28 100644 --- a/include/linux/uio.h +++ b/include/l

Re: [PATCH net-next v1 7/9] net: devmem: ksft: add 5 tuple FS support

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > On Mon, May 19, 2025 at 8:37 AM Stanislav Fomichev > wrote: > > > > On 05/19, Mina Almasry wrote: > > > ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple > > > FS support, but the ksft is currentl

Re: [PATCH net-next v1 5/9] net: devmem: ksft: add ipv4 support

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > On Mon, May 19, 2025 at 8:32 AM Stanislav Fomichev > wrote: > > > > On 05/19, Mina Almasry wrote: > > > ncdevmem supports both ipv4 and ipv6, but the ksft is currently > > > ipv6-only. Propagate the ipv4 support to the ksft, so

Re: [PATCH net-next v1 4/9] net: devmem: ksft: remove ksft_disruptive

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > On Mon, May 19, 2025 at 8:25 AM Stanislav Fomichev > wrote: > > > > On 05/19, Mina Almasry wrote: > > > As far as I can tell the ksft_disruptive here is unnecessary. These > > > tests are largerly independent, and when one tes

Re: [PATCH net-next v1 9/9] net: devmem: ncdevmem: remove unused variable

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > This variable is unused and can be removed. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v1 8/9] net: devmem: ksft: upgrade rx test to send 1K data

2025-05-19 Thread Stanislav Fomichev
exactly failed, what was the expected > byte pattern, and what is the actual byte pattern received. All this > debug information will be useful when the test fails. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v1 3/9] net: devmem: preserve sockc_err

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > Preserve the error code returned by sock_cmsg_send and return that on > err. > > Signed-off-by: Mina Almasry > --- > net/ipv4/tcp.c | 24 ++-- > 1 file changed, 10 insertions(+), 14 deletions(-) > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c

Re: [PATCH net-next v1 7/9] net: devmem: ksft: add 5 tuple FS support

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple > FS support, but the ksft is currently 3-tuple only. Support drivers that > have 5-tuple FS supported by adding a ksft arg. > > Signed-off-by: Mina Almasry > > --- > .../testing/selftests/dr

Re: [PATCH net-next v1 6/9] net: devmem: ksft: add exit_wait to make rx test pass

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > This exit_wait seems necessary to make the rx side test pass for me. > I think this is just missed from the original test add patch. Add it now. > > Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev

Re: [PATCH net-next v1 5/9] net: devmem: ksft: add ipv4 support

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > ncdevmem supports both ipv4 and ipv6, but the ksft is currently > ipv6-only. Propagate the ipv4 support to the ksft, so that folks that > are limited to these networks can also test. > > Signed-off-by: Mina Almasry > > --- > .../selftests/drivers/net/hw/devmem.py

Re: [PATCH net-next v1 4/9] net: devmem: ksft: remove ksft_disruptive

2025-05-19 Thread Stanislav Fomichev
On 05/19, Mina Almasry wrote: > As far as I can tell the ksft_disruptive here is unnecessary. These > tests are largerly independent, and when one test fails, it's nice to > know the results from all the other test cases. We currently don't do anything special for disruptive tests. I'm assuming an

[PATCH net v2] selftests: net: validate team flags propagation

2025-05-16 Thread Stanislav Fomichev
n the respective fix is reverted. Not sure about the placement, but since it all relies on teaming, added to the teaming directory. One ugly bit is that I add NETIF_F_LRO to netdevsim; there is no way to trigger netdev_sync_lower_features without it. Signed-off-by: Stanislav Fomichev --- v2: fix cl

Re: [PATCH net] selftests: net: validate team flags propagation

2025-05-16 Thread Stanislav Fomichev
On 05/16, Jakub Kicinski wrote: > On Thu, 15 May 2025 16:13:32 -0700 Stanislav Fomichev wrote: > > Cover three recent cases: > > 1. missing ops locking for the lowers during netdev_sync_lower_features > > 2. missing locking for dev_set_promiscuity (plus netdev_ops_assert

[PATCH net] selftests: net: validate team flags propagation

2025-05-15 Thread Stanislav Fomichev
n the respective fix is reverted. Not sure about the placement, but since it all relies on teaming, added to the teaming directory. One ugly bit is that I add NETIF_F_LRO to netdevsim; there is no way to trigger netdev_sync_lower_features without it. Signed-off-by: Stanislav Fomichev --- driver

Re: [PATCH bpf-next 0/2] selftests/bpf: Move test_lwt_seg6local to test_progs

2025-03-07 Thread Stanislav Fomichev
> the test into the test_progs framework. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v2 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-03-03 Thread Stanislav Fomichev
's validity. > Use these helpers in all the available tests. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v2 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-03-03 Thread Stanislav Fomichev
able the > IPv6 DAD feature because it can take lot of time and cause some tests to > fail depending on the environment they're run on. > Remove test_ip6gre() and test_ip6gretap() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 09/10] selftests/bpf: test_tunnel: Move ip6tnl tunnel tests to test_progs

2025-02-27 Thread Stanislav Fomichev
Remove test_ipip6() and test_ip6ip6() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 06/10] selftests/bpf: test_tunnel: Move ip6erspan tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
cript. > Remove test_ip6erspan() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 03/10] selftests/bpf: test_tunnel: Move gre tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
ove test_gre() and test_gre_no_tunnel_key() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 07/10] selftests/bpf: test_tunnel: Move geneve tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
cript. > Remove test_geneve() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v4 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-27 Thread Stanislav Fomichev
t; with commit c047e0e0e435 ("selftests/bpf: Optionally open a dedicated > namespace to run test in it"). This provides some extra safety against > conflicting interface names. > > Signed-off-by: Marcus Wichelmann Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 10/10] selftests/bpf: test_tunnel: Remove test_tunnel.sh

2025-02-27 Thread Stanislav Fomichev
> Remove the test_tunnel.sh script and its Makefile entry > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 08/10] selftests/bpf: test_tunnel: Move ip6geneve tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
cript. > Remove test_ip6geneve() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 05/10] selftests/bpf: test_tunnel: Move erspan tunnel tests to test_progs

2025-02-27 Thread Stanislav Fomichev
cript. > Remove test_erspan() from the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test ip6gre tunnels. It uses the same > network topology and the same BPF programs than the script. Disable the > IPv6 D

Re: [PATCH bpf-next 02/10] selftests/bpf: test_tunnel: Add ping helpers

2025-02-27 Thread Stanislav Fomichev
ers around test_ping() and use them in the tests to avoid code > duplication. > Remove the unnecessary ASSERT_OK() from the tests. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-02-27 Thread Stanislav Fomichev
On 02/27, Bastien Curutchet (eBPF Foundation) wrote: > A fair amount of code duplication is present among tests to attach BPF > programs. > > Create generic_attach* helpers that attach BPF programs to a given > interface. > Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. > Use th

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Stanislav Fomichev
On 02/26, Marcus Wichelmann wrote: > Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: > > On 02/24, Marcus Wichelmann wrote: > > > Add a selftest that creates a tap device, attaches XDP and TC programs, > > > writes a packet with a test payload into the tap device and c

Re: [PATCH bpf-next v3 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-24 Thread Stanislav Fomichev
On 02/24, Marcus Wichelmann wrote: > The existing XDP metadata test works by creating a veth pair and > attaching XDP & TC programs that drop the packet when the condition of > the test isn't fulfilled. The test then pings through the veth pair and > succeeds when the ping comes through. > > While

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-24 Thread Stanislav Fomichev
On 02/24, Marcus Wichelmann wrote: > Add a selftest that creates a tap device, attaches XDP and TC programs, > writes a packet with a test payload into the tap device and checks the > test result. This test ensures that the XDP metadata support in the tun > driver is enabled and that the metadata s

Re: [PATCH bpf-next 0/2] selftests/bpf: Migrate test_xdp_vlan.sh into test_progs

2025-02-24 Thread Stanislav Fomichev
overed by an other test in the > test_progs framework so I add a new file prog_tests/xdp_vlan.c that does > the exact same tests (same network topology, same BPF programs) and > remove the script. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 2/2] selftests/bpf: Migrate test_xdp_vlan.sh into test_progs

2025-02-24 Thread Stanislav Fomichev
On 02/24, Bastien Curutchet wrote: > Hi Stanislav, > > On 2/21/25 5:14 PM, Stanislav Fomichev wrote: > > On 02/21, Bastien Curutchet (eBPF Foundation) wrote: > > > test_xdp_vlan.sh isn't used by the BPF CI. > > > > > > Migrate test_xdp_vlan.sh in pr

Re: [PATCH bpf-next 2/2] selftests/bpf: Migrate test_xdp_vlan.sh into test_progs

2025-02-21 Thread Stanislav Fomichev
On 02/21, Bastien Curutchet (eBPF Foundation) wrote: > test_xdp_vlan.sh isn't used by the BPF CI. > > Migrate test_xdp_vlan.sh in prog_tests/xdp_vlan.c. > It uses the same BPF programs located in progs/test_xdp_vlan.c and the > same network topology. > Remove test_xdp_vlan*.sh and their Makefile e

Re: [PATCH bpf-next v2 0/4] selftests/bpf: tc_links/tc_opts: Unserialize tests

2025-02-19 Thread Stanislav Fomichev
; PATCH 3 & 4 convert some tests to use these dedicated namespaces. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > > --- > Changes in v2: > - Handle the netns creation / opening directly in test_progs > - Link to v1: > https://lore.kernel.org/bpf/e3838d93-04e3-4e96-af53-e9e63550d...@bootlin.com Acked-by: Stanislav Fomichev Thanks, looks very nice!

Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests

2025-02-18 Thread Stanislav Fomichev
n. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) > Acked-by: Stanislav Fomichev LGTM, thank you! Optionally, if there is more to convert, we can think about moving create_and_open_tid_ns to the test_progs itself. For example, if the test name starts with ns_,

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Stanislav Fomichev
On 02/11, Joe Damato wrote: > On Tue, Feb 11, 2025 at 12:00:38PM -0800, Stanislav Fomichev wrote: > > On 02/11, Joe Damato wrote: > > > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > > > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: >

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Stanislav Fomichev
On 02/11, Joe Damato wrote: > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > > > On 2/10/25 8:38 PM, Joe Damato wrote: > > > > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None: > > > > +test_dir = os.path.dirname(os.

Re: [PATCH bpf-next v2 00/10] selftests/bpf: Migrate test_xdp_redirect_multi.sh to test_progs

2025-01-23 Thread Stanislav Fomichev
t we want them serial mostly because of the hard-coded namespace names? If yes, might be a good idea to follow up (separately) with a way to generate unique name for each subtest and unserialize them. (If you have time/desire, I think there is a bunch of similar cases where we have to serialize tes

Re: [PATCH bpf] selftests/bpf: add XDP_UMEM_TX_METADATA_LEN flag to umem_config

2024-12-20 Thread Stanislav Fomichev
On 12/20, Wei Fang wrote: > The Tx metadata test has been broken since the commit d5e726d9143c ("xsk: > Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len"). Because > this change requires XDP_UMEM_TX_METADATA_LEN flag to be set, otherwise > xsk_buff_pool::tx_metadata_len will be initializ

Re: [PATCH bpf-next 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata

2024-12-05 Thread Stanislav Fomichev
On 12/05, Song, Yoong Siang wrote: > On Wednesday, December 4, 2024 11:49 PM, Stanislav Fomichev > wrote: > >On 12/04, Song Yoong Siang wrote: > >> Set tx_type to HWTSTAMP_TX_ON to enable hardware timestamping for all > >> outgoing packets. > >> > >&g

Re: [PATCH net-next v2] selftests: net: cleanup busy_poller.c

2024-12-04 Thread Stanislav Fomichev
ing for overall hygenie. > - initialize napi_id = 0 in setup_queue to avoid warnings on some > compilers. > > Signed-off-by: Joe Damato > --- > v2: >- initialize napi_id to 0 in setup_queue to avoid clang warning as > suggested by Stanislav. Tested with clang 10.0.0 and 18.1.8 Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 1/1] selftests/bpf: Enable Tx hwtstamp in xdp_hw_metadata

2024-12-04 Thread Stanislav Fomichev
device are you testing against? I do see some hwts_tx_en checks in the stfmmac at least... Can you add these details to the commit message and respin? With the above addressed: Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next] tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind

2024-12-04 Thread Stanislav Fomichev
On 12/03, Marco Leogrande wrote: > On Mon, Dec 2, 2024 at 4:15 PM Stanislav Fomichev > wrote: > > Do you see this failing in your CI or in the BPF CI? > > I see this failing in our internal CI, in around 1% to 2% of the CI runs. > > > It seems ok > > t

Re: [PATCH net-next] selftests: net: cleanup busy_poller.c

2024-12-02 Thread Stanislav Fomichev
On 12/03, Joe Damato wrote: > Fix various integer type conversions by using strtoull and a temporary > variable which is bounds checked before being casted into the > appropriate cfg_* variable for use by the test program. > > While here, free the strdup'd cfg string for overall hygenie. Thank yo

Re: [PATCH bpf-next] tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind

2024-12-02 Thread Stanislav Fomichev
On 12/02, Marco Leogrande wrote: > Commit f803bcf9208a ("selftests/bpf: Prevent client connect before > server bind in test_tc_tunnel.sh") added code that waits for the > netcat server to start before the netcat client attempts to connect to > it. However, not all calls to 'server_listen' were guar

Re: [PATCH bpf-next] selftests/bpf: ensure proper root namespace cleanup when test fail

2024-12-02 Thread Stanislav Fomichev
not test errno value if the tested operation do not fail. > > Fixes: 284ed00a59dd ("selftests/bpf: migrate flow_dissector namespace > exclusivity test") > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v3 10/14] selftests/bpf: document pseudo-header checksum helpers

2024-11-20 Thread Stanislav Fomichev
e documentation. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v3 13/14] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-20 Thread Stanislav Fomichev
ssector.sh) > > Convert test_flow_dissector.sh into test_progs so that the corresponding > tests are also run in CI. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v3 12/14] selftests/bpf: add network helpers to generate udp checksums

2024-11-20 Thread Stanislav Fomichev
ned-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v3 11/14] selftests/bpf: use the same udp and tcp headers in tests under test_progs

2024-11-20 Thread Stanislav Fomichev
e change needs to be done in the eBPF > program part as well, because of some headers sharing between both > sides. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v3 09/14] selftests/bpf: move ip checksum helper to network helpers

2024-11-20 Thread Stanislav Fomichev
On 11/20, Alexis Lothoré (eBPF Foundation) wrote: > xdp_metadata test has a small helper computing ipv4 checksums to allow > manually building packets. > > Move this helper to network_helpers to share it with other tests. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) A

Re: [PATCH bpf-next v2 11/13] selftests/bpf: add network helpers to generate udp checksums

2024-11-15 Thread Stanislav Fomichev
On 11/14, Alexis Lothoré (eBPF Foundation) wrote: > network_helpers.c provides some helpers to generate ip checksums or ip > pseudo-header checksums, but not for upper layers (eg: udp checksums) > > Add helpers for udp checksum to allow manually building udp packets. > > Signed-off-by: Alexis Lot

Re: [PATCH bpf-next v2 04/13] selftests/bpf: re-split main function into dedicated tests

2024-11-15 Thread Stanislav Fomichev
ests. Each test now must have > its own setup/teardown, but for the advantage of being able to run them > separately. While at it, make sure that tests attaching the bpf programs > are run in a dedicated ns. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v2 10/13] selftests/bpf: rename pseudo headers checksum computation

2024-11-15 Thread Stanislav Fomichev
On 11/14, Alexis Lothoré (eBPF Foundation) wrote: > network_helpers.h provides helpers to compute checksum for pseudo > headers but no helpers to compute the global checksums. > > Before adding those, rename the pseudo header checksum helper to clarify > their role. Same here: let's keep the old

Re: [PATCH bpf-next v2 12/13] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-15 Thread Stanislav Fomichev
On 11/14, Alexis Lothoré (eBPF Foundation) wrote: > test_flow_dissector.sh loads flow_dissector program and subprograms, > creates and configured relevant tunnels and interfaces, and ensure that > the bpf dissection is actually performed correctly. Similar tests exist > in test_progs (thanks to flo

Re: [PATCH bpf-next v2 07/13] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-15 Thread Stanislav Fomichev
> any other test. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v2 01/13] selftests/bpf: add a macro to compare raw memory

2024-11-15 Thread Stanislav Fomichev
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 01 00 00 00 00 00 00 00 > [...] > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next v2 09/13] selftests/bpf: move ip checksum helper to network helpers

2024-11-15 Thread Stanislav Fomichev
On 11/14, Alexis Lothoré (eBPF Foundation) wrote: > xdp_metadata test has a small helper computing ipv checksums to allow > manually building packets. > > Move this helper to network_helpers to share it with other tests. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) > --- > Changes in v2:

Re: [PATCH bpf-next 10/10] selftests/bpf: remove test_flow_dissector.sh

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > Now that test_flow_dissector.sh has been converted to test_progs, remove > the legacy test. > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 09/10] selftests/bpf: migrate bpf flow dissectors tests to test_progs

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > test_flow_dissector.sh loads flow_dissector program and subprograms, > creates and configured relevant tunnels and interfaces, and ensure that > the bpf dissection is actually performed correctly. Similar tests exist > in test_progs (thanks to flo

Re: [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré wrote: > On 11/13/24 14:53, Alexis Lothoré (eBPF Foundation) wrote: > > [...] > > > + ns = open_netns(TEST_NS); > > + bpf_prog_detach2(prog_fd, 0, BPF_FLOW_DISSECTOR); > > + close_netns(ns); > > I would like to mention that I initially planned to directly delete th

Re: [PATCH bpf-next 02/10] selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys

2024-11-13 Thread Stanislav Fomichev
lows to get rid of the unused bpf_test_run_opts variable in > run_tests_skb_less (it was only used by the CHECK macro for its duration > field) > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 08/10] selftests/bpf: Enable generic tc actions in selftests config

2024-11-13 Thread Stanislav Fomichev
ion) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 06/10] selftests/bpf: add gre packets testing to flow_dissector

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The bpf_flow program is able to handle GRE headers in IP packets. Add a > few test data input simulating those GRE packets, with 2 different > cases: > - parse GRE and the encapsulated packet > - parse GRE only Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 05/10] selftests/bpf: expose all subtests from flow_dissector

2024-11-13 Thread Stanislav Fomichev
h a specific input only. > > Expose all subtests executed by flow_dissector by using > test__start_subtest(). > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > The flow_dissector runs plenty of tests over diffent kind of packets, > grouped into three categories: skb mode, non-skb mode with direct > attach, and non-skb with indirect attach. > > Re-split the main function into dedicated tests. Each test n

Re: [PATCH bpf-next 03/10] selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test

2024-11-13 Thread Stanislav Fomichev
he CHECK macros > > Signed-off-by: Alexis Lothoré (eBPF Foundation) Acked-by: Stanislav Fomichev

Re: [PATCH bpf-next 01/10] selftests/bpf: add a macro to compare raw memory

2024-11-13 Thread Stanislav Fomichev
On 11/13, Alexis Lothoré (eBPF Foundation) wrote: > We sometimes need to compare whole structures in an assert. It is > possible to use the existing macros on each field, but when the whole > structure has to be checked, it is more convenient to simply compare the > whole structure memory > > Add

Re: [PATCH net-next v8 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-11-07 Thread Stanislav Fomichev
On 11/07, Joe Damato wrote: > On Thu, Nov 07, 2024 at 10:11:59AM -0800, Stanislav Fomichev wrote: > > The goal of the series is to simplify and make it possible to use > > ncdevmem in an automated way from the ksft python wrapper. > > > > ncdevmem is slowly mutated

[PATCH net-next v8 11/12] selftests: ncdevmem: Move ncdevmem under drivers/net/hw

2024-11-07 Thread Stanislav Fomichev
This is where all the tests that depend on the HW functionality live in and this is where the automated test is gonna be added in the next patch. Reviewed-by: Mina Almasry Signed-off-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/.gitignore | 1 + tools/testing

  1   2   3   4   >