nvme: Export constants for min and max queue sizes

These are useful for NVMe over Fabrics.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44441

(cherry picked from commit 1931b75e004f25cf1d2db809bfd9baba40c04521)
This commit is contained in:
John Baldwin 2024-03-22 17:21:20 -07:00
parent aaa01ea24d
commit 94feb21059
2 changed files with 7 additions and 8 deletions

View file

@ -63,6 +63,13 @@
/* Many items are expressed in terms of power of two times MPS */
#define NVME_MPS_SHIFT 12
/* Limits on queue sizes: See 4.1.3 Queue Size in NVMe 1.4b. */
#define NVME_MIN_ADMIN_ENTRIES 2
#define NVME_MAX_ADMIN_ENTRIES 4096
#define NVME_MIN_IO_ENTRIES 2
#define NVME_MAX_IO_ENTRIES 65536
/* Register field definitions */
#define NVME_CAP_LO_REG_MQES_SHIFT (0)
#define NVME_CAP_LO_REG_MQES_MASK (0xFFFF)

View file

@ -57,9 +57,6 @@ MALLOC_DECLARE(M_NVME);
#define NVME_ADMIN_TRACKERS (16)
#define NVME_ADMIN_ENTRIES (128)
/* min and max are defined in admin queue attributes section of spec */
#define NVME_MIN_ADMIN_ENTRIES (2)
#define NVME_MAX_ADMIN_ENTRIES (4096)
/*
* NVME_IO_ENTRIES defines the size of an I/O qpair's submission and completion
@ -74,11 +71,6 @@ MALLOC_DECLARE(M_NVME);
#define NVME_MIN_IO_TRACKERS (4)
#define NVME_MAX_IO_TRACKERS (1024)
/*
* NVME_MAX_IO_ENTRIES is not defined, since it is specified in CC.MQES
* for each controller.
*/
#define NVME_INT_COAL_TIME (0) /* disabled */
#define NVME_INT_COAL_THRESHOLD (0) /* 0-based */