Re: [PATCH net-next] selftests: mptcp: interpret \n as a new line

2020-10-06 Thread Paolo Abeni
sed because this commit above was done in parallel to one here below. > > Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") > Signed-off-by: Matthieu Baerts Acked-by: Paolo Abeni

Re: general protection fault in sock_recvmsg

2020-05-25 Thread Paolo Abeni
https://syzkaller.appspot.com/x/repro.syz?x=141034ba10 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=119cd01610 > > The bug was bisected to: > > commit 263e1201a2c324b60b15ecda5de9ebf1e7293e31 > Author: Paolo Abeni > Date: Thu Apr 30 13:01:51 2020

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-03 Thread Paolo Abeni
On Wed, 2020-09-02 at 22:01 -0700, Cong Wang wrote: > Can you test the attached one-line fix? I think we are overthinking, > probably all > we need here is a busy wait. I think that will solve, but I also think that will kill NOLOCK performances due to really increased contention. At this point I

Re: [PATCH] net: udp: increase UDP_MIB_RCVBUFERRORS when ENOBUFS

2020-10-26 Thread Paolo Abeni
Hello, On Mon, 2020-10-26 at 17:39 +0800, Menglong Dong wrote: > The error returned from __udp_enqueue_schedule_skb is ENOMEM or ENOBUFS. > For now, only ENOMEM is counted into UDP_MIB_RCVBUFERRORS in > __udp_queue_rcv_skb. UDP_MIB_RCVBUFERRORS should count all of the > failed skb because of memor

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-07-09 Thread Paolo Abeni
On Wed, 2020-07-08 at 13:16 -0700, Cong Wang wrote: > On Tue, Jul 7, 2020 at 7:18 AM Paolo Abeni wrote: > > So the regression with 2 pktgen threads is still relevant. 'perf' shows > > relevant time spent into net_tx_action() and __netif_schedule(). > > So, touching

Re: [PATCH net] mptcp: fix joined subflows with unblocking sk

2020-07-27 Thread Paolo Abeni
cking connect()") > Signed-off-by: Matthieu Baerts Acked-by: Paolo Abeni

Re: [PATCH net-next] mptcp: Remove unused inline function mptcp_rcv_synsent()

2020-07-15 Thread Paolo Abeni
On Wed, 2020-07-15 at 10:36 +0800, YueHaibing wrote: > commit 263e1201a2c3 ("mptcp: consolidate synack processing.") > left behind this, remove it. > > Signed-off-by: YueHaibing Acked-by: Paolo Abeni Thank you for the clean-up! /P

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-10 Thread Paolo Abeni
kfree_skb_list(to_free); > > > > > > > > > Per other thread we also need the state deactivated check added > > > back. > > > > I guess no, because pfifo_dequeue() seems to require q->seqlock, > > according to comments in qdisc_run(), so we c

Re: [PATCH net-next] selftests: mptcp: interpret \n as a new line

2020-09-17 Thread Paolo Abeni
usly, the idea was to add a new line before the socket stat and not > print "\nnetns". > > Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") > Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") > Signed-off-by: Matthieu Baerts Acked-by: Paolo Abeni

Re: [PATCH net-next 2/2] ipv6: fib6: avoid indirect calls from fib6_rule_lookup

2020-06-22 Thread Paolo Abeni
Hi, On Fri, 2020-06-19 at 20:14 -0700, Brian Vazquez wrote: > @@ -111,11 +111,13 @@ struct dst_entry *fib6_rule_lookup(struct net *net, > struct flowi6 *fl6, > } else { > struct rt6_info *rt; > > - rt = lookup(net, net->ipv6.fib6_local_tbl, fl6, skb, flags); > +

Re: [PATCH v2 net-next 1/2] indirect_call_wrapper: extend indirect wrapper to support up to 4 calls

2020-06-23 Thread Paolo Abeni
> +#define INDIRECT_CALL_3(f, f3, f2, f1, ...) f(__VA_ARGS__) > +#define INDIRECT_CALL_4(f, f4, f3, f2, f1, ...) f(__VA_ARGS__) > #define INDIRECT_CALLABLE_DECLARE(f) > #define INDIRECT_CALLABLE_SCOPE static > #endif Acked-by: Paolo Abeni

Re: [PATCH v2 net-next 2/2] ipv6: fib6: avoid indirect calls from fib6_rule_lookup

2020-06-23 Thread Paolo Abeni
the patch the average is 354263 pkt/s or 2822 ns/pkt and with > the patch the average is 360738 pkt/s or 2772 ns/pkt which gives an > estimate of 50 ns per packet. > > [1] http://netsniff-ng.org/ > > Changelog since v1: > - Change ordering in the ICW (Paolo

[PATCH] x86/uaccess: optimize copy_user_enhanced_fast_string for short string

2017-06-29 Thread Paolo Abeni
v4 - in the [72%-9%] range on Intel Core i7-4810MQ Other tested CPUs - namely Intel Atom S1260 and AMD Opteron 8216 - show no differences, because they do not expose the ERMS feature bit. Signed-off-by: Paolo Abeni --- arch/x86/lib/copy_user_64.S | 7 +-- 1 file changed, 5 insertions(+), 2

Re: [RFC 1/2] net-next: add a dma_desc element to struct skb_shared_info

2017-07-21 Thread Paolo Abeni
Hi, On Fri, 2017-07-21 at 17:20 +0200, John Crispin wrote: > In order to make HW flow offloading work in latest MediaTek silicon we need > to propagate part of the RX DMS descriptor to the upper layers populating > the flow offload engines HW tables. This patch adds an extra element to > struct sk

Re: BUG: sleeping function called from invalid context at net/core/sock.c:LINE (3)

2018-02-19 Thread Paolo Abeni
On Mon, 2018-02-19 at 13:23 +, Jon Maloy wrote: > I don't understand this one. tipc_topsrv_stop() can only be trigged > from a user doing rmmod(), and I double checked that this is running > in user mode. > How does the call chain you are reporting occur? tipc_topsrv_stop() is called also at n

Re: WARNING: proc registration bug in clusterip_tg_check

2018-02-07 Thread Paolo Abeni
On Tue, 2018-02-06 at 22:42 -0800, Cong Wang wrote: > On Tue, Feb 6, 2018 at 6:27 AM, syzbot > wrote: > > Hello, > > > > syzbot hit the following crash on net-next commit > > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > > Merge tag 'usercopy-v4.16-rc1' of > > git://g

Re: possible deadlock in rtnl_lock (3)

2018-02-07 Thread Paolo Abeni
On Tue, 2018-02-06 at 19:00 +0100, Dmitry Vyukov wrote: > On Tue, Feb 6, 2018 at 6:58 PM, syzbot > wrote: > > Hello, > > > > syzbot hit the following crash on net-next commit > > 617aebe6a97efa539cc4b8a52adccd89596e6be0 (Sun Feb 4 00:25:42 2018 +) > > Merge tag 'usercopy-v4.16-rc1' of > > git

Re: WARNING: proc registration bug in clusterip_tg_check

2018-02-07 Thread Paolo Abeni
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master I can't reproduce the issue locally, so asking the syzbot to test the tentive fix for me (and hoping I did not mess with the tag/format) --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 30 +++--- 1 f

Re: WARNING: proc registration bug in clusterip_tg_check

2018-02-07 Thread Paolo Abeni
On Wed, 2018-02-07 at 09:43 +0100, Paolo Abeni wrote: > On Tue, 2018-02-06 at 22:42 -0800, Cong Wang wrote: > > On Tue, Feb 6, 2018 at 6:27 AM, syzbot > > wrote: > > > Hello, > > > > > > syzbot hit the following crash on net-next commit > > >

Re: [PATCH] x86/uaccess: use unrolled string copy for short strings

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 10:47 +0200, Ingo Molnar wrote: > * Paolo Abeni wrote: > > > The 'rep' prefix suffers for a relevant "setup cost"; as a result > > string copies with unrolled loops are faster than even > > optimized string copy using 'rep

Re: [PATCH] x86/uaccess: use unrolled string copy for short strings

2017-06-22 Thread Paolo Abeni
On Thu, 2017-06-22 at 10:30 -0700, Linus Torvalds wrote: > So if you want to do this optimization, I'd argue that you should just > do it inside the copy_user_enhanced_fast_string() function itself, the > same way we already handle the really small case specially in > copy_user_generic_string(). >

Re: [PATCH] udp: make function udp_skb_dtor_locked static

2017-05-17 Thread Paolo Abeni
, too */ > -void udp_skb_dtor_locked(struct sock *sk, struct sk_buff *skb) > +static void udp_skb_dtor_locked(struct sock *sk, struct sk_buff *skb) > { > udp_rmem_release(sk, skb->dev_scratch, 1, true); > } Acked-by: Paolo Abeni

Re: net: possible deadlock in skb_queue_tail

2017-05-04 Thread Paolo Abeni
On Thu, 2017-05-04 at 15:49 +0200, Andrey Konovalov wrote: > On Fri, Feb 24, 2017 at 3:56 AM, Florian Westphal wrote: > > Andrey Konovalov wrote: > > > > [ CC Paolo ] > > > > > I've got the following error report while fuzzing the kernel with > > > syzkaller. > > > > > > On commit c470abd4fde

[PATCH 0/4] RCU: introduce noref debug

2017-10-06 Thread Paolo Abeni
usage in the networking stack. Patch 3 and 4 are bugfixes for small buglet found running this infrastructure on basic scenarios. Paolo Abeni (4): rcu: introduce noref debug net: use RCU noref infrastructure to track dst noref ipv4: drop unneeded and misleading RCU lock in ip_route_input_

[PATCH 1/4] rcu: introduce noref debug

2017-10-06 Thread Paolo Abeni
different places (e.g. noref dst on skb_clone()). To keep the patch/implementation simple RCU_NOREF_DEBUG depends on PREEMPT_RCU=n in Kconfig. Signed-off-by: Paolo Abeni --- include/linux/rcupdate.h | 11 ++ kernel/rcu/Kconfig.debug | 15 kernel/rcu/Makefile | 1 + kernel/rcu

[PATCH 4/4] tcp: avoid noref dst leak on input path

2017-10-06 Thread Paolo Abeni
Fix it by adding the explicit drop in tcp_queue_rcv() and moving the current skb_dst_drop() just before the other enqueuing operation, do avoid unneeded double skb_dst_drop() for some path. The leak itself is not harmful, because the tcp recvmsg() code should not access such info. Signed-off-by: Pa

[PATCH 3/4] ipv4: drop unneeded and misleading RCU lock in ip_route_input_noref()

2017-10-06 Thread Paolo Abeni
ps the unneeded lock. Signed-off-by: Paolo Abeni --- net/ipv4/route.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 94d4cd2d5ea4..5a6ca1f16d3f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2069,14 +2069,9

[PATCH 2/4] net: use RCU noref infrastructure to track dst noref

2017-10-06 Thread Paolo Abeni
We can now ensure noref dsts do no escape the relevant RCU section. This does not introduce any functional changes, it adds the relevant debug code enabled by CONFIG_RCU_NOREF_DEBUG. Signed-off-by: Paolo Abeni --- include/linux/skbuff.h | 1 + include/net/dst.h | 5 + 2 files changed

Re: [PATCH 0/4] RCU: introduce noref debug

2017-10-11 Thread Paolo Abeni
On Tue, 2017-10-10 at 21:02 -0700, Paul E. McKenney wrote: > Linus and Ingo will ask me how users decide how they should set that > additional build flag. Especially given that if there is code that > requires non-strict checking, isn't everyone required to set up non-strict > checking to avoid fa

Re: linux-next: build failure after merge of the net-next tree

2017-09-22 Thread Paolo Abeni
On Thu, 2017-09-21 at 18:37 -0700, David Miller wrote: > From: Stephen Rothwell > Date: Fri, 22 Sep 2017 11:03:55 +1000 > > > After merging the net-next tree, today's linux-next build (arm > > multi_v7_defconfig) failed like this: > > > > net/ipv4/fib_frontend.c: In function 'fib_validate_source

Re: [PATCH 0/4] RCU: introduce noref debug

2017-10-06 Thread Paolo Abeni
Hi, On Fri, 2017-10-06 at 06:34 -0700, Paul E. McKenney wrote: > On Fri, Oct 06, 2017 at 02:57:45PM +0200, Paolo Abeni wrote: > > The networking subsystem is currently using some kind of long-lived > > RCU-protected, references to avoid the overhead of full book-keeping. > >

Re: [PATCH 4/4] tcp: avoid noref dst leak on input path

2017-10-06 Thread Paolo Abeni
Hi, On Fri, 2017-10-06 at 07:37 -0700, Eric Dumazet wrote: > On Fri, 2017-10-06 at 14:57 +0200, Paolo Abeni wrote: > > Enabling CONFIG_RCU_NOREF_DEBUG gives the following splat when > > processing tcp packets: > > > >to-be-untracked noref entity 942c

Re: [PATCH 0/4] RCU: introduce noref debug

2017-10-09 Thread Paolo Abeni
On Fri, 2017-10-06 at 09:34 -0700, Paul E. McKenney wrote: > On Fri, Oct 06, 2017 at 05:10:09PM +0200, Paolo Abeni wrote: > > Hi, > > > > On Fri, 2017-10-06 at 06:34 -0700, Paul E. McKenney wrote: > > > On Fri, Oct 06, 2017 at 02:57:45PM +0200, Paolo Abeni wrote: &g

Re: [PATCH net-next v3 1/3] selftests: nic_link_layer: Add link layer selftest for NIC driver

2024-10-22 Thread Paolo Abeni
On 10/16/24 23:50, Mohan Prasad J wrote: > Add selftest file for the link layer tests of a NIC driver. > Test for auto-negotiation is added. > Add LinkConfig class for changing link layer configs. > Selftest makes use of ksft modules and ethtool. > Include selftest file in the Makefile. > > Signed

Re: [PATCH net-next v3 3/3] selftests: nic_performance: Add selftest for performance of NIC driver

2024-10-22 Thread Paolo Abeni
On 10/16/24 23:50, Mohan Prasad J wrote: > Add selftest case to check the send and receive throughput. > Supported link modes between local NIC driver and partner > are varied. Then send and receive throughput is captured > and verified. Test uses iperf3 tool. > > Signed-off-by: Mohan Prasad J >

Re: [PATCH net v6] ipv6: Fix soft lockups in fib6_select_path under high next hop churn

2024-11-05 Thread Paolo Abeni
On 10/31/24 15:10, David Ahern wrote: > On 10/31/24 4:13 AM, Paolo Abeni wrote: >> Given the issue is long-standing, and the fix is somewhat invasive, I >> suggest steering this patch on net-next. > > FWIW, I think net-next is best. Should I count the above as a formal a

Re: [PATCH net-next v2 4/4] selftests: hsr: Add test for VLAN

2024-10-31 Thread Paolo Abeni
On 10/24/24 12:30, MD Danish Anwar wrote: > @@ -183,9 +232,21 @@ trap cleanup_all_ns EXIT > setup_hsr_interfaces 0 > do_complete_ping_test > > +# Run VLAN Test > +if $vlan; then > + setup_vlan_interfaces > + hsr_vlan_ping > +fi > + > setup_ns ns1 ns2 ns3 > > setup_hsr_interfaces 1 >

Re: [PATCH net v6] ipv6: Fix soft lockups in fib6_select_path under high next hop churn

2024-10-31 Thread Paolo Abeni
f36a30 > 28 [bd13003d3ee8] kthread at 8cf2b39f > 29 [bd13003d3f28] ret_from_fork at 8ce5fa64 > 30 [bd13003d3f50] ret_from_fork_asm at 8ce03cbb > > Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in > fib6_table") > Repo

Re: [PATCH net-next v2 2/4] net: hsr: Add VLAN CTAG filter support

2024-10-31 Thread Paolo Abeni
On 10/24/24 12:30, MD Danish Anwar wrote: > From: Murali Karicheri > > This patch adds support for VLAN ctag based filtering at slave devices. > The slave ethernet device may be capable of filtering ethernet packets > based on VLAN ID. This requires that when the VLAN interface is created > ov

Re: [PATCH v2 1/4] selftests: add unshare_test and msg_oob to gitignore

2024-09-26 Thread Paolo Abeni
On 9/25/24 18:41, Shuah Khan wrote: On 9/25/24 06:23, Javier Carrasco wrote: These executables are missing from their corresponding gitignore files. Add them to the lists. Signed-off-by: Javier Carrasco --- tools/testing/selftests/core/.gitignore | 1 + tools/testing/selftests/net/.gitign

Re: [PATCH v6] ptp: Add support for the AMZNC10C 'vmclock' device

2024-09-26 Thread Paolo Abeni
On 9/20/24 11:32, David Woodhouse wrote: From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that counter against an extern

Re: [PATCH net-next] selftests: net: ioam: add tunsrc support

2024-09-19 Thread Paolo Abeni
On 9/7/24 18:42, Justin Iurman wrote: TL;DR This patch comes from a discussion we had with Jakub and Paolo. This patch updates the IOAM selftests to support the new "tunsrc" feature of IOAM. As a consequence, some changes were required. For example, the IPv6 header must be accessed to check some

Re: [PATCH 1/1 V4] selftests: net: improve missing modules error message

2024-09-19 Thread Paolo Abeni
On 9/14/24 18:00, David Hunter wrote: The error message describing the required modules is inaccurate. Currently, only "SKIP: Need act_mirred module" is printed when any of the modules are missing. As a result, users might only include that module; however, three modules are required. Fix th

Re: [PATCH 1/1 V4] selftests: net: improve missing modules error message

2024-09-19 Thread Paolo Abeni
On 9/19/24 10:10, Paolo Abeni wrote: On 9/14/24 18:00, David Hunter wrote: The error message describing the required modules is inaccurate. Currently, only "SKIP: Need act_mirred module" is printed when any of the modules are missing. As a result, users might only include that modul

Re: [PATCH net v4 0/2] bpf: devmap: provide rxq after redirect

2024-09-19 Thread Paolo Abeni
On 9/11/24 10:41, Florian Kauer wrote: rxq contains a pointer to the device from where the redirect happened. Currently, the BPF program that was executed after a redirect via BPF_MAP_TYPE_DEVMAP* does not have it set. Add bugfix and related selftest. Signed-off-by: Florian Kauer --- Changes i

Re: [PATCH net 4/4] virtio_net: Update rss when set queue

2024-11-07 Thread Paolo Abeni
On 11/5/24 21:31, Joe Damato wrote: > On Mon, Nov 04, 2024 at 04:57:06PM +0800, Philo Lu wrote: >> RSS configuration should be updated with queue number. In particular, it >> should be updated when (1) rss enabled and (2) default rss configuration >> is used without user modification. >> >> During

Re: [PATCH v3 net] ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()

2024-11-28 Thread Paolo Abeni
On 11/23/24 10:42, Jinghao Jia wrote: > Under certain kernel configurations when building with Clang/LLVM, the > compiler does not generate a return or jump as the terminator > instruction for ip_vs_protocol_init(), triggering the following objtool > warning during build time: > > vmlinux.o: war

Re: [PATCH net-next v4 3/3] selftests: nic_performance: Add selftest for performance of NIC driver

2024-11-19 Thread Paolo Abeni
On 11/14/24 20:25, Mohan Prasad J wrote: > +#Setup: > +#Connect the DUT PC with NIC card to partner pc back via ethernet medium of > your choice(RJ45, T1) > +# > +#DUT PC Partner PC > +#┌───┐ > ┌─

Re: [PATCH net-next v2] mm: page_frag: fix a compile error when kernel is not compiled

2024-11-19 Thread Paolo Abeni
On 11/19/24 04:30, Yunsheng Lin wrote: > page_frag test module is an out of tree module, but built > using KDIR as the main kernel tree, the mm test suite is > just getting skipped if newly added page_frag test module > fails to compile due to kernel not yet compiled. > > Fix the above problem by

Re: [PATCH net-next v12 11/22] ovpn: implement TCP transport

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > +void ovpn_tcp_socket_detach(struct socket *sock) > +{ > + struct ovpn_socket *ovpn_sock; > + struct ovpn_peer *peer; > + > + if (!sock) > + return; > + > + rcu_read_lock(); > + ovpn_sock = rcu_dereference_sk_user_data(soc

Re: [PATCH net-next v12 09/22] ovpn: implement packet processing

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > @@ -286,6 +292,31 @@ struct ovpn_peer *ovpn_peer_get_by_dst(struct ovpn_priv > *ovpn, > return peer; > } > > +/** > + * ovpn_peer_check_by_src - check that skb source is routed via peer > + * @ovpn: the openvpn instance to search > + * @skb: th

Re: [PATCH net-next v12 08/22] ovpn: implement basic RX path (UDP)

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c > index > 2a3dbc723813a14070159318097755cc7ea3f216..1bbbaae8639477b67626731c3bd14810a65dfdcd > 100644 > --- a/drivers/net/ovpn/io.c > +++ b/drivers/net/ovpn/io.c > @@ -9,15 +9,78 @@ > > #inc

Re: [PATCH net-next v3 08/10] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-04 Thread Paolo Abeni
Hi, On 2/3/25 6:01 PM, Peter Seiderer wrote: > @@ -806,6 +812,9 @@ static long num_arg(const char __user *user_buffer, > unsigned long maxlen, > if ((c >= '0') && (c <= '9')) { > *num *= 10; > *num += c - '0'; > + } else if (i

Re: [PATCH net-next v3 02/10] net: pktgen: enable 'param=value' parsing

2025-02-04 Thread Paolo Abeni
On 2/3/25 6:01 PM, Peter Seiderer wrote: > Enable additional to 'parm value' the 'param=value' parsing It could be language bias on my side, by I find the above statement hard to parse. Could you please rephrase it? IMHO something alike: """ Enable more flexible parameters syntax, allowing "para

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

2025-02-11 Thread Paolo Abeni
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.path.realpath(__file__)) > +xdp = subprocess.Popen([f"{test_dir}/xdp_helper", f"{cfg.ifindex}", > f"{xdp_queue_id}"], > + stdin=subprocess.PIP

Re: [PATCH net v4 1/6] virtio_net: correct netdev_tx_reset_queue() invocation point

2024-12-10 Thread Paolo Abeni
On 12/6/24 02:10, Koichiro Den wrote: > When virtnet_close is followed by virtnet_open, some TX completions can > possibly remain unconsumed, until they are finally processed during the > first NAPI poll after the netdev_tx_reset_queue(), resulting in a crash > [1]. Commit b96ed2c97c79 ("virtio_net

Re: [PATCH net-next v12 17/22] ovpn: implement peer add/get/dump/delete via netlink

2024-12-03 Thread Paolo Abeni
On 12/2/24 16:07, Antonio Quartulli wrote: > +/** > + * ovpn_nl_peer_modify - modify the peer attributes according to the > incoming msg > + * @peer: the peer to modify > + * @info: generic netlink info from the user request > + * @attrs: the attributes from the user request > + * > + * Return: a

Re: [PATCH net v3 2/3] selftest/bpf: Add test for AF_VSOCK connect() racing sockmap update

2025-03-17 Thread Paolo Abeni
On 3/16/25 11:45 PM, Michal Luczaj wrote: > Racing signal-interrupted connect() and sockmap update may result in an > unconnected (and missing vsock transport) socket in a sockmap. > > Test spends 2 seconds attempting to reach WARN_ON_ONCE(). > > connect > / state = SS_CONNECTED / >

Re: [PATCH net 4/7] selftests/net: Add mixed select()+polling mode to TCP-AO tests

2025-03-18 Thread Paolo Abeni
On 3/12/25 10:10 AM, Dmitry Safonov wrote: > Currently, tcp_ao tests have two timeouts: TEST_RETRANSMIT_SEC and > TEST_TIMEOUT_SEC [by default 1 and 5 seconds]. The first one, > TEST_RETRANSMIT_SEC is used for operations that are expected to succeed > in order for a test to pass. It is usually not

Re: [PATCH] virtio-net: disable delayed refill when pausing rx

2025-04-08 Thread Paolo Abeni
On 4/8/25 9:34 AM, Jason Wang wrote: > On Mon, Apr 7, 2025 at 10:27 AM Bui Quang Minh > wrote: >> On 4/7/25 08:03, Xuan Zhuo wrote: >>> On Fri, 4 Apr 2025 16:39:03 +0700, Bui Quang Minh >>> wrote: When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call napi_disable() on the r

Re: [PATCH] selftests: mptcp: add comment for getaddrinfo

2025-04-08 Thread Paolo Abeni
On 4/8/25 5:09 AM, zhenwei pi wrote: > On 4/8/25 09:43, Geliang Tang wrote: >> On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote: >>> mptcp_connect.c is a startup tutorial of MPTCP programming, however >>> there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for >>> getaddrinfo MPTCP

Re: [PATCH net-next 1/2] vsock: Linger on unsent data

2025-04-10 Thread Paolo Abeni
On 4/7/25 8:41 PM, Michal Luczaj wrote: > Change the behaviour of a lingering close(): instead of waiting for all > data to be consumed, block until data is considered sent, i.e. until worker > picks the packets and decrements virtio_vsock_sock::bytes_unsent down to 0. I think it should be better

Re: [PATCH net] vsock: avoid timeout during connect() if the socket is closing

2025-04-01 Thread Paolo Abeni
uigi Leonardi > Closes: > https://lore.kernel.org/virtualization/bq6hxrolno2vmtqwcvb5bljfpb7mvwb3kohrvaed6auz5vxrfv@ijmd2f3grobn/ > Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") > Signed-off-by: Stefano Garzarella Acked-by: Paolo Abeni

Re: [PATCH net-next] selftests: drv-net: fix merge conflicts resolution

2025-03-14 Thread Paolo Abeni
On 3/14/25 9:35 AM, Matthieu Baerts (NGI0) wrote: > After the recent merge between net-next and net, I got some conflicts on > my side because the merge resolution was different from Stephen's one > [1] I applied on my side in the MPTCP tree. > > It looks like the code that is now in net-next is u

Re: [PATCH net-next v2] vhost/net: Defer TX queue re-enable until after sendmsg

2025-04-24 Thread Paolo Abeni
On 4/20/25 3:05 AM, Jon Kohler wrote: > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index b9b9e9d40951..9b04025eea66 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -769,13 +769,17 @@ static void handle_tx_copy(struct vhost_net *net, > struct socket *sock) >

Re: [PATCH net-next v2 4/4] selftests: drv-net: Test that NAPI ID is non-zero

2025-04-17 Thread Paolo Abeni
On 4/17/25 3:32 AM, Joe Damato wrote: > diff --git a/tools/testing/selftests/drivers/net/napi_id.py > b/tools/testing/selftests/drivers/net/napi_id.py > new file mode 100755 > index ..aee6f90be49b > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/napi_id.py > @@ -0,0 +1,24 @@

Re: [PATCH net-next v26 00/23] Introducing OpenVPN Data Channel Offload

2025-04-17 Thread Paolo Abeni
On 4/15/25 1:17 PM, Antonio Quartulli wrote: > Notable changes since v25: > * removed netdev notifier (was only used for our own devices) > * added .dellink implementation to address what was previously > done in notifier > * removed .ndo_open and moved netif_carrier_off() call to .ndo_init > * f

Re: [PATCH net-next v3] selftests/vsock: add initial vmtest.sh for vsock

2025-05-02 Thread Paolo Abeni
On 4/29/25 1:48 AM, Bobby Eshleman wrote: > This commit introduces a new vmtest.sh runner for vsock. > > It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, > H2G, and loopback. The testing tools from tools/testing/vsock/ are > reused. Currently, only vsock_test is used. > > VMCI

Re: [PATCH net-next v3] selftests/vsock: add initial vmtest.sh for vsock

2025-05-02 Thread Paolo Abeni
On 4/30/25 3:06 PM, Stefano Garzarella wrote: > On Mon, Apr 28, 2025 at 04:48:11PM -0700, Bobby Eshleman wrote: >> This commit introduces a new vmtest.sh runner for vsock. >> >> It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, >> H2G, and loopback. The testing tools from tools/t

Re: [PATCH net-next v7 6/8] net: pktgen: fix mpls reset parsing

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > diff --git a/net/core/pktgen.c b/net/core/pktgen.c > index ae5e81e62733..bb13a4591709 100644 > --- a/net/core/pktgen.c > +++ b/net/core/pktgen.c > @@ -915,8 +915,13 @@ static ssize_t get_labels(const char __user *buffer, > > max = min(8,

Re: [PATCH net-next v7 8/8] selftest: net: add proc_net_pktgen

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > +TEST_F(proc_net_pktgen, dev_cmd_min_pkt_size) { > + ssize_t len; > + > + // with trailing '\0' ... same here. Much more occurrences below. /P

Re: [PATCH net-next v7 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries > (instead of up to MAX_MPLS_LABELS - 1). Very minor nit... The above comments sounds misleading to me. I read it as the new limit is MAX_MPLS_LABELS divided by 16, that is 1. Thank

Re: [PATCH] virtio-net: disable delayed refill when setting up xdp

2025-04-03 Thread Paolo Abeni
On 4/2/25 7:42 AM, Bui Quang Minh wrote: > When setting up XDP for a running interface, we call napi_disable() on > the receive queue's napi. In delayed refill_work, it also calls > napi_disable() on the receive queue's napi. This can leads to deadlock > when napi_disable() is called on an already

Re: [PATCH net-next v4] selftests/vsock: add initial vmtest.sh for vsock

2025-05-13 Thread Paolo Abeni
On 5/8/25 3:23 AM, Bobby Eshleman wrote: > This commit introduces a new vmtest.sh runner for vsock. > > It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, > H2G, and loopback. The testing tools from tools/testing/vsock/ are > reused. Currently, only vsock_test is used. > > VMCI

Re: [PATCH net v2] vsock/test: Fix occasional failure in SIOCOUTQ tests

2025-05-13 Thread Paolo Abeni
On 5/7/25 5:14 PM, Konstantin Shkolnyy wrote: > These tests: > "SOCK_STREAM ioctl(SIOCOUTQ) 0 unsent bytes" > "SOCK_SEQPACKET ioctl(SIOCOUTQ) 0 unsent bytes" > output: "Unexpected 'SIOCOUTQ' value, expected 0, got 64 (CLIENT)". > > They test that the SIOCOUTQ ioctl reports 0 unsent bytes a

Re: [PATCH net-next 1/2] vsock/test: retry send() to avoid occasional failure in sigpipe test

2025-05-13 Thread Paolo Abeni
On 5/8/25 4:20 PM, Stefano Garzarella wrote: > From: Stefano Garzarella > > When the other peer calls shutdown(SHUT_RD), there is a chance that > the send() call could occur before the message carrying the close > information arrives over the transport. In such cases, the send() > might still suc

Re: [PATCH net-next 2/2] vsock/test: check also expected errno on sigpipe test

2025-05-13 Thread Paolo Abeni
On 5/8/25 4:20 PM, Stefano Garzarella wrote: > diff --git a/tools/testing/vsock/vsock_test.c > b/tools/testing/vsock/vsock_test.c > index 7de870dee1cf..533d9463a297 100644 > --- a/tools/testing/vsock/vsock_test.c > +++ b/tools/testing/vsock/vsock_test.c > @@ -1074,9 +1074,13 @@ static void test_st

Re: [PATCH net-next v7] selftests/vsock: add initial vmtest.sh for vsock

2025-05-20 Thread Paolo Abeni
On 5/20/25 10:24 AM, Stefano Garzarella wrote: > On Thu, May 15, 2025 at 03:00:48PM -0700, Bobby Eshleman wrote: >> This commit introduces a new vmtest.sh runner for vsock. >> >> It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, >> H2G, and loopback. The testing tools from tools/

Re: [PATCH net-next v7] selftests/vsock: add initial vmtest.sh for vsock

2025-05-20 Thread Paolo Abeni
On 5/16/25 12:00 AM, Bobby Eshleman wrote: > +tap_prefix() { > + sed -e "s/^/${TAP_PREFIX}/" > +} I think there is no need to the tap prefix to the output you intend to 'comment out', the kselftest infra should already add the tap prefix mark to each line generated by the test, > + > +tap_out

Re: [PATCH RESEND] selftests: nettest: Fix typo in log and error messages for clarity

2025-05-26 Thread Paolo Abeni
On 5/26/25 5:16 PM, Alok Tiwari wrote: > This patch corrects several logging and error message typos in nettest.c: > - Corrects function name in log messages "setsockopt" -> "getsockopt". > - Closes missing parentheses in "setsockopt(IPV6_FREEBIND)". > - Replaces misleading error text ("Invalid por

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

2025-06-05 Thread Paolo Abeni
On 6/3/25 5:06 PM, Bui Quang Minh wrote: > In virtio-net, we have not yet supported multi-buffer XDP packet in > zerocopy mode when there is a binding XDP program. However, in that > case, when receiving multi-buffer XDP packet, we skip the XDP program > and return XDP_PASS. As a result, the packet

Re: [PATCH net v2 2/2] virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp()

2025-06-24 Thread Paolo Abeni
On 6/21/25 4:49 PM, Bui Quang Minh wrote: > This commit does not do any functional changes. It moves xdp->data > adjustment for buffer other than first buffer to buf_to_xdp() helper so > that the xdp_buff adjustment does not scatter over different functions. > > Signed-off-by: Bui Quang Minh > --

Re: [PATCH net v2 1/2] virtio-net: xsk: rx: fix the frame's length check

2025-06-24 Thread Paolo Abeni
On 6/21/25 4:49 PM, Bui Quang Minh wrote: > When calling buf_to_xdp, the len argument is the frame data's length > without virtio header's length (vi->hdr_len). We check that len with > > xsk_pool_get_rx_frame_size() + vi->hdr_len > > to ensure the provided len does not larger than the allo

Re: [PATCH net 2/2] selftests: bonding: add test for passive LACP mode

2025-07-15 Thread Paolo Abeni
On 7/9/25 11:03 AM, Hangbin Liu wrote: > Add a selftest to verify bonding behavior when lacp_active is set to off. > > Signed-off-by: Hangbin Liu > --- > .../drivers/net/bonding/bond_passive_lacp.sh | 21 + > .../drivers/net/bonding/bond_topo_lacp.sh | 77 +++ > 2 files

Re: [PATCH net-next V2 0/3] in order support for vhost-net

2025-07-17 Thread Paolo Abeni
On 7/17/25 8:01 AM, Jason Wang wrote: > On Thu, Jul 17, 2025 at 1:55 PM Michael S. Tsirkin wrote: >> On Thu, Jul 17, 2025 at 10:03:00AM +0800, Jason Wang wrote: >>> On Thu, Jul 17, 2025 at 8:04 AM Jakub Kicinski wrote: On Mon, 14 Jul 2025 16:47:52 +0800 Jason Wang wrote: > This seri

Re: [PATCH net-next v4 1/3] selftests: drv-net: add helper/wrapper for bpftrace

2025-07-08 Thread Paolo Abeni
On 7/2/25 1:21 PM, Breno Leitao wrote: > From: Jakub Kicinski > > bpftrace is very useful for low level driver testing. perf or trace-cmd > would also do for collecting data from tracepoints, but they require > much more post-processing. > > Add a wrapper for running bpftrace and sanitizing its

Re: [PATCH net v2] virtio-net: fix received length check in big packets

2025-07-10 Thread Paolo Abeni
On 7/8/25 4:42 PM, Bui Quang Minh wrote: > Since commit 4959aebba8c0 ("virtio-net: use mtu size as buffer length > for big packets"), the allocated size for big packets is not > MAX_SKB_FRAGS * PAGE_SIZE anymore but depends on negotiated MTU. The > number of allocated frags for big packets is store

Re: [PATCH net v2] virtio-net: fix a rtnl_lock() deadlock during probing

2025-07-10 Thread Paolo Abeni
On 7/2/25 12:37 PM, Zigit Zo wrote: > This bug happens if the VMM sends a VIRTIO_NET_S_ANNOUNCE request while > the virtio-net driver is still probing with rtnl_lock() hold, this will > cause a recursive mutex in netdev_notify_peers(). > > Fix it by temporarily save the announce status while probi

Re: [PATCH net v3 2/2] virtio-net: xsk: rx: move the xdp->data adjustment to buf_to_xdp()

2025-07-03 Thread Paolo Abeni
On 7/1/25 4:23 AM, Jason Wang wrote: > On Mon, Jun 30, 2025 at 11:13 PM Bui Quang Minh > wrote: >> >> This commit does not do any functional changes. It moves xdp->data >> adjustment for buffer other than first buffer to buf_to_xdp() helper so >> that the xdp_buff adjustment does not scatter over

Re: [PATCH v3] selftests: net: fix resource leak in napi_id_helper.c

2025-07-03 Thread Paolo Abeni
On 6/30/25 8:36 PM, Malaya Kumar Rout wrote: > Resolve minor resource leaks reported by cppcheck in napi_id_helper.c > > cppcheck output before this patch: > tools/testing/selftests/drivers/net/napi_id_helper.c:37:3: error: Resource > leak: server [resourceLeak] > tools/testing/selftests/drivers/

Re: [PATCH net-next V2 0/3] in order support for vhost-net

2025-07-18 Thread Paolo Abeni
On 7/18/25 11:29 AM, Michael S. Tsirkin wrote: > Paolo I'm likely confused. That series is in net-next, right? > So now it would be work to drop it from there, and invalidate > all the testing it got there, for little benefit - > the merge conflict is easy to resolve. Yes, that series is in net-ne

Re: [PATCH net-next V2 0/3] in order support for vhost-net

2025-07-18 Thread Paolo Abeni
On 7/18/25 4:04 AM, Jason Wang wrote: > On Thu, Jul 17, 2025 at 9:52 PM Paolo Abeni wrote: >> On 7/17/25 8:01 AM, Jason Wang wrote: >>> On Thu, Jul 17, 2025 at 1:55 PM Michael S. Tsirkin wrote: >>>> On Thu, Jul 17, 2025 at 10:03:00AM +0800, Jason Wang wrote: >>

[tip:x86/asm] x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings

2017-06-30 Thread tip-bot for Paolo Abeni
Commit-ID: 236222d39347e0e486010f10c1493e83dbbdfba8 Gitweb: http://git.kernel.org/tip/236222d39347e0e486010f10c1493e83dbbdfba8 Author: Paolo Abeni AuthorDate: Thu, 29 Jun 2017 15:55:58 +0200 Committer: Ingo Molnar CommitDate: Fri, 30 Jun 2017 09:52:51 +0200 x86/uaccess: Optimize

<    1   2