[PATCH 7/9] nvme-pci: convert the data mapping blk_rq_dma_map

Christoph Hellwig hch at lst.de
Mon Jun 16 04:35:05 PDT 2025


On Mon, Jun 16, 2025 at 09:49:47AM +0200, Daniel Gomez wrote:
> >  #define NVME_MAX_SEGS \
> > -	min(NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc), \
> > -	    (PAGE_SIZE / sizeof(struct scatterlist)))
> > +	(NVME_CTRL_PAGE_SIZE / sizeof(struct nvme_sgl_desc))
> 
> IIRC, I've seen in the commit history going from PAGE_SIZE to CC.MPS for
> different cases in the driver. PRPs requires contiguous regions to be CC.MPS,
> i.e use NVME_CTRL_PAGE_SIZE for PRP lists and entries. But I think that is not a
> limit for SGLs. Can we use PAGE_SIZE here?

Sure.  Separate unrelated patch, though.



More information about the Linux-nvme mailing list