Skip to content

Commit f392f71

Browse files
ikegami-tigaw
authored andcommitted
types: Add enum nvme_unit/cmbebs/cmbswtp/flbas/cmic documentation
Since missed to add the documentatin. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 5cee33e commit f392f71

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,33 @@ enum nvme_cmbsts {
513513

514514
#define NVME_CMBSTS_CBAI(cmbsts) NVME_GET(cmbsts, CMBSTS_CBAI)
515515

516+
/**
517+
* enum nvme_unit - Defined buffer size and write throughput granularity units
518+
* @NVME_UNIT_B: Bytes or Bytes/second
519+
* @NVME_UNIT_1K: 1 KiB or 1 KiB/second
520+
* @NVME_UNIT_1M: 1 MiB or 1 MiB/second
521+
* @NVME_UNIT_1G: 1 GiB or 1 GiB/second
522+
*/
516523
enum nvme_unit {
517524
NVME_UNIT_B = 0,
518525
NVME_UNIT_1K = 1,
519526
NVME_UNIT_1M = 2,
520527
NVME_UNIT_1G = 3,
521528
};
522529

530+
/**
531+
* enum nvme_cmbebs - This field indicates the controller memory buffer elasticity buffer size
532+
* @NVME_CMBEBS_CMBSZU_SHIFT: Shift amount to get the CMB elasticity buffer size units
533+
* @NVME_CMBEBS_RBB_SHIFT: Shift amount to get the read bypass behavior
534+
* @NVME_CMBEBS_CMBWBZ_SHIFT: Shift amount to get the CMB elasiticity buffer size base
535+
* @NVME_CMBEBS_CMBSZU_MASK: Mask to get the CMB elasticity buffer size units
536+
* @NVME_CMBEBS_RBB_MASK: Mask to get the read bypass behavior
537+
* @NVME_CMBEBS_CMBWBZ_MASK: Mask to get the CMB elasiticity buffer size base
538+
* @NVME_CMBEBS_CMBSZU_B: Bytes granularity
539+
* @NVME_CMBEBS_CMBSZU_1K: 1 KiB granularity
540+
* @NVME_CMBEBS_CMBSZU_1M: 1 MiB granularity
541+
* @NVME_CMBEBS_CMBSZU_1G: 1 GiB granularity
542+
*/
523543
enum nvme_cmbebs {
524544
NVME_CMBEBS_CMBSZU_SHIFT = 0,
525545
NVME_CMBEBS_RBB_SHIFT = 4,
@@ -537,6 +557,17 @@ enum nvme_cmbebs {
537557
#define NVME_CMBEBS_RBB(cmbebs) NVME_GET(cmbebs, CMBEBS_RBB)
538558
#define NVME_CMBEBS_CMBWBZ(cmbebs) NVME_GET(cmbebs, CMBEBS_CMBWBZ)
539559

560+
/**
561+
* enum nvme_cmbswtp - This field indicates the controller memory buffer sustained write throughput
562+
* @NVME_CMBSWTP_CMBSWTU_SHIFT: Shift amount to get the CMB sustained write throughput units
563+
* @NVME_CMBSWTP_CMBSWTV_SHIFT: Shift amount to get the CMB sustained write throughput
564+
* @NVME_CMBSWTP_CMBSWTU_MASK: Mask to get the CMB sustained write throughput units
565+
* @NVME_CMBSWTP_CMBSWTV_MASK: Mask to get the CMB sustained write throughput
566+
* @NVME_CMBSWTP_CMBSWTU_B: Bytes/second granularity
567+
* @NVME_CMBSWTP_CMBSWTU_1K: 1 KiB/second granularity
568+
* @NVME_CMBSWTP_CMBSWTU_1M: 1 MiB/second granularity
569+
* @NVME_CMBSWTP_CMBSWTU_1G: 1 GiB/second granularity
570+
*/
540571
enum nvme_cmbswtp {
541572
NVME_CMBSWTP_CMBSWTU_SHIFT = 0,
542573
NVME_CMBSWTP_CMBSWTV_SHIFT = 8,
@@ -677,6 +708,15 @@ static const __u64 NVME_PMRMSC_CBA_MASK = 0xfffffffffffffull;
677708
#define NVME_PMRMSC_CMSE(pmrmsc) NVME_GET(pmrmsc, PMRMSC_CMSE)
678709
#define NVME_PMRMSC_CBA(pmrmsc) NVME_GET(pmrmsc, PMRMSC_CBA)
679710

711+
/**
712+
* enum nvme_flbas - This field indicates the formatted LBA size
713+
* @NVME_FLBAS_LOWER_SHIFT: Shift amount to get the format index least significant 4 bits
714+
* @NVME_FLBAS_META_EXT_SHIFT: Shift amount to get the metadata transferred
715+
* @NVME_FLBAS_HIGHER_SHIFT: Shift amount to get the format index most significant 2 bits
716+
* @NVME_FLBAS_LOWER_MASK: Mask to get the format index least significant 4 bits
717+
* @NVME_FLBAS_META_EXT_MASK: Mask to get the metadata transferred
718+
* @NVME_FLBAS_HIGHER_MASK: Mask to get the format index most significant 2 bits
719+
*/
680720
enum nvme_flbas {
681721
NVME_FLBAS_LOWER_SHIFT = 0,
682722
NVME_FLBAS_META_EXT_SHIFT = 4,
@@ -1136,6 +1176,19 @@ struct nvme_id_ctrl {
11361176
__u8 vs[1024];
11371177
};
11381178

1179+
/**
1180+
* enum nvme_cmic - This field indicates the controller multi-path I/O and NS sharing capabilities
1181+
* @NVME_CMIC_MULTI_PORT_SHIFT: Shift amount to get the NVM subsystem port
1182+
* @NVME_CMIC_MULTI_CTRL_SHIFT: Shift amount to get the controllers
1183+
* @NVME_CMIC_MULTI_SRIOV_SHIFT: Shift amount to get the SR-IOV virtual function
1184+
* @NVME_CMIC_MULTI_ANA_SHIFT: Shift amount to get the asymmetric namespace access reporting
1185+
* @NVME_CMIC_MULTI_RSVD_SHIFT: Shift amount to get the reserved
1186+
* @NVME_CMIC_MULTI_PORT_MASK: Mask to get the NVM subsystem port
1187+
* @NVME_CMIC_MULTI_CTRL_MASK: Mask to get the controllers
1188+
* @NVME_CMIC_MULTI_SRIOV_MASK: Mask to get the SR-IOV virtual function
1189+
* @NVME_CMIC_MULTI_ANA_MASK: Mask to get the asymmetric namespace access reporting
1190+
* @NVME_CMIC_MULTI_RSVD_MASK: Mask to get the reserved
1191+
*/
11391192
enum nvme_cmic {
11401193
NVME_CMIC_MULTI_PORT_SHIFT = 0,
11411194
NVME_CMIC_MULTI_CTRL_SHIFT = 1,

0 commit comments

Comments
 (0)