Re: [PATCH net-next V6 2/5] selftests: drv-net: Test XDP_PASS/DROP support

2025-07-22 Thread Paolo Abeni
On 7/21/25 8:34 PM, Gal Pressman wrote: > On 21/07/2025 18:40, Jakub Kicinski wrote: >> On Mon, 21 Jul 2025 14:43:15 +0300 Nimrod Oren wrote: +static struct udphdr *filter_udphdr(struct xdp_md *ctx, __u16 port) +{ + void *data_end = (void *)(long)ctx->data_end; + void *data =

[PATCH net] selftests: net: increase inter-packet timeout in udpgro.sh

2025-07-10 Thread Paolo Abeni
The mentioned test is not very stable when running on top of debug kernel build. Increase the inter-packet timeout to allow more slack in such environments. Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net

Re: [PATCH v21 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc

2025-07-08 Thread Paolo Abeni
On 7/2/25 5:28 AM, chia-yu.ch...@nokia-bell-labs.com wrote: > +static int dualpi2_change(struct Qdisc *sch, struct nlattr *opt, > + struct netlink_ext_ack *extack) > +{ > + struct nlattr *tb[TCA_DUALPI2_MAX + 1]; > + struct dualpi2_sched_data *q; > + int old_backlo

Re: [PATCH net-next v2 1/2] net: netfilter: Add IPIP flowtable SW acceleration

2025-07-03 Thread Paolo Abeni
On 6/28/25 11:47 AM, Lorenzo Bianconi wrote: >> On Fri, Jun 27, 2025 at 02:45:28PM +0200, Lorenzo Bianconi wrote: >>> Introduce SW acceleration for IPIP tunnels in the netfilter flowtable >>> infrastructure. >>> IPIP SW acceleration can be tested running the following scenario where >>> the traffic

Re: [PATCH v20 net-next 0/6] DUALPI2 patch

2025-06-24 Thread Paolo Abeni
On 6/21/25 9:33 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > Please find the DualPI2 patch v20. > > This patch serise adds DualPI Improved with a Square (DualPI2) with > following features: > * Supports congestion controls that comply with the Prague requirements i

Re: [PATCH v20 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc

2025-06-24 Thread Paolo Abeni
On 6/21/25 9:33 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > +static u32 get_memory_limit(struct Qdisc *sch, u32 limit) > +{ > + /* Apply rule of thumb, i.e., doubling the packet length, > + * to further include per packet overhead in memory_limit. > + */ > + u64 memlim = mul_u3

Re: [PATCH net] selftests: drv-net: add configs for the TSO test

2025-06-03 Thread Paolo Abeni
On 6/3/25 1:16 AM, Jakub Kicinski wrote: > diff --git a/tools/testing/selftests/drivers/net/hw/config > b/tools/testing/selftests/drivers/net/hw/config > new file mode 100644 > index ..ea4b70d71563 > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/hw/config > @@ -0,0 +1,6 @@

Re: [PATCH v16 net-next 3/5] sched: Add enqueue/dequeue of dualpi2 qdisc

2025-05-20 Thread Paolo Abeni
On 5/16/25 2:01 AM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Koen De Schepper > > DualPI2 provides L4S-type low latency & loss to traffic that uses a > scalable congestion controller (e.g. TCP-Prague, DCTCP) without > degrading the performance of 'classic' traffic (e.g. Reno, > Cubic etc.

Re: [PATCH v16 net-next 2/5] sched: Dump configuration and statistics of dualpi2 qdisc

2025-05-20 Thread Paolo Abeni
On 5/16/25 2:01 AM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > The configuration and statistics dump of the DualPI2 Qdisc provides > information related to both queues, such as packet numbers and queuing > delays in the L-queue and C-queue, as well as general information s

Re: [PATCH v16 net-next 1/5] sched: Struct definition and parsing of dualpi2 qdisc

2025-05-20 Thread Paolo Abeni
On 5/16/25 2:01 AM, chia-yu.ch...@nokia-bell-labs.com wrote: > +static u32 calculate_probability(struct Qdisc *sch) > +{ > + struct dualpi2_sched_data *q = qdisc_priv(sch); > + u32 new_prob; > + u64 qdelay_c; > + u64 qdelay_l; > + u64 qdelay; > + s64 delta; > + > + get_q

Re: [PATCH v15 net-next 2/5] sched: Dump configuration and statistics of dualpi2 qdisc

2025-05-15 Thread Paolo Abeni
On 5/9/25 11:47 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > The configuration and statistics dump of the DualPI2 Qdisc provides > information related to both queues, such as packet numbers and queuing > delays in the L-queue and C-queue, as well as general information s

Re: [PATCH v15 net-next 1/5] sched: Struct definition and parsing of dualpi2 qdisc

2025-05-15 Thread Paolo Abeni
On 5/15/25 10:51 AM, Paolo Abeni wrote: > On 5/9/25 11:47 PM, chia-yu.ch...@nokia-bell-labs.com wrote: >> +struct dualpi2_sched_data { >> +struct Qdisc *l_queue; /* The L4S Low latency queue (L-queue) */ >> +struct Qdisc *sch; /* The C

Re: [PATCH v15 net-next 1/5] sched: Struct definition and parsing of dualpi2 qdisc

2025-05-15 Thread Paolo Abeni
On 5/9/25 11:47 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > +struct dualpi2_sched_data { > + struct Qdisc *l_queue; /* The L4S Low latency queue (L-queue) */ > + struct Qdisc *sch; /* The Classic queue (C-queue) */ > + > + /* Registered tc filters */ > + struct tcf_proto __

Re: [PATCH v15 net-next 0/5] DUALPI2 patch

2025-05-15 Thread Paolo Abeni
Hi, On 5/9/25 11:47 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > Hello, > > Please find the DualPI2 patch v14. [...] > > For more details of DualPI2, please refer IETF RFC9332 > (https://datatracker.ietf.org/doc/html/rfc9332). A couple of process notes I should ha

Re: [PATCH v6 net-next 04/15] tcp: AccECN core

2025-05-13 Thread Paolo Abeni
On 5/9/25 11:18 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > @@ -5098,7 +5100,8 @@ static void __init tcp_struct_check(void) > /* 32bit arches with 8byte alignment on u64 fields might need padding >* before tcp_clock_cache. >*/ > - CACHELINE_ASSERT_GROUP_SIZE(struct tcp_

Re: [PATCH net-next v2] selftests: net: exit cleanly on SIGTERM / timeout

2025-05-02 Thread Paolo Abeni
On 4/30/25 8:03 PM, Edward Cree wrote: > On 29/04/2025 18:08, Jakub Kicinski wrote: >> +class KsftTerminate(KeyboardInterrupt): >> +pass > ... >> @@ -229,11 +249,12 @@ KSFT_DISRUPTIVE = True >> cnt_key = 'xfail' >> except BaseException as e: >> stop |= isinsta

Re: [PATCH net-next] selftests: net: exit cleanly on SIGTERM / timeout

2025-04-29 Thread Paolo Abeni
On 4/29/25 3:27 AM, Willem de Bruijn wrote: > Reviewed-by: Willem de Bruijn > > Jakub Kicinski wrote: >> On Sat, 26 Apr 2025 11:15:34 -0400 Willem de Bruijn wrote: @@ -193,6 +198,19 @@ KSFT_DISRUPTIVE = True return env +term_cnt = 0 + >>> >>> A bit ugly to

Re: [PATCH v5 net-next 15/15] tcp: try to avoid safer when ACKs are thinned

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:36 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Ilpo Järvinen > > Add newly acked pkts EWMA. When ACK thinning occurs, select > between safer and unsafe cep delta in AccECN processing based > on it. If the packets ACKed per ACK tends to be large, don't > conservatively assume

Re: [PATCH v5 net-next 11/15] tcp: accecn: AccECN option failure handling

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > @@ -555,6 +556,30 @@ static void smc_check_reset_syn_req(const struct > tcp_sock *oldtp, > #endif > } > > +u8 tcp_accecn_option_init(const struct sk_buff *skb, u8 opt_offset) > +{ > + unsigned char *ptr = skb_transport_header(s

Re: [PATCH v5 net-next 10/15] tcp: accecn: AccECN option send control

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Ilpo Järvinen > > Instead of sending the option in every ACK, limit sending to > those ACKs where the option is necessary: > - Handshake > - "Change-triggered ACK" + the ACK following it. The > 2nd ACK is necessary to unambigu

Re: [PATCH v5 net-next 09/15] tcp: accecn: AccECN option

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > @@ -302,10 +303,13 @@ struct tcp_sock { > u32 snd_up; /* Urgent pointer */ > u32 delivered; /* Total data packets delivered incl. rexmits */ > u32 delivered_ce; /* Like the abov

Re: [PATCH v5 net-next 07/15] tcp: allow embedding leftover into option padding

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > @@ -709,6 +709,8 @@ static __be32 *process_tcp_ao_options(struct tcp_sock *tp, > return ptr; > } > > +#define NOP_LEFTOVER ((TCPOPT_NOP << 8) | TCPOPT_NOP) > + > /* Write previously computed TCP options to the packet. > * >

Re: [PATCH v5 net-next 05/15] tcp: accecn: add AccECN rx byte counters

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > diff --git a/include/linux/tcp.h b/include/linux/tcp.h > index af38fff24aa4..9cbfefd693e3 100644 > --- a/include/linux/tcp.h > +++ b/include/linux/tcp.h > @@ -303,6 +303,7 @@ struct tcp_sock { > u32 delivered; /* Total da

Re: [PATCH v5 net-next 04/15] tcp: accecn: AccECN negotiation

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > diff --git a/include/linux/tcp.h b/include/linux/tcp.h > index e36018203bd0..af38fff24aa4 100644 > --- a/include/linux/tcp.h > +++ b/include/linux/tcp.h > @@ -156,6 +156,10 @@ struct tcp_request_sock { > #if IS_ENABLED(CONFIG_MPTCP) >

Re: [PATCH v5 net-next 03/15] tcp: AccECN core

2025-04-29 Thread Paolo Abeni
On 4/22/25 5:35 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > @@ -298,6 +298,9 @@ struct tcp_sock { > u32 snd_up; /* Urgent pointer */ > u32 delivered; /* Total data packets delivered incl. rexmits */ > u32 delivered_ce; /* Like the above

Re: [PATCH v11 net-next 5/5] sched: Add enqueue/dequeue of dualpi2 qdisc

2025-04-22 Thread Paolo Abeni
On 4/15/25 2:43 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > +static struct sk_buff *dualpi2_qdisc_dequeue(struct Qdisc *sch) > +{ > + struct dualpi2_sched_data *q = qdisc_priv(sch); > + struct sk_buff *skb; > + int credit_change; > + u64 now; > + > + now = ktime_get_ns(); > +

Re: [PATCH v11 net-next 3/5] sched: Struct definition and parsing of dualpi2 qdisc

2025-04-22 Thread Paolo Abeni
On 4/15/25 2:43 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > DualPI2 is the reference implementation of IETF RFC9332 DualQ Coupled > AQM (https://datatracker.ietf.org/doc/html/rfc9332) providing two > queues called low latency (L-queue) and classic (C-queue). By defau

Re: [PATCH v11 net-next 1/5] Documentation: netlink: specs: tc: Add DualPI2 specification

2025-04-22 Thread Paolo Abeni
On 4/15/25 2:43 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > From: Chia-Yu Chang > > Introduce the specification of tc qdisc DualPI2 stats and attributes, > which is the reference implementation of IETF RFC9332 DualQ Coupled AQM > (https://datatracker.ietf.org/doc/html/rfc9332) providing two di

Re: [PATCH v9 net-next 3/3] sched: Add dualpi2 qdisc

2025-03-21 Thread Paolo Abeni
On 3/16/25 4:27 PM, chia-yu.ch...@nokia-bell-labs.com wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index 0dbfe069a6e3..987686e91919 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -30,6 +30,7 @@ > #include > #include > > +#inclu

Re: [PATCH net v2 3/3] selftests: net: test for lwtunnel dst ref loops

2025-03-20 Thread Paolo Abeni
On 3/14/25 1:00 PM, Justin Iurman wrote: > As recently specified by commit 0ea09cbf8350 ("docs: netdev: add a note > on selftest posting") in net-next, the selftest is therefore shipped in > this series. However, this selftest does not really test this series. It > needs this series to avoid crashi

Re: [PATCH net 7/7] selftests: net: test for lwtunnel dst ref loops

2025-03-13 Thread Paolo Abeni
On 3/11/25 3:12 PM, Justin Iurman wrote: > diff --git a/tools/testing/selftests/net/config > b/tools/testing/selftests/net/config > index 5b9baf708950..61e5116987f3 100644 > --- a/tools/testing/selftests/net/config > +++ b/tools/testing/selftests/net/config > @@ -107,3 +107,5 @@ CONFIG_XFRM_INTERF

Re: [PATCH net-next v2] selftests: net: Add support for testing SO_RCVMARK and SO_RCVPRIORITY

2025-02-11 Thread Paolo Abeni
On 2/10/25 8:22 PM, Anna Emese Nyiri wrote: > Introduce tests to verify the correct functionality of the SO_RCVMARK and > SO_RCVPRIORITY socket options. > > Key changes include: > > - so_rcv_listener.c: Implements a receiver application to test the correct > behavior of the SO_RCVMARK and SO_RC

Re: [PATCH net-next, v7 2/2] selftests/net: Add selftest for IPv4 RTM_GETMULTICAST support

2025-02-06 Thread Paolo Abeni
On 2/4/25 10:19 AM, Yuyang Huang wrote: > diff --git a/tools/testing/selftests/net/lib/py/ynl.py > b/tools/testing/selftests/net/lib/py/ynl.py > index ad1e36baee2a..7b1e29467e46 100644 > --- a/tools/testing/selftests/net/lib/py/ynl.py > +++ b/tools/testing/selftests/net/lib/py/ynl.py > @@ -38,8 +3

Re: [PATCH net-next, v7 1/2] netlink: support dumping IPv4 multicast addresses

2025-02-06 Thread Paolo Abeni
On 2/4/25 10:19 AM, Yuyang Huang wrote: > diff --git a/include/linux/igmp_internal.h b/include/linux/igmp_internal.h > new file mode 100644 > index ..0a1bcc8ec8e1 > --- /dev/null > +++ b/include/linux/igmp_internal.h I did not undertand you intended to place the new header under the 'i

Re: [PATCH net-next, v5] netlink: support dumping IPv4 multicast addresses

2025-01-17 Thread Paolo Abeni
On 1/17/25 7:56 AM, Yuyang Huang wrote: > Hi Paolo > > Thanks for the review feedback, I will adjust them in the patch v6. > >> Why moving the struct definition here? IMHO addrconf.h is better suited >> and will avoid additional headers dep. > > The `struct inet_fill_args` is moved from devinet.

Re: [PATCH net-next, v5] netlink: support dumping IPv4 multicast addresses

2025-01-16 Thread Paolo Abeni
On 1/14/25 3:37 AM, Yuyang Huang wrote: > Extended RTM_GETMULTICAST to support dumping joined IPv4 multicast > addresses, in addition to the existing IPv6 functionality. This allows > userspace applications to retrieve both IPv4 and IPv6 multicast > addresses through similar netlink command and the

Re: [PATCH net-next 0/4] selftests/net: packetdrill: import multiple tests

2024-12-19 Thread Paolo Abeni
On 12/18/24 19:00, Jakub Kicinski wrote: > On Tue, 17 Dec 2024 18:51:57 + Soham Chakradeo wrote: >> Import tests for the following features (folder names in brackets): >> ECN (ecn) : RFC 3168 >> Close (close) : RFC 9293 >> TCP_INFO (tcp_info) : RFC 9293 >> Fast recovery (fast_recovery) : RFC 56

Re: [PATCH v2 net-next 1/2] ipv6: release nexthop on device removal

2024-11-06 Thread Paolo Abeni
On 11/5/24 22:40, David Ahern wrote: > On 11/5/24 11:23 AM, Paolo Abeni wrote: >> The CI is hitting some aperiodic hangup at device removal time in the >> pmtu.sh self-test: >> >> unregister_netdevice: waiting for veth_A-R1 to become free. Usage count = 6 >> ref_tr

[PATCH v2 net-next 1/2] ipv6: release nexthop on device removal

2024-11-05 Thread Paolo Abeni
hop object in a fib6_info") Signed-off-by: Paolo Abeni --- v1 -> v2: - dropped unintended whitespace change --- net/ipv6/route.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d7ce5cf2017a..038c1eeef0be 100644 --- a/net

[PATCH v2 net-next 2/2] selftests: net: really check for bg process completion

2024-11-05 Thread Paolo Abeni
stant wait") Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/pmtu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh index 569bce8b6383..6c651c880fe8 100755 --- a/tools/testing/selftests/n

[PATCH v2 net-next 0/2] ipv6: fix hangup on device removal

2024-11-05 Thread Paolo Abeni
the fib info/nh jungle. --- v1 -> v2: - drop unintended whitespace change in patch 1/2 Paolo Abeni (2): ipv6: release nexthop on device removal selftests: net: really check for bg process completion net/ipv6/route.c| 6 +++--- tools/testing/selftests/net/pmtu.sh | 2 +-

Re: [PATCH v5] net: ipv4: Cache pmtu for all packet paths if multipath enabled

2024-11-02 Thread Paolo Abeni
Hi, On 11/1/24 18:34, Vladimir Vdovin wrote: > On Fri Nov 1, 2024 at 4:45 PM MSK, Jakub Kicinski wrote: >> On Fri, 1 Nov 2024 10:48:57 + Vladimir Vdovin wrote: >>> + pmtu_ipv4_mp_exceptions ipv4: PMTU multipath nh exceptions >>> 0" >> >> This new test seems to fail in

Re: [PATCH net-next 01/10] selftests: net: lib: Introduce deferred commands

2024-10-15 Thread Paolo Abeni
Hi, On 10/9/24 14:06, Petr Machata wrote: diff --git a/tools/testing/selftests/net/lib/sh/defer.sh b/tools/testing/selftests/net/lib/sh/defer.sh new file mode 100644 index ..8d205c3f0445 --- /dev/null +++ b/tools/testing/selftests/net/lib/sh/defer.sh @@ -0,0 +1,115 @@ +#!/bin/bash +

Re: [PATCH net-next 04/10] selftests: RED: Use defer for test cleanup

2024-10-15 Thread Paolo Abeni
On 10/9/24 14:06, Petr Machata wrote: @@ -450,6 +415,7 @@ __do_ecn_test() start_tcp_traffic $h1.$vlan $(ipaddr 1 $vlan) $(ipaddr 3 $vlan) \ $h3_mac tos=0x01 + defer stop_traffic $! sleep 1 ecn_test_common "$name" "$get_nmarked" $vlan $limit @@

Re: [PATCH net] selftests/net: packetdrill: increase timing tolerance in debug mode

2024-09-26 Thread Paolo Abeni
On 9/19/24 23:04, Stanislav Fomichev wrote: On 09/19, Willem de Bruijn wrote: From: Willem de Bruijn Some packetdrill tests are flaky in debug mode. As discussed, increase tolerance. We have been doing this for debug builds outside ksft too. Previous setting was 1. A manual 50 runs in vi

Re: [PATCH net-next 2/2] selftests/net: integrate packetdrill with ksft

2024-09-06 Thread Paolo Abeni
On 9/6/24 03:31, Willem de Bruijn wrote: Willem de Bruijn wrote: Willem de Bruijn wrote: Jakub Kicinski wrote: On Wed, 4 Sep 2024 23:07:03 -0400 Willem de Bruijn wrote: +++ b/tools/testing/selftests/net/packetdrill/config @@ -0,0 +1 @@ +CONFIG_TCP_MD5SIG=y Looks like this is not enough: #

Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

2024-08-28 Thread Paolo Abeni
Adding Mat(s) for awareness, it would be great (but difficult) to have mptcp too in the long run ;) On 8/27/24 21:32, Willem de Bruijn wrote: From: Willem de Bruijn Lay the groundwork to import into kselftests the over 150 packetdrill TCP/IP conformance tests on github.com/google/packetdrill.

Re: [PATCH net 2/2] selftests: udpgro: no need to load xdp for gro

2024-08-14 Thread Paolo Abeni
no GRO ok [...] multiple GRO socks ok Fixes: d7db7775ea2e ("net: veth: do not manipulate GRO when using XDP") Reported-by: Yi Chen Closes: https://issues.redhat.com/browse/RHEL-53858 Signed-off-by: Hangbin Liu LGTM, Acked-by: Paolo Abeni

Re: [PATCH net 1/2] selftests: udpgro: report error when receive failed

2024-08-14 Thread Paolo Abeni
: bad packet len, got 1452, expected 14520 ./udpgso_bench_rx: recv: bad packet len, got 1452, expected 14520 failed $ echo $? 1 Fixes: 3327a9c46352 ("selftests: add functionals test for UDP GRO") Suggested-by: Paolo Abeni Signed-off-by: Hangbin Liu --- tools/testing/selftest

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] 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] 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-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 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 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 v10 11/14] tcp: RX path for devmem TCP

2024-06-04 Thread Paolo Abeni
On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote: > @@ -2317,6 +2318,213 @@ static int tcp_inq_hint(struct sock *sk) > return inq; > } > > +/* batch __xa_alloc() calls and reduce xa_lock()/xa_unlock() overhead. */ > +struct tcp_xa_pool { > + u8 max; /* max <= MAX_SKB_

Re: [PATCH net-next v10 10/14] net: add support for skbs with unreadable frags

2024-06-04 Thread Paolo Abeni
On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote: > diff --git a/net/core/gro.c b/net/core/gro.c > index 26f09c3e830b7..7b9d018f552bd 100644 > --- a/net/core/gro.c > +++ b/net/core/gro.c > @@ -422,6 +422,9 @@ static void gro_pull_from_frag0(struct sk_buff *skb, int > grow) > { > struct

Re: [PATCH net-next v10 06/14] page_pool: convert to use netmem

2024-06-04 Thread Paolo Abeni
On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote: > diff --git a/include/trace/events/page_pool.h > b/include/trace/events/page_pool.h > index 6834356b2d2ae..c5b6383ff2760 100644 > --- a/include/trace/events/page_pool.h > +++ b/include/trace/events/page_pool.h > @@ -42,51 +42,52 @@ TRACE_EVEN

Re: [PATCH net-next v10 05/14] netdev: netdevice devmem allocator

2024-06-04 Thread Paolo Abeni
On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote: > diff --git a/net/core/devmem.c b/net/core/devmem.c > index d82f92d7cf9ce..d5fac8edf621d 100644 > --- a/net/core/devmem.c > +++ b/net/core/devmem.c > @@ -32,6 +32,14 @@ static void net_devmem_dmabuf_free_chunk_owner(struct > gen_pool *genpool

Re: [PATCH net-next 2/2] selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns

2024-05-30 Thread Paolo Abeni
On Thu, 2024-05-30 at 05:10 -0700, Breno Leitao wrote: > On Tue, May 28, 2024 at 02:11:39PM +0200, Matteo Croce wrote: > > Add a selftest which checks that the sysctl is present in a netns, > > that the value is read from the init one, and that it's readonly. > > > > Signed-off-by: Matteo Croce >

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Paolo Abeni
On Wed, 2024-05-22 at 00:56 +, Edward Liaw wrote: > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes > redefinitions of _GNU_SOURCE from source code. > > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > asprintf into kselftest_harness.h, which is

Re: [PATCH net] selftests: net: move amt to socat for better compatibility

2024-05-09 Thread Paolo Abeni
v4_forward() > > test_ipv6_forward() > { > - RESULT6=$(ip netns exec "${LISTENER}" nc -w 1 -l -u ff0e::5:6 6000) > - if [ "$RESULT6" == "2001:db8:3::2" ]; then > + RESULT6=$(ip netns exec "${LISTENER}" timeout 15 socat -

Re: [PATCH net] selftests: net: avoid waiting for server in amt.sh forever when it fails.

2024-05-09 Thread Paolo Abeni
On Wed, 2024-05-08 at 04:06 +, Taehee Yoo wrote: > @@ -210,40 +217,52 @@ check_features() > > test_ipv4_forward() > { > - RESULT4=$(ip netns exec "${LISTENER}" nc -w 1 -l -u 239.0.0.1 4000) > + echo "" > $RESULT > + bash -c "$(ip netns exec "${LISTENER}" \ > + timeo

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

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 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 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 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 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 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 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 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 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 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 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 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 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: [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

[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

[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] 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 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

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"

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] 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-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

[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 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] 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

[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: 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

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-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

[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

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

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] 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

  1   2   >