🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24737

Re: [PATCH net-next v3 10/11] net/mlx5e: TC, match the tunnel key without a tunnel device

#24737
From: Alexandre Cassen
Date: Mon, 30 Nov 2026 18:23
64 lines
11907 bytes

On 11/30/26 14:55, Jianbo Liu wrote:
> enc_key_id is the key of a decapsulated tunnel, and patch 9 enforces
> that in mlx5. Here it becomes a field on the wire that software can't
> match. I'd like to see the dedicated key you offered in the cover
> letter, but could you please get suggestions from the TC maintainers?

Thanks for your review. ok for the dedicated key.


Jamal, Jiri: which way sounds best to you ?

(1) keep enc_key_id: withtout a tnl device it names the key on the wire 
like cxgb4 and hns3 are doing today. skip_sw needed since only the HW 
can match it.

(2) Dedicated flower key for the tunnel key on the wire: as already 
available for L2TPv3 session_id and IPsec SPI. sw would match it too. 
flow dissector already read GRE key. for GTP-U, VXLAN and GENEVE it 
would have to read the UDP payload on their related port.


will respin then.

>> This covers NIC and eswitch flows. The other tunnel keys stay refused
>> without a tunnel device. On a VF representor the eswitch only reads the
>> headers the VF inlines, which can stop before the tunnel header. Refuse
>> the rule there unless the min inline mode is none.
> 
> What is the use case for the eswitch flows? The series is about RX
> queue steering, and skbedit queue_mapping is only offloaded in NIC
> flows. In switchdev mode the rule from the cover letter is refused on
> the uplink too. The min inline check is build tested only. I would keep
> this patch to NIC flows and add the eswitch part later, with a user and
> a test on a device that needs inlining.

Agreed. next version will keep it to NIC flows (and drop the min inline chk)



> One more question. Why not let the sender choose the UDP source port 
> from a hash of the TEID? Then RSS can spread the tunnels without the 
> changes in this series.
the goal is to select deterministically the rx_queue on which GTP-U 
traffic for a specific TEID will land. I will try not to abuse mobile 
network 3 letters buzzwords here, but mainly the sender is a gNB or 
another UPF and you cant control the src_port they will use. It varies 
from one vendor to another (sometime fixes but most of the time not).

RSS only spreads by hash and you cant control it. This series lets a UPF 
palce a session on the rx_queue it choose by allocating the TEID in a 
specific range (one different range per rx_queue). You can then turn 
this allocation mechanism into a real scheduling algo by reserving a set 
of rx_queue (CPU) for specific traffic pattern or use-cases (premium or 
whatever). That way your UPF can have fine control its resources by 
placing session based on a set of metrics (CPU load, nb of session per 
rx_queue, latency, current trend by CPU, ...)

=> additionally when the UPF allocate a TEID to a session for its 
uplink, it can pick the same CPU to match the L3 of the same session for 
the downlink... that way both direction of your session will stick to 
the same CPU/rx_queue.
Technical Details
Message-ID: <d366ab0c-ca43-4a53-9cb4-fed69cb1fb13@corp.free.fr>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374380-linux-kernel-netdev=dewy.ru
References: <20261122213200.3207385-1-acassen@corp.free.fr> <20261122213200.3207385-11-acassen@corp.free.fr> <e70f147f-d9b0-46b2-8104-2c1f7ceb782d@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374380-linux-kernel-netdev=dewy.ru
From: acassen@corp.free.fr (Alexandre Cassen)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 10/11] net/mlx5e: TC, match the tunnel key
 without a tunnel device
Date: Mon, 30 Nov 2026 19:23:13 +0100
Organization: Usenet Network
Message-ID: <d366ab0c-ca43-4a53-9cb4-fed69cb1fb13@corp.free.fr>
References: <20261122213200.3207385-1-acassen@corp.free.fr>
 <20261122213200.3207385-11-acassen@corp.free.fr>
 <e70f147f-d9b0-46b2-8104-2c1f7ceb782d@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1500291"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:O9xtf3A+hFe0UCsVCiFUZ2hX3zs= sha256:6Gt1LptXr+siCyUiCBNQQSYwCFx9L7fyGfTZ6fi6SsM=
	sha1:UUmZ+LltiINfoFKjtUqrMTXGfAs= sha256:ir0XVaKbfwtsbGERA6oJkrqxzQHvpo/RFrITkN/ESAc=
Content-Language: en-US
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 6FC2B126000; Mon, 30 Nov 2026 21:23:45 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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] 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 CbszUyeowG23;
	Mon, 30 Nov 2026 21:23:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374380-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 0330B125FFF; Mon, 30 Nov 2026 21:23:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 17FE22BB16; Mon, 30 Nov 2026 18:23:32 +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=1796063011;
	b=C6wBqY40qcs02Y4QgpNJz+BqqOqm+Rx7hN18RcEzMniAzAqIpIkqPUzunmsipoLhHrgx
	 Hx+scTH7Yxyu+lE71uHqvItyMt4ikSQU7WxQ/94A2uUDMAeWFLXbtQKO7RnW+H+n2p+SR
	 zKts44b6DE62CgQY5m1voDjOzvNASECVMR/w2e5mPY0fDPmx0j0/23l7CWr65A4zCHG1c
	 rpV7ePhQFTQo1tKWf6g5H859pv8erSPsn6s/HzDQX9dtZPFB8F13xYzzFF/6xU3nXm0rp
	 8tl2Q8c5Qbgk4SxCOiB5ioBZTYyYYiwHBrW3mOLCFS81C0UyYkJ8RjmybGbBCboqHGg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796063011;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 Message-ID:Date:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=Q/ONyWo/lsU5MGCcI2NnD06kbC20uhr+eArsZLZZ3hQ=;
	b=ZQO5CiJUfArJfcuBqhiidem9SQt+bSvAkYyaMwRA3/71bzUfeiDHw2S1M2CZqwZXErM1
	 CFlVBv+CKtVpwW7WBTS6vZhJQvLVNBg4AeEwpmgGYKAdlhZqzuc3AB6+K4d96ZXeUS1hB
	 IfNpqShJyz9RU4vTS3sqcZrskHXB8C/KiTyzZv5M/GcObddFM9nS+TKwPmK4rPgAZ3taD
	 K84SyP2fZUNeTxvnNLHZt7Trp/UWpRh/PdQxF8uPwsKTiiI1PJQPptRelwOXMvSC1NqvB
	 GMtijz8T2yMuUpMZXlhdQeFtT/nsDW4H/iKZNs2mjhA60iSfjyzlmE4s273SKoc+Lxg==
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=se1OvjOG;
	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 3F9A0606A325;
	Mon, 30 Nov 2026 18:23:31 +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=se1OvjOG
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=1796063005;
	b=ft4K5p64zt1gsr/n2rFhmaIZs/+Nh3MN87y5xy3yLrlJQiAntvdH7mxSJoLcRBP8MmjU
	 vxO9AeTovo6YCckIKKITZtsWdyN/zpq5n/A9CP5fIB+MRED4wknkwkvh2loi5hM2qu9c1
	 Ju1S0oEuzHEFPQPfSNP/z2V4J9qKydjVyZBK6s0AiCmCVjl5Q/xu6JEgmbmiV+cU0g0LW
	 z7nho08HlgiCiK/+cgyagt6wnyF2ayqYDY0kElnAPIPNUHl6I7YCBQ9mnofJUgM8S9H/h
	 FDNY3Shyq4cJ2Fyky7HTuFBOfdhJXhnouCwHQMPaMfpLEoTpAOSXOn4MarO98YPQZnQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796063005;
	h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version:
	 User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=Q/ONyWo/lsU5MGCcI2NnD06kbC20uhr+eArsZLZZ3hQ=;
	b=bJcHp969jB/J09MCr26o1g46ZAB0J0vP2uRyZNDA4BMuLJ+Dr9QAFiXQ0+zQKXHmVX1X
	 nAbkhh8IJqaV8jyiZ+CcJy118Vt+EQ19oORT1JK38MBQVEP5C8NIZAjhtwNDU0VgmE/JH
	 jB44AQxqfns91ldzt0pLV5RT14vkAQxevB7PQFb4CEhr3AQ+Lr2JqKSVJEscuGB84n/rB
	 l/gqzDazo4s5tpTeqQ2VcoxJzExcweS7+XSIVxDDGkpj5iP0vsjk202lWG6owD6kBWX7J
	 cgiL8VPVgnISzRWXWT9YMdc5v2vmODs0lKZJcX6NBwsZf0Ab6TsetVI7mEsYMKFzdUA==
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=se1OvjOG;
	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) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83B63606A31C;
	Mon, 30 Nov 2026 18:23:24 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 83B63606A31C
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=1796062995; bh=HWYAlwEEkzDi4cKDQ0xAoVGG0rVMieJzUOjr5BzUmic=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=se1OvjOGjN3ImTJffp2NhlyvZBs7JkLxEoPUS419MKhS2MAhVFTHx5z6S9Oz5C0WK
	 8q5xZQHDOzOOqz4t7PLLGMAU7VBGf5dvAAJ59yI5dyK+BT2SKat7rIu5nMGS6Ddk25
	 aLNSGABnQNqk5DZo1yNcGS7Ll30HW4mTSkoUrFSdfLl1Norvf+Mu2d/HeCtM+ja+lm
	 Pb0YEkK5nLcv6N66WAoNK05UVN4CMWR6sNdUha+J1HNy/qT73w/avdhU09zOvRUmS1
	 UURnlmZTWoeOnNm8guVNcCdwzr4VeOJCLpH6FInIpC1qAsVIOK9nu4TNedAWYmw+sM
	 2NDccRTzQljKA==
X-Received: from [0.0.0.0] (unknown [213.228.1.188])
	by rcs.proxad.net (Postfix) with ESMTPSA id 0CD4244C4670;
	Mon, 30 Nov 2026 19:23:13 +0100 (CET)
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
X-User-Agent: Mozilla Thunderbird
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-In-Reply-To: <e70f147f-d9b0-46b2-8104-2c1f7ceb782d@nvidia.com>