Article View: linux.kernel.netdev
Article #24187Re: [PATCH net-next v3 11/11] docs: networking: describe tunnel key partitioning in TC queue filtering
From: Alexandre Cassen
Date: Sun, 29 Nov 2026 17:05
Date: Sun, 29 Nov 2026 17:05
117 lines
13547 bytes
13547 bytes
On 11/23/26 22:34, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] The new mlx5 paragraph in Documentation/networking/tc-queue-
> filters.rst (lines 54-55) says 'ip_proto 0x2f, or udp with dst_port…
> - [Low] The new mlx5 paragraph in Documentation/networking/tc-queue-
> filters.rst (lines 51-56) leaves out two conditions the driver…
>
> --
>
> docs: networking: describe tunnel key partitioning in TC queue filtering
>
> This patch documents tunnel key partitioning in tc-queue-filters.rst,
> where an enc_key_id mask steers blocks of tunnel flows to RX queues. It
> gives a GTP-U example and describes how mlx5 matches enc_key_id on a
> physical port. It also describes what happens to such a filter when its
> channel is removed.
>
>> diff --git a/Documentation/networking/tc-queue-filters.rst b/Documentation/networking/tc-queue-filters.rst
>> index 6b417092276f6..14032375d6308 100644
>> --- a/Documentation/networking/tc-queue-filters.rst
>> +++ b/Documentation/networking/tc-queue-filters.rst
>
> [ ... ]
>
>> + # 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
>
> [Severity: Low]
> Should this paragraph list the conditions mlx5 checks before it will
> offload the GTP-U example above?
>
> First, the GTP-U TEID match depends on the firmware flex parser profile.
> In mlx5e_tc_tun_parse_outer_key_gtp():
>
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gtp.c:
> if (!(MLX5_CAP_GEN(priv->mdev, flex_parser_protocols) &
> MLX5_FLEX_PARSER_GTPU_TEID_ENABLED)) {
>
> If that capability is not set, the rule fails with -EOPNOTSUPP and
> "Matching on GTP-U TEID is not supported".
>
> The commit "net/mlx5e: TC, match the tunnel key without a tunnel device"
> says GTP-U needs flex parser profile 3 and GENEVE needs profile 0. That
> means 2152 and 6081 cannot both be used on one device. The text below
> lists them without any condition.
>
> Second, skbedit queue_mapping is only registered for NIC flows:
>
> drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c:tc_acts_nic[]
> [FLOW_ACTION_RX_QUEUE_MAPPING] = &mlx5e_tc_act_rx_queue,
>
> drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.c:mlx5e_tc_act_get()
> tc_acts = ns_type == MLX5_FLOW_NAMESPACE_FDB ? tc_acts_fdb : tc_acts_nic;
>
> tc_acts_fdb[] has no entry for it. In switchdev mode the physical port is
> the uplink representor, and its ingress rules are FDB flows. Can the
> example command be offloaded there at all?
>
> Third, mlx5e_tc_tun_parse_outer_key() accepts the wire-header enc_key_id
> match on FDB flows for VF representors when inline mode is none:
>
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c:mlx5e_tc_tun_parse_outer_key()
> if (fs_type == FS_FT_FDB && !mlx5e_is_uplink_rep(priv) &&
> esw->offloads.inline_mode != MLX5_INLINE_MODE_NONE) {
>
> That covers more than "a physical port". Would it help to say that the
> example applies to NIC (legacy) mode with a flex parser profile that
> supports GTP-U?
No, as on v2 [1]. The document doesn't repeat each driver limit. The
driver refuses such a filter with an extack. The paragraph covers a
filter that steers to a queue (a representor never takes it).
> [Severity: Low]
> This lists 4789 and 6081 next to 2152, but the 24-bit VNI limit for
> VXLAN and GENEVE is not mentioned. Both
> mlx5e_tc_tun_parse_outer_key_vxlan() and
> mlx5e_tc_tun_parse_outer_key_geneve() have this check:
>
> if (key >= MLX5E_TC_TUN_N_VNI || !(mask & (MLX5E_TC_TUN_N_VNI - 1))) {
>
> MLX5E_TC_TUN_N_VNI is BIT(24). The only example uses mask 0xc0000000,
> which has no bits in the low 24 bits.
>
> Suppose the example is copied and only dst_port is changed to 4789 or
> 6081. The rule is then always refused with -EOPNOTSUPP and "Tunnel key
> does not fit the 24 bit VNI".
>
> The commit message says the patch documents "what enc_key_id means on a
> physical port of mlx5". Could the text state that for VXLAN and GENEVE,
> the key and mask must fit in the 24-bit VNI?
No, as on v2 [1]. The VNI width comes with the protocol, the example is
GTP-U...
[1]
https://lore.kernel.org/netdev/bfa7625b-1452-4ced-b172-604216264cfc@corp.free.fr/
Technical Details
Message-ID:
<fff9081c-3152-4476-a1a1-6046ace7d86f@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-373588-linux-kernel-netdev=dewy.ruReferences:
<20261122213200.3207385-12-acassen@corp.free.fr> <179546967590.3135.7112800630047842498@kernel.org>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-373588-linux-kernel-netdev=dewy.ru From: acassen@corp.free.fr (Alexandre Cassen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 11/11] docs: networking: describe tunnel key partitioning in TC queue filtering Date: Sun, 29 Nov 2026 18:05:42 +0100 Organization: Usenet Network Message-ID: <fff9081c-3152-4476-a1a1-6046ace7d86f@corp.free.fr> References: <20261122213200.3207385-12-acassen@corp.free.fr> <179546967590.3135.7112800630047842498@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1218075"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:EUTqlk5VKUfCzM4qYMGfMv5WLeU= sha256:Zh8o8hcNijRWas5PgQKWA6E7nHMa0qZ2AEBtCrBuPc0= sha1:M4nw86L9EO5hdkNttHcPOc0AYYc= sha256:owjw5HpFCbeJRS3KAUXgMKK03i3TiQuY0EH4lwE71s8= 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 47FCA125F9C; Sun, 29 Nov 2026 20:06:15 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[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 0nEsEHkVsN9D; Sun, 29 Nov 2026 20:06:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-373588-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 17596125F96; Sun, 29 Nov 2026 20:06:02 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id E720724072; Sun, 29 Nov 2026 17:05:57 +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=1795971954; b=BFyr+tB3jBCdIW1W2M4Rl0DtBMI8fr98mt9XylN15Pm8Spru1ZNs8i3/KN/4giskNqoB Ji56/SL0/pXGEfoDxRsR/Ggsr4ONWKOfyfhhhdzFEppuBLO4ygdXLgytjJV767JSJ7b+z vyS+2tH465fFWliQlh69/qjT6HCHhXYkrEDALNwjMvNVy1xRbl8aXKy9ATF/YjnFC175s 5FqTaoj8lR9XTFbI97YJiDLHaI8/M4Qc5U4UUhYT6dQjN38hHu4Hw/Fo3CA0IjkZjler+ Nllu8PhXWXzi2DkXnyvWVc5KdCjYwo88nNqcdsHw88NVaOS/FLKGqWFfld/XOtoyg8w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795971954; 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=fgvTCNJPWvcMh/DuH4dPzjC1505DYQ9buxjrV7s2C+U=; b=S76oJwHjuUIEDDs42XMZy0dDALp8VleU+WQsRIZYUa1DFhBst1g4a45quhICz98PLpVA wTRud7JAj0aMygZxRukRN7hwAP/uSkS59rH2D+dbw1ShqASLHUGzFvN0Qx10aBH1+7O/+ aB/mL1c8qsM2SVhQXT38CkqAziK43rHQr6pPWS9vQLGOA6TDyh5ra1i1DzfoLf14rnAGq e4SGE7Mm4QatySWmLRGKPZbeaOAILHQTNN47saWwWoD+lW0Y+IS2hUikOn1UqsX3o4oMf xFxXnwIa53BVqLDT6JeOsGLDpqFEvK7TCHvFW6URz6MhJrY4/2Q5CSIjAFgQ8qkC+0A== 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=IPi7iuVv; 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 C15E0606A330; Sun, 29 Nov 2026 17:05:54 +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=IPi7iuVv 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=1795971954; b=Ulfrnnubz+UaDPCYNxxKJhBLiO0qXgkeV/FcSRIs2ou4ThJnRswpaSQj4xqZs28vejvo 6fY/KDch7ej7Hgl8Ve5b9TECn0IWCP2tSgVU6aMUBZTGaDyLLs3OUHWb609wTOX8x0jqy YGLR3m3dej3B7EW4KV+NFwUvkClN5s44Nf1Kjc8+xb9kfwWledc0CNMVmVG+UbCElexw9 7yKfvhDqP9OEtwDwBrBKnRnSMaMelDoZ/XJm9x+gRwugpMD0kTT/ACm+msz9EVSt5bNon JQGpGTvWTEGaYWFyySnOs02YGje21Z9tDZPzoq6pz/jBXUQDnJk2Uf6CztMw4GBL41g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795971954; 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=fgvTCNJPWvcMh/DuH4dPzjC1505DYQ9buxjrV7s2C+U=; b=DYgAvJumIdVAz9z80wyLZx1w9BkS2fjXMFGnXagxitE+RjflF/WZFqHtLBgHxCGKpSCP 6VonZD2ik99ZlzTSpkDOb3qo1poIy22oR0PlmaCwbBucm6tSHM2YqlHFdkeG1C2Vv9j4i c7AaLxSD7CiJkdYFhxKzKq5HXC6uo7GCTNq1b53AsTt5KFeeJJlvTKTRXW08/gM/v0K6E GMigDRZjqXNHOMc41X+j6U11KNElNlB6Q+bdjg3Fg+exUt/FZcqkfdEHDq1hamnzMwKxl g9/fieVS2ieaAzHvRtk1knRNEdXjNDHICWOY9TzVVVoWMG+fiWj5rLERuYri6BA+bRg== 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=IPi7iuVv; 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 A081D606A681; Sun, 29 Nov 2026 17:05:52 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A081D606A681 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=1795971945; bh=s1Tn9ktpWe9anEXkEAIyqUeRE64NT3N11F8xx1vXhuc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=IPi7iuVvRYcmqEWOWMNjS6hYZunAriflMfp4m12V5Pcjrer4zrf98ce4adcKGSH1O /CtQYUOJ/GtLaXS6diLfSwVM8EjERmTxj4yt2I4itv3FajjcAm+QBmhtJEZltAcOx0 ena5jkq1DuwVDxV2alRKl1yQNpzfIwQV84YsVnTxORwaguqcJ0GXiwJQ8gSGz8fnwi 438S0wRS6YUREIV+LXbqJj0Wrz6tqnUmWyZSs2t+AtMbbPTBqT/JUEkk6pgDBySfZf WjF/Oe14ISQxA2jTHt5MXQsz2Z11RV05jWTIclte9uU7LxYMCFdzjc+uZY9f0iRjBp +1MaCiOudo3tQ== X-Received: from [0.0.0.0] (unknown [213.228.1.188]) by rcs.proxad.net (Postfix) with ESMTPSA id 4EA7A44C0DFC; Sun, 29 Nov 2026 18:05:43 +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: saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com, mbloch@nvidia.com, jhs@mojatatu.com, jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, michael.chan@broadcom.com, pavan.chebbi@broadcom.com, bharat@chelsio.com, donald.hunter@gmail.com, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, dsahern@kernel.org, idosch@nvidia.com, 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: <179546967590.3135.7112800630047842498@kernel.org>