| Message ID | d9c14824ec8786328076546ede61c98e21cf88ed.1794234673.git.ralf@mandelbit.com |
|---|---|
| State | Changes Requested |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:63cb:10b0:11a:a05e:cb97 with SMTP id
w11-n1csp802949lat;
Mon, 9 Nov 2026 07:09:34 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErEpTN50F1MPTF289e1qDsUNGaEprlRD65ZwOj4GijW13dAnCvky+5mj5Bve19x+pMycEhO8+w9fBIQ=@openvpn.net
X-Received: by 2002:a05:701b:2618:b0:1b2:559b:67ed with SMTP id
a92af1059eb24-1b39feaecc0mr5723712c88.26.1794236974221;
Mon, 09 Nov 2026 07:09:34 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1794236974; cv=none;
d=google.com; s=arc-20260327;
b=fS2wr7UHju1iJeQDCB5j//cJBXciMIUJRTO3FbIXZ68/z15mJxyPXOzfOiUXXXtdeA
qeeZXjJ3MIEfPHCt8vvq++GwBGM8SArKNVtSVAgwCI3VpcJgQDW17NvvyW58J5S/u4qy
w/d4wurPGDifkOh3dh27R7RVyolMwXOMgtYarI/QeauHDWgxYeGgB4ZYgo1IBJj1CZXF
LSfbL5tVUJa19R9UaJuXcglJGHFeY2PHSgAITzA7g5HJ8xAsl2jsEqvNzWHcXKeD2XcY
ZPcIrwyBIdJBSLLM1rzEhOTY3QMsoR3KCDVKty8W8zOu9WqvfJS/6kxVjqUZJtDUr295
4Zig==
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:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature:dkim-signature:dkim-signature;
bh=odlpY7JwXfEGYJJMlybtC2ECDkb6df8Y3E8LQzRPdYo=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=HE20OBpvG5GKAEJM7x/4hBj62NpalV5SrjCMg7A5t310c3ZghVo/1L6St7TWM8xP/s
0h/JokpISaqQHhGtlhVGXWR87NuGDsQtupNfVE4Ym9Rhi130QOFeTsbirV85wKpFsuIH
grSkMw32qoW9yGafRrXA/xN6w0YcP2EmQC39b/3+R3yzuiKAmlkGVDdyNq89qpD32pIb
9j4lsvXt7kw2/g2FYui+otL/YNZc8//cFf7S07b2l1grV7XUq/ntkS1flb4eseuVdSOZ
DvCkoeY8EsqHBrbfGzRapbALYKHw0lMF1hj8r0yr8zbZBNzeswG3aHjRr0hIioQnrAnH
UElQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=KIm0s04b;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=d0hMI8ia;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=eA7MYSIx;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b="OH/xkFJk";
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-1b3752c3f2esi14807658c88.5.2026.11.09.07.09.33
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 09 Nov 2026 07:09:34 -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=KIm0s04b;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=d0hMI8ia;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=eA7MYSIx;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b="OH/xkFJk";
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:References:In-Reply-To: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:List-Unsubscribe-Post:
List-Owner; bh=odlpY7JwXfEGYJJMlybtC2ECDkb6df8Y3E8LQzRPdYo=; b=KIm0s04b/ZsbEf
9MZJy2wE4IgoU/o3tNFou7y7zLs5kK+f3S7D0imsVti/D6uJ3zP697d8de8jibEBzk8uA+7YXvm3p
wfZpsBkmgKaoxfp49vAuAvKa9uipx5psAxuuX3oeoB5FzbfdjbG9u773dRV+iE5SMCcvBUmDWPHIV
fMY=;
Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com)
by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.100.1)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xQQzz-000000006HI-1myf;
Mon, 09 Nov 2026 15:09:31 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-1.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 1xQQzw-000000006H1-46bV
for openvpn-devel@lists.sourceforge.net;
Mon, 09 Nov 2026 15:09:28 +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:References:
In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:
List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive;
bh=3q7N4wO4Je0A/m5UkoGIPDRwnmB52vnHgiQtYTDrKGg=; b=d0hMI8ia/9L7q9O15f+u2xO0GP
8CWahyGPoR9j9ovcgaYxehdK6ng5OgDCK95lLyXqWuF2ptLl0WS8le8LC+4l8rMZfM9+6/X6Iip0u
k5DAgmtl8xC+wiEPPJz0yPFCDMIoIIoIN15Gl9jBvHIh2sjT2pseUbJ1pArgrJB9vMxk=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=3q7N4wO4Je0A/m5UkoGIPDRwnmB52vnHgiQtYTDrKGg=; b=eA7MYSIxCXKWsSnJbIaOjgucts
EfzwJ28I1ZqVFANwkmQm/KG0UjVEyxVo/aqQwt/DWYP1LIcCO9FUpEs7roZj7VNGdrpKqKBiBaNrh
7wU+IraUPVI2IMrGn+/6GUh4zdMf5mmBs+vTC0L75wThpQZ7UT4Jo7DO0qxuW8fuN2sM=;
Received: from mout-b-202.mailbox.org ([195.10.208.62])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xQQzu-000000000En-2mdK for openvpn-devel@lists.sourceforge.net;
Mon, 09 Nov 2026 15:09:28 +0000
Received: from smtp2.mailbox.org (smtp2.mailbox.org
[IPv6:2001:67c:2050:b231:465::2])
(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 4jNY8t2TZ7zKnTh
for <openvpn-devel@lists.sourceforge.net>;
Mon, 09 Nov 2026 16:09:18 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
s=MBO0001; t=1794236959;
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:
in-reply-to:in-reply-to:references:references;
bh=3q7N4wO4Je0A/m5UkoGIPDRwnmB52vnHgiQtYTDrKGg=;
b=OH/xkFJkOaHBVb/ZXowq1ceNbZD2vvu3yHeXu6kDtbQwojjgDUQEW2dEW0uW6+s+j56v0w
B9cFT3LmwkArdbPfXoHRjXdtZXBEOc89Ac1x1vKNrNLt9TfgE01Wr2C77w4TDTQnhVJCVz
WQdusLLtlMQLZZ5jjQY/MiaOeLFpXUoSyuyxoOxYvAwoDP7l+qXwTXg2VZVvti9qc/YVDT
hX6Q+cYOYQLG/QVf2UNdxaUNw50ihRKMEQJJ2fDuM2lomUz4Zza5b+r7L75T+y5R7PTpYY
xUbhJV92m2b+BljYrY537zhR/NOP8OPtKBzkLqpi1+LEsj2mXW7747LS+9F3bw==
Authentication-Results: outgoing_mbo_mout; dkim=none;
spf=pass (outgoing_mbo_mout: domain of ralf@mandelbit.com designates
2001:67c:2050:b231:465::2 as permitted sender)
smtp.mailfrom=ralf@mandelbit.com
From: Ralf Lici <ralf@mandelbit.com>
To: openvpn-devel@lists.sourceforge.net
Date: Mon, 9 Nov 2026 16:09:00 +0100
Message-ID:
<d9c14824ec8786328076546ede61c98e21cf88ed.1794234673.git.ralf@mandelbit.com>
X-Mailer: git-send-email 2.56.0
In-Reply-To: <cover.1794234673.git.ralf@mandelbit.com>
References: <cover.1794234673.git.ralf@mandelbit.com>
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4jNY8t2TZ7zKnTh
X-Spam-Score: -0.2 (/)
X-Spam-Report: Spam detection software,
running on the system "sfi-spamd-2.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: Forwarded TCP traffic can be coalesced into SKB_GSO_FRAGLIST
when the receiving host has no local TCP socket for the flow. Although ovpn
segments every GSO input itself, it does not advertise NETIF_F_ [...]
Content analysis details: (-0.2 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-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
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
X-Headers-End: 1xQQzu-000000000En-2mdK
Subject: [Openvpn-devel] [PATCH ovpn net-next v4 2/9] ovpn: accept frag-list
GSO input
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: 1881393829637156061
X-GMAIL-MSGID: 1881393829637156061
|
| Series |
ovpn: preserve GSO batching
|
|
Commit Message
Ralf Lici
Nov. 9, 2026, 3:09 p.m. UTC
Forwarded TCP traffic can be coalesced into SKB_GSO_FRAGLIST when the
receiving host has no local TCP socket for the flow. Although ovpn
segments every GSO input itself, it does not advertise NETIF_F_FRAGLIST,
so generic transmit validation segments these aggregates before calling
ovpn_net_xmit. That segmentation is functionally correct, but causes
ovpn_net_xmit to be invoked separately for every resulting packet.
Advertise frag-list storage so ovpn receives the aggregate intact and
performs protocol validation and destination-to-peer lookup once before
segmenting it. Frag-list GSO segmentation recovers the complete child
skbs, which can then be encrypted in place and transmitted
independently.
The feature also admits non-GSO frag lists, which describe one packet
split across several skbs. Let skb_cow_data preserve small lists
directly. If a list exceeds the AEAD scatterlist limit, linearize it and
continue rather than rejecting an otherwise valid packet.
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
---
No changes since v3 https://lore.kernel.org/openvpn-devel/d9c14824ec8786328076546ede61c98e21cf88ed.1794223133.git.ralf@mandelbit.com/
Changes since v2 https://lore.kernel.org/openvpn-devel/20261102164353.459969-3-ralf@mandelbit.com/
- Update the commit message now that fixed-size frag-list GSO input can
use the UDP GSO output path.
No changes since v1 https://lore.kernel.org/openvpn-devel/5baa1d94e29e7b109ffd412b4f1d5d113a319389.1790843153.git.ralf@mandelbit.com/
drivers/net/ovpn/crypto_aead.c | 8 ++++++--
drivers/net/ovpn/main.c | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ovpn/crypto_aead.c b/drivers/net/ovpn/crypto_aead.c index 74eaf6fac2f5..2af493fd5735 100644 --- a/drivers/net/ovpn/crypto_aead.c +++ b/drivers/net/ovpn/crypto_aead.c @@ -168,8 +168,12 @@ int ovpn_aead_encrypt(struct ovpn_peer *peer, struct ovpn_crypto_key_slot *ks, if (unlikely(nfrags < 0)) return nfrags; - if (unlikely(nfrags + 2 > (MAX_SKB_FRAGS + 2))) - return -ENOSPC; + if (unlikely(nfrags > MAX_SKB_FRAGS)) { + ret = skb_linearize(skb); + if (unlikely(ret)) + return ret; + nfrags = 1; + } /* allocate temporary memory for iv, sg and req */ tmp = kmalloc(ovpn_aead_crypto_tmp_size(ks->encrypt, nfrags), diff --git a/drivers/net/ovpn/main.c b/drivers/net/ovpn/main.c index 28e1eb06e127..ac4e0d85e215 100644 --- a/drivers/net/ovpn/main.c +++ b/drivers/net/ovpn/main.c @@ -158,7 +158,8 @@ static const struct ethtool_ops ovpn_ethtool_ops = { static void ovpn_setup(struct net_device *dev) { netdev_features_t feat = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_GSO | - NETIF_F_GSO_SOFTWARE | NETIF_F_HIGHDMA; + NETIF_F_GSO_SOFTWARE | NETIF_F_FRAGLIST | + NETIF_F_HIGHDMA; dev->needs_free_netdev = true;