[PATCH 9/9] nvme-pci: rework the build time assert for NVME_MAX_NR_DESCRIPTORS

Daniel Gomez da.gomez at kernel.org
Wed Jun 11 06:51:38 PDT 2025


On 10/06/2025 07.06, Christoph Hellwig wrote:
> The current use of an always_inline helper is a bit convoluted.
> Instead use macros that represent the arithmerics used for building

Nit, typo here:

s/arithmerics/arithmetics/g

> up the PRP chain.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---

These are my checks:

NVME_MAX_BYTES=8388608
NVME_CTRL_PAGE_SIZE=4096
MAX_PRP_RANGE=8396798
NVME_MAX_NR_DESCRIPTORS=5
PRPS_PER_PAGE=511.0
MAX_PRP_RANGE/NVME_CTRL_PAGE_SIZE=2049.99951171875
1+NVME_MAX_NR_DESCRIPTORS*PRPS_PER_PAGE=2556.0


Reviewed-by: Daniel Gomez <da.gomez at samsung.com>



More information about the Linux-nvme mailing list