Re: [PATCH RFC 03/11] nvmet: Add nvmet_fabrics_ops flag to indicate SGLs not supported

Damien Le Moal
2025-03-13T09:16:12Z

On 3/13/25 18:13, Christoph Hellwig wrote:
> On Thu, Mar 13, 2025 at 06:02:29PM +0900, Damien Le Moal wrote:
>> On 3/13/25 14:18, Mike Christie wrote:
>>> The nvmet_mdev_pci driver does not initially support SGLs. In some
>>> prelim testing I don't think there will be a perf gain (the virt related
>>> interface may be the major bottleneck so I may not notice) so I wasn't
>>> sure if they will be required/needed. This adds a nvmet_fabrics_ops flag
>>> so we can tell nvmet core to tell the host we do not supports SGLS.
>>
>> That is a major spec violation as NVMe fabrics mandates SGL support.
>
> But this is a PCIe controller implementation, not fabrics.

Ah ! yes !

> Fabrics does not support PRPs and has very different SGLs from the
> PCIe ones. The fact that the spec conflates those in very confusing
> ways is one of the big mistakes in the spec.

Yes, and despite tripping on this several times with pci-epf, I did it again :)

pci-epf has code for handling both PCI PRPs and SGL. We probably can make that
common with mdev to facilitate SGL support.

--
Damien Le Moal
Western Digital Research