Skip to content

Commit 7dbc1a3

Browse files
nvme-print: print Host Behavior Support feature fields
Print the fields of Host Behavior Support feature (FID - 16h). NVM Express Base Specification 2.1 Signed-off-by: Francis Pravin <francis.p@samsung.com>
1 parent 3e512dd commit 7dbc1a3

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

nvme-print-json.c

+18-1
Original file line numberDiff line numberDiff line change
@@ -3504,8 +3504,25 @@ static void json_feature_show_fields_lba_sts_interval(struct json_object *r, uns
35043504

35053505
static void json_feature_show_fields_host_behavior(struct json_object *r, unsigned char *buf)
35063506
{
3507-
if (buf)
3507+
if (buf) {
3508+
struct nvme_feat_host_behavior *host = (struct nvme_feat_host_behavior *)buf;
3509+
35083510
obj_add_str(r, "Host Behavior Support", buf[0] & 0x1 ? "True" : "False");
3511+
obj_add_str(r, "Advanced Command Retry Enable (ACRE)", host->acre ?
3512+
"True" : "False");
3513+
obj_add_str(r, "Extended Telemetry Data Area 4 Supported (ETDAS)", host->etdas ?
3514+
"True" : "False");
3515+
obj_add_str(r, "LBA Format Extension Enable (LBAFEE)", host->lbafee ?
3516+
"True" : "False");
3517+
obj_add_str(r, "Host Dispersed Namespace Support (HDISNS)", host->hdisns ?
3518+
"Enabled" : "Disabled");
3519+
obj_add_str(r, "Copy Descriptor Format 2h Enable (CDF2E)", host->cdfe & (1 << 2) ?
3520+
"True" : "False");
3521+
obj_add_str(r, "Copy Descriptor Format 3h Enable (CDF3E)", host->cdfe & (1 << 3) ?
3522+
"True" : "False");
3523+
obj_add_str(r, "Copy Descriptor Format 4h Enable (CDF4E)", host->cdfe & (1 << 4) ?
3524+
"True" : "False");
3525+
}
35093526
}
35103527

35113528
static void json_feature_show_fields_sanitize(struct json_object *r, unsigned int result)

nvme-print-stdout.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -5020,10 +5020,14 @@ static void stdout_feature_show_fields(enum nvme_features_id fid,
50205020
host_behavior->etdas ? "True" : "False");
50215021
printf("\tLBA Format Extension Enable (LBAFEE): %s\n",
50225022
host_behavior->lbafee ? "True" : "False");
5023-
printf("\tCopy Descriptor Format 2h Enabled (CDFE): %s\n",
5023+
printf("\tHost Dispersed Namespace Support (HDISNS) : %s\n",
5024+
host_behavior->hdisns ? "Enabled" : "Disabled");
5025+
printf("\tCopy Descriptor Format 2h Enabled (CDF2E) : %s\n",
50245026
host_behavior->cdfe & (1 << 2) ? "True" : "False");
5025-
printf("\tCopy Descriptor Format 3h Enabled (CDFE): %s\n",
5027+
printf("\tCopy Descriptor Format 3h Enabled (CDF3E) : %s\n",
50265028
host_behavior->cdfe & (1 << 3) ? "True" : "False");
5029+
printf("\tCopy Descriptor Format 4h Enabled (CDF4E) : %s\n",
5030+
host_behavior->cdfe & (1 << 4) ? "True" : "False");
50275031
}
50285032
break;
50295033
case NVME_FEAT_FID_SANITIZE:

0 commit comments

Comments
 (0)