| Message ID | cover.1794314969.git.ralf@mandelbit.com |
|---|---|
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:20a6:b0:11a:a05e:cb97 with SMTP id 38csp991094lad;
Tue, 10 Nov 2026 04:54:44 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErENvXYJ7VspUo9js/G7qBJDkq+No/PsuN3dpWyGs+DNKS61PdrxsrPga3T2JDQZjNj5ld7BHwekaCE=@openvpn.net
X-Received: by 2002:a05:7022:b052:20b0:191:ac4:55a7 with SMTP id
a92af1059eb24-1b3b6025b98mr3634588c88.23.1794315284242;
Tue, 10 Nov 2026 04:54:44 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1794315284; cv=none;
d=google.com; s=arc-20260327;
b=sqd49fatqAO3+C0Tn12BkpUuboGCiviIACz5/M8DacFmtt/Dv7KIgtTTpPMLkxElq/
1jVnN5xuafZMgfKsZqG8YVSq1uvZIAwjzbGki4nwTxnTA0FbEsVVk2OwhOruGmOJ1pHW
3yKC8UKcEmBAijyNo/XKgCgYtv+y42a4ycISy6JXwqI/1tEE8M95qi7mSWrqEWT9J7QF
hNNrpn1GeF59pCNWsfrpKH4+oe/Nc/+EzLDBZdq2cs60wJK0UXkLRt/6XMtIhRnHkk/y
Ig7hZnDQv4rscT7P467Vb/8nxKJqrl4fdnNXXUOUlwTDq3WTUIARx4ML4sx/9ilDfnDy
P/rA==
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=DTsckbIAT+cpMHm3whAXWFdnXxtYUIPdLGtG7n6n6zY=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=JwvUq015xJT6Zhjsvkb7jyq+emJkB96WP7ugQHi8qRLwPYfX5fD6FIU2UaqXB+PnoW
6nRIOS7DpGfl5Mw4hyfn3wyiRORvzyWsfWW4xyABGK8L6z7jG7mT8ywLr/wIUC9VU0kX
RlJP8kCz2UhpS6ayC0NApcdCr5uclykHSXyT1K+m10W5kIxLIO6+qHQENIXWRvWtcA3a
rhfXKb+2pDtoBohee/g95JvqIuRgIsACrJB4B3OrMmZhFZ/rVUWO/ne50OKfh2sYwRjk
ViybSnwh4S9oMI96tugSEylkfd86jTk1gKp2MPVFC3Ky8UhVBhb9lAWhUpR040rCdFMm
kqsw==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=drUTVAVW;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=cfu1gfkc;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=BfDl9PQp;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=uaPcIFia;
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
a92af1059eb24-1b3b588c169si6204562c88.1.2026.11.10.04.54.43
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Tue, 10 Nov 2026 04:54:44 -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=drUTVAVW;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=cfu1gfkc;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=BfDl9PQp;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=uaPcIFia;
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=DTsckbIAT+cpMHm3whAXWFdnXxtYUIPdLGtG7n6n6zY=; b=drUTVAVW3pSeso3fmySIyaKBSc
hRp/KuYpLyR0y7tlflpPI466KlSbytdMkcBGaOO9uX4ED5n3lXWuifKE1tU7tUBKC05afBvmz7rq2
rJhXrdeI7yl0mHx6Ne3yCR/9VLPEQgp6+PYJduPpvlP7Cp6QO6TAGEZiESUO1An94PW8=;
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 1xQlN3-000000001zz-3Wwn;
Tue, 10 Nov 2026 12:54:41 +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 1xQlN1-000000001zf-2lNM
for openvpn-devel@lists.sourceforge.net;
Tue, 10 Nov 2026 12:54:41 +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=SHcnLx1rqLIvEY54xgb03wQ0Kq8CAOXLIDf56ZJqPsI=; b=cfu1gfkc7QuCGcObH1Ofi1HRMv
DQMeU6gcezR4tWLOY8IY2aFylmH+l97WAgym0oEAbDze0z0bt8MaUInscZC0DYEpYBR951JaX0qPM
cXMFY+6OSRMF/FaZDXwDqJunDru3l3ixgwf78spuDOI4AUYcMbHjC7HCGKJsbZ1d5MNk=;
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=SHcnLx1rqLIvEY54xgb03wQ0Kq8CAOXLIDf56ZJqPsI=; b=BfDl9PQpBRPHEIk2yB0RioyPNs
yqzAN4lFXq+3ofxR+t/HUrzXGhhfvI4KrCd5exI3zDufg2YIvPak1DvISejGy1jlXoJdTQHcbGRUf
R6uZNEXhQMex677sJpIC4cM57+ICWAHFvXEwFQfpyJGamwgVcOZISVgLvkTIZjO6YqUw=;
Received: from mout-b-202.mailbox.org ([195.10.208.62])
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xQlMz-00000000699-3bjV for openvpn-devel@lists.sourceforge.net;
Tue, 10 Nov 2026 12:54:39 +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-202.mailbox.org (Postfix) with ESMTPS id 4jP66s3RNRzKnb1
for <openvpn-devel@lists.sourceforge.net>;
Tue, 10 Nov 2026 13:54:29 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
s=MBO0001; t=1794315269;
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=SHcnLx1rqLIvEY54xgb03wQ0Kq8CAOXLIDf56ZJqPsI=;
b=uaPcIFiapqsotVYLazNlVpJt9cvu/n5UrPQTrFPQK+sTuxOGjDgMH33am0Zhna3CYEp6Db
7pG9hUchB0OzqspOGQpMN62NSfZf1090x5r2/WWRz0Fxqrac5xx2oiPbdIfYbvwWz9GzfV
ItmfGKA/xVoYCrMeWGV+DlBlpDRTB6+TSEfqV0iI75HSxghKLcvU31865a8zP/WkpOqx96
/W6bg8NPbW4GSyyx81PHVGGy6XQZjuAXRO7rC4GYt8vsK2w0+/oYdBM2j4CfJEXY6n3f6t
FiOhT/uh5uPf55m0IccASvTPsbcCZlxieX+tpbu39r+2RKsw8rjrT4ZaW5mhIg==
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: Tue, 10 Nov 2026 13:54:17 +0100
Message-ID: <cover.1794314969.git.ralf@mandelbit.com>
X-Mailer: git-send-email 2.56.0
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4jP66s3RNRzKnb1
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,
These patches were initially included in a joint GSO-GRO
series [1] implementing both TX and RX batching mechanisms in the ovpn data
path. Sashiko's review of v2 of that series identified fundamental [...]
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_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
X-Headers-End: 1xQlMz-00000000699-3bjV
Subject: [Openvpn-devel] [PATCH ovpn net-next 0/5] ovpn: construct and
process GRO batches
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: 1881475943569031181
X-GMAIL-MSGID: 1881475943569031181
|
| Series |
ovpn: construct and process GRO batches
|
|
Message
Ralf Lici
Nov. 10, 2026, 12:54 p.m. UTC
Hi,
These patches were initially included in a joint GSO-GRO series [1]
implementing both TX and RX batching mechanisms in the ovpn data path.
Sashiko's review of v2 of that series identified fundamental flaws in
the GRO part which required a broad redesign of the new RX path. So I
decided to proceed with the GSO series separately [2] and keep this
series GRO-specific since the two mechanisms are not functionally
dependent. The series applies both on its own and on top of [2].
The redesign uses the standard SKB_GSO_UDP_L4 | SKB_GSO_FRAGLIST
representation instead of giving an ovpn aggregate tunnel-specific
completion semantics. This requires UDP to let an encapsulation callback
opt into consuming that representation, while retaining a
segment-and-redeliver fallback when the callback is absent or declines
it. It also requires detachable GRO callbacks: unlike a conventional
kernel-owned tunnel socket, ovpn attaches to a userspace socket which
can outlive its association with the driver. The first three patches
provide those core contracts and make UDP_ENCAP changes retire
detachable callbacks before replacing the encapsulation state. Clearly,
those patches are more suited to netdev than openvpn-devel, but in order
to keep this series applicable and reviewable, they are included in this
openvpn-devel-targeted series. Patch 1 explains why this opt-in does not
reopen commit 3d010c8031e3 and shows that consuming the aggregate
directly is 22.7% to 25.2% faster than letting UDP segment it first.
On receive, the ovpn GRO callback collects compatible DATA_V2 records
from one outer transport flow, matching their opcode, key and peer
header while retaining every complete encrypted record as a separate
frag-list entry. The aggregate continues through the ordinary outer
receive stack. At the encapsulation callback, ovpn validates its layout,
ownership, headers and outer tuple before detaching the records,
propagating post-GRO metadata and authenticating each one independently.
Any aggregate which ovpn cannot accept whole, such as a foreign or
modified one, is declined, causing UDP to segment it and retry delivery
one datagram at a time. The final patch uses the resulting lookahead to
prefetch ciphertext two records before it is decrypted.
Performance was measured with the GSO series [2] applied solely to keep
transmit from limiting the receive comparison. Five interleaved
60-second iperf3 -Z single-flow AES-128-GCM runs in each direction,
after a 10-second warm-up, over two directly connected 100-Gbit/s mlx5
ports produced:
Forward Reverse
Without GRO 18.721 Gbit/s 18.777 Gbit/s
With GRO 21.542 Gbit/s 21.366 Gbit/s
With GRO + RX prefetch 25.741 Gbit/s 25.150 Gbit/s
The complete series improved throughput by 37.5% forward and 33.9%
reverse. Across the monitored data-path CPUs, mean cycles per byte fell
from 4.535 to 3.896 (-14.1%) and instructions per byte from 10.913 to
9.492 (-13.0%). Individual patch messages contain the incremental
measurements and further test details.
Thanks,
Ralf Lici
Mandelbit Srl
[1] https://lore.kernel.org/openvpn-devel/20261102164353.459969-1-ralf@mandelbit.com/
[2] https://lore.kernel.org/openvpn-devel/cover.1794244231.git.ralf@mandelbit.com/
---
Ralf Lici (5):
udp: let encapsulation callbacks consume UDP frag-list GSO
udp_tunnel: support detachable GRO receive callbacks
udp: detach tunnel GRO before changing UDP encapsulation
ovpn: coalesce UDP data records with GRO
ovpn: prefetch encrypted records before GRO batch decryption
drivers/net/ovpn/udp.c | 332 ++++++++++++++++++++++++++++++++++++-
include/linux/udp.h | 13 ++
include/net/udp_tunnel.h | 3 +
net/core/gro.c | 1 +
net/ipv4/udp.c | 43 ++++-
net/ipv4/udp_offload.c | 59 ++++++-
net/ipv4/udp_tunnel_core.c | 31 +++-
net/ipv6/udp.c | 37 ++++-
8 files changed, 487 insertions(+), 32 deletions(-)
base-commit: 734bef548a96e8774d6eef5dfa2026c6edc4e80b