From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Yishai Hadas <yishaih@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Paolo Abeni <pabeni@redhat.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH mlx5-next 3/8] net/mlx5: Add support for device steering tag
Date: Tue, 8 Jul 2025 08:51:33 +0300 [thread overview]
Message-ID: <20250708055133.GD592765@unreal> (raw)
In-Reply-To: <dc4c7f6ba34e6beaf95a3c4f9c2e122925be97c9.1751907231.git.leon@kernel.org>
On Mon, Jul 07, 2025 at 08:03:03PM +0300, Leon Romanovsky wrote:
> From: Yishai Hadas <yishaih@nvidia.com>
>
> Background, from PCIe specification 6.2.
>
> TLP Processing Hints (TPH)
> --------------------------
> TLP Processing Hints is an optional feature that provides hints in
> Request TLP headers to facilitate optimized processing of Requests that
> target Memory Space. These Processing Hints enable the system hardware
> (e.g., the Root Complex and/or Endpoints) to optimize platform
> resources such as system and memory interconnect on a per TLP basis.
> Steering Tags are system-specific values used to identify a processing
> resource that a Requester explicitly targets. System software discovers
> and identifies TPH capabilities to determine the Steering Tag allocation
> for each Function that supports TPH.
>
> This patch adds steering tag support for mlx5 based NICs by:
>
> - Enabling the TPH functionality over PCI if both FW and OS support it.
> - Managing steering tags and their matching steering indexes by
> writing a ST to an ST index over the PCI configuration space.
> - Exposing APIs to upper layers (e.g.,mlx5_ib) to allow usage of
> the PCI TPH infrastructure.
>
> Further details:
> - Upon probing of a device, the feature will be enabled based
> on both capability detection and OS support.
>
> - It will retrieve the appropriate ST for a given CPU ID and memory
> type using the pcie_tph_get_cpu_st() API.
>
> - It will track available ST indices according to the configuration
> space table size (expected to be 63 entries), reserving index 0 to
> indicate non-TPH use.
>
> - It will assign a free ST index with a ST using the
> pcie_tph_set_st_entry() API.
>
> - It will reuse the same index for identical (CPU ID + memory type)
> combinations by maintaining a reference count per entry.
>
> - It will expose APIs to upper layers (e.g., mlx5_ib) to allow usage of
> the PCI TPH infrastructure.
>
> - SF will use its parent PF stuff.
>
> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> .../net/ethernet/mellanox/mlx5/core/Makefile | 5 +
> .../net/ethernet/mellanox/mlx5/core/lib/st.c | 162 ++++++++++++++++++
> .../net/ethernet/mellanox/mlx5/core/main.c | 2 +
> .../ethernet/mellanox/mlx5/core/mlx5_core.h | 9 +
> include/linux/mlx5/driver.h | 20 +++
> 5 files changed, 198 insertions(+)
> create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/st.c
<...>
> + if (mlx5_core_is_sf(dev))
Somehow this line was lost during rebase.
This should be if (IS_ENABLED(CONFIG_MLX5_SF) && mlx5_core_is_sf(dev))
Thanks
next prev parent reply other threads:[~2025-07-08 5:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 17:03 [PATCH rdma-next 0/8] RDMA support for DMA handle Leon Romanovsky
2025-07-07 17:03 ` [PATCH mlx5-next 2/8] net/mlx5: Expose IFC bits for TPH Leon Romanovsky
2025-07-07 17:03 ` [PATCH mlx5-next 3/8] net/mlx5: Add support for device steering tag Leon Romanovsky
2025-07-08 5:51 ` Leon Romanovsky [this message]
2025-07-07 17:03 ` [PATCH rdma-next 4/8] IB/core: Add UVERBS_METHOD_REG_MR on the MR object Leon Romanovsky
2025-07-07 17:03 ` [PATCH rdma-next 5/8] RDMA/core: Introduce a DMAH object and its alloc/free APIs Leon Romanovsky
2025-07-07 17:03 ` [PATCH rdma-next 6/8] RDMA/mlx5: Add DMAH object support Leon Romanovsky
2025-07-07 17:03 ` [PATCH rdma-next 7/8] IB: Extend UVERBS_METHOD_REG_MR to get DMAH Leon Romanovsky
2025-07-08 2:27 ` Junxian Huang
2025-07-08 5:50 ` Leon Romanovsky
2025-07-08 6:03 ` Gal Pressman
2025-07-08 12:29 ` Jason Gunthorpe
2025-07-08 13:12 ` Gal Pressman
2025-07-08 13:13 ` Jason Gunthorpe
2025-07-08 13:57 ` Margolin, Michael
2025-07-08 14:02 ` Jason Gunthorpe
2025-07-07 17:03 ` [PATCH rdma-next 8/8] RDMA/mlx5: Add DMAH support for reg_user_mr/reg_user_dmabuf_mr Leon Romanovsky
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=20250708055133.GD592765@unreal \
--to=leon@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=edumazet@google.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=yishaih@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