From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69F601F000C1; Mon, 30 Nov 2026 12:07:37 +0000 (UTC) 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== Subject: Re: [PATCH net-next V5 5/7] net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag From: netdev-bot+sashiko@kernel.org To: tariqt@nvidia.com 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 Date: Mon, 30 Nov 2026 12:07:37 +0000 Message-ID: <179604045701.3146.674579475787317900@kernel.org> In-Reply-To: <20261129120331.1910180-6-tariqt@nvidia.com> References: <20261129120331.1910180-6-tariqt@nvidia.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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