| Message ID | 20261102164353.459969-1-ralf@mandelbit.com |
|---|---|
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:3119:b0:118:2077:975e with SMTP id
e25csp5673355laa;
Mon, 2 Nov 2026 08:44:21 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AKwUvBy4GtvILQDlee52aE0LCTmwMLDygiVKZl7TTQGmPbWJ690DSMhx7WmD3fWalDIAp1udqS4zbhtEosg=@openvpn.net
X-Received: by 2002:a05:693c:8956:10b0:367:23b6:94e1 with SMTP id
5a478bee46e88-36a42444c49mr16531864eec.41.1793637861500;
Mon, 02 Nov 2026 08:44:21 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1793637861; cv=none;
d=google.com; s=arc-20260327;
b=Uki1txpHuPx0d5OHOjvP5D5HvEei71W+6UbZQ/X6jxf4crm8nRO5bGBTwSzs5A5Xl1
s6y4YDUanXVNTrGEZJZo6GmZzWP60b1nCq5pItMdfwM3eK11hCD9K092Z9M3Axc8qg4+
SKV8rJyj7mE3aW658+YPQIIFe0d/d9qX5oXtHeGkMimUcz34G6TRjOSfPdEDokJ0l0el
AhqPwxMVrDnbh7JFM0lG8OiOHOI0OWK41TJ4cxsEzxAqbb+lWoFrztJ1rTXCosJETdK2
z3TLNNUkBpIg87jGfqCn2lHnQSWGIYI4CmXlkrkw7RSgEsx1Y+SwgfLb8Q1KWbRNYzrH
boYQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:message-id:date:to:from:dkim-signature:dkim-signature
:dkim-signature:dkim-signature;
bh=bDAa2gVJrrR3n95+NlZEKkvhKqwB1D5pYbgW08NZcIo=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=A0zA+ClUkk/L8PSdMv1Q5/UZVaZK0F/NhnBDA8M5IsF2py8nqizBgVMVfzlm3bAQ9d
gQuW0Rnq1RPFZkrxBwPHw5KgRx+29MBDf8zQ/myh8+yBlbPVnwnj52V7MZPXVTH5S3F1
xOm54oLdSbhlN7WDBKpJKhgFhSanQABdb9QpakmbcL7jDcimK2JbioKLkXiiAOGGDD71
YVJRKRHXiDNNHrOtbtZoBRG3jNCoeHjuGCre45XgA1mGBv1LtloGV7XZydlbhzv/ElB/
Sb5zmUftgKWRdSfLT5QTie7W1hGGV9ODiZ2skUdbQnV1tjJqvzXSGIYJUGtkFwhtIZDG
rGOg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=jVquz29r;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=aEFounns;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=Gkcu6uB2;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=1L6lou1X;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
5a478bee46e88-36a42b581bcsi31147993eec.72.2026.11.02.08.44.21
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 02 Nov 2026 08:44:21 -0800 (PST)
Received-SPF: pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) client-ip=216.105.38.7;
Authentication-Results: mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=jVquz29r;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=aEFounns;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=Gkcu6uB2;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=1L6lou1X;
spf=pass (google.com: domain of
openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as
permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:
List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:
Subject:MIME-Version:Message-ID:Date:To:From:Sender:Reply-To:Cc:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:In-Reply-To:References:List-Unsubscribe-Post:List-Owner;
bh=bDAa2gVJrrR3n95+NlZEKkvhKqwB1D5pYbgW08NZcIo=; b=jVquz29r5f+xeWgd3UHnHu3Qjo
AayqkqYabEgnJ4fPg2dCdWIeGka/RCqp1QblLywB82r4fCEaOM/oGqzq3DxVTjbMskcrFQdtf5XQr
l1d11Cegb/dMGRKugDouamG8RwliwR+0sjJr+o26YZVn+0IFMLWXuY/6xNhWm5ZD/srI=;
Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com)
by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xNv8u-000000000hh-1ckh;
Mon, 02 Nov 2026 16:44:20 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1)
(envelope-from <ralf@mandelbit.com>) id 1xNv8h-000000000hF-3Pvw
for openvpn-devel@lists.sourceforge.net;
Mon, 02 Nov 2026 16:44:09 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-ID:
Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=BZrw4Kf8r2gZVTy2U3QzK3EykllVF2PzfhzTueuGIC8=; b=aEFounnsBQmkyq6wf3Re5ZE1Dw
Gma2xcW1DnWndGblEyMwHGkaua4QWubyMb4IKed4GaZv8t0SL4VEiYSVlGIyo9CP8MxkJpcfVrDiA
uHW1wRckBx3RWrjNYrsA7/ZfwK0AaCjs6TVsrVzRkC+N+hJpLGMHqt3xFLdh99ch34AE=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:To:From:
Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:
References:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=BZrw4Kf8r2gZVTy2U3QzK3EykllVF2PzfhzTueuGIC8=; b=Gkcu6uB2FwNp/Cr5PYyqyW/65/
6d4NSAn9msz9GpbM3ugHU6OjOBf3ol8gT85Y7b1hAYDVtFip5jzfFJWTaovODUmq6ULk8chIcO5jS
+TaULVs5xCln9WhTrIjEM0jyEcOuSAsAlWwO2WtdSFyc+vVuzJqT3FTd6nIoS4YBWYe8=;
Received: from mout-b-206.mailbox.org ([195.10.208.51])
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xNv8e-000000005Wv-2OVf for openvpn-devel@lists.sourceforge.net;
Mon, 02 Nov 2026 16:44:07 +0000
Received: from smtp102.mailbox.org (smtp102.mailbox.org
[IPv6:2001:67c:2050:b231:465::102])
(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 4jJHbJ3BJmzYQ
for <openvpn-devel@lists.sourceforge.net>;
Mon, 02 Nov 2026 17:43:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
s=MBO0001; t=1793637836;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding;
bh=BZrw4Kf8r2gZVTy2U3QzK3EykllVF2PzfhzTueuGIC8=;
b=1L6lou1XxKPUGI5DDFb3hTmOcw3YZQNDrqCSh32YW7jY8koTHHA1ctuiw2v0uZ9OfWGa0R
1l5B5mfFdqO44qi0cX4zYAGWOElwM9rdLg9Y+UeYVEvw9quzX8C3FME7j+9yGU8h97ZFTt
uDW01a5hTkZTfHERiSHzTIL2hITX4WajVDxm3YF7V4GPWu8vTd0jrvbCo90tNA2hhxy/dL
QXDrgQAdVxWcF+TzwjuI9ea7W2O5srqfrESctTl2KxGcB06TGKykTUQzEJ8G45lzQH8K8Q
dmmQ9EypHDpl8yjo4HT7YTaSZuZTOzkT0LmQJWIQLBQjz3FKDXn0o8WYDPnxdw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
spf=pass (outgoing_mbo_mout: domain of ralf@mandelbit.com designates
2001:67c:2050:b231:465::102 as permitted sender)
smtp.mailfrom=ralf@mandelbit.com
From: Ralf Lici <ralf@mandelbit.com>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 2 Nov 2026 17:43:42 +0100
Message-ID: <20261102164353.459969-1-ralf@mandelbit.com>
X-Mailer: git-send-email 2.56.0
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4jJHbJ3BJmzYQ
X-Spam-Score: -0.2 (/)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-1.hosts.colo.sdot.me",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Hi,
This series is the respin of the work exploring how ovpn
can preserve GSO and GRO batching across its data path. Since sending the
RFC, I spent more time profiling the paths on different systems and r [...]
Content analysis details: (-0.2 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
X-Headers-End: 1xNv8e-000000005Wv-2OVf
Subject: [Openvpn-devel] [PATCH ovpn net-next v2 0/9] ovpn: preserve GSO and
GRO batching
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: 1880765614172080325
X-GMAIL-MSGID: 1880765614172080325
|
| Series |
ovpn: preserve GSO and GRO batching
|
|
Message
Ralf Lici
Nov. 2, 2026, 4:43 p.m. UTC
Hi, This series is the respin of the work exploring how ovpn can preserve GSO and GRO batching across its data path. Since sending the RFC, I spent more time profiling the paths on different systems and refining the implementation. The result is a smaller series with some additional optimizations and a fresh set of measurements. On transmit, it lets GSO skbs reach ovpn, completes each inner packet's checksum during software segmentation and, when the layout permits, encrypts the resulting packets directly into a UDP GSO aggregate. Ordinary packets and frag-list GSO children retain the existing in-place encryption path. Packet IDs for a UDP GSO batch are reserved as a single range instead of one segment at a time. The final patch also constructs each record's AAD directly in its output range when that range has a suitable scatterlist representation, avoiding a scratch-buffer copy. On receive, ovpn uses UDP GRO to collect compatible DATA_V2 records in a frag-list, then detaches and authenticates each record independently. Small transmit and receive prefetch changes use the resulting lookahead to overlap memory access with encryption and decryption. On two directly connected 100-Gbit/s mlx5 ports, five interleaved iperf3 -t 60 -O 10 single-flow AES-128-GCM runs in each direction raised mean throughput from 12.053 to 25.002 Gbit/s. Individual patch messages contain the intermediate measurements and test details. Thanks, Ralf Lici Mandelbit Srl --- Changes since v1 https://lore.kernel.org/openvpn-devel/cover.1790843153.git.ralf@mandelbit.com/ - Release successfully encrypted GSO source skbs with consume_skb after their data has been transferred to the output aggregate. (Antonio) - Complete a held GRO aggregate before delivering an unmergeable record, and let a DATA_V2 record with a changed header start the next aggregate. (Antonio) - Document that RX prefetch primarily targets synchronous software AEAD; asynchronous transforms are not expected to benefit in the same way. - Add direct placement of record AAD in the output aggregate, retaining the scratch-and-copy path as a fallback. Changes since RFC v4 https://lore.kernel.org/openvpn-devel/cover.1789558856.git.ralf@mandelbit.com/ - Drop the opt-in direct GRO mode and the generic GRO ownership change it required. The series now retains the complete outer receive stack. - Preserve safe page-backed payload fragments during GSO segmentation and map them directly into the AEAD source scatterlist. - Reserve one consecutive packet-ID range for each UDP GSO batch instead of updating the counter once per segment. - Extend transmit prefetch to the first payload fragment of segments encrypted into a UDP GSO aggregate. - Refresh the GSO, GRO and prefetch measurements using two directly connected 100-Gbit/s mlx5 ports. Ralf Lici (9): ovpn: advertise checksum offload for GSO packets ovpn: accept frag-list GSO input ovpn: refactor AEAD encryption helpers ovpn: convert GSO input into UDP GSO output ovpn: reserve packet-ID ranges for UDP GSO batches ovpn: coalesce UDP data records with GRO ovpn: prefetch encrypted records before GRO batch decryption ovpn: prefetch GSO segments before encryption ovpn: place GSO record AAD directly in output drivers/net/ovpn/crypto_aead.c | 212 ++++++++++++++++---- drivers/net/ovpn/crypto_aead.h | 4 + drivers/net/ovpn/io.c | 342 ++++++++++++++++++++++++++++++--- drivers/net/ovpn/io.h | 18 +- drivers/net/ovpn/main.c | 5 +- drivers/net/ovpn/pktid.h | 48 +++++ drivers/net/ovpn/proto.h | 4 + drivers/net/ovpn/skb.h | 27 ++- drivers/net/ovpn/stats.h | 16 +- drivers/net/ovpn/tcp.c | 4 +- drivers/net/ovpn/udp.c | 260 ++++++++++++++++++++++++- net/core/gro.c | 1 + net/ipv4/udp_offload.c | 3 +- 13 files changed, 856 insertions(+), 88 deletions(-) base-commit: 734bef548a96e8774d6eef5dfa2026c6edc4e80b