| Message ID | 5baa1d94e29e7b109ffd412b4f1d5d113a319389.1790843153.git.ralf@mandelbit.com |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:6c89:b0:8b5:356c:6cee with SMTP id p9csp1750193may;
Thu, 1 Oct 2026 01:43:49 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AKwUvBwD7EEZLZoffAAAY3L7Jzp8ok1eThldwuDRpenKil2MiVFY/36fO+E5lQFXr5c34fI0P33tKrT5AXg=@openvpn.net
X-Received: by 2002:a05:6808:eca:b0:4e6:fdeb:934e with SMTP id
5614622812f47-4f1b0d0b5d0mr4087766b6e.6.1790844118525;
Thu, 01 Oct 2026 01:41:58 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1790844118; cv=none;
d=google.com; s=arc-20260327;
b=fZCjKByERqHZMeYPoqOx1U1UicdsXg9FE1TzBpvnW+jDJiszAh1oCpyhkSpGH1zlRy
NHZTIc6DKCfkt4OmqEsV1nS2JyxSxtHP7Eu+13Q2DsPU9WPfkSxoGz1om0zlBUTtiAtO
5UQjym7PoKqGLu1ARQqzzdIP0dYZZqHmbEfdJ+hIDZtmZcSV0I+Uvx0/Ujg6f6jWvTMs
Puht+3fltAjjK6PNV6f6Nj6Gtmk15a0xOw+K2UdSl44QGnjOxZgeWthIVLw5/Fw14Cs+
aYp6svjVQiQ/ERDqZFmX3yjZuKJ3ocwU/X3yDDePEMpYdDPcHKyB6W9ePeNVCSof9+u+
McHQ==
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=jl2AJNI8c817z+i/47LK4XFdnDZYvWbNabUwnW2POV0=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=PvmpIMKI2u+wFONUt3VoY8OXoiNWUVHFbQCyRedGwkUHzHl/AAIIE2RXb8y/cTjFdl
M7UMEhILrDs3+wthigR80ijSoj8Glcz2X2idDta65ajTj3gR8EfrQA7dnrcWsBlOIi9+
Rx4UTOqVulQDkcMLMwzH8J2aUDKc2zkw8DUOVKV6NtFAmVTJjB3UCfZGXdBSmCJlRbyV
bUm51Mn53xacng6PN2Bg0QUw1H4WxpWnCKiAeHKR7lkgB/eHG+QKcHo7yrijRF/pO9Y6
/0M8RGI/A3IzkNRisl+VFhWMHncS1NXTcROFZljk5JBKqMOZ8t5NH8YdhcWbNb25YJdA
KiWQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=bj++wUSK;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=WJ++Rg7e;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="Lm/XqmGL";
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=tUFTo+4y;
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
5614622812f47-4f352d24c8bsi3040262b6e.93.2026.10.01.01.41.58
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 01 Oct 2026 01:41:58 -0700 (PDT)
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=bj++wUSK;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=WJ++Rg7e;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="Lm/XqmGL";
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=tUFTo+4y;
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-Owner;
bh=jl2AJNI8c817z+i/47LK4XFdnDZYvWbNabUwnW2POV0=; b=bj++wUSKAbEuMcdFLpxA3djeU0
05LIukcBziUmt8EviAgXNEFAN+WImray/wiq2StXj3VD4foXp1YM2gGkO1r2fTKLUEXpkvVbeoH3H
MzaEo2pkXrDli4ycxT80XS30fv1BSmAnJBqmySI5RZYNuomhEbxoejkn4ZWbuM+Az7co=;
Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com)
by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xCCMR-0000BC-Dd;
Thu, 01 Oct 2026 08:41:52 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <ralf@mandelbit.com>) id 1xCCMK-0000Am-OL
for openvpn-devel@lists.sourceforge.net;
Thu, 01 Oct 2026 08:41:46 +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-Subscribe:List-Post:List-Owner:List-Archive;
bh=L/QYUSx4EvRc/2E6p7CIOHwdh1Za13HtWolk4+IhE/s=; b=WJ++Rg7eTMSQ7HkOP/NiEXKtrK
nUH7oTEF7WA8cv8VbfJBCp8P2RiADZb5+oRLgtIjfVMCTVhOlUHcbAaWUzNioP98gSy3hfuRqzc8Z
nK0pColKcz8cRxGsGFM6zcGby6kV4u5MEQWAX/c1MNZNbNNqjnC4N1j0TN253nNyQ71o=;
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-Subscribe:
List-Post:List-Owner:List-Archive;
bh=L/QYUSx4EvRc/2E6p7CIOHwdh1Za13HtWolk4+IhE/s=; b=Lm/XqmGLJM0bYUpy+bhB0MvopW
TU2BogYo4GaZ7VgLnfSr10m1yq9ZrX39aPWld8NFveDQQv+IN5T6jBk+nV0LsqIPjKF0HF5j6sKEb
x9FEHxihkGzKD6+JIgVsVgpQ5YMPHm8v2XscbJMeutkbDm4RdQEPWv2B93Mo17Xor8cE=;
Received: from mout-b-206.mailbox.org ([195.10.208.51])
by sfi-mx-2.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1xCCMK-0003Tw-Nd for openvpn-devel@lists.sourceforge.net;
Thu, 01 Oct 2026 08:41:45 +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 x25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested)
by mout-b-206.mailbox.org (Postfix) with ESMTPS id 4hwQPX2Lk4zV7
for <openvpn-devel@lists.sourceforge.net>;
Thu, 01 Oct 2026 10:41:36 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
s=MBO0001; t=1790844096;
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=L/QYUSx4EvRc/2E6p7CIOHwdh1Za13HtWolk4+IhE/s=;
b=tUFTo+4yjhy9tE8fSWASGc65znh0cUFS6CY8m4r0oMmZFOXHXRvaAa8ZO6aSCkzzibyrD7
YxNVqbR6iv73EuiJBhghL+pmVnl7RlBf1c+L0naGPPojD5rx7hKh07fI8BuX935/uzlVqs
S0PRCNS2NSCe/OWQMWQFMvmR3dvU8zjQB54O6DFPfTXM5TCssveXNKMHV2TjXmss25HKDP
wzf7p/mx7bHBDD2l7Yy4tTIr4Z21r7gbFlEoNDsxFmTSxybFwZJ5YHAcpigtqo0RiDnmQf
MVRDHinjjW0oVjip99dPQkkMtDGE4YGRTYq2f+HIsj8d/v+Bfmvo6r4jempe5g==
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: Thu, 1 Oct 2026 10:41:21 +0200
Message-ID:
<5baa1d94e29e7b109ffd412b4f1d5d113a319389.1790843153.git.ralf@mandelbit.com>
In-Reply-To: <cover.1790843153.git.ralf@mandelbit.com>
References: <cover.1790843153.git.ralf@mandelbit.com>
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4hwQPX2Lk4zV7
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_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
domain
X-Headers-End: 1xCCMK-0003Tw-Nd
Subject: [Openvpn-devel] [PATCH ovpn net-next 2/8] 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: 1877836162292767836
X-GMAIL-MSGID: 1877836162292767836
|
| Series |
ovpn: preserve GSO and GRO batching
|
|
Commit Message
Ralf Lici
Oct. 1, 2026, 8:41 a.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. Rebuilding those children into a replacement UDP GSO
aggregate was found to add cost rather than improve throughput.
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 RFC v4 https://lore.kernel.org/openvpn-devel/5baa1d94e29e7b109ffd412b4f1d5d113a319389.1789558856.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;