]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print: print Host Behavior Support feature fields
authorFrancis Pravin <francis.p@samsung.com>
Thu, 20 Feb 2025 13:05:40 +0000 (18:35 +0530)
committerDaniel Wagner <wagi@monom.org>
Mon, 24 Feb 2025 13:09:25 +0000 (14:09 +0100)
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>
nvme-print-json.c
nvme-print-stdout.c

index 821258c11ac956ffa6c48ac47af3fabe2c85824c..338e0bcb373b96e709062ce8744c9723c6e1c021 100644 (file)
@@ -3504,8 +3504,25 @@ static void json_feature_show_fields_lba_sts_interval(struct json_object *r, uns
 
 static void json_feature_show_fields_host_behavior(struct json_object *r, unsigned char *buf)
 {
-       if (buf)
+       if (buf) {
+               struct nvme_feat_host_behavior *host = (struct nvme_feat_host_behavior *)buf;
+
                obj_add_str(r, "Host Behavior Support", buf[0] & 0x1 ? "True" : "False");
+               obj_add_str(r, "Advanced Command Retry Enable (ACRE)", host->acre ?
+                           "True" : "False");
+               obj_add_str(r, "Extended Telemetry Data Area 4 Supported (ETDAS)", host->etdas ?
+                           "True" : "False");
+               obj_add_str(r, "LBA Format Extension Enable (LBAFEE)", host->lbafee ?
+                           "True" : "False");
+               obj_add_str(r, "Host Dispersed Namespace Support (HDISNS)", host->hdisns ?
+                           "Enabled" : "Disabled");
+               obj_add_str(r, "Copy Descriptor Format 2h Enable (CDF2E)", host->cdfe & (1 << 2) ?
+                           "True" : "False");
+               obj_add_str(r, "Copy Descriptor Format 3h Enable (CDF3E)", host->cdfe & (1 << 3) ?
+                           "True" : "False");
+               obj_add_str(r, "Copy Descriptor Format 4h Enable (CDF4E)", host->cdfe & (1 << 4) ?
+                           "True" : "False");
+       }
 }
 
 static void json_feature_show_fields_sanitize(struct json_object *r, unsigned int result)
index 66308c653e76d425cca87aa3e105f5dd2c08b549..2c7cafded81c72f4aa89d40f392762b2614ceb6e 100644 (file)
@@ -5020,10 +5020,14 @@ static void stdout_feature_show_fields(enum nvme_features_id fid,
                               host_behavior->etdas ? "True" : "False");
                        printf("\tLBA Format Extension Enable (LBAFEE): %s\n",
                               host_behavior->lbafee ? "True" : "False");
-                       printf("\tCopy Descriptor Format 2h Enabled (CDFE): %s\n",
+                       printf("\tHost Dispersed Namespace Support (HDISNS) : %s\n",
+                              host_behavior->hdisns ? "Enabled" : "Disabled");
+                       printf("\tCopy Descriptor Format 2h Enabled (CDF2E) : %s\n",
                               host_behavior->cdfe & (1 << 2) ? "True" : "False");
-                       printf("\tCopy Descriptor Format 3h Enabled (CDFE): %s\n",
+                       printf("\tCopy Descriptor Format 3h Enabled (CDF3E) : %s\n",
                               host_behavior->cdfe & (1 << 3) ? "True" : "False");
+                       printf("\tCopy Descriptor Format 4h Enabled (CDF4E) : %s\n",
+                              host_behavior->cdfe & (1 << 4) ? "True" : "False");
                }
                break;
        case NVME_FEAT_FID_SANITIZE: