From: Jakub Kicinski <kuba@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Boris Pismenny <borisp@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>,
Cosmin Ratiu <cratiu@nvidia.com>,
Daniel Zahka <daniel.zahka@gmail.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
Gal Pressman <gal@nvidia.com>, "Kees Cook" <kees@kernel.org>,
Leon Romanovsky <leon@kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Raed Salem <raeds@nvidia.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH net] net/mlx5e: Add mutual exclusion between PSP and PTP TX port timestamping
Date: Mon, 3 Aug 2026 18:06:31 -0700 [thread overview]
Message-ID: <20260803180631.5813f758@kernel.org> (raw)
In-Reply-To: <20260729065137.2420679-1-tariqt@nvidia.com>
On Wed, 29 Jul 2026 09:51:37 +0300 Tariq Toukan wrote:
> The WQE flow_table_metadata field is shared by multiple TX offloads:
> IPsec, MACsec, PTP timestamping and PSP each write to it.
>
> Commit [1] resolved the conflicts between IPsec/MACsec and PTP
> by shifting their markers to bits [8+], leaving PTP's 8-bit metadata
> index in bits [7:0] without overlap.
> But then PSP support was added in commit [2], which writes a 32-bit
> keyid across all bits of flow_table_metadata. Unlike IPsec and MACsec,
> PTP timestamping applies independently of encryption -- a PSP-encrypted
> packet can also require a HW timestamp. When both write to the same
> WQE, the values corrupt each other, leading to wrong PTP timestamp
> tracking and potentially wrong PSP encryption keys.
Is the concern about Tx? (please clarify)
If so, Tx HW timestamps are never guaranteed, why can't we just
skip timestamping for PSP packets? Only TCP supports PSP, and
upstream TCP and HW timestamps are pretty much mutually exclusive.
> Prevent the conflict at configuration time by blocking:
> - Enabling TX-port-TS when PSP has active TX keys.
> - Adding PSP TX keys when TX-port-TS is already enabled.
Why catch PSP at the Tx key programming? PSP docs very explicitly
require drivers to _not_ enable the feature by default. And tx
keys can't be added if it's disabled. So it would make much more
sense to catch the enable / config callback of PSP?
--
pw-bot: cr
prev parent reply other threads:[~2026-08-04 1:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 6:51 [PATCH net] net/mlx5e: Add mutual exclusion between PSP and PTP TX port timestamping Tariq Toukan
2026-08-04 1:06 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803180631.5813f758@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=borisp@nvidia.com \
--cc=cjubran@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kees@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raeds@nvidia.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox