@@ -1096,6 +1096,96 @@ const char *nvme_feature_temp_sel_to_string(__u8 sel)
10961096 }
10971097}
10981098
1099+ const char * nvme_feature_perfc_attri_to_string (__u8 attri )
1100+ {
1101+ switch (attri ) {
1102+ case NVME_FEAT_PERFC_ATTRI_STD :
1103+ return "standard performance attribute" ;
1104+ case NVME_FEAT_PERFC_ATTRI_ID_LIST :
1105+ return "performance attribute identifier list" ;
1106+ case NVME_FEAT_PERFC_ATTRI_VS_MIN ... NVME_FEAT_PERFC_ATTRI_VS_MAX :
1107+ return "vendor specific performance attribute" ;
1108+ default :
1109+ break ;
1110+ }
1111+
1112+ return "reserved" ;
1113+ }
1114+
1115+ const char * nvme_feature_perfc_r4karl_to_string (__u8 r4karl )
1116+ {
1117+ switch (r4karl ) {
1118+ case NVME_FEAT_PERFC_R4KARL_NO_REPORT :
1119+ return "not reported" ;
1120+ case NVME_FEAT_PERFC_R4KARL_GE_100_SEC :
1121+ return "greater than or equal to 100 seconds" ;
1122+ case NVME_FEAT_PERFC_R4KARL_GE_50_SEC :
1123+ return "greater than or equal to 50 seconds and less than 100 seconds" ;
1124+ case NVME_FEAT_PERFC_R4KARL_GE_10_SEC :
1125+ return "greater than or equal to 10 seconds and less than 50 seconds" ;
1126+ case NVME_FEAT_PERFC_R4KARL_GE_5_SEC :
1127+ return "greater than or equal to 5 seconds and less than 10 seconds" ;
1128+ case NVME_FEAT_PERFC_R4KARL_GE_1_SEC :
1129+ return "greater than or equal to 1 second and less than 5 seconds" ;
1130+ case NVME_FEAT_PERFC_R4KARL_GE_500_MS :
1131+ return "greater than or equal to 500 milliseconds and less than 1 second" ;
1132+ case NVME_FEAT_PERFC_R4KARL_GE_100_MS :
1133+ return "greater than or equal to 100 milliseconds and less than 500 milliseconds" ;
1134+ case NVME_FEAT_PERFC_R4KARL_GE_50_MS :
1135+ return "greater than or equal to 50 milliseconds and less than 100 milliseconds" ;
1136+ case NVME_FEAT_PERFC_R4KARL_GE_10_MS :
1137+ return "greater than or equal to 10 milliseconds and less than 50 milliseconds" ;
1138+ case NVME_FEAT_PERFC_R4KARL_GE_5_MS :
1139+ return "greater than or equal to 5 milliseconds and less than 10 milliseconds" ;
1140+ case NVME_FEAT_PERFC_R4KARL_GE_1_MS :
1141+ return "greater than or equal to 1 millisecond and less than 5 milliseconds" ;
1142+ case NVME_FEAT_PERFC_R4KARL_GE_500_US :
1143+ return "greater than or equal to 500 microseconds and less than 1 millisecond" ;
1144+ case NVME_FEAT_PERFC_R4KARL_GE_100_US :
1145+ return "greater than or equal to 100 microseconds and less than 500 microseconds" ;
1146+ case NVME_FEAT_PERFC_R4KARL_GE_50_US :
1147+ return "greater than or equal to 50 microseconds and less than 100 microseconds" ;
1148+ case NVME_FEAT_PERFC_R4KARL_GE_10_US :
1149+ return "greater than or equal to 10 microseconds and less than 50 microseconds" ;
1150+ case NVME_FEAT_PERFC_R4KARL_GE_5_US :
1151+ return "greater than or equal to 5 microseconds and less than 10 microseconds" ;
1152+ case NVME_FEAT_PERFC_R4KARL_GE_1_US :
1153+ return "greater than or equal to 1 microsecond and less than 5 microseconds" ;
1154+ case NVME_FEAT_PERFC_R4KARL_GE_500_NS :
1155+ return "greater than or equal to 500 nanoseconds and less than 1 microsecond" ;
1156+ case NVME_FEAT_PERFC_R4KARL_GE_100_NS :
1157+ return "greater than or equal to 100 nanoseconds and less than 500 nanoseconds" ;
1158+ case NVME_FEAT_PERFC_R4KARL_GE_50_NS :
1159+ return "greater than or equal to 50 nanoseconds and less than 100 nanoseconds" ;
1160+ case NVME_FEAT_PERFC_R4KARL_GE_10_NS :
1161+ return "greater than or equal to 10 nanoseconds and less than 50 nanoseconds" ;
1162+ case NVME_FEAT_PERFC_R4KARL_GE_5_NS :
1163+ return "greater than or equal to 5 nanoseconds and less than 10 nanoseconds" ;
1164+ case NVME_FEAT_PERFC_R4KARL_GE_1_NS :
1165+ return "greater than or equal to 1 nanosecond and less than 5 nanoseconds" ;
1166+ default :
1167+ break ;
1168+ }
1169+
1170+ return "reserved" ;
1171+ }
1172+
1173+ const char * nvme_feature_perfc_attrtyp_to_string (__u8 attrtyp )
1174+ {
1175+ switch (attrtyp ) {
1176+ case NVME_GET_FEATURES_SEL_CURRENT :
1177+ return "current attribute" ;
1178+ case NVME_GET_FEATURES_SEL_DEFAULT :
1179+ return "default attribute" ;
1180+ case NVME_GET_FEATURES_SEL_SAVED :
1181+ return "saved attribute" ;
1182+ default :
1183+ break ;
1184+ }
1185+
1186+ return "reserved" ;
1187+ }
1188+
10991189const char * nvme_ns_wp_cfg_to_string (enum nvme_ns_write_protect_cfg state )
11001190{
11011191 switch (state ) {
0 commit comments