Re: [PATCH net 1/4] selftests: openvswitch: Add version check for pyroute2

2023-10-10 Thread Paolo Abeni
On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: > Paolo Abeni reports that on some systems the pyroute2 version isn't > new enough to run the test suite. Ensure that we support a minimum > version of 0.6 for all cases (which does include the existing ones). > The 0.6.1 ver

Re: [PATCH net 3/4] selftests: openvswitch: Skip drop testing on older kernels

2023-10-10 Thread Paolo Abeni
On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: > Kernels that don't have support for openvswitch drop reasons also > won't have the drop counter reasons, so we should skip the test > completely. It previously wasn't possible to build a test case > for this without polluting the datapath, s

Re: [PATCH net 4/4] selftests: openvswitch: Fix the ct_tuple for v4

2023-10-10 Thread Paolo Abeni
On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote: > Caught during code review. Since there are a few other small things, please additionally expand this changelog briefly describing the addressed problem and it's consequences. Thanks, Paolo

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
at checks whether the ports in the namespace are ready for > use. > > Suggested-by: Paolo Abeni > Signed-off-by: Lucas Karpinski > --- > https://lore.kernel.org/all/t7v6mmuobrbucyfpwqbcujtvpa3wxnsrc36cz5rr6kzzrzkwtj@toz6mr4ggnyp/ > > Changelog v2: > - applied synchroni

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
at checks whether the ports in the namespace are ready for > use. > > Suggested-by: Paolo Abeni > Signed-off-by: Lucas Karpinski > --- > https://lore.kernel.org/all/t7v6mmuobrbucyfpwqbcujtvpa3wxnsrc36cz5rr6kzzrzkwtj@toz6mr4ggnyp/ > I almost forgot ... > Changelog v2: > -

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
On Tue, 2023-10-31 at 09:26 -0400, Lucas Karpinski wrote: > > Since you wrote the same function verbatim in 3 different files, I > > think it would be better place it in separate, new, net_helper.sh > > file > > and include such file from the various callers. Possibly > > additionally > > rename th

Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +int netdev_bind_dmabuf(struct net_device *dev, unsigned int dmabuf_fd, > +struct netdev_dmabuf_binding **out) > +{ > + struct netdev_dmabuf_binding *binding; > + struct scatterlist *sg; > + struct dma_bu

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +void netdev_free_devmem(struct page_pool_iov *ppiov) > +{ > + struct netdev_dmabuf_binding *binding = page_pool_iov_binding(ppiov); > + > + refcount_set(&ppiov->refcount, 1); > + > + if (gen_pool_has_addr(binding->chunk_poo

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > Overload the LSB of struct page* to indicate that it's a page_pool_iov. > > Refactor mm calls on struct page* into helpers, and add page_pool_iov > handling on those helpers. Modify callers of these mm APIs with calls to > these helpers inst

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > @@ -3421,7 +3446,7 @@ static inline struct page *skb_frag_page(const > skb_frag_t *frag) > */ > static inline void __skb_frag_ref(skb_frag_t *frag) > { > - get_page(skb_frag_page(frag)); > + page_pool_page_get_many(frag->bv

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +/* On error, returns the -errno. On success, returns number of bytes sent to > the > + * user. May not consume all of @remaining_len. > + */ > +static int tcp_recvmsg_devmem(const struct sock *sk, const struct sk_buff > *skb, > +

Re: [RFC PATCH v3 12/12] selftests: add ncdevmem, netcat for devmem TCP

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > @@ -91,6 +95,7 @@ TEST_PROGS += test_bridge_neigh_suppress.sh > TEST_PROGS += test_vxlan_nolocalbypass.sh > TEST_PROGS += test_bridge_backup_port.sh > TEST_PROGS += fdb_flush.sh > +TEST_GEN_FILES += ncdevmem I guess we want something adde

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-09 Thread Paolo Abeni
On Mon, 2023-11-06 at 14:55 -0800, Willem de Bruijn wrote: > On Mon, Nov 6, 2023 at 2:34 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > IMHO, we need a better UAPI to receive the tokens and give them back > > > > > to > > > > > the kernel. CMSG + setsockopt(SO_D

Re: [RFC PATCH v3 02/12] net: page_pool: create hooks for custom page providers

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h > index 6fc5134095ed..d4bea053bb7e 100644 > --- a/include/net/page_pool/types.h > +++ b/include/net/page_pool/types.h > @@ -60,6 +60,8 @@ struct page_pool_params { >

Re: [Discuss] Seeking advice on net selftests netns naming method

2023-11-14 Thread Paolo Abeni
On Tue, 2023-11-14 at 17:55 +0800, Hangbin Liu wrote: > Good day! Following Guillaume's suggestion, I've been working on updating all > net self-tests to run in their respective netns. This modification allows us > to execute all tests in parallel, potentially saving a significant amount of > test

Re: [Discuss] Seeking advice on net selftests netns naming method

2023-11-15 Thread Paolo Abeni
On Wed, 2023-11-15 at 15:51 +0800, Hangbin Liu wrote: > On Tue, Nov 14, 2023 at 12:02:00PM +0100, Paolo Abeni wrote: > > I personally would like sort of both :) e.g. lib function(s) to > > automatically create and dispose netns, and retain a script- > > specific/related name

Re: [PATCHv3 net-next 01/14] selftests/net: add lib.sh

2023-12-05 Thread Paolo Abeni
On Sat, 2023-12-02 at 10:00 +0800, Hangbin Liu wrote: > Add a lib.sh for net selftests. This file can be used to define commonly > used variables and functions. Some commonly used functions can be moved > from forwarding/lib.sh to this lib file. e.g. busywait(). > > Add function setup_ns() for use

Re: [PATCHv3 net-next 01/14] selftests/net: add lib.sh

2023-12-06 Thread Paolo Abeni
On Wed, 2023-12-06 at 13:32 +0100, Petr Machata wrote: > Paolo Abeni writes: > > > Side note for a possible follow-up: if you maintain $ns_list as global > > variable, and remove from such list the ns deleted by cleanup_ns, you > > could remove the cleanup trap from

Re: [PATCH] selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS

2024-01-11 Thread Paolo Abeni
.org/software/make/manual/html_node/Implicit-Variables.html > > Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") > Reported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202401011151.veyytjzq-...@intel.com/ > Signed-off-by: Dmitry Safonov Acked-by: Paolo Abeni

Re: [PATCH net 2/2] selftests: forwarding: Remove executable bits from lib.sh

2024-01-16 Thread Paolo Abeni
On Wed, 2024-01-10 at 09:14 -0500, Benjamin Poirier wrote: > The lib.sh script is meant to be sourced from other scripts, not executed > directly. Therefore, remove the executable bits from lib.sh's permissions. LGTM, but there is any special reason to not fix the permissions of other *lib.sh file

Re: [PATCH net] selftests: netdevsim: add a config file

2024-01-16 Thread Paolo Abeni
On Tue, 2024-01-16 at 07:43 -0800, Jakub Kicinski wrote: > netdevsim tests aren't very well integrated with kselftest, > which has its advantages and disadvantages.  Out of sheer ignorance I don't see the advantage?!? > But regardless > of the intended integration - a config file to know what ker

Re: [PATCH net] selftests: netdevsim: add a config file

2024-01-17 Thread Paolo Abeni
On Tue, 2024-01-16 at 10:34 -0800, Jakub Kicinski wrote: > On Tue, 16 Jan 2024 18:40:49 +0100 Paolo Abeni wrote: > > On Tue, 2024-01-16 at 07:43 -0800, Jakub Kicinski wrote: > > > netdevsim tests aren't very well integrated with kselftest, > > > which has

Re: [PATCH net] selftests: netdevsim: add a config file

2024-01-18 Thread Paolo Abeni
On Wed, 2024-01-17 at 07:39 -0800, Jakub Kicinski wrote: > On Wed, 17 Jan 2024 10:32:19 +0100 Paolo Abeni wrote: > > > > I think something like the following should do: > > > > cd tools/testing/selftests > > make TARGETS="net drivers/net/bonding <...ful

Re: [PATCH net] selftests: netdevsim: fix the udp_tunnel_nic test

2024-01-23 Thread Paolo Abeni
o, before noticing it's actually consistent with the whole script :) Do you think we should look at dropping ifconfig usage from self-tests? I guess that in the long run most systems should not have such command available in the default install. In any case the patch LGTM. Acked-by: Paolo Abeni Cheers, Paolo

Re: [PATCH net] selftests/net/lib: update busywait timeout value

2024-01-23 Thread Paolo Abeni
On Mon, 2024-01-22 at 17:05 +0800, Hangbin Liu wrote: > The busywait timeout value is a millisecond, not a second. So the > current setting 2 is meaningless. Let's copy the WAIT_TIMEOUT from > forwarding/lib.sh and set a BUSYWAIT_TIMEOUT here. > > Signed-off-by: Hangbin Liu > --- > Not sure if th

[PATCH net 0/3] selftests: net: a few fixes

2024-01-24 Thread Paolo Abeni
/kselftest_install/run_kselftest.sh \ -t "net:udpgro_bench.sh net:udpgro.sh net:udpgro_fwd.sh \ net:udpgro_frglist.sh net:veth.sh" no failures. Paolo Abeni (3): selftests: net: remove dependency on ebpf tests selftests: net: included needed helper in the install targets self

[PATCH net 1/3] selftests: net: remove dependency on ebpf tests

2024-01-24 Thread Paolo Abeni
bogus dependency. Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/Makefile | 5 +++-- tools/testing/selftests/net/udpgro.sh | 4 ++-- tools/testing/selftests/net/udpgro_bench.sh | 4 ++-- tools/testing/selftests/net/udpgro_frglist.sh | 6 +++--- tools/te

[PATCH net 3/3] selftests: net: explicitly wait for listener ready

2024-01-24 Thread Paolo Abeni
("selftests: net: add UDP GRO forwarding self-tests") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/udpgro_fwd.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/udpgro_fwd.sh b/tools/testing/selftests/net/udpgro_fwd.sh index 5f

[PATCH net 2/3] selftests: net: included needed helper in the install targets

2024-01-24 Thread Paolo Abeni
issue updating the install targets. Fixes: 3bdd9fd29cb0 ("selftests/net: synchronize udpgro tests' tx and rx connection") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/Makefile

Re: [PATCH net 1/3] selftests: net: remove dependency on ebpf tests

2024-01-24 Thread Paolo Abeni
On Wed, 2024-01-24 at 20:10 -0500, Willem de Bruijn wrote: > Paolo Abeni wrote: > > Several net tests requires an XDP program build under the ebpf > > directory, and error out if such program is not available. > > > > That makes running successful net test hard, let&#

[PATCH net] selftests: net: add missing required classifier

2024-01-25 Thread Paolo Abeni
. # We have an error talking to the kernel # Error: TC classifier not found. # We have an error talking to the kernel Add the missing knob. Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/config | 1

Re: [PATCH net] selftests: net: add missing required classifier

2024-01-25 Thread Paolo Abeni
On Thu, 2024-01-25 at 09:48 +0100, Eric Dumazet wrote: > On Thu, Jan 25, 2024 at 9:23 AM Paolo Abeni wrote: > > > > the udpgro_fraglist self-test uses the BPF classifiers, but the > > current net self-test configuration does not include it, causing > > CI failures:

Re: [PATCH net 1/3] selftests: net: remove dependency on ebpf tests

2024-01-25 Thread Paolo Abeni
On Thu, 2024-01-25 at 09:27 -0500, Willem de Bruijn wrote: > Paolo Abeni wrote: > > On Wed, 2024-01-24 at 20:10 -0500, Willem de Bruijn wrote: > > > Paolo Abeni wrote: > > > > Several net tests requires an XDP program build under the ebpf > > > > direc

Re: [PATCH net] selftests: net: add missing required classifier

2024-01-25 Thread Paolo Abeni
On Thu, 2024-01-25 at 15:10 +0100, Eric Dumazet wrote: > On Thu, Jan 25, 2024 at 12:38 PM Paolo Abeni wrote: > > > > On Thu, 2024-01-25 at 09:48 +0100, Eric Dumazet wrote: > > > On Thu, Jan 25, 2024 at 9:23 AM Paolo Abeni wrote: > > > > > > >

[PATCH net] selftests: net: give more time for GRO aggregation

2024-01-25 Thread Paolo Abeni
make the relevant segments reach the GRO engine after the flush timeout triggers. Give the GRO flush timeout more slack, to avoid sporadic self-tests failures. Fixes: 9af771d2ec04 ("selftests/net: allow GRO coalesce test on veth") Signed-off-by: Paolo Abeni --- tools/testing/sel

[PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Paolo Abeni
GRO | GW GSO | SER GRO # ./big_tcp.sh: line 107: test: !=: unary operator expected ... # onon on on : [FAIL_on_link1] Add the missing configs Fixes: 6bb382bcf742 ("selftests: add a selftest for big tcp") Signed-off-by: Paolo Abeni --- tools/testing/sel

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Paolo Abeni
On Fri, 2024-01-26 at 11:18 -0500, Aaron Conole wrote: > Paolo Abeni writes: > > > The big_tcp test-case requires a few kernel knobs currently > > not specified in the net selftests config, causing the > > following failure: > > > > # selftests: net: big_

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-29 Thread Paolo Abeni
On Fri, 2024-01-26 at 11:55 -0800, Jakub Kicinski wrote: > On Fri, 26 Jan 2024 16:32:36 +0100 Paolo Abeni wrote: > > The big_tcp test-case requires a few kernel knobs currently > > not specified in the net selftests config, causing the > > following failure: > > > &g

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-29 Thread Paolo Abeni
On Mon, 2024-01-29 at 10:11 +0100, Paolo Abeni wrote: > On Fri, 2024-01-26 at 11:55 -0800, Jakub Kicinski wrote: > > On Fri, 26 Jan 2024 16:32:36 +0100 Paolo Abeni wrote: > > > The big_tcp test-case requires a few kernel knobs currently > > > not specified in the net se

[PATCH net 0/3] selftests: net: a few pmtu.sh fixes

2024-01-30 Thread Paolo Abeni
. --user root -- \ ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:pmtu.sh Paolo Abeni (3): selftests: net: add missing config for pmtu.sh tests selftests: net: fix available tunnels detection selftests: net: don't access /dev/stdout in pmtu.sh tools/te

[PATCH net 1/3] selftests: net: add missing config for pmtu.sh tests

2024-01-30 Thread Paolo Abeni
DSCP and ECN") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config index d4b38177ed04..88835cdbf0ea 100644 --- a/tools/testing/selftests/net/config +

[PATCH net 2/3] selftests: net: fix available tunnels detection

2024-01-30 Thread Paolo Abeni
kill: (7544) - No such process After: # xfrm4 not supported # TEST: vti4: PMTU exceptions [SKIP] Fixes: ece1278a9b81 ("selftests: net: add ESP-in-UDP PMTU test") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/pmtu.sh | 16 -

[PATCH net 3/3] selftests: net: don't access /dev/stdout in pmtu.sh

2024-01-30 Thread Paolo Abeni
the above: # TEST: IPv4, bridged vxlan4: PMTU exceptions - nexthop objects [ OK ] Fixes: 136a1b434bbb ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/pmtu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-30 Thread Paolo Abeni
On Mon, 2024-01-29 at 08:39 -0800, Jakub Kicinski wrote: > On Mon, 29 Jan 2024 17:31:33 +0100 Paolo Abeni wrote: > > Uhm... while the self-test doesn't emit anymore the message related to > > the missing modules, it still fails in the CI env and I can't reproduce > &g

[PATCH net 0/3] selftests: net: more fixes

2024-01-31 Thread Paolo Abeni
Another small bunch of fixes, addressing issues outlined by the netdev CI. Paolo Abeni (3): selftests: net: cut more slack for gro fwd tests. selftests: net: fix setup_ns usage in rtnetlink.sh selftests: net: enable some more knobs tools/testing/selftests/net/config| 3

[PATCH net 2/3] selftests: net: fix setup_ns usage in rtnetlink.sh

2024-01-31 Thread Paolo Abeni
ns in bonding test") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/rtnetlink.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 4667d74579d1..874a2952aa8e 100755 -

[PATCH net 1/3] selftests: net: cut more slack for gro fwd tests.

2024-01-31 Thread Paolo Abeni
tests: net: add UDP GRO forwarding self-tests") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/udpgro_fwd.sh | 14 -- tools/testing/selftests/net/udpgso_bench_rx.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/testing/sel

[PATCH net 3/3] selftests: net: enable some more knobs

2024-01-31 Thread Paolo Abeni
The rtnetlink tests require additional options currently off by default. Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test") Fixes: 5e596ee171ba ("selftests: add xfrm state-policy-monitor to rtnetlink.sh") Signed-off-by: Paolo Abeni --- tools/testing/

Re: [PATCH net-next] selftests/net: calibrate txtimestamp

2024-01-31 Thread Paolo Abeni
On Wed, 2024-01-31 at 10:06 -0500, Willem de Bruijn wrote: > Otherwise I'll start with the gro and so-txtime tests. They may not > be so easily calibrated. As we cannot control the gro timeout, nor > the FQ max horizon. Note that we can control the GRO timeout to some extent, via gro_flush_timeou

Re: [PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Paolo Abeni
On Thu, 2024-02-01 at 10:05 +0200, Ido Schimmel wrote: > The test toggles the carrier of a bridge port in order to test the > bridge backup port feature. > > Due to the linkwatch delayed work the carrier change is not always > reflected fast enough to the bridge driver and packets are not forwarde

Re: [PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Paolo Abeni
On Thu, 2024-02-01 at 13:16 +0200, Ido Schimmel wrote: > On Thu, Feb 01, 2024 at 10:34:52AM +0100, Paolo Abeni wrote: > > What about adding an helper alike wait_local_port_listen(), checking > > for bridge link status in short intervals, to likely reduce the overall > > wait

[PATCH v2 net 0/4] selftests: net: more fixes

2024-02-01 Thread Paolo Abeni
Another small bunch of fixes, addressing issues outlined by the netdev CI. The first 2 patches are just rebased. The following 2 are new fixes, for even more problems that surfaced meanwhile. Paolo Abeni (4): selftests: net: cut more slack for gro fwd tests. selftests: net: fix setup_ns

[PATCH v2 net 1/4] selftests: net: cut more slack for gro fwd tests.

2024-02-01 Thread Paolo Abeni
tests: net: add UDP GRO forwarding self-tests") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/udpgro_fwd.sh | 14 -- tools/testing/selftests/net/udpgso_bench_rx.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/testing/sel

[PATCH v2 net 2/4] selftests: net: fix setup_ns usage in rtnetlink.sh

2024-02-01 Thread Paolo Abeni
ns in bonding test") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/rtnetlink.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 4667d74579d1..874a2952aa8e 100755 -

[PATCH v2 net 3/4] selftests: net: fix tcp listener handling in pmtu.sh

2024-02-01 Thread Paolo Abeni
: 136a1b434bbb ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/pmtu.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh index 3f

[PATCH v2 net 4/4] selftests: net: avoid just another constant wait

2024-02-01 Thread Paolo Abeni
anner, PMTU dst likely leaked Replace the crude sleep with a loop looking for the expected condition at low interval for a much longer range. Fixes: b3cc4f8a8a41 ("selftests: pmtu: add explicit tests for PMTU exceptions cleanup") Signed-off-by: Paolo Abeni --- tools/testing/selftests/n

[PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Paolo Abeni
larger write operations. Note that is hard to observe the issue without an extremely slow and/or overloaded environment; reduce the TCP transfer time to allow for much easier/faster reproducibility. Fixes: 6bb382bcf742 ("selftests: add a selftest for big tcp") Signed-off-by: P

Re: [PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-02 Thread Paolo Abeni
On Fri, 2024-02-02 at 17:13 +0100, Eric Dumazet wrote: > On Fri, Feb 2, 2024 at 5:07 PM Paolo Abeni wrote: > > > > In very slow environments, most big TCP cases including > > segmentation and reassembly of big TCP packets have a good > > chance to fail: by default the

Re: [PATCH v2 net 2/4] selftests: net: fix setup_ns usage in rtnetlink.sh

2024-02-02 Thread Paolo Abeni
On Thu, 2024-02-01 at 19:42 +0100, Paolo Abeni wrote: > The setup_ns helper marks the testns global variable as > readonly. Later attempts to set such variable are unsuccessful, > causing a couple test failures. > > Avoid completely the variable re-initialization and let the > f

Re: [PATCH net-next] selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW

2024-02-06 Thread Paolo Abeni
On Fri, 2024-02-02 at 19:31 -0500, Willem de Bruijn wrote: > Jakub Kicinski wrote: > > On Thu, 1 Feb 2024 11:21:19 -0500 Willem de Bruijn wrote: > > > This test is time sensitive. It may fail on virtual machines and for > > > debug builds. > > > > > > Continue to run in these environments to get

[PATCH net] selftests: net: cope with slow env in gro.sh test

2024-02-06 Thread Paolo Abeni
arge' test-case. Address the issue explicitly ignoring failures for such case in slow environments (KSFT_MACHINE_SLOW==true). Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test") Signed-off-by: Paolo Abeni --- Note that the fixes tag is there mainly to justify targeting the net tr

[PATCH net-next] selftests: net: include forwarding lib

2024-02-07 Thread Paolo Abeni
commit 2a0683be5b4c ("selftests: Introduce Makefile variable to list shared bash scripts") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Make

Re: [PATCH net] selftests: net: cope with slow env in gro.sh test

2024-02-07 Thread Paolo Abeni
On Wed, 2024-02-07 at 12:16 +0100, Matthieu Baerts wrote: > Hi Paolo, > > On 06/02/2024 16:27, Paolo Abeni wrote: > > The gro self-tests sends the packets to be aggregated with > > multiple write operations. > > > > When running is slow environment, it's har

[PATCH net] selftests: net: add more missing kernel config

2024-02-07 Thread Paolo Abeni
The reuseport_addr_any.sh is currently skipping DCCP tests and pmtu.sh is skipping all the FOU/GUE related cases: add the missing options. Signed-off-by: Paolo Abeni --- Note that this does not include the - still missing - OVS-related option and pmtu.sh is will keep skipping such cases. Such

[PATCH net v2] selftests: net: cope with slow env in gro.sh test

2024-02-07 Thread Paolo Abeni
arge' test-case. Address the issue explicitly ignoring failures for such case in slow environments (KSFT_MACHINE_SLOW==true). Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test") Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni --- v1 -> v2: - replace the '-a&#

[PATCH net] selftests: net: wait for receiver startup in so_txtime.sh

2024-02-08 Thread Paolo Abeni
before the receiver is ready, so that the later recv times out. Address the issue explcitly waiting for the socket being bound to the relevant port. Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ") Signed-off-by: Paolo Abeni --- Note that to really cope with slow env the ment

Re: [PATCH net v2] selftests: net: Fix bridge backup port test flakiness

2024-02-08 Thread Paolo Abeni
453053fb ("selftests: net: Add bridge backup port and backup > nexthop ID test") > Signed-off-by: Ido Schimmel > Reviewed-by: Petr Machata > --- > > Notes: > v2: > * Use busy waiting instead of 1 second sleep. Fine by be, thanks! Acked-by: Paolo Abeni

[PATCH net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW

2024-02-08 Thread Paolo Abeni
This test is time sensitive. It may fail on virtual machines and for debug builds. Similar to commit c41dfb0dfbec ("selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW"), optionally suppress failure for timing errors (only). Signed-off-by: Paolo Abeni --- too

Re: [PATCH net] selftests: net: wait for receiver startup in so_txtime.sh

2024-02-09 Thread Paolo Abeni
On Thu, 2024-02-08 at 16:45 +0100, Paolo Abeni wrote: > The mentioned test is failing in slow environments: > > # SO_TXTIME ipv4 clock monotonic > # ./so_txtime: recv: timeout: Resource temporarily unavailable > not ok 1 selftests: net: so_txtime.sh # exit=1 > > The r

Re: [PATCH net] selftests: net: wait for receiver startup in so_txtime.sh

2024-02-09 Thread Paolo Abeni
On Fri, 2024-02-09 at 15:51 +0100, Paolo Abeni wrote: > On Thu, 2024-02-08 at 16:45 +0100, Paolo Abeni wrote: > > The mentioned test is failing in slow environments: > > > > # SO_TXTIME ipv4 clock monotonic > > # ./so_txtime: recv: timeout: Resource temporarily

Re: [PATCH net] selftests: net: wait for receiver startup in so_txtime.sh

2024-02-11 Thread Paolo Abeni
On Fri, 2024-02-09 at 11:17 -0800, Jakub Kicinski wrote: > On Fri, 09 Feb 2024 17:45:28 +0100 Paolo Abeni wrote: > > But I'm pretty sure that even with that there will be sporadic failures > > in slow enough environments. > > > > When the host-induced jitter/d

Re: [PATCH net v2] selftests: net: cope with slow env in gro.sh test

2024-02-12 Thread Paolo Abeni
On Fri, 2024-02-09 at 11:15 -0800, Jakub Kicinski wrote: > On Wed, 7 Feb 2024 19:36:46 +0100 Paolo Abeni wrote: > > +if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" ]]; then > > +echo "Ignoring errors due to slow environment"

[PATCH v3 net] selftests: net: cope with slow env in gro.sh test

2024-02-12 Thread Paolo Abeni
arge' test-case. Address the issue explicitly ignoring failures for such case in slow environments (KSFT_MACHINE_SLOW==true). Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test") Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni --- v2 -> v3: - dump the error suppre

[PATCH net] selftests: net: cope with slow env in so_txtime.sh test

2024-02-12 Thread Paolo Abeni
environment. Just resort to suppress any error in such cases. Note to suppress them we need first to refactor a bit the code moving it to explicit error handling. Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ") Signed-off-by: Paolo Abeni --- tools/testing/sel

[PATCH net 0/2] selftests: net: more pmtu.sh fixes

2024-02-12 Thread Paolo Abeni
The mentioned test is still flaky, unusally enough in 'fast' environments. Patch 2/2 [try to] address the existing issues, while patch 1/2 introduces more strict tests for the existing net helpers, to hopefully prevent future pain. Paolo Abeni (2): selftests: net: more stric

[PATCH net 1/2] selftests: net: more strict check in net_helper

2024-02-12 Thread Paolo Abeni
TCP sockets. Fixes: 3bdd9fd29cb0 ("selftests/net: synchronize udpgro tests' tx and rx connection") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/net_helper.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/n

[PATCH net 2/2] selftests: net: more pmtu.sh fixes

2024-02-12 Thread Paolo Abeni
("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/pmtu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh index d6

Re: [RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Paolo Abeni
On Fri, 2024-02-16 at 10:28 -0500, Aaron Conole wrote: > Many openvswitch test cases reused netns and interface names. This works > fine as long as the test case cleans up gracefully. However, if there is > some kind of ungraceful termination (such as an external signal) the netns > or interfaces

Re: [PATCH net 1/2] ioam6: fix write to cloned skb in ipv6_hop_ioam()

2024-02-19 Thread Paolo Abeni
> check. This commit provides a fix for the input path, inside > ipv6_hop_ioam(). > > Fixes: 9ee11f0fff20 ("ipv6: ioam: Data plane support for Pre-allocated Trace > ") > Reported-by: Paolo Abeni > Signed-off-by: Justin Iurman > --- > net/ipv6/exthdrs.c | 8 ++

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-19 Thread Paolo Abeni
On Mon, 2024-02-19 at 18:35 +0100, Eric Dumazet wrote: > On Mon, Feb 19, 2024 at 6:21 PM Eric Dumazet wrote: > > > > On Thu, Feb 15, 2024 at 7:25 PM Matthieu Baerts (NGI0) > > wrote: > > > > > > From: Paolo Abeni > > > > > > Sinc

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-20 Thread Paolo Abeni
On Mon, 2024-02-19 at 19:33 +0100, Eric Dumazet wrote: > On Mon, Feb 19, 2024 at 7:04 PM Paolo Abeni wrote: > > Thanks for the head-up. This later option looks preferable, to avoid > > quit a bit of noise with _ONCE annotation. Is there a syzkaller splat I > > could look at

Re: [PATCH net-next v3 00/11] selftests: kselftest_harness: support using xfail

2024-02-21 Thread Paolo Abeni
On Tue, 2024-02-20 at 11:22 -0800, Jakub Kicinski wrote: > When running selftests for our subsystem in our CI we'd like all > tests to pass. Currently some tests use SKIP for cases they > expect to fail, because the kselftest_harness limits the return > codes to pass/fail/skip. > > Clean up and su

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Paolo Abeni
Hi, On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: > This patch is meaningful by itself - removing checks against non-relevant > packets and making the flush/flush_id checks in a single place. I'm personally not sure this patch is a win. The code churn is significant. I understand this

Re: [PATCH net-next v4 4/4] net: gro: move L3 flush checks to tcp_gro_receive

2024-03-26 Thread Paolo Abeni
On Tue, 2024-03-26 at 18:25 +0100, Richard Gobert wrote: > Paolo Abeni wrote: > > Hi, > > > > On Tue, 2024-03-26 at 16:02 +0100, Richard Gobert wrote: > > > This patch is meaningful by itself - removing checks against non-relevant > > > packets and makin

Re: [PATCH net-next v2 5/7] netdevsim: report stats by default, like a real device

2024-04-04 Thread Paolo Abeni
On Tue, 2024-04-02 at 19:34 -0700, Jakub Kicinski wrote: > Real devices should implement qstats. Devices which support > pause or FEC configuration should also report the relevant stats. > > nsim was missing FEC stats completely, some of the qstats > and pause stats required toggling a debugfs kno

Re: [PATCH v2 net-next 0/7] selftests: net: Switch pmtu.sh to use the internal ovs script.

2024-06-25 Thread Paolo Abeni
On Mon, 2024-06-24 at 12:53 -0400, Aaron Conole wrote: > Aaron Conole writes: > > > Jakub Kicinski writes: > > > > > On Thu, 20 Jun 2024 08:55:54 -0400 Aaron Conole wrote: > > > > This series enhances the ovs-dpctl utility to provide support for set() > > > > and tunnel() flow specifiers, bette

Re: [PATCH net-next v15 03/14] netdev: support binding dma-buf to netdevice

2024-07-02 Thread Paolo Abeni
On Fri, 2024-06-28 at 00:32 +, Mina Almasry wrote: > +int net_devmem_bind_dmabuf(struct net_device *dev, unsigned int dmabuf_fd, > +struct net_devmem_dmabuf_binding **out) > +{ > + struct net_devmem_dmabuf_binding *binding; > + static u32 id_alloc_next; > + s

Re: [PATCH net-next v15 03/14] netdev: support binding dma-buf to netdevice

2024-07-02 Thread Paolo Abeni
On Tue, 2024-07-02 at 13:08 +0200, Paolo Abeni wrote: > On Fri, 2024-06-28 at 00:32 +, Mina Almasry wrote: > > +int net_devmem_bind_dmabuf(struct net_device *dev, unsigned int dmabuf_fd, > > + struct net_devmem_dmabuf_binding **out) > &

Re: [PATCH] selftests/net: missing close function in randomize function

2024-07-09 Thread Paolo Abeni
On Fri, 2024-07-05 at 16:24 +0800, Liu Jing wrote: > in randomize function, there is a open function, but there is no > close function in the randomize, which is easy to cause memory leaks. Please not that the file descriptor is not leaked, the kernel will dispose it at process exit() time. > >

Re: [PATCH net] selftests: forwarding: skip if kernel not support setting bridge fdb learning limit

2024-07-23 Thread Paolo Abeni
On 7/23/24 10:30, Nikolay Aleksandrov wrote: On 23/07/2024 11:22, Hangbin Liu wrote: If the testing kernel doesn't support setting fdb_max_learned or show fdb_n_learned, just skip it. Or we will get errors like ./bridge_fdb_learning_limit.sh: line 218: [: null: integer expression expected ./

Re: [PATCH net-next 0/7] net/selftests: TCP-AO selftests updates

2024-07-30 Thread Paolo Abeni
On 7/30/24 04:12, Dmitry Safonov wrote: First 4 patches are more-or-less cleanups/preparations. Patch 5 was sent to me/contributed off-list by Mohammad, who wants 32-bit kernels to run TCP-AO. Patch 6 is a workaround/fix for slow VMs. Albeit, I can't reproduce the issue, but I hope it will fix

Re: [PATCH net-next 1/5] selftests: drv-net: define endpoint structures

2024-04-15 Thread Paolo Abeni
On Fri, 2024-04-12 at 16:37 -0700, Jakub Kicinski wrote: > +class Endpoint: > +def __init__(self, name): > +self.name = name > +self._tmpdir = None > + > +def __del__(self): > +if self._tmpdir: > +self.cmd("rm -rf " + self._tmpdir) > +self._tm

Re: [PATCH net-next 4/5] selftests: drv-net: construct environment for running tests which require an endpoint

2024-04-15 Thread Paolo Abeni
On Fri, 2024-04-12 at 16:37 -0700, Jakub Kicinski wrote: > Nothing surprising here, hopefully. Wrap the variables from > the environment into a class or spawn a netdevsim based env > and pass it to the tests. > > Signed-off-by: Jakub Kicinski > --- > .../testing/selftests/drivers/net/README.rst

Re: [PATCH net-next 5/5] selftests: drv-net: add a trivial ping test

2024-04-15 Thread Paolo Abeni
On Fri, 2024-04-12 at 16:37 -0700, Jakub Kicinski wrote: > +def ping_v4(cfg) -> None: > +if not cfg.v4: > +raise KsftXfailEx() > + > +cmd(f"ping -c 1 -W0.5 {cfg.ep_v4}") > +cmd(f"ping -c 1 -W0.5 {cfg.v4}", host=cfg.endpoint) Very minor nit, I personally find a bit more readable

Re: [PATCH net-next 1/5] selftests: drv-net: define endpoint structures

2024-04-15 Thread Paolo Abeni
On Mon, 2024-04-15 at 07:19 -0700, Jakub Kicinski wrote: > On Mon, 15 Apr 2024 10:57:31 +0200 Paolo Abeni wrote: > > If I read correctly the above will do a full ssh handshake for each > > command. If the test script/setup is complex, I think/fear the overhead > > could be

Re: [PATCH net-next 5/5] selftests: drv-net: add a trivial ping test

2024-04-15 Thread Paolo Abeni
On Mon, 2024-04-15 at 07:33 -0700, Jakub Kicinski wrote: > On Mon, 15 Apr 2024 11:31:05 +0200 Paolo Abeni wrote: > > On Fri, 2024-04-12 at 16:37 -0700, Jakub Kicinski wrote: > > > +def ping_v4(cfg) -> None: > > > +if not cfg.v4: > > > +raise Ksft

Re: [PATCH net-next 1/5] selftests: drv-net: define endpoint structures

2024-04-15 Thread Paolo Abeni
On Mon, 2024-04-15 at 07:19 -0700, Jakub Kicinski wrote: > On Mon, 15 Apr 2024 10:57:31 +0200 Paolo Abeni wrote: > > If I read correctly the above will do a full ssh handshake for each > > command. If the test script/setup is complex, I think/fear the overhead > > could be

Re: [PATCH net-next v7 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-16 Thread Paolo Abeni
On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote: > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > iph->id, ...) against all packets in a loop. These flush checks are used > currently in all tcp flows and in some UDP flows in GRO. > > These checks need to be done only

Re: [PATCH net-next v7 1/3] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-16 Thread Paolo Abeni
On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote: > This patch adds network_offset and inner_network_offset to napi_gro_cb, and > makes sure both are set correctly. In the common path there's only one > write (skb_gro_reset_offset). > > Signed-off-by: Richard Gobert Does not apply cleanly

Re: [PATCH net-next v7 2/3] net: gro: move L3 flush checks to tcp_gro_receive and udp_gro_receive_segment

2024-04-16 Thread Paolo Abeni
On Tue, 2024-04-16 at 11:21 +0200, Paolo Abeni wrote: > On Fri, 2024-04-12 at 17:55 +0200, Richard Gobert wrote: > > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags, > > iph->id, ...) against all packets in a loop. These flush checks are used > > curren

  1   2   >