From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796134310; b=eyxKiJ/0wjUi0x024dYc/OGjjgX6FZ6oQ/hOZgFre6Q5ATXM+h7sZlYpR9lGhAgum97k zVhKGAbX0IlMtSYMyveVj9rjSHJwXU7NRvOO+Pp+4Xi9U/MS+PQZ8/f5R6P4PdeTwzTMG qc5Z1YwePSfpWXapuvGgxXxCsfCgDozp6jZjCfH4tyxn38b2VpfEngmm6h8S7VJUEgmxc CDnPtREucQUeSfnFJhvxR5JvCFUSDeoLFG6kBMibMg9sbQaEKOS+mMNXQAoZtIWulvRsC PFiHHpdGdMPQq4VQ1WrfH5vVlSFlHu188yB9ipm6XX/lJ1xS4/d/CxQbBZcHnbVEugQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796134310; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=brN6pWJbFGk3v0+ipTn+APpw/DdPmoBg2OJaY1t3e00=; b=LOW6JVY7A1vmxuwXW/RrbKQEo0olUxKBFjBHbzaK9aHaK4GqdVAuArHMMDNVurritkTo stYDWupaQyvYYE4YlUoPqWNUmPimXiFMIlESjoj4qRXKyiZtMHgPpR8N/HylwfwLoNS4V Xfd+sO75aFPdF868yY0F2/sfPj0A14wnk2CewkhIRITyMxC/eSlAwMmESA8T+6yIZHKRw 4JhoLI6xajt95zADFON5+DoZV/N02nNqYIlkANSVnsdVdx9Klia7yIudNuuK5GHu1QLW2 1fJvc6uvQRqV4PqXFEiVG/EEaN4OEfi6//F56c00gdpTtMXi+YZprHkAl/PlN/Uqx0g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=mandelbit.com; spf=pass smtp.mailfrom=mandelbit.com; dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b="z/AJLfiI"; arc=none smtp.remote-ip=195.10.208.51 Received: from mout-b-206.mailbox.org (mout-b-206.mailbox.org [195.10.208.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD885606A339; Tue, 1 Dec 2026 14:11:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AD885606A339 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=z/AJLfiI Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-206.mailbox.org (Postfix) with ESMTPS id 4jf2rK2xVhzZy; Tue, 01 Dec 2026 15:11:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1796134305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=brN6pWJbFGk3v0+ipTn+APpw/DdPmoBg2OJaY1t3e00=; b=z/AJLfiIfNLkYbSJCTo6rqaYJ7Ujvihsh4V8NMYHjrPfpEp1701sInwJgelKNXibZ6VSCe Pf2kT8m7Uq4hILlW1LwzLjVKlfwJU5EMUjSpSFcZ1bGu8QpOi/x4ut/2M+tXocP2lDaHBv ksFioWCBocaOH2LGwaQgNyaFIxyRnq1B68kLH4PxWOi0aDjRCdNz11BJq5s/YweXW0Wscp dghTVWC15sLvJjFMV/8L4dZf/n+XxsorucpLZ7OjdZ28eh0U57nqvv4Pz5G0x2XIz3HOOR BncBCWunSB4UXkWcGUdrrevwERrZ/Zr9pQ2fsptYlKarzlA3U/3oNm+muyPP9Q== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::202 as permitted sender) smtp.mailfrom=antonio@mandelbit.com From: Antonio Quartulli To: Dragos Tatulea Cc: Antonio Quartulli , netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, leon@kernel.org, cratiu@nvidia.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path Date: Tue, 1 Dec 2026 15:11:31 +0100 Message-ID: <20261201141133.1747734-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261201112031.2657332-1-dtatulea@nvidia.com> References: <20261104195241.1883539-1-antonio@mandelbit.com> <674eb8ef-c93f-4926-a760-62df154ed3eb@mandelbit.com> <20261125215233.3422038-1-dtatulea@nvidia.com> <20261201112031.2657332-1-dtatulea@nvidia.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4jf2rK2xVhzZy Hi Dragos, On 01/12/2026 12:20, Dragos Tatulea wrote: > I was trying to reproduce this and am not able to see such a large diff. > Any steps on how to reproduce this? > > I ran 3 ovpn tunnels over a single queue, one TCP stream per queue and > was a very small diff. Thanks a lot for trying ovpn out :-) I re-measured today and found why: my numbers were taken with the ovpn code we are working on, not with the ovpn in net-next, and the two behave very differently herei (we are testing GRO/GSO and other techniques to squeeze every single Bps out of it!). Same setup as before (Ryzen 9 9950X, ConnectX-5, MTU 1500, stock ring and coalescing, one RX queue with its IRQ on a dedicated CPU, AES-GCM, mean of 3 rounds), Gb/s: off v2 v2 w/o shinfo net-next ovpn, 1 tunnel 17.8 17.9 17.9 net-next ovpn, 3 tunnels 18.0 20.5 19.7 ovpn perf branch, 1 tunnel 33.0 44.9 37.5 ovpn perf branch, 3 tunnels 30.8 41.3 38.1 ("3 tunnels" is your layout: 3 tunnels over a single queue, one TCP stream each.) With the net-next ovpn the sender is the bottleneck: without GSO, every packet is encrypted in the sending application's context, which caps a tunnel at about 18 Gb/s. The receiver gets cheaper with v2, but that doesn't show as throughput. That's the small difference you saw. Our perf branch adds UDP GSO/GRO batching to ovpn (Ralf Lici's series on openvpn-devel) and other RX/TX work, which makes the receiving CPU the bottleneck. There v2 gives +34-36%, also with your layout. The skb_shared_info line is worth +20% of that with one tunnel and +8% with three; my earlier "+4-5% without it" came from an older version of our GRO code and is outdated. If you want to try it: the branch is antonio/ovpn-perf-next at https://github.com/mandelbitdev/ovpn-net-next (4a8182fa1798). It needs its own kernel (it changes UDP GRO too); the tunnels can be set up with the ovpn-cli of its selftests. The quickest way to see the throughput effect without ovpn is plain TCP with several flows on one RX queue, the application on another CPU: receiver: ethtool -L combined 1 echo > /proc/irq//smp_affinity_list taskset -c iperf3 -s sender: iperf3 -c -P 4 -t 20 That gives here, mean of 3 rounds: off v2 TCP, 4 streams, Gb/s 56.1 89.8 +60% RX CPU cycles/packet 1172 664 -43% TCP, 1 stream, Gb/s 50.4 49.5 RX CPU cycles/packet 1176 663 -44% With 4 streams and no prefetch the RX CPU is saturated and drops (about 10 million TCP retransmits per 20 s run, 130 thousand with v2). A single stream stays at about 50 Gb/s either way, so there the gain shows only as RX CPU time. I can share the scripts I used for both if they help. Ah, one last note: for convenience I run my tests on a single host, with the two ports of the CX5 connected to each other and two netns that set them apart (but as long as you have enough cores, this shouldn't make a difference for us). Cheers, -- Antonio Quartulli Mandelbit Srl https://www.mandelbit.com