🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17746

[PATCH net-next v2 10/10] docs: networking: describe tunnel key partitioning in TC queue filtering

#17746
From: Alexandre Cassen
Date: Tue, 17 Nov 2026 09:29
43 lines
10800 bytes
Tunnel key partitioning steers blocks of tunnel flows to RX queues with a
mask on enc_key_id. Document this use and what enc_key_id means on a
physical port of mlx5. Also document what happens to such a filter when
its queue goes away.

Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>
---
 Documentation/networking/tc-queue-filters.rst | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/networking/tc-queue-filters.rst b/Documentation/networking/tc-queue-filters.rst
index 6b417092276f..14032375d630 100644
--- a/Documentation/networking/tc-queue-filters.rst
+++ b/Documentation/networking/tc-queue-filters.rst
@@ -35,3 +35,25 @@ queues and/or a single queue are supported as below:
    devices, TC filter directing traffic to a queue have higher
    priority over flow director filter assigning a queue. The hash
    filter has lowest priority.
+
+Tunnel key partitioning splits the key space of a tunnel into blocks. One
+filter with a mask on enc_key_id steers a block to its own queue. This
+helps with traffic that RSS cannot spread because its hashed fields barely
+vary, such as GTP-U tunnels between a few endpoints::
+
+  # GTP-U TEIDs whose two top bits are 01 go to queue 1
+  tc filter add dev eth0 ingress protocol ip flower skip_sw \
+      ip_proto udp dst_port 2152 enc_key_id 0x40000000/0xc0000000 \
+      action skbedit queue_mapping 1 skip_sw
+
+Not all drivers can program a partial mask.
+
+On mlx5 devices such a filter runs on a physical port where nothing
+decapsulates the packet. All the keys describe the packet on the wire.
+enc_key_id is the only tunnel key such a filter matches.
+ip_proto 0x2f, or udp with dst_port 2152, 4789 or 6081, tells the hardware
+which tunnel header holds the key. The software datapath has no tunnel
+metadata on such a port. Only the hardware can match the key.
+
+Reducing the number of channels below the queue of a filter drops the
+traffic of that filter on mlx5 devices until the channel returns.
-- 
2.43.0
Technical Details
Message-ID: <20261117092915.255194-11-acassen@corp.free.fr>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365117-linux-kernel-netdev=dewy.ru
References: <20261117092915.255194-1-acassen@corp.free.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365117-linux-kernel-netdev=dewy.ru
From: acassen@corp.free.fr (Alexandre Cassen)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 10/10] docs: networking: describe tunnel key partitioning in TC queue filtering
Date: Tue, 17 Nov 2026 10:29:13 +0100
Organization: Usenet Network
Message-ID: <20261117092915.255194-11-acassen@corp.free.fr>
References: <20261117092915.255194-1-acassen@corp.free.fr>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2292019"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ATDmAfAtHZzxDDO63SGRtcBhgT4= sha256:3U/7cnyfsnH/JBr6Ni1t4qouatgZtL8s24kFj8qm0GQ=
	sha1:pVuPSUqiU1kvORzl7GVl8dHWIug= sha256:zIUEw/25p48uOYjsQ1oA32OgNpNIvZqWsZcs+ZJ44M4=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id EC6CB114ED1; Tue, 17 Nov 2026 12:30:04 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=corp.free.fr
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id tMkQKueA6FWg;
	Tue, 17 Nov 2026 12:30:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-365117-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 6B7AF114ECA; Tue, 17 Nov 2026 12:29:53 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id F24B126C63; Tue, 17 Nov 2026 09:29:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794907778;
	b=S9bzU1tHM6b69GNmMR4zXs2+rRqu7aYCeCEgXU+c5Wp+QJZ3v52hEtw8vDa2hYyAY239
	 Iq/JAzRH2Po9WDS9aWTYs7c8aEGxkRHQ7Y306k9SFazXRNDU++R+P6KVqW3/lTD3N+Gcd
	 OMPmuFlHIgjrWkB/4iChQzUXLYiWzxHbbL79SBjhr3ycdsOjW/g4tfQiy/G15cZ/AidDx
	 6YtsAYvn08RGnfAxJc31pglw111UW8LfeN1zR1bFP6d8t15Uw0y6X5rYWeLcTthu9G5nr
	 c8qs5D5sARaEq7HTs4K0vKoBwhjtTQ8QPY4efR3bugbWWL+8eZ34vrq8M3CXbOkSmsg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794907778;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=WwkPKboaRHO3gWj6crYxjpzj9cX9xx9wCpXmZOCeZgY=;
	b=fcQ4MgvytV0c6hk7HQKNOfbdNYaV49NMqZGjkunYSb1IaLanBDuQeTWKf3SNS+7a2KF2
	 huwqrIIH73oEdqkDz3mI/8RLKA0ScfN24rDxQgP9+krh1//+BewI/sMimD7mVygMKKKak
	 Z0HTGp8lGCuQjxc1G1l1aR3Daa6eu5xOmDJKy/hr8cy2fLyPXF/KPlQxjuetcT0VpwDib
	 YuDTsH2pPW821NsXKUW2aBTGNvXJEA03K/xr7SC1FK/D6QRnPpxkZi3qsspE1zbl5GP/D
	 ml5RwkHSAzROX+/gt5BA3StoUEnK44GJVCfejGjR29Gp0TwnBdwb0id8l2RuIgE8QQA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=AR7mJYKU;
	dmarc=pass header.from=corp.free.fr;
	spf=pass smtp.mailfrom=corp.free.fr;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B501606A334;
	Tue, 17 Nov 2026 09:29:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=AR7mJYKU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=212.27.60.169
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794907777;
	b=W5KgHNGRV6yt8YNLlJ4qNmlyk5hy0UpHxUO8FU1qk3Y2nUq5aR7dj1HpI3pFortXisCA
	 ahvAK6NSEtO97lzXtUIz6TdKUrS90UXxuf0hf2C7a2AFFNiDNKaxQsHUyrP58iEnGwh2i
	 hCJNLo7epiCVJ8qVKvD9Wqk79dYiHJyankUq7u3Zm+lutdK7w+L29UbrML9pnq8erBXRV
	 GV9kvKVoSqk+gM+WjvzJA38aGunTEXmOiD4DDjvLMRUqVvoOrWH0s6Iuv5KMaJCZ5LKb2
	 rVgW50wAkDhbBN1J3LNkhVNVo8C0WWcCNkvR7QOfzvZ42iMqKttUR+kQtgddPZW2nsQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794907777;
	h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=WwkPKboaRHO3gWj6crYxjpzj9cX9xx9wCpXmZOCeZgY=;
	b=h1DAfE6s6BQ+phWnpe8EWXhsVCMyn/kcnCdAWP7Wnggbz58Kw+bXWiFLDKqJewkd4G5A
	 4IQsiNUsA9hWQVE5UbxaAz4tGIPsPI5BqB4rNtA0yX9nB2v7PK7uOsceqJLc7sVv6Zi+V
	 VHMnmPo0iCN3sSiJ5mzc7dfenEcEB7wzzjeqzZJoyVmicPDw1kK9sPwLgmeCyMTSKIb8n
	 NzOZv2D7JULf7wnaG1Un0Y3Z6chy7edz61BX0OM5ftakaGNQBIk37hbCcChZ75lFi5i+Y
	 ukCFxOIaKKqRRTCVQHJNCIJYpMjUKZ74c0kCQpoq+J6yodb43/mzoapJKL+NZlOiHmA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=corp.free.fr;
	spf=pass smtp.mailfrom=corp.free.fr;
	dkim=pass header.d=corp.free.fr header.i=@corp.free.fr header.a=rsa-sha256 header.s=rcs header.b=AR7mJYKU;
	arc=none smtp.remote-ip=212.27.60.169
X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C4A760A261A;
	Tue, 17 Nov 2026 09:29:36 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6C4A760A261A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs;
	t=1794907767; bh=ETQLiklF/DMETVxTZ3pQ7sasKCndEu5GA0chMOax7tQ=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
	b=AR7mJYKUIRtrhZbZFUN8RbCO7nzL38du94dad2Uxd0sbL1VDMHZoxW4tsGLpAOQiK
	 sByl3UiR7+ADY+ER3BvxcyxfuAD8VOGIh1h98WTyXTkbAkLLwRDE7ax4q+DmILoIGA
	 PvgJ6F9pZDSzlr1ByjIwgdifTNLj3+7Kzx7v0xeKAFUJxCFQbF6URFy0d8TNIitOzn
	 LCwMs16pF5URo/XGfr9LLt8mc7Ya37HSl31qr2uYZ6yfHXvXxMlvC5IBBjAkDKt8sp
	 0dirJNTLY9v7cVeqKm81bVQ1WHs54Ec77eTiSZr+7Du64WmkGCPtd65Rqk1/6e0x4a
	 cRpK9ywmg9gCQ==
X-Received: from lnxos-dev.home (82-66-150-212.subs.proxad.net [82.66.150.212])
	by rcs.proxad.net (Postfix) with ESMTPSA id 958F844C0C2F;
	Tue, 17 Nov 2026 10:29:26 +0100 (CET)
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Donald Hunter <donald.hunter@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org,
	linux-doc@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	oss-drivers@corigine.com
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <20261117092915.255194-1-acassen@corp.free.fr>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list