Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Zhiping Zhang <zhipingz@meta.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Michael Guralnik <michaelgur@nvidia.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Christian Konig <christian.koenig@amd.com>,
	Alex Williamson <alex@shazbot.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	kvm@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v8 4/4] RDMA/mlx5: get tph for p2p access when registering dma-buf mr
Date: Wed, 17 Jun 2026 12:25:50 +0300	[thread overview]
Message-ID: <20260617092550.GT327369@unreal> (raw)
In-Reply-To: <20260615065912.2177918-5-zhipingz@meta.com>

On Sun, Jun 14, 2026 at 11:59:01PM -0700, Zhiping Zhang wrote:
> Query dma-buf PCI TPH metadata when registering a dma-buf MR for
> peer-to-peer access to a PCIe endpoint and use it to program
> requester-side TPH on the outbound mkey. If the exporter has no
> metadata, fall back to the existing no-TPH path.
> 
> Use mlx5_st_alloc_index_by_tag() to translate exporter-provided
> steering tags into local ST entries when table mode is active, and add
> mlx5_st_get_index() for DMAH-backed flows that already carry an ST
> index.
> 
> For TPH-backed FRMRs, keep the extra ST-table reference tied to MR
> lifetime rather than pooled mkey lifetime. Acquire the ref before MR
> creation and release it again when the MR is returned to the pool or
> the backing mkey is destroyed, while leaving the generic FRMR pool core
> unchanged.
> 
> Import the DMA_BUF namespace for the new dma_buf_get_pci_tph() call so
> modular mlx5_ib builds link cleanly.

The commit message explains *what* the patch does, but it lacks context on
*why* the change is needed. The 'what' is mostly clear from reading the code;
the important part missing here is the rationale behind the change.

Thanks

      reply	other threads:[~2026-06-17  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15  6:58 [PATCH v8 0/4] vfio/dma-buf: add TPH support for peer-to-peer access Zhiping Zhang
2026-06-15  6:58 ` [PATCH v8 1/4] PCI/TPH: Add requester/completer type helpers Zhiping Zhang
2026-06-15  6:58 ` [PATCH v8 2/4] dma-buf: add optional get_pci_tph() callback Zhiping Zhang
2026-06-17  9:41   ` Leon Romanovsky
2026-06-15  6:59 ` [PATCH v8 3/4] vfio/pci: implement get_pci_tph and DMA_BUF_TPH feature Zhiping Zhang
2026-06-15  6:59 ` [PATCH v8 4/4] RDMA/mlx5: get tph for p2p access when registering dma-buf mr Zhiping Zhang
2026-06-17  9:25   ` Leon Romanovsky [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=20260617092550.GT327369@unreal \
    --to=leon@kernel.org \
    --cc=alex@shazbot.org \
    --cc=bhelgaas@google.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@ziepe.ca \
    --cc=kvm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michaelgur@nvidia.com \
    --cc=sumit.semwal@linaro.org \
    --cc=zhipingz@meta.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