From: Pranjal Shrivastava <praan@google.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Shivaji Kant <shivajikant@google.com>,
kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] nvme: enable PCI P2PDMA support for RDMA transport
Date: Wed, 1 Apr 2026 17:43:22 +0000 [thread overview]
Message-ID: <ac1ZOgnpSjxo51WK@google.com> (raw)
In-Reply-To: <20260401141706.GA22165@lst.de>
On Wed, Apr 01, 2026 at 04:17:06PM +0200, Christoph Hellwig wrote:
> On Wed, Apr 01, 2026 at 10:34:41AM +0000, Shivaji Kant wrote:
> > Enable BLK_FEAT_PCI_P2PDMA on the NVMe when the underlying
> > RDMA controller supports it.
> >
> > blk_stack_limits() currently filters out this feature bit because it is
> > absent from BLK_FEAT_INHERIT_MASK. Manually re-assert the capability
> > in nvme_update_ns_info() after the stacking operation.
>
> This is really two different features/fixes and should be two patches.
> Note that Chaitanya also has an outstanding patch about p2p on multipath,
> so please work with him.
>
Ack.
Shivaji, I believe this [1] is the patch Christoph's referring to.
> > Hardware reachability remains enforced by late-stage distance checks
> > during DMA mapping.
>
> I don't know what this is supposed to mean. Callers need to check the
> reachability first before submitting P2P I/O.
>
> > +static bool nvme_rdma_supports_pci_p2pdma(struct nvme_ctrl *ctrl)
> > +{
> > + struct nvme_rdma_ctrl *r_ctrl = to_rdma_ctrl(ctrl);
> > + bool supported = false;
> > +
> > + if (r_ctrl && r_ctrl->device)
>
> to_rdma_ctrl is a wrapper around container_of, so r_ctrl can't be
> NULL for a non-NULL ctrl. ->device also should not NULL because it
> is set up before namespaces are probed.
>
> > + supported = ib_dma_pci_p2p_dma_supported(r_ctrl->device->dev);
> > +
> > + dev_dbg(ctrl->device, "PCI P2PDMA support result: %s\n",
> > + supported ? "PASSED" : "FAILED (HW/Driver restriction)");
>
> Overly long line, and screaming isn't really something we do in our
> messages. We also don't do that debug message in PCI, so please just
> drop it. IF you think this is important enough add a tracepoint in the
> core code in a separate patch.
>
+1, we should drop the log and add a TP if necessary.
Thanks,
Praan
[1] https://lore.kernel.org/all/20260323234416.46944-3-kch@nvidia.com/
next prev parent reply other threads:[~2026-04-01 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:34 [RFC PATCH] nvme: enable PCI P2PDMA support for RDMA transport Shivaji Kant
2026-04-01 14:17 ` Christoph Hellwig
2026-04-01 17:43 ` Pranjal Shrivastava [this message]
2026-04-01 17:55 ` Shivaji Kant
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=ac1ZOgnpSjxo51WK@google.com \
--to=praan@google.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=shivajikant@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.