Article View: linux.kernel.netdev
Article #24598Re: [PATCH net-next V5 5/7] net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag
From: netdev-bot+sashiko
Date: Mon, 30 Nov 2026 12:07
Date: Mon, 30 Nov 2026 12:07
86 lines
11442 bytes
11442 bytes
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 layout comment in the new
drivers/net/ethernet/mellanox/mlx5/core/en_accel/flow_tag.h splits theβ¦
--
net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag
This patch moves the PSP RX marker out of ft_metadata, where a modify_hdr
action wrote it, and into the flow_tag set in the flow_context of the PSP
decrypt rule. It adds a new en_accel/flow_tag.h header that defines a
shared accel flow_tag bit layout and helpers. mlx5e_psp_is_rx_flow() now
reads the protocol ID from the CQE flow_tag.
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/flow_tag.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/flow_tag.h
> new file mode 100644
> index 0000000000000..b6fcd4b630311
> --- /dev/null
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/flow_tag.h
[ ... ]
> +/* Unified accel flow_tag layout in CQE sop_drop_qpn [23:0]:
> + *
> + * [23:21] = protocol ID (3 bits):
> + * 0 = none (default)
> + * 3 = PSP (HW decrypted, PSP header present)
> + * 1,2,4-7 = reserved
> + * [20:16] = reserved
> + * [15:0] = used by other subsystems (e.g. TC).
> + */
[Severity: Low]
This isn't a bug, but could this comment be read as saying the accel
protocol ID and a TC mark can be carried together in one packet's
flow_tag?
As far as I can tell, there is only one flow_tag per packet. Each FTE sets
the whole value, and the last rule that sets it overwrites the earlier
one. The "net/mlx5e: Generalize TC <-> IPsec mutual exclusion" patch in
this series says the same thing.
The PSP decrypt rule in accel_psp_fs_rx_decrypt_ft_create() writes the
full tag, so bits [15:0] are zero:
spec->flow_context.flags = FLOW_CONTEXT_HAS_TAG;
spec->flow_context.flow_tag =
FIELD_PREP(MLX5E_ACCEL_FLOW_TAG_PROTO_MASK,
MLX5E_ACCEL_FLOW_TAG_PROTO_PSP);
mlx5e_add_offloaded_nic_rule() in en_tc.c also always writes the whole
tag:
flow_context->flags |= FLOW_CONTEXT_HAS_TAG;
flow_context->flow_tag = nic_attr->flow_tag;
Both mlx5e_psp_is_rx_flow() and mlx5e_build_rx_skb() read this same field:
skb->mark = be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK;
Today this works only because TC offload and accel RX offload are mutually
exclusive. That comes from the earlier patches in the series, such as
"net/mlx5e: psp: Block TC offload when PSP is enabled". This header does
not mention that.
The same comment stays at the end of the series, which only adds IPsec=1
and MACsec=2.
Would it help to say in this comment that each packet's flow_tag has one
effective writer? It could also say that the [15:0] split only keeps the
TC and accel value ranges from overlapping, and that TC offload and accel
RX offload are mutually exclusive.
> +#define MLX5E_ACCEL_FLOW_TAG_MASK GENMASK(23, 0)
> +#define MLX5E_ACCEL_FLOW_TAG_PROTO_MASK GENMASK(23, 21)
[ ... ]
--
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129120331.1910180-1-tariqt%40nvidia.com
Technical Details
Message-ID:
<179604045701.3146.674579475787317900@kernel.org>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-374158-linux-kernel-netdev=dewy.ruReferences:
<20261129120331.1910180-6-tariqt@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-374158-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next V5 5/7] net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag Date: Mon, 30 Nov 2026 12:07:37 +0000 Organization: Usenet Network Message-ID: <179604045701.3146.674579475787317900@kernel.org> References: <20261129120331.1910180-6-tariqt@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1419838"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:zxIitqk33IwaMg4w4NNCrk2BbvM= sha256:2+dFpLLmzjdGA1cU7BMDfvpm9K48nYeoRAVw2JaEATQ= sha1:o/u9Vzm8gxjCwj/VTCnNwS3HBrU= sha256:EE0mP4P1e2LLvsgsNw8yZHDlqCIHIH1R8qccWVtRyIE= 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 5AFDE125FDD; Mon, 30 Nov 2026 15:07:55 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 2qA4jbpYVR9j; Mon, 30 Nov 2026 15:07:52 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-374158-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id E92FB125FD9; Mon, 30 Nov 2026 15:07:42 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 23E24601000; Mon, 30 Nov 2026 12:07:41 +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=1796040460; b=hAkclZjiPkeweisRVZSAEDBouO7/P/fPTdQfhXSrLOfQejBGOq32T9hfy9a9WqwMGFkI 5LZuYQcg7ie4wOqnPa4z64XxfXBXwuIhiMCeAo3jHuEMwakZ/uR08Gb7N1piq1NNB4U5U A0sMK8jNI28QIM+tuUWSAmv18mUGMgHa3biICcAinEtcaM0A0ltcDAkl/c1kxcs66Ju9t u/8R8HVHAIv2cbvUhnUZmVj67cfssuG1z5GvlMut+7xRO9eHzJoMKLmk7IYPcM9+MxMa2 tTnVwwUc5NbCRye51CBypj5IhdVjta9SaIoWFlSpi1COTIzlFR3ji5njq14lvM+E5Wg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796040460; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=Ndu2TpOr8uam4K4Rd2aLA0WAEzqhJAgMb9LiOaVghFo=; b=GpmblEXlmcZ/QwL7lf153tCuDjLwDDlvmxOSXhoZe3+t8T8/g01p3V9hl3DJ3vBC1GFo BvQrDJH6U0qO3rMRCtsgjOZw5YLAyIDsdrowA8dK18HHk15l4ON1LDAHscAKfYWU7xjIa 1D4ktTC0Us7ecktHGADmiyep8cPEfS8wZvoqx+0tSpiXVyJ5Aw1rFm2CksM9s125bM4wR 4SezMEm3NxzuYgCmaFWl6GsO484vuNqSYJYYNGWL3PQhmnmdUlnjgMm+eM9WackAGDH2i sghvF7P/2aDyjC/z6uVK4dZ3LJzCLeLiwrTrvfOZX3DIOD9GCq+jFM+ztHR8jO++OSw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V3gku9Z3; 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 28EB2606A33F; Mon, 30 Nov 2026 12:07:40 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V3gku9Z3 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796040459; b=g5Lyux1SlUMydEw6ISM2YKec+XxDsiTN87RHHkPMUsUrS8FopeZ+Nysl8nvzgHiIldmZ BOYQ1uMv6zDr3EmU1eApYlJQt9Saz/O36Cdw9oYmyNoIQ7H4nrC2HPBDciPkCwUYDwZ1o dEMZfOo8KmECSB/D7JsFL4zppfj7Vl6314fm0eAo7cbl3nXYVxe0vw/LW4jEZQuG0Whj9 EpBjCPkwtxodjKcytmG9Hnx/MZq5VZrEPBYM/SnmGpSM5bi8c1L5d4eBHNnCMEo6agqsc 4RaEZ0s59yOYAwSmQhZ4PW+Al4B0RWZhd+ohSua8EVa86zgmbwws4jO3tmF6NiYYvbQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796040459; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Ndu2TpOr8uam4K4Rd2aLA0WAEzqhJAgMb9LiOaVghFo=; b=wxZPbdfJaotLNGgzeot1gpNA5vv3QJPkWvSD61Gp3m8+yNiui7vHrD+ouY5oUNvHWvE7 awbTwLf2pFObx0EGpGb7VQz+X6OboiJBj7z9xcJPhRefy/BTeSYsJoU8ZVqWD6CPm2NAk KgZrwNnCftnDtQ1GqBOLqEjkXY8nXSkU1/dmL8rv2XHoTfRcHsNi+EFhB0HVZ9XQ7BQMf 1vY0jd7WRTBiokYJ15W0OILpHBhF/n05dEBO7JAKmNASZostliZDTLHjoyrNuhP9fnMdk ZpmaZ3dbgcOf4M+5IUtvQmiHNDLb16JeQ7kf6tGo3JPSvf+vG1/UXlquU4OVUhAS+ZA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V3gku9Z3; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (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 47EE8606A32C; Mon, 30 Nov 2026 12:07:39 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69F601F000C1; Mon, 30 Nov 2026 12:07:37 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796040458; bh=Ndu2TpOr8uam4K4Rd2aLA0WAEzqhJAgMb9LiOaVghFo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=V3gku9Z3REWxhEH4T+VN2+WnEcHz/cyKJOyUAWJ0ikBidsu+unZV7RYgTbaTkkJnX 6lf6W8UO2+fGowMdBfFRuZM4XHNtq7jkEh+SW10bb/4Oyk7LIwDuXZ+nXazlAcmSoy 64TfC36bioeU6nuYjFxxhiQ7MZWqxGNBto06UoKZ5io7dQd6MoSfvY2Mlaz8J0we8v AvXyaAOaitOLOdWp9NhotHNrrZXzTz/9V2jnUYM38vnWBrNXo748LnCDVnhN53Yhve 4Zv+gWlpixVcUmIXnXlYmaH4XAebMn8msWAwgkeud10t2Ed3giRzt5EKbaWrOr225q 3NlCgoaC2rSvQ== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, sd@queasysnail.net, willemb@google.com, aleksandr.loktionov@intel.com, parri.andrea@gmail.com, borisp@nvidia.com, cjubran@nvidia.com, lcy8047@gmail.com, cratiu@nvidia.com, daniel.zahka@gmail.com, davem@davem-thinkpadp1gen8.ibmlond.csb, doruk@0sec.ai, dtatulea@nvidia.com, gal@nvidia.com, jianbol@nvidia.com, joasantonio108@gmail.com, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, mbloch@nvidia.com, phaddad@nvidia.com, ralf@mandelbit.com, saeedm@nvidia.com, horms@kernel.org X-In-Reply-To: <20261129120331.1910180-6-tariqt@nvidia.com> X-sashiko-severity: Low 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