diff options
author | John Baldwin <jhb@FreeBSD.org> | 2024-03-23 00:21:20 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2024-08-26 18:27:21 +0000 |
commit | 94feb210599a358462ad48ccc792ec4d78e03ee3 (patch) | |
tree | 38d019e6fad115b2022e7a7e73f90de4674f8e85 | |
parent | aaa01ea24d645e096199b4bc4064acf21324631d (diff) | |
download | src-94feb210599a358462ad48ccc792ec4d78e03ee3.tar.gz src-94feb210599a358462ad48ccc792ec4d78e03ee3.zip |
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)
-rw-r--r-- | sys/dev/nvme/nvme.h | 7 | ||||
-rw-r--r-- | sys/dev/nvme/nvme_private.h | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 137aff792868..ee387d54985e 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -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) diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 72797d30a3bf..26dc75ba4141 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -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 */ |