Skip to content

Commit

Permalink
types: Add enum for nvme_id_ctrl.trattr
Browse files Browse the repository at this point in the history
Add missing define for bit fields

Signed-off-by: Steven Seungcheol Lee <[email protected]>
  • Loading branch information
sc108-lee authored and igaw committed Dec 9, 2024
1 parent 1fe7a1e commit d5b39ad
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,8 @@ struct nvme_id_psd {
* value supported in the Requested Memory Range Tracking
* Granularity (RMRTG) field of the Track Memory Ranges data
* structure.
* @trattr: Tracking Attributes indicates supported attributes for the
* Track Send command and Track Receive command.
* @trattr: Tracking Attributes indicates supported attributes for the Track Send
* command and Track Receive command. see &enum nvme_id_ctrl_trattr
* @rsvd577: Reserved
* @mcudmq: Maximum Controller User Data Migration Queues indicates the
* maximum number of User Data Migration Queues supported by the
Expand Down Expand Up @@ -2374,6 +2374,30 @@ enum nvme_id_ctrl_sgls {
NVME_CTRL_SGLS_TPORT = 1 << 21,
};

/**
* enum nvme_id_ctrl_trattr - Tracking Attributes
* @NVME_CTRL_TRATTR_THMCS_SHIFT: Shift amount to get the Track Host Memory Changes Support
* from the &struct nvme_id_ctrl.trattr field.
* @NVME_CTRL_TRATTR_TUDCS_SHIFT: Shift amount to get the Track User Data Changes Support
* from the &struct nvme_id_ctrl.trattr field.
* @NVME_CTRL_TRATTR_MRTLL_SHIFT: Shift amount to get the Memory Range Tracking Length Limit
* from the &struct nvme_id_ctrl.trattr field.
* @NVME_CTRL_TRATTR_THMCS_MASK: Mask to get the Track Host Memory Changes Support
* from the &struct nvme_id_ctrl.trattr field.
* @NVME_CTRL_TRATTR_TUDCS_MASK: Mask to get the Track User Data Changes Support
* from the &struct nvme_id_ctrl.trattr field.
* @NVME_CTRL_TRATTR_MRTLL_MASK: Mask to get the Memory Range Tracking Length Limit
* from the &struct nvme_id_ctrl.trattr field.
*/
enum nvme_id_ctrl_trattr {
NVME_CTRL_TRATTR_THMCS_SHIFT = 0,
NVME_CTRL_TRATTR_TUDCS_SHIFT = 1,
NVME_CTRL_TRATTR_MRTLL_SHIFT = 2,
NVME_CTRL_TRATTR_THMCS_MASK = 0x1,
NVME_CTRL_TRATTR_TUDCS_MASK = 0x1,
NVME_CTRL_TRATTR_MRTLL_MASK = 0x1,
};

/**
* enum nvme_id_ctrl_fcatt - This field indicates attributes of the controller
* that are specific to NVMe over Fabrics.
Expand Down

0 comments on commit d5b39ad

Please sign in to comment.