| Message ID | 148b9524e5fcbbe18a18368ba6a2abe3904b4d24.1794922487.git.ralf@mandelbit.com |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:6022:9292:b0:11a:f58a:e788 with SMTP id
dc18csp2609550lab;
Tue, 17 Nov 2026 06:11:25 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErF9hndORkGhh0ewi6hvn5AKwaqseZW7BaeuDxNtwgSx30GqeEiFcPLaVx0xgCEvLRTiolAMMzjFyks=@openvpn.net
X-Received: by 2002:a05:701b:2044:20b0:1b5:1f62:7b51 with SMTP id
a92af1059eb24-1b53a47612emr2339100c88.23.1794924684977;
Tue, 17 Nov 2026 06:11:24 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1794924684; cv=none;
d=google.com; s=arc-20260327;
b=XPpRSRZPvdFgowwU0dxsLGML22sAmG8Pr3/d+4TwnZYe03hswQfVm4dPYyIjLEu5kj
jT8E4n4O8wGBjEEfyjXrS7p3VWOcb4theQGGJwA2p38FBuwZ+K+dLW+omavVJzc5kZZ6
szgxQidXp/8aPTHNnch6kQnQ7ke/iA1xz8yQQ1L1B0pih/O3e03B1QteZIa/rN3eBuZ6
dIZBPGOcaiuFsHjvysWSzxAqtlkk11rvsjQs8Odrq4DpXuxo8DqbxI5vvjkZdeNxPc+m
8h1avtVu25gi5654vxAhbrxwQr4K/oPrJltyooyldofeb34OMjMqBJBlVlP2/DAeKnsg
EL4w==
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=w7JkQ29F/32j9OTHXUaNDYXFg/wmOWy4WA8qJK1cenI=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=ApU+Rta/gOWDmxPV592e/qIQ6A/XjL9lyKfkw/KPqxhSqW2pg84ZlpU8PAn/GZGslX
auCu3uthUUWm6dVKZsG0yW3BWVnsd9JWLygDw/dVGszcpiCyx12YJpxOuqJlQXsqX1jV
TxRmv2Z8944V6UHn3/uTIS5R7L05Bu2hOmkDswL5Yer/DtxP6+UpX4ER+wsW4R/hj6Nb
IvrFmZ+3+nblFazH2rnDAWIV9i3Bi7ExyFOLnJLO97pcyZVzPZTlmYIPbPL3oyfX/fhY
usuIjjp8L8TI9Eg0nYKXv0cwMngBXRSapysZjOPeq80wP0ObxWgio0Ix607bbrLK0nzP
TyJQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=KxJxAT9d;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=ZBTTNEcb;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=PedlbSbP;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=Q7rPNm+q;
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-379599bcc02si55135187eec.26.2026.11.17.06.11.24
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Tue, 17 Nov 2026 06:11:24 -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=KxJxAT9d;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=ZBTTNEcb;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=PedlbSbP;
dkim=neutral (body hash did not verify) header.i=@mandelbit.com
header.s=MBO0001 header.b=Q7rPNm+q;
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=w7JkQ29F/32j9OTHXUaNDYXFg/wmOWy4WA8qJK1cenI=; b=KxJxAT9dYFxV1/
FkB0x1ya0TdOdKM/OYz6Qdq6ACfHl5xD5VPcHbmj0Sq/0np7a4YAemwwIGFNYoPa3NBmcBYIIBf64
y5a9Z6Ngdm6P8Z1fnOFlPBDQYuSRwqrZZbX0Cw1yUWXmo43aBY66QCzMMM9WThuZQV5P822ny46sj
iY8=;
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 1xTJu8-000000006qu-0Ato;
Tue, 17 Nov 2026 14:11:24 +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 1xTJu3-000000006qj-31JN
for openvpn-devel@lists.sourceforge.net;
Tue, 17 Nov 2026 14:11:20 +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=DQj1ziqMEKpHWDaqoM4Ka48aAbfdgTEL750t4tRlk/U=; b=ZBTTNEcbkHKV3e45H2Td7qtjYb
AxrvIwdC+2+rEi9LAB/3Xz+SC9+fgQEn070DWgBqZVKx6gdSH4uDGwOxqcsx+K4CYbQHunOFTUTUZ
RqDXQsQInB3V7BiY6Yevg9qAL2cbpQdBNrpgtlrzDfjrMNL3jhZbqG4UfbrGZyIP68mk=;
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=DQj1ziqMEKpHWDaqoM4Ka48aAbfdgTEL750t4tRlk/U=; b=PedlbSbPZnMT17BqDV75F1n3xt
6Le0vmpmEuciZ7Gvcz3Iumg28g8jVNSeGwqAYZLE+td2W8GM5eQsr0Z5aZGvHqC52SB11Cktl3bWL
OGZRa31GuMkX+/PvmreXEguS6gfdW/LKjlyHhj5g1r5NH53it5O1jRtn/fRWWyfDoVuE=;
Received: from mout-b-201.mailbox.org ([195.10.208.61])
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1)
id 1xTJu2-000000003Nz-0rQx for openvpn-devel@lists.sourceforge.net;
Tue, 17 Nov 2026 14:11:19 +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-201.mailbox.org (Postfix) with ESMTPS id 4jTRV66PqYzLlp6
for <openvpn-devel@lists.sourceforge.net>;
Tue, 17 Nov 2026 15:11:10 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
s=MBO0001; t=1794924670;
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=DQj1ziqMEKpHWDaqoM4Ka48aAbfdgTEL750t4tRlk/U=;
b=Q7rPNm+qpa/rZPdKrV4u/DwkAqL45ESZ8Sad6kb4xPPErgo3iZu8kJQvy2ZOURfj4508AF
D4flT7TjYmTYVFEqpS1FWSv7o46uFcCW48EsQaqHxUbL3l/cIBY/QbYVW4NqV0xX0d7LV5
93Qs98ixJFTkc/IXbDWhbN/wxo3u1YL9f+vm3azEGixJxEXztOiiGCFKeVQ4db7r69KZs9
dlLXjNvuSypnlkDV/AU2oAZXlStsY//67aSC6LFuPo1qByUCcg36uAyN/xzUMQxmHlPWjv
f8nSvWLK9dUF7HpOQ4s1pIHVeVd88n+JSKsDzp+ukwZd1cMghm+aU/OuDUtgrA==
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, 17 Nov 2026 15:11:01 +0100
Message-ID:
<148b9524e5fcbbe18a18368ba6a2abe3904b4d24.1794922487.git.ralf@mandelbit.com>
X-Mailer: git-send-email 2.56.0
In-Reply-To: <cover.1794922487.git.ralf@mandelbit.com>
References: <cover.1794922487.git.ralf@mandelbit.com>
MIME-Version: 1.0
X-Rspamd-Queue-Id: 4jTRV66PqYzLlp6
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: Selecting the physical TX queue from the packet hash makes
netdev_pick_tx dissect every outer packet, although ovpn already holds the
outer flow in the flowi it routes with. On IPv6, the stack derives [...]
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_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 Message has at least one valid DKIM or DK signature
X-Headers-End: 1xTJu2-000000003Nz-0rQx
Subject: [Openvpn-devel] [PATCH ovpn net-next 4/4] ovpn: hash the outer flow
from its flowi
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: 1882114946640959353
X-GMAIL-MSGID: 1882114946640959353
|
| Series |
ovpn: select physical TX queues from the outer flow
|
|
Commit Message
Ralf Lici
Nov. 17, 2026, 2:11 p.m. UTC
Selecting the physical TX queue from the packet hash makes
netdev_pick_tx dissect every outer packet, although ovpn already holds
the outer flow in the flowi it routes with. On IPv6, the stack derives
the hash from that flowi only when it generates an automatic flow
label.
Set the hash from the outer flowi in both output paths, so that queue
selection depends neither on dissecting the packet nor on automatic
flow labels.
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
---
drivers/net/ovpn/udp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ovpn/udp.c b/drivers/net/ovpn/udp.c index 892b33edaf8c..f9741fd86c20 100644 --- a/drivers/net/ovpn/udp.c +++ b/drivers/net/ovpn/udp.c @@ -288,6 +288,8 @@ static int ovpn_udp4_output(struct ovpn_peer *peer, struct ovpn_bind *bind, spin_unlock_bh(&peer->lock); transmit: + /* hash the outer flow for queue selection without dissecting it */ + skb_get_hash_flowi4(skb, &fl); udp_tunnel_xmit_skb(rt, sk, skb, fl.saddr, fl.daddr, 0, ip4_dst_hoplimit(&rt->dst), 0, fl.fl4_sport, fl.fl4_dport, false, sk->sk_no_check_tx, 0); @@ -388,6 +390,8 @@ static int ovpn_udp6_output(struct ovpn_peer *peer, struct ovpn_bind *bind, * udp_tunnel_xmit_skb() */ skb->ignore_df = 1; + /* hash the outer flow for queue selection without dissecting it */ + skb_get_hash_flowi6(skb, &fl); udp_tunnel6_xmit_skb(dst, sk, skb, skb->dev, &fl.saddr, &fl.daddr, 0, ip6_dst_hoplimit(dst), 0, fl.fl6_sport, fl.fl6_dport, udp_get_no_check6_tx(sk), 0);