Skip to content

Commit 350559d

Browse files
committed
util: add performance characteristics feature decode function
Decodes the feature command dword 11 fields values. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 2df2605 commit 350559d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/nvme/util.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,15 @@ static inline void nvme_feature_decode_endurance_group_event_config(__u32 value,
448448
*endgcw = NVME_FEAT_EG_EGCW(value);
449449
}
450450

451+
#define NVME_FEAT_PERFC_ATTRI(v) NVME_GET(v, FEAT_PERFC_ATTRI)
452+
#define NVME_FEAT_PERFC_RVSPA(v) NVME_GET(v, FEAT_PERFC_RVSPA)
453+
454+
static inline void nvme_feature_decode_perf_characteristics(__u32 value, __u8 *attri, bool *rvspa)
455+
{
456+
*attri = NVME_FEAT_PERFC_ATTRI(value);
457+
*rvspa = NVME_FEAT_PERFC_RVSPA(value);
458+
}
459+
451460
#define NVME_FEAT_SPM_PBSLC(v) NVME_GET(v, FEAT_SPM_PBSLC)
452461

453462
static inline void nvme_feature_decode_software_progress_marker(__u32 value,

0 commit comments

Comments
 (0)