[PATCH 2/2] nvme-multipath: enable PCI P2PDMA for multipath devices

Chaitanya Kulkarni chaitanyak at nvidia.com
Tue Mar 24 20:50:01 PDT 2026


On 3/24/26 07:40, Keith Busch wrote:
> On Tue, Mar 24, 2026 at 07:49:37AM +0100, Christoph Hellwig wrote:
>> On Mon, Mar 23, 2026 at 04:44:16PM -0700, Chaitanya Kulkarni wrote:
>>> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
>>> index ba00f0b72b85..c49fca43ef19 100644
>>> --- a/drivers/nvme/host/multipath.c
>>> +++ b/drivers/nvme/host/multipath.c
>>> @@ -737,6 +737,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>>>   		BLK_FEAT_POLL | BLK_FEAT_ATOMIC_WRITES;
>>>   	if (head->ids.csi == NVME_CSI_ZNS)
>>>   		lim.features |= BLK_FEAT_ZONED;
>>> +	if (ctrl->ops && ctrl->ops->supports_pci_p2pdma &&
>>> +	    ctrl->ops->supports_pci_p2pdma(ctrl))
>>> +		lim.features |= BLK_FEAT_PCI_P2PDMA;
>> This assumes all controllers support P2P, but we allow matching
>> over different transports.  So you'll need to do the same scheme
>> as for MD RAID that checks that every member supports P2P.
> If that is a possible setup, then you could add a path that is non-P2P
> capable sometime after the MD volume was setup with P2P supported, so
> that case might need special handling to notify the stacking device of
> the new limits.

Thanks for review working on V2 and testscripts.

-ck




More information about the Linux-nvme mailing list