summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/AppImageBuilder.yml14
-rw-r--r--.github/azure-pipelines.yml5
-rw-r--r--.github/cross/clang.txt5
-rw-r--r--.github/cross/ubuntu-armhf.txt1
-rw-r--r--.github/cross/ubuntu-ppc64le.txt1
-rw-r--r--.github/cross/ubuntu-s390x.txt18
-rw-r--r--.github/workflows/appimage.yml9
-rw-r--r--.github/workflows/build.yml314
-rw-r--r--.github/workflows/release.yml11
-rw-r--r--Documentation/nvme-admin-passthru.14
-rw-r--r--Documentation/nvme-admin-passthru.html2
-rw-r--r--Documentation/nvme-ana-log.14
-rw-r--r--Documentation/nvme-ana-log.html2
-rw-r--r--Documentation/nvme-attach-ns.14
-rw-r--r--Documentation/nvme-attach-ns.html2
-rw-r--r--Documentation/nvme-boot-part-log.14
-rw-r--r--Documentation/nvme-boot-part-log.html2
-rw-r--r--Documentation/nvme-capacity-mgmt.14
-rw-r--r--Documentation/nvme-capacity-mgmt.html2
-rw-r--r--Documentation/nvme-changed-ns-list-log.14
-rw-r--r--Documentation/nvme-changed-ns-list-log.html2
-rw-r--r--Documentation/nvme-check-tls-key.txt34
-rw-r--r--Documentation/nvme-cmdset-ind-id-ns.14
-rw-r--r--Documentation/nvme-cmdset-ind-id-ns.html2
-rw-r--r--Documentation/nvme-compare.112
-rw-r--r--Documentation/nvme-compare.html14
-rw-r--r--Documentation/nvme-compare.txt10
-rw-r--r--Documentation/nvme-connect-all.154
-rw-r--r--Documentation/nvme-connect-all.html94
-rw-r--r--Documentation/nvme-connect-all.txt42
-rw-r--r--Documentation/nvme-connect.128
-rw-r--r--Documentation/nvme-connect.html41
-rw-r--r--Documentation/nvme-connect.txt17
-rw-r--r--Documentation/nvme-copy.14
-rw-r--r--Documentation/nvme-copy.html2
-rw-r--r--Documentation/nvme-create-ns.14
-rw-r--r--Documentation/nvme-create-ns.html2
-rw-r--r--Documentation/nvme-delete-ns.14
-rw-r--r--Documentation/nvme-delete-ns.html2
-rw-r--r--Documentation/nvme-dera-stat.14
-rw-r--r--Documentation/nvme-dera-stat.html2
-rw-r--r--Documentation/nvme-detach-ns.14
-rw-r--r--Documentation/nvme-detach-ns.html2
-rw-r--r--Documentation/nvme-device-self-test.14
-rw-r--r--Documentation/nvme-device-self-test.html2
-rw-r--r--Documentation/nvme-dim.14
-rw-r--r--Documentation/nvme-dim.html2
-rw-r--r--Documentation/nvme-dir-receive.14
-rw-r--r--Documentation/nvme-dir-receive.html2
-rw-r--r--Documentation/nvme-dir-send.14
-rw-r--r--Documentation/nvme-dir-send.html2
-rw-r--r--Documentation/nvme-disconnect-all.14
-rw-r--r--Documentation/nvme-disconnect-all.html2
-rw-r--r--Documentation/nvme-disconnect.14
-rw-r--r--Documentation/nvme-disconnect.html2
-rw-r--r--Documentation/nvme-discover.154
-rw-r--r--Documentation/nvme-discover.html90
-rw-r--r--Documentation/nvme-discover.txt47
-rw-r--r--Documentation/nvme-dsm.14
-rw-r--r--Documentation/nvme-dsm.html2
-rw-r--r--Documentation/nvme-effects-log.14
-rw-r--r--Documentation/nvme-effects-log.html2
-rw-r--r--Documentation/nvme-endurance-event-agg-log.14
-rw-r--r--Documentation/nvme-endurance-event-agg-log.html2
-rw-r--r--Documentation/nvme-endurance-log.14
-rw-r--r--Documentation/nvme-endurance-log.html2
-rw-r--r--Documentation/nvme-error-log.14
-rw-r--r--Documentation/nvme-error-log.html2
-rw-r--r--Documentation/nvme-fdp-configs.14
-rw-r--r--Documentation/nvme-fdp-configs.html2
-rw-r--r--Documentation/nvme-fdp-events.14
-rw-r--r--Documentation/nvme-fdp-events.html2
-rw-r--r--Documentation/nvme-fdp-set-events.14
-rw-r--r--Documentation/nvme-fdp-set-events.html2
-rw-r--r--Documentation/nvme-fdp-stats.14
-rw-r--r--Documentation/nvme-fdp-stats.html2
-rw-r--r--Documentation/nvme-fdp-status.14
-rw-r--r--Documentation/nvme-fdp-status.html2
-rw-r--r--Documentation/nvme-fdp-update.14
-rw-r--r--Documentation/nvme-fdp-update.html2
-rw-r--r--Documentation/nvme-fdp-usage.14
-rw-r--r--Documentation/nvme-fdp-usage.html2
-rw-r--r--Documentation/nvme-fid-support-effects-log.14
-rw-r--r--Documentation/nvme-fid-support-effects-log.html2
-rw-r--r--Documentation/nvme-flush.14
-rw-r--r--Documentation/nvme-flush.html2
-rw-r--r--Documentation/nvme-format.14
-rw-r--r--Documentation/nvme-format.html2
-rw-r--r--Documentation/nvme-fw-commit.14
-rw-r--r--Documentation/nvme-fw-commit.html2
-rw-r--r--Documentation/nvme-fw-download.14
-rw-r--r--Documentation/nvme-fw-download.html2
-rw-r--r--Documentation/nvme-fw-log.14
-rw-r--r--Documentation/nvme-fw-log.html2
-rw-r--r--Documentation/nvme-gen-hostnqn.14
-rw-r--r--Documentation/nvme-gen-hostnqn.html2
-rw-r--r--Documentation/nvme-gen-tls-key.txt49
-rw-r--r--Documentation/nvme-get-feature.14
-rw-r--r--Documentation/nvme-get-feature.html2
-rw-r--r--Documentation/nvme-get-lba-status.14
-rw-r--r--Documentation/nvme-get-lba-status.html2
-rw-r--r--Documentation/nvme-get-log.110
-rw-r--r--Documentation/nvme-get-log.html15
-rw-r--r--Documentation/nvme-get-log.txt6
-rw-r--r--Documentation/nvme-get-ns-id.14
-rw-r--r--Documentation/nvme-get-ns-id.html2
-rw-r--r--Documentation/nvme-get-property.14
-rw-r--r--Documentation/nvme-get-property.html2
-rw-r--r--Documentation/nvme-help.14
-rw-r--r--Documentation/nvme-help.html2
-rw-r--r--Documentation/nvme-huawei-id-ctrl.14
-rw-r--r--Documentation/nvme-huawei-id-ctrl.html2
-rw-r--r--Documentation/nvme-huawei-list.14
-rw-r--r--Documentation/nvme-huawei-list.html2
-rw-r--r--Documentation/nvme-id-ctrl.14
-rw-r--r--Documentation/nvme-id-ctrl.html2
-rw-r--r--Documentation/nvme-id-domain.14
-rw-r--r--Documentation/nvme-id-domain.html2
-rw-r--r--Documentation/nvme-id-iocs.14
-rw-r--r--Documentation/nvme-id-iocs.html2
-rw-r--r--Documentation/nvme-id-ns.14
-rw-r--r--Documentation/nvme-id-ns.html2
-rw-r--r--Documentation/nvme-id-nvmset.14
-rw-r--r--Documentation/nvme-id-nvmset.html2
-rw-r--r--Documentation/nvme-inspur-nvme-vendor-log.14
-rw-r--r--Documentation/nvme-inspur-nvme-vendor-log.html2
-rw-r--r--Documentation/nvme-intel-id-ctrl.14
-rw-r--r--Documentation/nvme-intel-id-ctrl.html2
-rw-r--r--Documentation/nvme-intel-internal-log.14
-rw-r--r--Documentation/nvme-intel-internal-log.html2
-rw-r--r--Documentation/nvme-intel-lat-stats.14
-rw-r--r--Documentation/nvme-intel-lat-stats.html2
-rw-r--r--Documentation/nvme-intel-market-name.14
-rw-r--r--Documentation/nvme-intel-market-name.html2
-rw-r--r--Documentation/nvme-intel-smart-log-add.14
-rw-r--r--Documentation/nvme-intel-smart-log-add.html2
-rw-r--r--Documentation/nvme-intel-temp-stats.14
-rw-r--r--Documentation/nvme-intel-temp-stats.html2
-rw-r--r--Documentation/nvme-io-mgmt-recv.14
-rw-r--r--Documentation/nvme-io-mgmt-recv.html2
-rw-r--r--Documentation/nvme-io-mgmt-send.14
-rw-r--r--Documentation/nvme-io-mgmt-send.html2
-rw-r--r--Documentation/nvme-io-passthru.14
-rw-r--r--Documentation/nvme-io-passthru.html2
-rw-r--r--Documentation/nvme-lba-status-log.14
-rw-r--r--Documentation/nvme-lba-status-log.html2
-rw-r--r--Documentation/nvme-list-ctrl.14
-rw-r--r--Documentation/nvme-list-ctrl.html2
-rw-r--r--Documentation/nvme-list-endgrp.14
-rw-r--r--Documentation/nvme-list-endgrp.html2
-rw-r--r--Documentation/nvme-list-ns.14
-rw-r--r--Documentation/nvme-list-ns.html2
-rw-r--r--Documentation/nvme-list-subsys.14
-rw-r--r--Documentation/nvme-list-subsys.html2
-rw-r--r--Documentation/nvme-list.14
-rw-r--r--Documentation/nvme-list.html2
-rw-r--r--Documentation/nvme-lockdown.14
-rw-r--r--Documentation/nvme-lockdown.html2
-rw-r--r--Documentation/nvme-mi-cmd-support-effects-log.14
-rw-r--r--Documentation/nvme-mi-cmd-support-effects-log.html2
-rw-r--r--Documentation/nvme-micron-clear-pcie-errors.14
-rw-r--r--Documentation/nvme-micron-clear-pcie-errors.html2
-rw-r--r--Documentation/nvme-micron-internal-log.14
-rw-r--r--Documentation/nvme-micron-internal-log.html2
-rw-r--r--Documentation/nvme-micron-nand-stats.14
-rw-r--r--Documentation/nvme-micron-nand-stats.html2
-rw-r--r--Documentation/nvme-micron-pcie-stats.14
-rw-r--r--Documentation/nvme-micron-pcie-stats.html2
-rw-r--r--Documentation/nvme-micron-selective-download.14
-rw-r--r--Documentation/nvme-micron-selective-download.html2
-rw-r--r--Documentation/nvme-micron-smart-add-log.14
-rw-r--r--Documentation/nvme-micron-smart-add-log.html2
-rw-r--r--Documentation/nvme-micron-temperature-stats.14
-rw-r--r--Documentation/nvme-micron-temperature-stats.html2
-rw-r--r--Documentation/nvme-netapp-ontapdevices.14
-rw-r--r--Documentation/nvme-netapp-ontapdevices.html2
-rw-r--r--Documentation/nvme-netapp-smdevices.14
-rw-r--r--Documentation/nvme-netapp-smdevices.html2
-rw-r--r--Documentation/nvme-ns-descs.14
-rw-r--r--Documentation/nvme-ns-descs.html2
-rw-r--r--Documentation/nvme-ns-rescan.14
-rw-r--r--Documentation/nvme-ns-rescan.html2
-rw-r--r--Documentation/nvme-nvm-id-ctrl.14
-rw-r--r--Documentation/nvme-nvm-id-ctrl.html2
-rw-r--r--Documentation/nvme-ocp-clear-fw-activate-history.14
-rw-r--r--Documentation/nvme-ocp-clear-fw-activate-history.html2
-rw-r--r--Documentation/nvme-ocp-latency-monitor-log.14
-rw-r--r--Documentation/nvme-ocp-latency-monitor-log.html2
-rw-r--r--Documentation/nvme-ocp-smart-add-log.14
-rw-r--r--Documentation/nvme-ocp-smart-add-log.html2
-rw-r--r--Documentation/nvme-persistent-event-log.14
-rw-r--r--Documentation/nvme-persistent-event-log.html2
-rw-r--r--Documentation/nvme-pred-lat-event-agg-log.14
-rw-r--r--Documentation/nvme-pred-lat-event-agg-log.html2
-rw-r--r--Documentation/nvme-predictable-lat-log.14
-rw-r--r--Documentation/nvme-predictable-lat-log.html2
-rw-r--r--Documentation/nvme-primary-ctrl-caps.14
-rw-r--r--Documentation/nvme-primary-ctrl-caps.html2
-rw-r--r--Documentation/nvme-read.112
-rw-r--r--Documentation/nvme-read.html18
-rw-r--r--Documentation/nvme-read.txt14
-rw-r--r--Documentation/nvme-reset.14
-rw-r--r--Documentation/nvme-reset.html2
-rw-r--r--Documentation/nvme-resv-acquire.14
-rw-r--r--Documentation/nvme-resv-acquire.html2
-rw-r--r--Documentation/nvme-resv-notif-log.14
-rw-r--r--Documentation/nvme-resv-notif-log.html2
-rw-r--r--Documentation/nvme-resv-register.14
-rw-r--r--Documentation/nvme-resv-register.html2
-rw-r--r--Documentation/nvme-resv-release.14
-rw-r--r--Documentation/nvme-resv-release.html2
-rw-r--r--Documentation/nvme-resv-report.14
-rw-r--r--Documentation/nvme-resv-report.html2
-rw-r--r--Documentation/nvme-rpmb.14
-rw-r--r--Documentation/nvme-rpmb.html2
-rw-r--r--Documentation/nvme-sanitize-log.14
-rw-r--r--Documentation/nvme-sanitize-log.html2
-rw-r--r--Documentation/nvme-sanitize.14
-rw-r--r--Documentation/nvme-sanitize.html2
-rw-r--r--Documentation/nvme-seagate-clear-fw-activate-history.14
-rw-r--r--Documentation/nvme-seagate-clear-fw-activate-history.html2
-rw-r--r--Documentation/nvme-seagate-clear-pcie-correctable-errors.14
-rw-r--r--Documentation/nvme-seagate-clear-pcie-correctable-errors.html2
-rw-r--r--Documentation/nvme-seagate-cloud-SSD-plugin-version.14
-rw-r--r--Documentation/nvme-seagate-cloud-SSD-plugin-version.html2
-rw-r--r--Documentation/nvme-seagate-get-ctrl-tele.14
-rw-r--r--Documentation/nvme-seagate-get-ctrl-tele.html2
-rw-r--r--Documentation/nvme-seagate-get-host-tele.14
-rw-r--r--Documentation/nvme-seagate-get-host-tele.html2
-rw-r--r--Documentation/nvme-seagate-help.14
-rw-r--r--Documentation/nvme-seagate-help.html2
-rw-r--r--Documentation/nvme-seagate-plugin-version.14
-rw-r--r--Documentation/nvme-seagate-plugin-version.html2
-rw-r--r--Documentation/nvme-seagate-version.14
-rw-r--r--Documentation/nvme-seagate-version.html2
-rw-r--r--Documentation/nvme-seagate-vs-fw-activate-history.14
-rw-r--r--Documentation/nvme-seagate-vs-fw-activate-history.html2
-rw-r--r--Documentation/nvme-seagate-vs-internal-log.14
-rw-r--r--Documentation/nvme-seagate-vs-internal-log.html2
-rw-r--r--Documentation/nvme-seagate-vs-log-page-sup.14
-rw-r--r--Documentation/nvme-seagate-vs-log-page-sup.html2
-rw-r--r--Documentation/nvme-seagate-vs-pcie-stats.14
-rw-r--r--Documentation/nvme-seagate-vs-pcie-stats.html2
-rw-r--r--Documentation/nvme-seagate-vs-smart-add-log.14
-rw-r--r--Documentation/nvme-seagate-vs-smart-add-log.html2
-rw-r--r--Documentation/nvme-seagate-vs-temperature-stats.14
-rw-r--r--Documentation/nvme-seagate-vs-temperature-stats.html2
-rw-r--r--Documentation/nvme-security-recv.14
-rw-r--r--Documentation/nvme-security-recv.html2
-rw-r--r--Documentation/nvme-security-send.14
-rw-r--r--Documentation/nvme-security-send.html2
-rw-r--r--Documentation/nvme-self-test-log.14
-rw-r--r--Documentation/nvme-self-test-log.html2
-rw-r--r--Documentation/nvme-set-feature.14
-rw-r--r--Documentation/nvme-set-feature.html2
-rw-r--r--Documentation/nvme-set-property.14
-rw-r--r--Documentation/nvme-set-property.html2
-rw-r--r--Documentation/nvme-show-hostnqn.14
-rw-r--r--Documentation/nvme-show-hostnqn.html2
-rw-r--r--Documentation/nvme-show-regs.14
-rw-r--r--Documentation/nvme-show-regs.html2
-rw-r--r--Documentation/nvme-show-topology.14
-rw-r--r--Documentation/nvme-show-topology.html2
-rw-r--r--Documentation/nvme-smart-log.14
-rw-r--r--Documentation/nvme-smart-log.html2
-rw-r--r--Documentation/nvme-subsystem-reset.14
-rw-r--r--Documentation/nvme-subsystem-reset.html2
-rw-r--r--Documentation/nvme-supported-log-pages.110
-rw-r--r--Documentation/nvme-supported-log-pages.html11
-rw-r--r--Documentation/nvme-supported-log-pages.txt11
-rw-r--r--Documentation/nvme-telemetry-log.14
-rw-r--r--Documentation/nvme-telemetry-log.html2
-rw-r--r--Documentation/nvme-toshiba-clear-pcie-correctable-errors.14
-rw-r--r--Documentation/nvme-toshiba-clear-pcie-correctable-errors.html2
-rw-r--r--Documentation/nvme-toshiba-vs-internal-log.14
-rw-r--r--Documentation/nvme-toshiba-vs-internal-log.html2
-rw-r--r--Documentation/nvme-toshiba-vs-smart-add-log.14
-rw-r--r--Documentation/nvme-toshiba-vs-smart-add-log.html2
-rw-r--r--Documentation/nvme-transcend-badblock.14
-rw-r--r--Documentation/nvme-transcend-badblock.html2
-rw-r--r--Documentation/nvme-transcend-healthvalue.14
-rw-r--r--Documentation/nvme-transcend-healthvalue.html2
-rw-r--r--Documentation/nvme-verify.112
-rw-r--r--Documentation/nvme-verify.html14
-rw-r--r--Documentation/nvme-verify.txt10
-rw-r--r--Documentation/nvme-virtium-save-smart-to-vtview-log.14
-rw-r--r--Documentation/nvme-virtium-save-smart-to-vtview-log.html2
-rw-r--r--Documentation/nvme-virtium-show-identify.14
-rw-r--r--Documentation/nvme-virtium-show-identify.html2
-rw-r--r--Documentation/nvme-wdc-cap-diag.14
-rw-r--r--Documentation/nvme-wdc-cap-diag.html2
-rw-r--r--Documentation/nvme-wdc-capabilities.14
-rw-r--r--Documentation/nvme-wdc-capabilities.html2
-rw-r--r--Documentation/nvme-wdc-clear-assert-dump.14
-rw-r--r--Documentation/nvme-wdc-clear-assert-dump.html2
-rw-r--r--Documentation/nvme-wdc-clear-fw-activate-history.14
-rw-r--r--Documentation/nvme-wdc-clear-fw-activate-history.html2
-rw-r--r--Documentation/nvme-wdc-clear-pcie-correctable-errors.14
-rw-r--r--Documentation/nvme-wdc-clear-pcie-correctable-errors.html2
-rw-r--r--Documentation/nvme-wdc-cloud-SSD-plugin-version.14
-rw-r--r--Documentation/nvme-wdc-cloud-SSD-plugin-version.html2
-rw-r--r--Documentation/nvme-wdc-cloud-boot-SSD-version.14
-rw-r--r--Documentation/nvme-wdc-cloud-boot-SSD-version.html2
-rw-r--r--Documentation/nvme-wdc-drive-essentials.14
-rw-r--r--Documentation/nvme-wdc-drive-essentials.html2
-rw-r--r--Documentation/nvme-wdc-drive-log.14
-rw-r--r--Documentation/nvme-wdc-drive-log.html2
-rw-r--r--Documentation/nvme-wdc-drive-resize.14
-rw-r--r--Documentation/nvme-wdc-drive-resize.html2
-rw-r--r--Documentation/nvme-wdc-enc-get-log.14
-rw-r--r--Documentation/nvme-wdc-enc-get-log.html2
-rw-r--r--Documentation/nvme-wdc-get-crash-dump.14
-rw-r--r--Documentation/nvme-wdc-get-crash-dump.html2
-rw-r--r--Documentation/nvme-wdc-get-dev-capabilities-log.14
-rw-r--r--Documentation/nvme-wdc-get-dev-capabilities-log.html2
-rw-r--r--Documentation/nvme-wdc-get-drive-status.14
-rw-r--r--Documentation/nvme-wdc-get-drive-status.html2
-rw-r--r--Documentation/nvme-wdc-get-error-recovery-log.14
-rw-r--r--Documentation/nvme-wdc-get-error-recovery-log.html2
-rw-r--r--Documentation/nvme-wdc-get-latency-monitor-log.14
-rw-r--r--Documentation/nvme-wdc-get-latency-monitor-log.html2
-rw-r--r--Documentation/nvme-wdc-get-pfail-dump.14
-rw-r--r--Documentation/nvme-wdc-get-pfail-dump.html2
-rw-r--r--Documentation/nvme-wdc-get-unsupported-reqs-log.14
-rw-r--r--Documentation/nvme-wdc-get-unsupported-reqs-log.html2
-rw-r--r--Documentation/nvme-wdc-id-ctrl.14
-rw-r--r--Documentation/nvme-wdc-id-ctrl.html2
-rw-r--r--Documentation/nvme-wdc-log-page-directory.14
-rw-r--r--Documentation/nvme-wdc-log-page-directory.html2
-rw-r--r--Documentation/nvme-wdc-namespace-resize.14
-rw-r--r--Documentation/nvme-wdc-namespace-resize.html2
-rw-r--r--Documentation/nvme-wdc-purge-monitor.14
-rw-r--r--Documentation/nvme-wdc-purge-monitor.html2
-rw-r--r--Documentation/nvme-wdc-purge.14
-rw-r--r--Documentation/nvme-wdc-purge.html2
-rw-r--r--Documentation/nvme-wdc-vs-cloud-log.14
-rw-r--r--Documentation/nvme-wdc-vs-cloud-log.html2
-rw-r--r--Documentation/nvme-wdc-vs-device-waf.14
-rw-r--r--Documentation/nvme-wdc-vs-device-waf.html2
-rw-r--r--Documentation/nvme-wdc-vs-drive-info.14
-rw-r--r--Documentation/nvme-wdc-vs-drive-info.html2
-rw-r--r--Documentation/nvme-wdc-vs-error-reason-identifier.14
-rw-r--r--Documentation/nvme-wdc-vs-error-reason-identifier.html2
-rw-r--r--Documentation/nvme-wdc-vs-fw-activate-history.14
-rw-r--r--Documentation/nvme-wdc-vs-fw-activate-history.html2
-rw-r--r--Documentation/nvme-wdc-vs-hw-rev-log.14
-rw-r--r--Documentation/nvme-wdc-vs-hw-rev-log.html2
-rw-r--r--Documentation/nvme-wdc-vs-internal-log.14
-rw-r--r--Documentation/nvme-wdc-vs-internal-log.html2
-rw-r--r--Documentation/nvme-wdc-vs-nand-stats.14
-rw-r--r--Documentation/nvme-wdc-vs-nand-stats.html2
-rw-r--r--Documentation/nvme-wdc-vs-smart-add-log.14
-rw-r--r--Documentation/nvme-wdc-vs-smart-add-log.html2
-rw-r--r--Documentation/nvme-wdc-vs-telemetry-controller-option.14
-rw-r--r--Documentation/nvme-wdc-vs-telemetry-controller-option.html2
-rw-r--r--Documentation/nvme-wdc-vs-temperature-stats.14
-rw-r--r--Documentation/nvme-wdc-vs-temperature-stats.html2
-rw-r--r--Documentation/nvme-write-uncor.14
-rw-r--r--Documentation/nvme-write-uncor.html2
-rw-r--r--Documentation/nvme-write-zeroes.14
-rw-r--r--Documentation/nvme-write-zeroes.html2
-rw-r--r--Documentation/nvme-write.112
-rw-r--r--Documentation/nvme-write.html14
-rw-r--r--Documentation/nvme-write.txt10
-rw-r--r--Documentation/nvme-zns-changed-zone-list.14
-rw-r--r--Documentation/nvme-zns-changed-zone-list.html2
-rw-r--r--Documentation/nvme-zns-close-zone.14
-rw-r--r--Documentation/nvme-zns-close-zone.html2
-rw-r--r--Documentation/nvme-zns-finish-zone.14
-rw-r--r--Documentation/nvme-zns-finish-zone.html2
-rw-r--r--Documentation/nvme-zns-id-ctrl.14
-rw-r--r--Documentation/nvme-zns-id-ctrl.html2
-rw-r--r--Documentation/nvme-zns-id-ns.14
-rw-r--r--Documentation/nvme-zns-id-ns.html2
-rw-r--r--Documentation/nvme-zns-offline-zone.14
-rw-r--r--Documentation/nvme-zns-offline-zone.html2
-rw-r--r--Documentation/nvme-zns-open-zone.14
-rw-r--r--Documentation/nvme-zns-open-zone.html2
-rw-r--r--Documentation/nvme-zns-report-zones.14
-rw-r--r--Documentation/nvme-zns-report-zones.html2
-rw-r--r--Documentation/nvme-zns-reset-zone.14
-rw-r--r--Documentation/nvme-zns-reset-zone.html2
-rw-r--r--Documentation/nvme-zns-set-zone-desc.14
-rw-r--r--Documentation/nvme-zns-set-zone-desc.html2
-rw-r--r--Documentation/nvme-zns-zone-append.14
-rw-r--r--Documentation/nvme-zns-zone-append.html2
-rw-r--r--Documentation/nvme-zns-zone-mgmt-recv.14
-rw-r--r--Documentation/nvme-zns-zone-mgmt-recv.html2
-rw-r--r--Documentation/nvme-zns-zone-mgmt-send.14
-rw-r--r--Documentation/nvme-zns-zone-mgmt-send.html2
-rw-r--r--Documentation/nvme.14
-rw-r--r--Documentation/nvme.html2
-rw-r--r--README.md2
-rw-r--r--completions/_nvme20
-rw-r--r--completions/bash-nvme-completion.sh7
-rw-r--r--fabrics.c111
-rw-r--r--meson.build49
-rw-r--r--meson_options.txt1
-rw-r--r--nvme-print-json.c2856
-rw-r--r--nvme-print-json.h148
-rw-r--r--nvme-print.c2920
-rw-r--r--nvme-print.h8
-rw-r--r--nvme-wrap.c6
-rw-r--r--nvme-wrap.h3
-rw-r--r--nvme.c612
-rw-r--r--nvme.h2
-rw-r--r--nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in3
-rw-r--r--nvmf-autoconnect/systemd/nvmf-connect@.service.in4
-rw-r--r--plugins/fdp/fdp.c3
-rw-r--r--plugins/innogrit/innogrit-nvme.c107
-rw-r--r--plugins/inspur/inspur-nvme.c4
-rw-r--r--plugins/intel/intel-nvme.c2
-rw-r--r--plugins/memblaze/memblaze-nvme.c14
-rw-r--r--plugins/meson.build56
-rw-r--r--plugins/micron/micron-nvme.c2
-rw-r--r--plugins/ocp/meson.build1
-rw-r--r--plugins/ocp/ocp-clear-fw-update-history.c56
-rw-r--r--plugins/ocp/ocp-clear-fw-update-history.h3
-rw-r--r--plugins/ocp/ocp-nvme.c1276
-rw-r--r--plugins/ocp/ocp-nvme.h12
-rw-r--r--plugins/ocp/ocp-smart-extended-log.c352
-rw-r--r--plugins/ocp/ocp-smart-extended-log.h18
-rw-r--r--plugins/ocp/ocp-utils.c69
-rw-r--r--plugins/ocp/ocp-utils.h2
-rw-r--r--plugins/solidigm/meson.build1
-rw-r--r--plugins/solidigm/solidigm-garbage-collection.c32
-rw-r--r--plugins/solidigm/solidigm-latency-tracking.c22
-rw-r--r--plugins/solidigm/solidigm-nvme.c10
-rw-r--r--plugins/solidigm/solidigm-nvme.h3
-rw-r--r--plugins/solidigm/solidigm-smart.c34
-rw-r--r--plugins/solidigm/solidigm-telemetry.c2
-rw-r--r--plugins/solidigm/solidigm-telemetry/cod.c8
-rw-r--r--plugins/solidigm/solidigm-telemetry/config.c12
-rw-r--r--plugins/solidigm/solidigm-telemetry/config.h5
-rw-r--r--plugins/solidigm/solidigm-telemetry/data-area.c48
-rw-r--r--plugins/solidigm/solidigm-telemetry/header.c32
-rw-r--r--plugins/solidigm/solidigm-telemetry/telemetry-log.h6
-rw-r--r--plugins/solidigm/solidigm-util.c20
-rw-r--r--plugins/solidigm/solidigm-util.h10
-rw-r--r--plugins/wdc/wdc-nvme.c88
-rw-r--r--plugins/wdc/wdc-nvme.h2
-rw-r--r--subprojects/libnvme.wrap2
-rw-r--r--subprojects/zlib.wrap12
-rw-r--r--unit/meson.build18
-rw-r--r--unit/test-argconfig-parse.c164
-rw-r--r--unit/test-suffix-binary-parse.c68
-rw-r--r--unit/test-suffix-si-parse.c53
-rw-r--r--util/argconfig.c365
-rw-r--r--util/argconfig.h11
-rw-r--r--util/crc32.c99
-rw-r--r--util/crc32.h11
-rw-r--r--util/json.c14
-rw-r--r--util/json.h10
-rw-r--r--util/meson.build10
-rw-r--r--util/suffix.c170
-rw-r--r--util/suffix.h4
-rw-r--r--util/types.c40
-rw-r--r--util/types.h1
458 files changed, 7159 insertions, 5162 deletions
diff --git a/.github/AppImageBuilder.yml b/.github/AppImageBuilder.yml
index 3675edf..67b215c 100644
--- a/.github/AppImageBuilder.yml
+++ b/.github/AppImageBuilder.yml
@@ -28,17 +28,15 @@ AppDir:
include:
- libjson-c5
- libhugetlbfs0
+ - libssl3
files:
include:
- - /lib64/libcrypto.so.3
- - /lib64/libdbus-1.so.3
- - /lib64/libjson-c.so.5
+ - libcrypt.so.3
+ - libdbus-1.so.3
+ - libjson-c.so.5
exclude:
- - usr/share/man
- - usr/share/doc/*/README.*
- - usr/share/doc/*/changelog.*
- - usr/share/doc/*/NEWS.*
- - usr/share/doc/*/TODO.*
+ - usr/share/man
+ - usr/share/doc
test:
fedora-30:
image: appimagecrafters/tests-env:fedora-30
diff --git a/.github/azure-pipelines.yml b/.github/azure-pipelines.yml
index 4b52903..f9eb5ed 100644
--- a/.github/azure-pipelines.yml
+++ b/.github/azure-pipelines.yml
@@ -6,7 +6,10 @@
# - nvme/012
# - nvme/013
-trigger: none # Disable CI triggers.
+trigger:
+ - master
+pr:
+ - master
jobs:
- job: blktests
diff --git a/.github/cross/clang.txt b/.github/cross/clang.txt
new file mode 100644
index 0000000..1484a3e
--- /dev/null
+++ b/.github/cross/clang.txt
@@ -0,0 +1,5 @@
+[binaries]
+c = 'clang'
+cpp = 'clang++'
+strip = 'strip'
+pkgconfig = 'pkg-config'
diff --git a/.github/cross/ubuntu-armhf.txt b/.github/cross/ubuntu-armhf.txt
index 2eee70b..41c8328 100644
--- a/.github/cross/ubuntu-armhf.txt
+++ b/.github/cross/ubuntu-armhf.txt
@@ -4,6 +4,7 @@ ar = '/usr/arm-linux-gnueabihf/bin/ar'
strip = '/usr/arm-linux-gnueabihf/bin/strip'
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
ld = '/usr/bin/arm-linux/gnueabihf-ld'
+exe_wrapper = '/usr/bin/qemu-arm-static'
[properties]
root = '/usr/arm-linux-gnueabihf'
diff --git a/.github/cross/ubuntu-ppc64le.txt b/.github/cross/ubuntu-ppc64le.txt
index 4cf6a92..6baaefb 100644
--- a/.github/cross/ubuntu-ppc64le.txt
+++ b/.github/cross/ubuntu-ppc64le.txt
@@ -4,6 +4,7 @@ ar = '/usr/powerpc64le-linux-gnu/bin/ar'
strip = '/usr/powerpc64le-linux-gnu/bin/strip'
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'
ld = '/usr/bin/powerpc64le-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-ppc64le-static'
[properties]
root = '/usr/powerpc64le-linux-gnu'
diff --git a/.github/cross/ubuntu-s390x.txt b/.github/cross/ubuntu-s390x.txt
new file mode 100644
index 0000000..51a3511
--- /dev/null
+++ b/.github/cross/ubuntu-s390x.txt
@@ -0,0 +1,18 @@
+[binaries]
+c = '/usr/bin/s390x-linux-gnu-gcc'
+ar = '/usr/s390x-linux-gnu/bin/ar'
+strip = '/usr/s390x-linux-gnu/bin/strip'
+pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
+ld = '/usr/bin/s390x-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-s390x-static'
+
+[properties]
+root = '/usr/s390x-linux-gnu'
+has_function_printf = true
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 's390x'
+cpu = ''
+endian = 'big'
diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml
index c64dfb3..80b0496 100644
--- a/.github/workflows/appimage.yml
+++ b/.github/workflows/appimage.yml
@@ -1,21 +1,22 @@
---
-name: AppImage
+name: appimage
on:
push:
- branches: [ master ]
+ branches: [master]
pull_request:
- branches: [ master ]
+ branches: [master]
env:
DESTDIR: ../AppDir
jobs:
build-appimage:
+ name: build AppImage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
- run: sudo apt-get install libjson-c-dev libdbus-1-dev libhugetlbfs-dev
+ run: sudo apt-get install libjson-c-dev libssl-dev libdbus-1-dev libhugetlbfs-dev
- uses: actions/setup-python@v4
with:
python-version: '3.x'
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 805a962..fae50a5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,29 +3,178 @@ name: build
on:
push:
- branches: [ master ]
+ branches: [master]
pull_request:
- branches: [ master ]
+ branches: [master]
workflow_dispatch:
jobs:
- build-distro:
+ gcc-debug:
+ name: gcc debug
runs-on: ubuntu-latest
+ steps:
+ - name: install dependencies
+ run: sudo apt-get install gcc pkg-config libjson-c-dev libhugetlbfs-dev
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+ - uses: bsfishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=debug
+ -Dlibnvme:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
+
+ gcc-release:
+ name: gcc release
+ runs-on: ubuntu-latest
+ steps:
+ - name: install dependencies
+ run: sudo apt-get install gcc pkg-config libjson-c-dev libhugetlbfs-dev
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+ - uses: bsfishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ -Dlibnvme:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
+
+ clang-release:
+ name: clang release
+ runs-on: ubuntu-latest
+ steps:
+ - name: install dependencies
+ run: sudo apt-get install clang pkg-config libjson-c-dev libhugetlbfs-dev
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+ - uses: bsfishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --cross-file=.github/cross/clang.txt
+ -Dlibnvme:werror=false
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
+
+ fallback-shared-libraries:
+ name: fallback shared libraries
+ runs-on: ubuntu-latest
+ steps:
+ - name: install dependencies
+ run: sudo apt-get install libpam-dev libcap-ng-dev
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.x'
+ - uses: BSFishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --wrap-mode=forcefallback
+ --default-library=shared
+ -Dlibnvme:werror=false
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
+ fallback-static-libraries:
+ name: fallback static libraries
+ runs-on: ubuntu-latest
steps:
- name: install dependencies
- run: sudo apt-get install libjson-c-dev libhugetlbfs-dev libdbus-1-dev
+ run: sudo apt-get install libpam-dev libcap-ng-dev
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: BSFishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --wrap-mode=forcefallback
+ --default-library=static
+ -Dlibnvme:werror=false
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
with:
- setup-options: --werror
action: test
+ meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
- build-cross-armhf:
+ cross-armhf:
+ name: cross armhf
runs-on: ubuntu-latest
steps:
- name: set up arm architecture
@@ -39,23 +188,35 @@ jobs:
EOF
sudo apt update
- name: install armhf compiler
- run: sudo apt install gcc-arm-linux-gnueabihf pkg-config
+ run: sudo apt install gcc-arm-linux-gnueabihf pkg-config qemu-user-static
- name: install libraries
- run: sudo apt install uuid-dev:armhf libjson-c-dev:armhf libdbus-1-dev:armhf
+ run: sudo apt install libjson-c-dev:armhf
- uses: actions/checkout@v3
- uses: BSFishy/meson-build@v1.0.3
+ name: build
with:
- # suppress python for now; the python headers currently assume native
- setup-options: --werror --cross-file=.github/cross/ubuntu-armhf.txt -Dlibnvme:python=false
- options: --verbose
action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --cross-file=.github/cross/ubuntu-armhf.txt
+ -Dlibnvme:python=disabled
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
- uses: actions/upload-artifact@v3
if: failure()
with:
- name: Linux_Meson_Testlog
- path: build/meson-logs/testlog.txt
+ name: log files
+ path: |
+ build/meson-logs/*.txt
- build-cross-ppc64le:
+ cross-ppc64le:
+ name: cross ppc64le
runs-on: ubuntu-latest
steps:
- name: set up ppc64le architecture
@@ -69,50 +230,121 @@ jobs:
EOF
sudo apt update
- name: install powerpc64le compiler
- run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config
+ run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config qemu-user-static
- name: install libraries
- run: sudo apt install uuid-dev:ppc64el libjson-c-dev:ppc64el libdbus-1-dev:ppc64el
+ run: sudo apt install libjson-c-dev:ppc64el
- uses: actions/checkout@v3
- uses: BSFishy/meson-build@v1.0.3
+ name: build
with:
- # suppress python for now; the python headers currently assume native
- setup-options: --werror --cross-file=.github/cross/ubuntu-ppc64le.txt -Dlibnvme:python=false
- options: --verbose
action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --cross-file=.github/cross/ubuntu-ppc64le.txt
+ -Dlibnvme:werror=false
+ -Dlibnvme:python=disabled
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
+ with:
+ action: test
+ meson-version: 0.61.2
- uses: actions/upload-artifact@v3
if: failure()
with:
- name: Linux_Meson_Testlog
- path: build/meson-logs/testlog.txt
+ name: log files
+ path: |
+ build/meson-logs/*.txt
- build-fallback:
+ cross-s390x:
+ name: cross s390x
runs-on: ubuntu-latest
steps:
- - name: install dependencies
- run: sudo apt-get install -y libpam-dev libcap-ng-dev
+ - name: set up s390x architecture
+ run: |
+ export release=$(lsb_release -c -s)
+ sudo dpkg --add-architecture s390x
+ sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
+ sudo dd of=/etc/apt/sources.list.d/s390x.list <<EOF
+ deb [arch=s390x] http://ports.ubuntu.com/ $release main universe restricted"
+ deb [arch=s390x] http://ports.ubuntu.com/ $release-updates main universe restricted"
+ EOF
+ sudo apt update
+ - name: install s390x compiler
+ run: sudo apt install gcc-s390x-linux-gnu pkg-config qemu-user-static
+ - name: install libraries
+ run: sudo apt install libjson-c-dev:s390x
- uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- uses: BSFishy/meson-build@v1.0.3
+ name: build
+ with:
+ action: build
+ setup-options: >
+ --werror
+ --buildtype=release
+ --cross-file=.github/cross/ubuntu-s390x.txt
+ -Dlibnvme:werror=false
+ -Dlibnvme:python=disabled
+ -Dopenssl:werror=false
+ meson-version: 0.61.2
+ - uses: bsfishy/meson-build@v1.0.3
+ name: test
with:
- setup-options: --werror -Dopenssl:werror=false -Ddbus:werror=false --wrap-mode=forcefallback
- options: --verbose
action: test
meson-version: 0.61.2
+ - uses: actions/upload-artifact@v3
+ if: failure()
+ with:
+ name: log files
+ path: |
+ build/meson-logs/*.txt
- build-static:
+ build-minimal:
+ name: muon minimal
runs-on: ubuntu-latest
steps:
- - name: install dependencies
- run: sudo apt-get install -y libpam-dev libcap-ng-dev
- uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- - uses: BSFishy/meson-build@v1.0.3
- with:
- setup-options: --werror -Dopenssl:werror=false -Ddbus:werror=false --wrap-mode=forcefallback --default-library=static
- options: --verbose
- action: test
- meson-version: 0.61.2
+ - name: build muon and samurai build-tool
+ run: |
+ mkdir build-tools
+ cd build-tools
+ git clone --depth 1 https://git.sr.ht/~lattis/muon
+ cd muon
+
+ export CC=gcc
+ export ninja=build/samu
+
+ ./tools/bootstrap_ninja.sh build
+ ./bootstrap.sh build
+
+ build/muon setup \
+ -Dlibcurl=disabled \
+ -Dlibarchive=disabled \
+ -Ddocs=disabled \
+ -Dsamurai=disabled \
+ build
+ build/samu -C build
+ build/muon -C build test
+ - name: fetch libnvme
+ run: |
+ cd subprojects
+ git clone https://github.com/linux-nvme/libnvme.git
+ libnvme_ref=$(sed -n "s/revision = \([0-9a-z]\+\)/\1/p" libnvme.wrap)
+ git -C libnvme checkout $libnvme_ref
+ - name: build
+ run: |
+ export PATH=$(pwd)/build-tools/muon/build:$PATH
+
+ muon setup \
+ -Dlibnvme:python=disabled \
+ -Dlibnvme:json-c=disabled \
+ -Djson-c=disabled \
+ build
+ samu -C build
+ - name: test
+ run: |
+ export PATH=$(pwd)/build-tools/muon/build:$PATH
+
+ muon -C build test
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e4ccb70..c88be9e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,11 +1,12 @@
---
-name: releases
+name: release
on:
push:
branches: [ master ]
tags:
- '**'
+
jobs:
build:
runs-on: ubuntu-latest
@@ -13,7 +14,7 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v3
- - uses: ncipollo/release-action@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ - uses: actions/checkout@v3
+ - uses: ncipollo/release-action@v1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1
index b5f1847..90b0f8c 100644
--- a/Documentation/nvme-admin-passthru.1
+++ b/Documentation/nvme-admin-passthru.1
@@ -2,12 +2,12 @@
.\" Title: nvme-admin-passthru
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ADMIN\-PASSTHR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ADMIN\-PASSTHR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html
index df793f1..2e9a379 100644
--- a/Documentation/nvme-admin-passthru.html
+++ b/Documentation/nvme-admin-passthru.html
@@ -998,7 +998,7 @@ Or if you want to save that structure to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ana-log.1 b/Documentation/nvme-ana-log.1
index 1612c3b..2579c31 100644
--- a/Documentation/nvme-ana-log.1
+++ b/Documentation/nvme-ana-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ana-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ANA\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ANA\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ana-log.html b/Documentation/nvme-ana-log.html
index 6fd8b75..c1ae82b 100644
--- a/Documentation/nvme-ana-log.html
+++ b/Documentation/nvme-ana-log.html
@@ -823,7 +823,7 @@ Print the ANA log page in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-attach-ns.1 b/Documentation/nvme-attach-ns.1
index c2339dc..4691b0a 100644
--- a/Documentation/nvme-attach-ns.1
+++ b/Documentation/nvme-attach-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-attach-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ATTACH\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ATTACH\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-attach-ns.html b/Documentation/nvme-attach-ns.html
index 874b250..7d43079 100644
--- a/Documentation/nvme-attach-ns.html
+++ b/Documentation/nvme-attach-ns.html
@@ -817,7 +817,7 @@ controller identifiers.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-boot-part-log.1 b/Documentation/nvme-boot-part-log.1
index 0ece2a2..bf5c828 100644
--- a/Documentation/nvme-boot-part-log.1
+++ b/Documentation/nvme-boot-part-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-boot-part-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-BOOT\-PART\-LO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-BOOT\-PART\-LO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-boot-part-log.html b/Documentation/nvme-boot-part-log.html
index b311966..fe9bbb0 100644
--- a/Documentation/nvme-boot-part-log.html
+++ b/Documentation/nvme-boot-part-log.html
@@ -835,7 +835,7 @@ Retrieve Boot Partition data to boot_part_log.bin
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-capacity-mgmt.1 b/Documentation/nvme-capacity-mgmt.1
index 119d52b..e5f358c 100644
--- a/Documentation/nvme-capacity-mgmt.1
+++ b/Documentation/nvme-capacity-mgmt.1
@@ -2,12 +2,12 @@
.\" Title: nvme-capacity-mgmt
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CAPACITY\-MGMT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CAPACITY\-MGMT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-capacity-mgmt.html b/Documentation/nvme-capacity-mgmt.html
index fc01efc..5a2a9ac 100644
--- a/Documentation/nvme-capacity-mgmt.html
+++ b/Documentation/nvme-capacity-mgmt.html
@@ -839,7 +839,7 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-changed-ns-list-log.1 b/Documentation/nvme-changed-ns-list-log.1
index dc88509..e440d48 100644
--- a/Documentation/nvme-changed-ns-list-log.1
+++ b/Documentation/nvme-changed-ns-list-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-changed-ns-list-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CHANGED\-NS\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CHANGED\-NS\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-changed-ns-list-log.html b/Documentation/nvme-changed-ns-list-log.html
index fa107d3..f0dbb87 100644
--- a/Documentation/nvme-changed-ns-list-log.html
+++ b/Documentation/nvme-changed-ns-list-log.html
@@ -835,7 +835,7 @@ Print the raw Changed Namespace List log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-check-tls-key.txt b/Documentation/nvme-check-tls-key.txt
index 9ef6679..a676f04 100644
--- a/Documentation/nvme-check-tls-key.txt
+++ b/Documentation/nvme-check-tls-key.txt
@@ -8,18 +8,42 @@ nvme-check-tls-key - Check a generated NVMe TLS PSK
SYNOPSIS
--------
[verse]
-'nvme check-tls-key' [--key=<key> ]
+'nvme check-tls-key' [--keyring=<name> | -k <name> ]
+ [--keytype=<type> | -t <type> ]
+ [--hostnqn=<nqn> | -n <nqn> ]
+ [--subsysnqn=<nqn> | -c <nqn> ]
+ [--keydata=<key> | -d <key> ]
DESCRIPTION
-----------
Checks if the key is a valid NVMe TLS PSK in the PSK interchange format
-NVMeTLSkey-1:01:VRLbtnN9AQb2WXW3c9+wEf/DRLz0QuLdbYvEhwtdWwNf9LrZ:
-
+'NVMeTLSkey-1:01:<base64-encoded data>:', and stores the derived 'retained'
+TLS key in the keyring if the subsystem NQN is specified.
OPTIONS
-------
--k <key>::
---key=<key>::
+-k <name>::
+--keyring=<name>::
+ Name of the keyring into which the 'retained' TLS key should be
+ stored. Default is '.nvme'.
+
+-t <type>::
+--keytype=<type>::
+ Type of the key for resulting TLS key.
+ Default is 'psk'.
+
+-n <nqn>::
+--hostnqn=<nqn>::
+ Host NVMe Qualified Name (NQN) to be used to derive the
+ 'retained' TLS key
+
+-c <nqn>::
+--subsysnqn=<nqn>::
+ Subsystem NVMe Qualified Name (NQN) to be used to derive the
+ 'retained' TLS key
+
+-d <key>::
+--keydata=<key>::
Key to be checked.
EXAMPLES
diff --git a/Documentation/nvme-cmdset-ind-id-ns.1 b/Documentation/nvme-cmdset-ind-id-ns.1
index d8082f3..0b035dc 100644
--- a/Documentation/nvme-cmdset-ind-id-ns.1
+++ b/Documentation/nvme-cmdset-ind-id-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-cmdset-ind-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CMDSET\-IND\-I" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CMDSET\-IND\-I" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-cmdset-ind-id-ns.html b/Documentation/nvme-cmdset-ind-id-ns.html
index 1d2192d..cb9bf51 100644
--- a/Documentation/nvme-cmdset-ind-id-ns.html
+++ b/Documentation/nvme-cmdset-ind-id-ns.html
@@ -879,7 +879,7 @@ Have the program return the raw structure in binary:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-compare.1 b/Documentation/nvme-compare.1
index f90e068..e151f31 100644
--- a/Documentation/nvme-compare.1
+++ b/Documentation/nvme-compare.1
@@ -2,12 +2,12 @@
.\" Title: nvme-compare
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-COMPARE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-COMPARE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -51,7 +51,7 @@ nvme-compare \- Send an NVMe Compare command, provide results
[\-\-dry\-run | \-w]
[\-\-latency | \-t]
[\-\-storage\-tag<storage\-tag> | \-g <storage\-tag>]
- [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
+ [\-\-storage\-tag\-check | \-C]
[\-\-force]
.fi
.SH "DESCRIPTION"
@@ -206,14 +206,14 @@ be set\&. Otherwise \-\-dry\-run option will be
Print out the latency the IOCTL took (in us)\&.
.RE
.PP
-\-\-storage\-tag=<storage\-tag>, \-g <storage\-tag>
+\-g <storage\-tag>, \-\-storage\-tag=<storage\-tag>
.RS 4
Variable Sized Expected Logical Block Storage Tag(ELBST)\&.
.RE
.PP
-\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+\-C, \-\-storage\-tag\-check
.RS 4
-This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+This flag enables Storage Tag field checking as part of end\-to\-end data protection processing\&.
.RE
.PP
\-\-force
diff --git a/Documentation/nvme-compare.html b/Documentation/nvme-compare.html
index 0c4d611..cd646a5 100644
--- a/Documentation/nvme-compare.html
+++ b/Documentation/nvme-compare.html
@@ -768,7 +768,7 @@ nvme-compare(1) Manual Page
[--dry-run | -w]
[--latency | -t]
[--storage-tag&lt;storage-tag&gt; | -g &lt;storage-tag&gt;]
- [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]
+ [--storage-tag-check | -C]
[--force]</pre>
<div class="attribution">
</div></div>
@@ -1044,10 +1044,10 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag=&lt;storage-tag&gt;
+-g &lt;storage-tag&gt;
</dt>
<dt class="hdlist1">
--g &lt;storage-tag&gt;
+--storage-tag=&lt;storage-tag&gt;
</dt>
<dd>
<p>
@@ -1055,14 +1055,14 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag-check=&lt;storage-tag-check&gt;
+-C
</dt>
<dt class="hdlist1">
--C &lt;storage-tag-check&gt;
+--storage-tag-check
</dt>
<dd>
<p>
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
</p>
</dd>
@@ -1095,7 +1095,7 @@ metadata is passes.</p></td>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-compare.txt b/Documentation/nvme-compare.txt
index 0137d8d..12121ab 100644
--- a/Documentation/nvme-compare.txt
+++ b/Documentation/nvme-compare.txt
@@ -27,7 +27,7 @@ SYNOPSIS
[--dry-run | -w]
[--latency | -t]
[--storage-tag<storage-tag> | -g <storage-tag>]
- [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
+ [--storage-tag-check | -C]
[--force]
DESCRIPTION
@@ -141,13 +141,13 @@ metadata is passes.
--latency::
Print out the latency the IOCTL took (in us).
---storage-tag=<storage-tag>::
-g <storage-tag>::
+--storage-tag=<storage-tag>::
Variable Sized Expected Logical Block Storage Tag(ELBST).
---storage-tag-check=<storage-tag-check>::
--C <storage-tag-check>::
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+-C::
+--storage-tag-check::
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
--force::
diff --git a/Documentation/nvme-connect-all.1 b/Documentation/nvme-connect-all.1
index f2dbcb5..57f27c1 100644
--- a/Documentation/nvme-connect-all.1
+++ b/Documentation/nvme-connect-all.1
@@ -2,12 +2,12 @@
.\" Title: nvme-connect-all
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CONNECT\-ALL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CONNECT\-ALL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -42,17 +42,21 @@ nvme-connect-all \- Discover and Connect to Fabrics controllers\&.
[\-\-hostnqn=<hostnqn> | \-q <hostnqn>]
[\-\-hostid=<hostid> | \-I <hostid>]
[\-\-raw=<filename> | \-r <filename>]
+ [\-\-device=<device> | \-d <device>]
[\-\-cfg\-file=<cfg> | \-C <cfg>]
- [\-\-keep\-alive\-tmo=<#> | \-k <#>]
+ [\-\-keep\-alive\-tmo=<sec> | \-k <sec>]
[\-\-reconnect\-delay=<#> | \-c <#>]
[\-\-ctrl\-loss\-tmo=<#> | \-l <#>]
- [\-\-hdr\-digest | \-g]
- [\-\-data\-digest | \-G]
[\-\-nr\-io\-queues=<#> | \-i <#>]
[\-\-nr\-write\-queues=<#> | \-W <#>]
[\-\-nr\-poll\-queues=<#> | \-P <#>]
[\-\-queue\-size=<#> | \-Q <#>]
+ [\-\-keyring=<#> ]
+ [\-\-tls_key=<#> ]
+ [\-\-hdr\-digest | \-g]
+ [\-\-data\-digest | \-G]
[\-\-persistent | \-p]
+ [\-\-tls ]
[\-\-quiet | \-S]
[\-\-dump\-config | \-O]
.fi
@@ -151,6 +155,11 @@ command and dump it to a raw binary file\&. By default
will dump the output to stdout\&.
.RE
.PP
+\-d <device>, \-\-device=<device>
+.RS 4
+This field takes a device as input\&. It must be a persistent device associated with a Discovery Controller previously created by the command "connect\-all" or "discover"\&. <device> follows the format nvme*, eg\&. nvme0, nvme1\&.
+.RE
+.PP
\-C <cfg>, \-\-config\-file=<cfg>
.RS 4
Use the specified JSON configuration file instead of the default /usr/local/etc/nvme/config\&.json file or
@@ -174,16 +183,6 @@ Overrides the default delay (in seconds) before reconnect is attempted after a c
Overrides the default controller loss timeout period (in seconds)\&.
.RE
.PP
-\-g, \-\-hdr\-digest
-.RS 4
-Generates/verifies header digest (TCP)\&.
-.RE
-.PP
-\-G, \-\-data\-digest
-.RS 4
-Generates/verifies data digest (TCP)\&.
-.RE
-.PP
\-i <#>, \-\-nr\-io\-queues=<#>
.RS 4
Overrides the default number of I/O queues create by the driver\&. This option will be ignored for discovery, but will be passed on to the subsequent connect call\&.
@@ -204,11 +203,36 @@ Adds additional queues that will be used for polling latency sensitive I/O\&.
Overrides the default number of elements in the I/O queues created by the driver\&. This option will be ignored for discovery, but will be passed on to the subsequent connect call\&.
.RE
.PP
+\-\-keyring=<#>
+.RS 4
+Keyring for TLS key lookup\&.
+.RE
+.PP
+\-\-tls_key=<#>
+.RS 4
+TLS key for the connection (TCP)\&.
+.RE
+.PP
+\-g, \-\-hdr\-digest
+.RS 4
+Generates/verifies header digest (TCP)\&.
+.RE
+.PP
+\-G, \-\-data\-digest
+.RS 4
+Generates/verifies data digest (TCP)\&.
+.RE
+.PP
\-p, \-\-persistent
.RS 4
Don\(cqt remove the discovery controller after retrieving the discovery log page\&.
.RE
.PP
+\-\-tls
+.RS 4
+Enable TLS encryption (TCP)\&.
+.RE
+.PP
\-S, \-\-quiet
.RS 4
Suppress error messages\&.
diff --git a/Documentation/nvme-connect-all.html b/Documentation/nvme-connect-all.html
index 89eae33..b1939f1 100644
--- a/Documentation/nvme-connect-all.html
+++ b/Documentation/nvme-connect-all.html
@@ -759,17 +759,21 @@ nvme-connect-all(1) Manual Page
[--hostnqn=&lt;hostnqn&gt; | -q &lt;hostnqn&gt;]
[--hostid=&lt;hostid&gt; | -I &lt;hostid&gt;]
[--raw=&lt;filename&gt; | -r &lt;filename&gt;]
+ [--device=&lt;device&gt; | -d &lt;device&gt;]
[--cfg-file=&lt;cfg&gt; | -C &lt;cfg&gt;]
- [--keep-alive-tmo=&lt;#&gt; | -k &lt;#&gt;]
+ [--keep-alive-tmo=&lt;sec&gt; | -k &lt;sec&gt;]
[--reconnect-delay=&lt;#&gt; | -c &lt;#&gt;]
[--ctrl-loss-tmo=&lt;#&gt; | -l &lt;#&gt;]
- [--hdr-digest | -g]
- [--data-digest | -G]
[--nr-io-queues=&lt;#&gt; | -i &lt;#&gt;]
[--nr-write-queues=&lt;#&gt; | -W &lt;#&gt;]
[--nr-poll-queues=&lt;#&gt; | -P &lt;#&gt;]
[--queue-size=&lt;#&gt; | -Q &lt;#&gt;]
+ [--keyring=&lt;#&gt; ]
+ [--tls_key=&lt;#&gt; ]
+ [--hdr-digest | -g]
+ [--data-digest | -G]
[--persistent | -p]
+ [--tls ]
[--quiet | -S]
[--dump-config | -O]</pre>
<div class="attribution">
@@ -945,6 +949,20 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
+-d &lt;device&gt;
+</dt>
+<dt class="hdlist1">
+--device=&lt;device&gt;
+</dt>
+<dd>
+<p>
+ This field takes a device as input. It must be a persistent device
+ associated with a Discovery Controller previously created by the
+ command "connect-all" or "discover". &lt;device&gt; follows the format
+ nvme*, eg. nvme0, nvme1.
+</p>
+</dd>
+<dt class="hdlist1">
-C &lt;cfg&gt;
</dt>
<dt class="hdlist1">
@@ -996,28 +1014,6 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
--g
-</dt>
-<dt class="hdlist1">
---hdr-digest
-</dt>
-<dd>
-<p>
- Generates/verifies header digest (TCP).
-</p>
-</dd>
-<dt class="hdlist1">
--G
-</dt>
-<dt class="hdlist1">
---data-digest
-</dt>
-<dd>
-<p>
- Generates/verifies data digest (TCP).
-</p>
-</dd>
-<dt class="hdlist1">
-i &lt;#&gt;
</dt>
<dt class="hdlist1">
@@ -1066,6 +1062,44 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
+--keyring=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ Keyring for TLS key lookup.
+</p>
+</dd>
+<dt class="hdlist1">
+--tls_key=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ TLS key for the connection (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
+-g
+</dt>
+<dt class="hdlist1">
+--hdr-digest
+</dt>
+<dd>
+<p>
+ Generates/verifies header digest (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
+-G
+</dt>
+<dt class="hdlist1">
+--data-digest
+</dt>
+<dd>
+<p>
+ Generates/verifies data digest (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
-p
</dt>
<dt class="hdlist1">
@@ -1078,6 +1112,14 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
+--tls
+</dt>
+<dd>
+<p>
+ Enable TLS encryption (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
-S
</dt>
<dt class="hdlist1">
@@ -1156,7 +1198,7 @@ nvme-connect(1)</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-connect-all.txt b/Documentation/nvme-connect-all.txt
index b449955..44bb4f9 100644
--- a/Documentation/nvme-connect-all.txt
+++ b/Documentation/nvme-connect-all.txt
@@ -18,17 +18,21 @@ SYNOPSIS
[--hostnqn=<hostnqn> | -q <hostnqn>]
[--hostid=<hostid> | -I <hostid>]
[--raw=<filename> | -r <filename>]
+ [--device=<device> | -d <device>]
[--cfg-file=<cfg> | -C <cfg>]
- [--keep-alive-tmo=<#> | -k <#>]
+ [--keep-alive-tmo=<sec> | -k <sec>]
[--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>]
- [--hdr-digest | -g]
- [--data-digest | -G]
[--nr-io-queues=<#> | -i <#>]
[--nr-write-queues=<#> | -W <#>]
[--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>]
+ [--keyring=<#> ]
+ [--tls_key=<#> ]
+ [--hdr-digest | -g]
+ [--data-digest | -G]
[--persistent | -p]
+ [--tls ]
[--quiet | -S]
[--dump-config | -O]
@@ -114,6 +118,13 @@ OPTIONS
and dump it to a raw binary file. By default 'nvme connect-all' will
dump the output to stdout.
+-d <device>::
+--device=<device>::
+ This field takes a device as input. It must be a persistent device
+ associated with a Discovery Controller previously created by the
+ command "connect-all" or "discover". <device> follows the format
+ nvme*, eg. nvme0, nvme1.
+
-C <cfg>::
--config-file=<cfg>::
Use the specified JSON configuration file instead of the
@@ -137,14 +148,6 @@ OPTIONS
--ctrl-loss-tmo=<#>::
Overrides the default controller loss timeout period (in seconds).
--g::
---hdr-digest::
- Generates/verifies header digest (TCP).
-
--G::
---data-digest::
- Generates/verifies data digest (TCP).
-
-i <#>::
--nr-io-queues=<#>::
Overrides the default number of I/O queues create by the driver.
@@ -165,11 +168,28 @@ OPTIONS
by the driver. This option will be ignored for discovery, but will be
passed on to the subsequent connect call.
+--keyring=<#>::
+ Keyring for TLS key lookup.
+
+--tls_key=<#>::
+ TLS key for the connection (TCP).
+
+-g::
+--hdr-digest::
+ Generates/verifies header digest (TCP).
+
+-G::
+--data-digest::
+ Generates/verifies data digest (TCP).
+
-p::
--persistent::
Don't remove the discovery controller after retrieving the discovery
log page.
+--tls::
+ Enable TLS encryption (TCP).
+
-S::
--quiet::
Suppress error messages.
diff --git a/Documentation/nvme-connect.1 b/Documentation/nvme-connect.1
index f657eb1..324bc45 100644
--- a/Documentation/nvme-connect.1
+++ b/Documentation/nvme-connect.1
@@ -2,12 +2,12 @@
.\" Title: nvme-connect
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CONNECT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CONNECT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -51,10 +51,14 @@ nvme-connect \- Connect to a Fabrics controller\&.
[\-\-keep\-alive\-tmo=<#> | \-k <#>]
[\-\-reconnect\-delay=<#> | \-c <#>]
[\-\-ctrl\-loss\-tmo=<#> | \-l <#>]
+ [\-\-tos=<#> | \-T <#>]
+ [\-\-keyring=<#> ]
+ [\-\-tls_key=<#> ]
[\-\-duplicate\-connect | \-D]
[\-\-disable\-sqflow | \-d]
[\-\-hdr\-digest | \-g]
[\-\-data\-digest | \-G]
+ [\-\-tls ]
[\-\-dump\-config | \-O]
[\-\-output\-format=<fmt> | \-o <fmt>]
.fi
@@ -193,6 +197,21 @@ Overrides the default delay (in seconds) before reconnect is attempted after a c
Overrides the default controller loss timeout period (in seconds)\&.
.RE
.PP
+\-T <#>, \-\-tos=<#>
+.RS 4
+Type of service for the connection (TCP)
+.RE
+.PP
+\-\-keyring=<#>
+.RS 4
+Keyring for TLS key lookup\&.
+.RE
+.PP
+\-\-tls_key=<#>
+.RS 4
+TLS key for the connection (TCP)\&.
+.RE
+.PP
\-D, \-\-duplicate\-connect
.RS 4
Allows duplicated connections between same transport host and subsystem port\&.
@@ -213,6 +232,11 @@ Generates/verifies header digest (TCP)\&.
Generates/verifies data digest (TCP)\&.
.RE
.PP
+\-\-tls
+.RS 4
+Enable TLS encryption (TCP)\&.
+.RE
+.PP
\-O, \-\-dump\-config
.RS 4
Print out resulting JSON configuration file to stdout\&.
diff --git a/Documentation/nvme-connect.html b/Documentation/nvme-connect.html
index 19fc688..e489e1d 100644
--- a/Documentation/nvme-connect.html
+++ b/Documentation/nvme-connect.html
@@ -768,10 +768,14 @@ nvme-connect(1) Manual Page
[--keep-alive-tmo=&lt;#&gt; | -k &lt;#&gt;]
[--reconnect-delay=&lt;#&gt; | -c &lt;#&gt;]
[--ctrl-loss-tmo=&lt;#&gt; | -l &lt;#&gt;]
+ [--tos=&lt;#&gt; | -T &lt;#&gt;]
+ [--keyring=&lt;#&gt; ]
+ [--tls_key=&lt;#&gt; ]
[--duplicate-connect | -D]
[--disable-sqflow | -d]
[--hdr-digest | -g]
[--data-digest | -G]
+ [--tls ]
[--dump-config | -O]
[--output-format=&lt;fmt&gt; | -o &lt;fmt&gt;]</pre>
<div class="attribution">
@@ -1047,6 +1051,33 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
+-T &lt;#&gt;
+</dt>
+<dt class="hdlist1">
+--tos=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ Type of service for the connection (TCP)
+</p>
+</dd>
+<dt class="hdlist1">
+--keyring=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ Keyring for TLS key lookup.
+</p>
+</dd>
+<dt class="hdlist1">
+--tls_key=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ TLS key for the connection (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
-D
</dt>
<dt class="hdlist1">
@@ -1093,6 +1124,14 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
+--tls
+</dt>
+<dd>
+<p>
+ Enable TLS encryption (TCP).
+</p>
+</dd>
+<dt class="hdlist1">
-O
</dt>
<dt class="hdlist1">
@@ -1162,7 +1201,7 @@ and <a href="mailto:hch@lst.de">Christoph Hellwig</a></p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-connect.txt b/Documentation/nvme-connect.txt
index f57b34d..0e8856c 100644
--- a/Documentation/nvme-connect.txt
+++ b/Documentation/nvme-connect.txt
@@ -27,10 +27,14 @@ SYNOPSIS
[--keep-alive-tmo=<#> | -k <#>]
[--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>]
+ [--tos=<#> | -T <#>]
+ [--keyring=<#> ]
+ [--tls_key=<#> ]
[--duplicate-connect | -D]
[--disable-sqflow | -d]
[--hdr-digest | -g]
[--data-digest | -G]
+ [--tls ]
[--dump-config | -O]
[--output-format=<fmt> | -o <fmt>]
@@ -150,6 +154,16 @@ OPTIONS
--ctrl-loss-tmo=<#>::
Overrides the default controller loss timeout period (in seconds).
+-T <#>::
+--tos=<#>::
+ Type of service for the connection (TCP)
+
+--keyring=<#>::
+ Keyring for TLS key lookup.
+
+--tls_key=<#>::
+ TLS key for the connection (TCP).
+
-D::
--duplicate-connect::
Allows duplicated connections between same transport host and subsystem
@@ -168,6 +182,9 @@ OPTIONS
--data-digest::
Generates/verifies data digest (TCP).
+--tls::
+ Enable TLS encryption (TCP).
+
-O::
--dump-config::
Print out resulting JSON configuration file to stdout.
diff --git a/Documentation/nvme-copy.1 b/Documentation/nvme-copy.1
index 12e9ee2..a196d19 100644
--- a/Documentation/nvme-copy.1
+++ b/Documentation/nvme-copy.1
@@ -2,12 +2,12 @@
.\" Title: nvme-copy
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-COPY" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-COPY" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-copy.html b/Documentation/nvme-copy.html
index 08e9eb9..7681438 100644
--- a/Documentation/nvme-copy.html
+++ b/Documentation/nvme-copy.html
@@ -982,7 +982,7 @@ logical block ranges to a single consecutive destination logical block range.</p
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-create-ns.1 b/Documentation/nvme-create-ns.1
index 4e191fc..0b68c65 100644
--- a/Documentation/nvme-create-ns.1
+++ b/Documentation/nvme-create-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-create-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-CREATE\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-CREATE\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-create-ns.html b/Documentation/nvme-create-ns.html
index dec4ee0..c0fdb8f 100644
--- a/Documentation/nvme-create-ns.html
+++ b/Documentation/nvme-create-ns.html
@@ -952,7 +952,7 @@ Create a namespace:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-delete-ns.1 b/Documentation/nvme-delete-ns.1
index b0a90e7..20a0dcf 100644
--- a/Documentation/nvme-delete-ns.1
+++ b/Documentation/nvme-delete-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-delete-ns.html b/Documentation/nvme-delete-ns.html
index c9a4c8a..c067961 100644
--- a/Documentation/nvme-delete-ns.html
+++ b/Documentation/nvme-delete-ns.html
@@ -799,7 +799,7 @@ The <code>'--namespace-id'</code> option is mandatory.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dera-stat.1 b/Documentation/nvme-dera-stat.1
index b99e453..fdf510c 100644
--- a/Documentation/nvme-dera-stat.1
+++ b/Documentation/nvme-dera-stat.1
@@ -2,12 +2,12 @@
.\" Title: nvme-dera-stat
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DERA\-STAT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DERA\-STAT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-dera-stat.html b/Documentation/nvme-dera-stat.html
index 6b621cd..a074417 100644
--- a/Documentation/nvme-dera-stat.html
+++ b/Documentation/nvme-dera-stat.html
@@ -797,7 +797,7 @@ Print the Dera Device status and Additional SMART log page in a human readable f
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-detach-ns.1 b/Documentation/nvme-detach-ns.1
index 57b95d6..496e741 100644
--- a/Documentation/nvme-detach-ns.1
+++ b/Documentation/nvme-detach-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-detach-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DETACH\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DETACH\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-detach-ns.html b/Documentation/nvme-detach-ns.html
index 477e40c..bb391fe 100644
--- a/Documentation/nvme-detach-ns.html
+++ b/Documentation/nvme-detach-ns.html
@@ -810,7 +810,7 @@ controller identifiers.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-device-self-test.1 b/Documentation/nvme-device-self-test.1
index 69d3651..3c93265 100644
--- a/Documentation/nvme-device-self-test.1
+++ b/Documentation/nvme-device-self-test.1
@@ -2,12 +2,12 @@
.\" Title: nvme-device-self-test
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DEVICE\-SELF\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DEVICE\-SELF\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-device-self-test.html b/Documentation/nvme-device-self-test.html
index ca5f09f..b1f5382 100644
--- a/Documentation/nvme-device-self-test.html
+++ b/Documentation/nvme-device-self-test.html
@@ -848,7 +848,7 @@ Abort the device self-test operation in the namespace-id 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dim.1 b/Documentation/nvme-dim.1
index 8cfa143..e17b3f5 100644
--- a/Documentation/nvme-dim.1
+++ b/Documentation/nvme-dim.1
@@ -2,12 +2,12 @@
.\" Title: nvme-dim
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DIM" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DIM" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-dim.html b/Documentation/nvme-dim.html
index 30ce918..8676673 100644
--- a/Documentation/nvme-dim.html
+++ b/Documentation/nvme-dim.html
@@ -863,7 +863,7 @@ Deregister from Central Discovery Controller (CDC) associated with nvme4
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dir-receive.1 b/Documentation/nvme-dir-receive.1
index 83c460f..6a919f8 100644
--- a/Documentation/nvme-dir-receive.1
+++ b/Documentation/nvme-dir-receive.1
@@ -2,12 +2,12 @@
.\" Title: nvme-dir-receive
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DIR\-RECEIVE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DIR\-RECEIVE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-dir-receive.html b/Documentation/nvme-dir-receive.html
index 135f733..6e3a462 100644
--- a/Documentation/nvme-dir-receive.html
+++ b/Documentation/nvme-dir-receive.html
@@ -969,7 +969,7 @@ Get streams directive status :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dir-send.1 b/Documentation/nvme-dir-send.1
index 1d52230..81c51ab 100644
--- a/Documentation/nvme-dir-send.1
+++ b/Documentation/nvme-dir-send.1
@@ -2,12 +2,12 @@
.\" Title: nvme-dir-send
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DIR\-SEND" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DIR\-SEND" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-dir-send.html b/Documentation/nvme-dir-send.html
index 6707f1f..1020cf5 100644
--- a/Documentation/nvme-dir-send.html
+++ b/Documentation/nvme-dir-send.html
@@ -982,7 +982,7 @@ Release stream ID 3 :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-disconnect-all.1 b/Documentation/nvme-disconnect-all.1
index 297e2a1..5baac59 100644
--- a/Documentation/nvme-disconnect-all.1
+++ b/Documentation/nvme-disconnect-all.1
@@ -2,12 +2,12 @@
.\" Title: nvme-disconnect-all
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DISCONNECT\-AL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DISCONNECT\-AL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-disconnect-all.html b/Documentation/nvme-disconnect-all.html
index 8857a29..3e95295 100644
--- a/Documentation/nvme-disconnect-all.html
+++ b/Documentation/nvme-disconnect-all.html
@@ -795,7 +795,7 @@ Disconnect all existing nvme controllers:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-disconnect.1 b/Documentation/nvme-disconnect.1
index 09062da..9521860 100644
--- a/Documentation/nvme-disconnect.1
+++ b/Documentation/nvme-disconnect.1
@@ -2,12 +2,12 @@
.\" Title: nvme-disconnect
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DISCONNECT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DISCONNECT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-disconnect.html b/Documentation/nvme-disconnect.html
index 8ba09f6..f0ce118 100644
--- a/Documentation/nvme-disconnect.html
+++ b/Documentation/nvme-disconnect.html
@@ -839,7 +839,7 @@ Disconnect the controller nvme4
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-discover.1 b/Documentation/nvme-discover.1
index cc5dc49..e0adce2 100644
--- a/Documentation/nvme-discover.1
+++ b/Documentation/nvme-discover.1
@@ -2,12 +2,12 @@
.\" Title: nvme-discover
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DISCOVER" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DISCOVER" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -47,14 +47,17 @@ nvme-discover \- Send Get Log Page request to Discovery Controller\&.
[\-\-keep\-alive\-tmo=<sec> | \-k <sec>]
[\-\-reconnect\-delay=<#> | \-c <#>]
[\-\-ctrl\-loss\-tmo=<#> | \-l <#>]
- [\-\-hdr_digest | \-g]
- [\-\-data_digest | \-G]
[\-\-nr\-io\-queues=<#> | \-i <#>]
[\-\-nr\-write\-queues=<#> | \-W <#>]
[\-\-nr\-poll\-queues=<#> | \-P <#>]
[\-\-queue\-size=<#> | \-Q <#>]
+ [\-\-keyring=<#> ]
+ [\-\-tls_key=<#> ]
+ [\-\-hdr\-digest | \-g]
+ [\-\-data\-digest | \-G]
[\-\-persistent | \-p]
[\-\-quiet | \-S]
+ [\-\-tls ]
[\-\-dump\-config | \-O]
[\-\-output\-format=<fmt> | \-o <fmt>]
[\-\-force]
@@ -122,7 +125,7 @@ This field specifies the name for the NVMe subsystem to connect to\&.
.PP
\-a <traddr>, \-\-traddr=<traddr>
.RS 4
-This field specifies the network address of the Discovery Controller\&. For transports using IP addressing (e\&.g\&. rdma) this should be an IP\-based (ex\&. IPv4) address\&.
+This field specifies the network address of the Discovery Controller\&. For transports using IP addressing (e\&.g\&. rdma) this should be an IP\-based address (ex\&. IPv4)\&.
.RE
.PP
\-s <trsvcid>, \-\-trsvcid=<trsvcid>
@@ -161,7 +164,7 @@ will dump the output to stdout\&.
.PP
\-d <device>, \-\-device=<device>
.RS 4
-This field takes a device as input\&. Device is in the format of nvme*, eg\&. nvme0, nvme1
+This field takes a device as input\&. It must be a persistent device associated with a Discovery Controller previously created by the command "connect\-all" or "discover"\&. <device> follows the format nvme*, eg\&. nvme0, nvme1\&.
.RE
.PP
\-C <cfg>, \-\-config\-file=<cfg>
@@ -174,7 +177,7 @@ to not read in an existing configuration file\&. The JSON configuration file for
.PP
\-k <#>, \-\-keep\-alive\-tmo=<#>
.RS 4
-Overrides the default timeout (in seconds) for keep alive\&. This option will be ignored for the discovery, and it is only implemented for completeness\&.
+Overrides the default keep alive timeout (in seconds)\&. This option will be ignored for discovery, and it is only implemented for completeness\&.
.RE
.PP
\-c <#>, \-\-reconnect\-delay=<#>
@@ -187,16 +190,6 @@ Overrides the default delay (in seconds) before reconnect is attempted after a c
Overrides the default controller loss timeout period (in seconds)\&.
.RE
.PP
-\-g, \-\-hdr_digest
-.RS 4
-Generates/verifies header digest (TCP)\&.
-.RE
-.PP
-\-G, \-\-data_digest
-.RS 4
-Generates/verifies data digest (TCP)\&.
-.RE
-.PP
\-i <#>, \-\-nr\-io\-queues=<#>
.RS 4
Overrides the default number of I/O queues create by the driver\&. This option will be ignored for the discovery, and it is only implemented for completeness\&.
@@ -217,9 +210,34 @@ Adds additional queues that will be used for polling latency sensitive I/O\&.
Overrides the default number of elements in the I/O queues created by the driver which can be found at drivers/nvme/host/fabrics\&.h\&. This option will be ignored for the discovery, and it is only implemented for completeness\&.
.RE
.PP
+\-\-keyring=<#>
+.RS 4
+Keyring for TLS key lookup\&.
+.RE
+.PP
+\-\-tls_key=<#>
+.RS 4
+TLS key for the connection (TCP)\&.
+.RE
+.PP
+\-g, \-\-hdr\-digest
+.RS 4
+Generates/verifies header digest (TCP)\&.
+.RE
+.PP
+\-G, \-\-data\-digest
+.RS 4
+Generates/verifies data digest (TCP)\&.
+.RE
+.PP
\-p, \-\-persistent
.RS 4
-Persistent discovery connection\&.
+Don\(cqt remove the discovery controller after retrieving the discovery log page\&.
+.RE
+.PP
+\-\-tls
+.RS 4
+Enable TLS encryption (TCP)\&.
.RE
.PP
\-S, \-\-quiet
diff --git a/Documentation/nvme-discover.html b/Documentation/nvme-discover.html
index 17d8e51..5f3c94e 100644
--- a/Documentation/nvme-discover.html
+++ b/Documentation/nvme-discover.html
@@ -764,14 +764,17 @@ nvme-discover(1) Manual Page
[--keep-alive-tmo=&lt;sec&gt; | -k &lt;sec&gt;]
[--reconnect-delay=&lt;#&gt; | -c &lt;#&gt;]
[--ctrl-loss-tmo=&lt;#&gt; | -l &lt;#&gt;]
- [--hdr_digest | -g]
- [--data_digest | -G]
[--nr-io-queues=&lt;#&gt; | -i &lt;#&gt;]
[--nr-write-queues=&lt;#&gt; | -W &lt;#&gt;]
[--nr-poll-queues=&lt;#&gt; | -P &lt;#&gt;]
[--queue-size=&lt;#&gt; | -Q &lt;#&gt;]
+ [--keyring=&lt;#&gt; ]
+ [--tls_key=&lt;#&gt; ]
+ [--hdr-digest | -g]
+ [--data-digest | -G]
[--persistent | -p]
[--quiet | -S]
+ [--tls ]
[--dump-config | -O]
[--output-format=&lt;fmt&gt; | -o &lt;fmt&gt;]
[--force]</pre>
@@ -885,7 +888,7 @@ cellspacing="0" cellpadding="4">
<p>
This field specifies the network address of the Discovery Controller.
For transports using IP addressing (e.g. rdma) this should be an
- IP-based (ex. IPv4) address.
+ IP-based address (ex. IPv4).
</p>
</dd>
<dt class="hdlist1">
@@ -974,8 +977,10 @@ cellspacing="0" cellpadding="4">
</dt>
<dd>
<p>
- This field takes a device as input. Device is in the format of nvme*,
- eg. nvme0, nvme1
+ This field takes a device as input. It must be a persistent device
+ associated with a Discovery Controller previously created by the
+ command "connect-all" or "discover". &lt;device&gt; follows the format
+ nvme*, eg. nvme0, nvme1.
</p>
</dd>
<dt class="hdlist1">
@@ -1001,8 +1006,8 @@ cellspacing="0" cellpadding="4">
</dt>
<dd>
<p>
- Overrides the default timeout (in seconds) for keep alive.
- This option will be ignored for the discovery, and it is only
+ Overrides the default keep alive timeout (in seconds). This
+ option will be ignored for discovery, and it is only
implemented for completeness.
</p>
</dd>
@@ -1030,74 +1035,90 @@ cellspacing="0" cellpadding="4">
</p>
</dd>
<dt class="hdlist1">
--g
+-i &lt;#&gt;
</dt>
<dt class="hdlist1">
---hdr_digest
+--nr-io-queues=&lt;#&gt;
</dt>
<dd>
<p>
- Generates/verifies header digest (TCP).
+ Overrides the default number of I/O queues create by the driver.
+ This option will be ignored for the discovery, and it is only
+ implemented for completeness.
</p>
</dd>
<dt class="hdlist1">
--G
+-W &lt;#&gt;
</dt>
<dt class="hdlist1">
---data_digest
+--nr-write-queues=&lt;#&gt;
</dt>
<dd>
<p>
- Generates/verifies data digest (TCP).
+ Adds additional queues that will be used for write I/O.
</p>
</dd>
<dt class="hdlist1">
--i &lt;#&gt;
+-P &lt;#&gt;
</dt>
<dt class="hdlist1">
---nr-io-queues=&lt;#&gt;
+--nr-poll-queues=&lt;#&gt;
</dt>
<dd>
<p>
- Overrides the default number of I/O queues create by the driver.
+ Adds additional queues that will be used for polling latency sensitive I/O.
+</p>
+</dd>
+<dt class="hdlist1">
+-Q &lt;#&gt;
+</dt>
+<dt class="hdlist1">
+--queue-size=&lt;#&gt;
+</dt>
+<dd>
+<p>
+ Overrides the default number of elements in the I/O queues created
+ by the driver which can be found at drivers/nvme/host/fabrics.h.
This option will be ignored for the discovery, and it is only
implemented for completeness.
</p>
</dd>
<dt class="hdlist1">
--W &lt;#&gt;
+--keyring=&lt;#&gt;
</dt>
+<dd>
+<p>
+ Keyring for TLS key lookup.
+</p>
+</dd>
<dt class="hdlist1">
---nr-write-queues=&lt;#&gt;
+--tls_key=&lt;#&gt;
</dt>
<dd>
<p>
- Adds additional queues that will be used for write I/O.
+ TLS key for the connection (TCP).
</p>
</dd>
<dt class="hdlist1">
--P &lt;#&gt;
+-g
</dt>
<dt class="hdlist1">
---nr-poll-queues=&lt;#&gt;
+--hdr-digest
</dt>
<dd>
<p>
- Adds additional queues that will be used for polling latency sensitive I/O.
+ Generates/verifies header digest (TCP).
</p>
</dd>
<dt class="hdlist1">
--Q &lt;#&gt;
+-G
</dt>
<dt class="hdlist1">
---queue-size=&lt;#&gt;
+--data-digest
</dt>
<dd>
<p>
- Overrides the default number of elements in the I/O queues created
- by the driver which can be found at drivers/nvme/host/fabrics.h.
- This option will be ignored for the discovery, and it is only
- implemented for completeness.
+ Generates/verifies data digest (TCP).
</p>
</dd>
<dt class="hdlist1">
@@ -1108,7 +1129,16 @@ cellspacing="0" cellpadding="4">
</dt>
<dd>
<p>
- Persistent discovery connection.
+ Don&#8217;t remove the discovery controller after retrieving the discovery
+ log page.
+</p>
+</dd>
+<dt class="hdlist1">
+--tls
+</dt>
+<dd>
+<p>
+ Enable TLS encryption (TCP).
</p>
</dd>
<dt class="hdlist1">
@@ -1218,7 +1248,7 @@ nvme-connect-all(1)</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-discover.txt b/Documentation/nvme-discover.txt
index 53826d5..d4df75c 100644
--- a/Documentation/nvme-discover.txt
+++ b/Documentation/nvme-discover.txt
@@ -23,14 +23,17 @@ SYNOPSIS
[--keep-alive-tmo=<sec> | -k <sec>]
[--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>]
- [--hdr_digest | -g]
- [--data_digest | -G]
[--nr-io-queues=<#> | -i <#>]
[--nr-write-queues=<#> | -W <#>]
[--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>]
+ [--keyring=<#> ]
+ [--tls_key=<#> ]
+ [--hdr-digest | -g]
+ [--data-digest | -G]
[--persistent | -p]
[--quiet | -S]
+ [--tls ]
[--dump-config | -O]
[--output-format=<fmt> | -o <fmt>]
[--force]
@@ -97,7 +100,7 @@ OPTIONS
--traddr=<traddr>::
This field specifies the network address of the Discovery Controller.
For transports using IP addressing (e.g. rdma) this should be an
- IP-based (ex. IPv4) address.
+ IP-based address (ex. IPv4).
-s <trsvcid>::
--trsvcid=<trsvcid>::
@@ -137,8 +140,10 @@ OPTIONS
-d <device>::
--device=<device>::
- This field takes a device as input. Device is in the format of nvme*,
- eg. nvme0, nvme1
+ This field takes a device as input. It must be a persistent device
+ associated with a Discovery Controller previously created by the
+ command "connect-all" or "discover". <device> follows the format
+ nvme*, eg. nvme0, nvme1.
-C <cfg>::
--config-file=<cfg>::
@@ -150,8 +155,8 @@ OPTIONS
-k <#>::
--keep-alive-tmo=<#>::
- Overrides the default timeout (in seconds) for keep alive.
- This option will be ignored for the discovery, and it is only
+ Overrides the default keep alive timeout (in seconds). This
+ option will be ignored for discovery, and it is only
implemented for completeness.
-c <#>::
@@ -163,14 +168,6 @@ OPTIONS
--ctrl-loss-tmo=<#>::
Overrides the default controller loss timeout period (in seconds).
--g::
---hdr_digest::
- Generates/verifies header digest (TCP).
-
--G::
---data_digest::
- Generates/verifies data digest (TCP).
-
-i <#>::
--nr-io-queues=<#>::
Overrides the default number of I/O queues create by the driver.
@@ -192,9 +189,27 @@ OPTIONS
This option will be ignored for the discovery, and it is only
implemented for completeness.
+--keyring=<#>::
+ Keyring for TLS key lookup.
+
+--tls_key=<#>::
+ TLS key for the connection (TCP).
+
+-g::
+--hdr-digest::
+ Generates/verifies header digest (TCP).
+
+-G::
+--data-digest::
+ Generates/verifies data digest (TCP).
+
-p::
--persistent::
- Persistent discovery connection.
+ Don't remove the discovery controller after retrieving the discovery
+ log page.
+
+--tls::
+ Enable TLS encryption (TCP).
-S::
--quiet::
diff --git a/Documentation/nvme-dsm.1 b/Documentation/nvme-dsm.1
index b03a15d..9a243a4 100644
--- a/Documentation/nvme-dsm.1
+++ b/Documentation/nvme-dsm.1
@@ -2,12 +2,12 @@
.\" Title: nvme-dsm
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-DSM" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-DSM" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-dsm.html b/Documentation/nvme-dsm.html
index ccfff82..e397d41 100644
--- a/Documentation/nvme-dsm.html
+++ b/Documentation/nvme-dsm.html
@@ -893,7 +893,7 @@ any settings from the flags may have provided.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-effects-log.1 b/Documentation/nvme-effects-log.1
index e136ccf..7851afc 100644
--- a/Documentation/nvme-effects-log.1
+++ b/Documentation/nvme-effects-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-effects-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-EFFECTS\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-EFFECTS\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-effects-log.html b/Documentation/nvme-effects-log.html
index efc7c48..9932474 100644
--- a/Documentation/nvme-effects-log.html
+++ b/Documentation/nvme-effects-log.html
@@ -847,7 +847,7 @@ Have the program return the raw structure in binary:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-endurance-event-agg-log.1 b/Documentation/nvme-endurance-event-agg-log.1
index df4c723..0e94d67 100644
--- a/Documentation/nvme-endurance-event-agg-log.1
+++ b/Documentation/nvme-endurance-event-agg-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-endurance-event-agg-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ENDURANCE\-EVE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ENDURANCE\-EVE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-endurance-event-agg-log.html b/Documentation/nvme-endurance-event-agg-log.html
index dc52e46..4704915 100644
--- a/Documentation/nvme-endurance-event-agg-log.html
+++ b/Documentation/nvme-endurance-event-agg-log.html
@@ -851,7 +851,7 @@ Print the raw Endurance log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-endurance-log.1 b/Documentation/nvme-endurance-log.1
index 1a09df9..4e1db30 100644
--- a/Documentation/nvme-endurance-log.1
+++ b/Documentation/nvme-endurance-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-endurance-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ENDURANCE\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ENDURANCE\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-endurance-log.html b/Documentation/nvme-endurance-log.html
index c8b2bd8..223d0b3 100644
--- a/Documentation/nvme-endurance-log.html
+++ b/Documentation/nvme-endurance-log.html
@@ -834,7 +834,7 @@ Print the raw Endurance log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-error-log.1 b/Documentation/nvme-error-log.1
index 03b4777..fb8a0a3 100644
--- a/Documentation/nvme-error-log.1
+++ b/Documentation/nvme-error-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-error-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ERROR\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ERROR\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-error-log.html b/Documentation/nvme-error-log.html
index 51c5b4d..d691f58 100644
--- a/Documentation/nvme-error-log.html
+++ b/Documentation/nvme-error-log.html
@@ -849,7 +849,7 @@ Print the raw output to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-configs.1 b/Documentation/nvme-fdp-configs.1
index 499e5bc..a8cddda 100644
--- a/Documentation/nvme-fdp-configs.1
+++ b/Documentation/nvme-fdp-configs.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-configs
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-CONFIGS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-CONFIGS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-configs.html b/Documentation/nvme-fdp-configs.html
index 76a7be1..ddea633 100644
--- a/Documentation/nvme-fdp-configs.html
+++ b/Documentation/nvme-fdp-configs.html
@@ -827,7 +827,7 @@ the possible configurations for Flexible Data Placement.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-events.1 b/Documentation/nvme-fdp-events.1
index b8f7e46..6f23cc4 100644
--- a/Documentation/nvme-fdp-events.1
+++ b/Documentation/nvme-fdp-events.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-events
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-EVENTS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-EVENTS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-events.html b/Documentation/nvme-fdp-events.html
index 293bdd1..a3b3476 100644
--- a/Documentation/nvme-fdp-events.html
+++ b/Documentation/nvme-fdp-events.html
@@ -827,7 +827,7 @@ Units and media usage in an Endurance Group.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-set-events.1 b/Documentation/nvme-fdp-set-events.1
index b081ff3..bd00aa6 100644
--- a/Documentation/nvme-fdp-set-events.1
+++ b/Documentation/nvme-fdp-set-events.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-set-events
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-SET\-EVEN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-SET\-EVEN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-set-events.html b/Documentation/nvme-fdp-set-events.html
index 30b80f3..9696ab6 100644
--- a/Documentation/nvme-fdp-set-events.html
+++ b/Documentation/nvme-fdp-set-events.html
@@ -817,7 +817,7 @@ Handle.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-stats.1 b/Documentation/nvme-fdp-stats.1
index 4b8498e..84a1d5a 100644
--- a/Documentation/nvme-fdp-stats.1
+++ b/Documentation/nvme-fdp-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-STATS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-STATS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-stats.html b/Documentation/nvme-fdp-stats.html
index 2283a4d..dd93280 100644
--- a/Documentation/nvme-fdp-stats.html
+++ b/Documentation/nvme-fdp-stats.html
@@ -815,7 +815,7 @@ the life of the FDP configuration in an Endurance Group.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-status.1 b/Documentation/nvme-fdp-status.1
index bb3f25f..6965507 100644
--- a/Documentation/nvme-fdp-status.1
+++ b/Documentation/nvme-fdp-status.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-status
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-STATUS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-STATUS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-status.html b/Documentation/nvme-fdp-status.html
index aa26b4c..a68c2a7 100644
--- a/Documentation/nvme-fdp-status.html
+++ b/Documentation/nvme-fdp-status.html
@@ -815,7 +815,7 @@ are accessible by the specified namespace.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-update.1 b/Documentation/nvme-fdp-update.1
index a7b56b6..579e931 100644
--- a/Documentation/nvme-fdp-update.1
+++ b/Documentation/nvme-fdp-update.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-update
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-UPDATE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-UPDATE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-update.html b/Documentation/nvme-fdp-update.html
index 71ccd32..9672785 100644
--- a/Documentation/nvme-fdp-update.html
+++ b/Documentation/nvme-fdp-update.html
@@ -802,7 +802,7 @@ a different Reclaim Unit accessible by the specified namespace.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-usage.1 b/Documentation/nvme-fdp-usage.1
index 948eec3..7d198a0 100644
--- a/Documentation/nvme-fdp-usage.1
+++ b/Documentation/nvme-fdp-usage.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fdp-usage
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FDP\-USAGE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FDP\-USAGE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fdp-usage.html b/Documentation/nvme-fdp-usage.html
index f60edab..72c53f3 100644
--- a/Documentation/nvme-fdp-usage.html
+++ b/Documentation/nvme-fdp-usage.html
@@ -816,7 +816,7 @@ Endurance Group.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fid-support-effects-log.1 b/Documentation/nvme-fid-support-effects-log.1
index 2b23024..596c55f 100644
--- a/Documentation/nvme-fid-support-effects-log.1
+++ b/Documentation/nvme-fid-support-effects-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fid-support-effects-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FID\-SUPPORT\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FID\-SUPPORT\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fid-support-effects-log.html b/Documentation/nvme-fid-support-effects-log.html
index cf3eab0..896ccf9 100644
--- a/Documentation/nvme-fid-support-effects-log.html
+++ b/Documentation/nvme-fid-support-effects-log.html
@@ -814,7 +814,7 @@ raw buffer may be printed to stdout.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-flush.1 b/Documentation/nvme-flush.1
index 5547f07..f99b26a 100644
--- a/Documentation/nvme-flush.1
+++ b/Documentation/nvme-flush.1
@@ -2,12 +2,12 @@
.\" Title: nvme-flush
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FLUSH" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FLUSH" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-flush.html b/Documentation/nvme-flush.html
index fbfea25..50c1b9e 100644
--- a/Documentation/nvme-flush.html
+++ b/Documentation/nvme-flush.html
@@ -800,7 +800,7 @@ any namespace.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-format.1 b/Documentation/nvme-format.1
index 4910b4e..22d2654 100644
--- a/Documentation/nvme-format.1
+++ b/Documentation/nvme-format.1
@@ -2,12 +2,12 @@
.\" Title: nvme-format
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FORMAT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FORMAT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-format.html b/Documentation/nvme-format.html
index c06e267..8d00dde 100644
--- a/Documentation/nvme-format.html
+++ b/Documentation/nvme-format.html
@@ -1035,7 +1035,7 @@ information:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fw-commit.1 b/Documentation/nvme-fw-commit.1
index 8020600..08f2fd9 100644
--- a/Documentation/nvme-fw-commit.1
+++ b/Documentation/nvme-fw-commit.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-commit
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-COMMIT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FW\-COMMIT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-commit.html b/Documentation/nvme-fw-commit.html
index 92129a0..1ca14b7 100644
--- a/Documentation/nvme-fw-commit.html
+++ b/Documentation/nvme-fw-commit.html
@@ -905,7 +905,7 @@ commit the last downloaded fw to slot 1.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fw-download.1 b/Documentation/nvme-fw-download.1
index 5786b86..5578e9f 100644
--- a/Documentation/nvme-fw-download.1
+++ b/Documentation/nvme-fw-download.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-download
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-DOWNLOAD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FW\-DOWNLOAD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-download.html b/Documentation/nvme-fw-download.html
index f35d6fa..d463852 100644
--- a/Documentation/nvme-fw-download.html
+++ b/Documentation/nvme-fw-download.html
@@ -852,7 +852,7 @@ Transfer a firmware size 128KiB at a time:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fw-log.1 b/Documentation/nvme-fw-log.1
index 4bd1d9c..7f2da46 100644
--- a/Documentation/nvme-fw-log.1
+++ b/Documentation/nvme-fw-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-fw-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-FW\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-FW\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-fw-log.html b/Documentation/nvme-fw-log.html
index f834047..615a941 100644
--- a/Documentation/nvme-fw-log.html
+++ b/Documentation/nvme-fw-log.html
@@ -835,7 +835,7 @@ Print the log firmware to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-gen-hostnqn.1 b/Documentation/nvme-gen-hostnqn.1
index e2f63f5..e5d13bd 100644
--- a/Documentation/nvme-gen-hostnqn.1
+++ b/Documentation/nvme-gen-hostnqn.1
@@ -2,12 +2,12 @@
.\" Title: nvme-gen-hostnqn
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GEN\-HOSTNQN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GEN\-HOSTNQN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-gen-hostnqn.html b/Documentation/nvme-gen-hostnqn.html
index 6aced60..9d88449 100644
--- a/Documentation/nvme-gen-hostnqn.html
+++ b/Documentation/nvme-gen-hostnqn.html
@@ -785,7 +785,7 @@ and prints it to stdout.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-gen-tls-key.txt b/Documentation/nvme-gen-tls-key.txt
index cfa8614..9a03e3a 100644
--- a/Documentation/nvme-gen-tls-key.txt
+++ b/Documentation/nvme-gen-tls-key.txt
@@ -8,18 +8,52 @@ nvme-gen-tls-key - Generate a NVMe TLS PSK
SYNOPSIS
--------
[verse]
-'nvme gen-tls-key' [--hmac=<hmac-id> | -h <hmac-id>]
+'nvme gen-tls-key' [--keyring=<name> | -k <name>]
+ [--keytype=<type> | -t <type> ]
+ [--hostnqn=<nqn> | -n <nqn>]
+ [--subsysnqn=<nqn> | -c <nqn>]
+ [--hmac=<hmac-id> | -h <hmac-id>]
[--secret=<secret> | -s <secret> ]
+ [--insert | -i ]
DESCRIPTION
-----------
-Generate a base64-encoded NVMe TLS pre-shared key (PSK) in
-the PSK interchange format
-NVMeTLSkey-1:01:VRLbtnN9AQb2WXW3c9+wEf/DRLz0QuLdbYvEhwtdWwNf9LrZ:
-and prints it to stdout.
+Generate a base64-encoded NVMe TLS pre-shared key (PSK).
+The resulting key is either printed in the PSK interchange format
+'NVMeTLSkey-1:01:<base64 encoded data>:',
+inserted as a 'retained' key into the specified keyring, or both.
+When the PSK should be inserted into the keyring a 'retained' key
+is derived from the secret key material, and the resulting 'retained'
+key is stored with the identity
+'NVMe0R0<hmac> <host NQN> <subsystem NQN>'
+in the keyring.
+The 'retained' key is derived from the secret key material,
+the specified subsystem NQN, and the host NQN.
+Once the 'retained' key is stored in the keyring the original
+secret key material cannot be retrieved.
OPTIONS
-------
+-k <name>::
+--keyring=<name>::
+ Name of the keyring into which the 'retained' TLS key should be
+ stored. Default is '.nvme'.
+
+-t <type>::
+--keytype=<type>::
+ Type of the key for resulting TLS key.
+ Default is 'psk'.
+
+-n <nqn>::
+--hostnqn=<nqn>::
+ Host NVMe Qualified Name (NQN) to be used to derive the
+ 'retained' TLS key
+
+-c <nqn>::
+--subsysnqn=<nqn>::
+ Subsystem NVMe Qualified Name (NQN) to be used to derive the
+ 'retained' TLS key
+
-h <hmac-id>::
--hmac=<hmac-id>::
Select a HMAC algorithm to use. Possible values are:
@@ -31,6 +65,11 @@ OPTIONS
Secret value (in hexadecimal) to be used for the key. If none are
provided a random value is used.
+-i::
+--insert::
+ Insert the resulting TLS key into the keyring without printing out
+ the key in PSK interchange format.
+
EXAMPLES
--------
No Examples
diff --git a/Documentation/nvme-get-feature.1 b/Documentation/nvme-get-feature.1
index 822dd23..14f5a5a 100644
--- a/Documentation/nvme-get-feature.1
+++ b/Documentation/nvme-get-feature.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-feature
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-FEATURE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GET\-FEATURE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-feature.html b/Documentation/nvme-get-feature.html
index 24af08a..64be00b 100644
--- a/Documentation/nvme-get-feature.html
+++ b/Documentation/nvme-get-feature.html
@@ -977,7 +977,7 @@ format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-lba-status.1 b/Documentation/nvme-get-lba-status.1
index a400cec..83f57fb 100644
--- a/Documentation/nvme-get-lba-status.1
+++ b/Documentation/nvme-get-lba-status.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-lba-status
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-LBA\-STAT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GET\-LBA\-STAT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-lba-status.html b/Documentation/nvme-get-lba-status.html
index d307b64..e01dea0 100644
--- a/Documentation/nvme-get-lba-status.html
+++ b/Documentation/nvme-get-lba-status.html
@@ -896,7 +896,7 @@ Get LBA Status of the namespace 1 from SLBA 10 for the max Dwords of 0x1000
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-log.1 b/Documentation/nvme-get-log.1
index 0e5f386..8c71416 100644
--- a/Documentation/nvme-get-log.1
+++ b/Documentation/nvme-get-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GET\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -43,6 +43,7 @@ nvme-get-log \- Retrieves a log page from an NVMe device
[\-\-rae | \-r]
[\-\-csi=<command_set_identifier> | \-y <command_set_identifier>]
[\-\-ot=<offset_type> | \-O <offset_type>]
+ [\-\-xfer\-len=<length> | \-x <length>]
.fi
.SH "DESCRIPTION"
.sp
@@ -107,6 +108,11 @@ This field specifies the identifier of command set\&. if not issued, NVM Command
.RS 4
This field specifies the offset type\&. If set to false, the Log Page Offset Lower field and the Log Page Offset Upper field specify the byte offset into the log page to be returned\&. If set to true, the Log Page Offset Lower field and the Log Page Offset Upper field specify the index into the list of data structures in the log page to be returned\&. The default is byte offset\&. If the option is specified the index mode is used\&.
.RE
+.PP
+\-x <length>
+.RS 4
+\-\-xfer\-len <length>: Specify the read chunk size\&. The length argument is expected to be a multiple of 4096\&. The default size is 4096\&.
+.RE
.SH "EXAMPLES"
.sp
.RS 4
diff --git a/Documentation/nvme-get-log.html b/Documentation/nvme-get-log.html
index 0bbb25a..486d3bc 100644
--- a/Documentation/nvme-get-log.html
+++ b/Documentation/nvme-get-log.html
@@ -759,7 +759,8 @@ nvme-get-log(1) Manual Page
[--lsi=&lt;field&gt; | -S &lt;field&gt;]
[--rae | -r]
[--csi=&lt;command_set_identifier&gt; | -y &lt;command_set_identifier&gt;]
- [--ot=&lt;offset_type&gt; | -O &lt;offset_type&gt;]</pre>
+ [--ot=&lt;offset_type&gt; | -O &lt;offset_type&gt;]
+ [--xfer-len=&lt;length&gt; | -x &lt;length&gt;]</pre>
<div class="attribution">
</div></div>
</div>
@@ -918,6 +919,16 @@ program to parse.</p></div>
the index mode is used.
</p>
</dd>
+<dt class="hdlist1">
+-x &lt;length&gt;
+</dt>
+<dd>
+<p>
+--xfer-len &lt;length&gt;:
+ Specify the read chunk size. The length argument is expected to be
+ a multiple of 4096. The default size is 4096.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -962,7 +973,7 @@ Have the program return the raw log page in binary:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-log.txt b/Documentation/nvme-get-log.txt
index a92ab6a..a51c435 100644
--- a/Documentation/nvme-get-log.txt
+++ b/Documentation/nvme-get-log.txt
@@ -19,6 +19,7 @@ SYNOPSIS
[--rae | -r]
[--csi=<command_set_identifier> | -y <command_set_identifier>]
[--ot=<offset_type> | -O <offset_type>]
+ [--xfer-len=<length> | -x <length>]
DESCRIPTION
-----------
@@ -95,6 +96,11 @@ OPTIONS
The default is byte offset. If the option is specified
the index mode is used.
+-x <length>::
+--xfer-len <length>:
+ Specify the read chunk size. The length argument is expected to be
+ a multiple of 4096. The default size is 4096.
+
EXAMPLES
--------
* Get 512 bytes from log page 2
diff --git a/Documentation/nvme-get-ns-id.1 b/Documentation/nvme-get-ns-id.1
index 624e228..b7ecbcd 100644
--- a/Documentation/nvme-get-ns-id.1
+++ b/Documentation/nvme-get-ns-id.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-ns-id
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-NS\-ID" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GET\-NS\-ID" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-ns-id.html b/Documentation/nvme-get-ns-id.html
index 6c82dd7..a3fd6a1 100644
--- a/Documentation/nvme-get-ns-id.html
+++ b/Documentation/nvme-get-ns-id.html
@@ -794,7 +794,7 @@ Shows the namespace id for the given block device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-property.1 b/Documentation/nvme-get-property.1
index 3237714..6be7656 100644
--- a/Documentation/nvme-get-property.1
+++ b/Documentation/nvme-get-property.1
@@ -2,12 +2,12 @@
.\" Title: nvme-get-property
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-GET\-PROPERTY" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-GET\-PROPERTY" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-get-property.html b/Documentation/nvme-get-property.html
index 59b27b5..01167ad 100644
--- a/Documentation/nvme-get-property.html
+++ b/Documentation/nvme-get-property.html
@@ -843,7 +843,7 @@ Then look for NVMe Fabrics command (0x7f) at trace
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-help.1 b/Documentation/nvme-help.1
index 090db55..db13fa7 100644
--- a/Documentation/nvme-help.1
+++ b/Documentation/nvme-help.1
@@ -2,12 +2,12 @@
.\" Title: nvme-help
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-HELP" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-HELP" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-help.html b/Documentation/nvme-help.html
index 864bba2..cbf33cd 100644
--- a/Documentation/nvme-help.html
+++ b/Documentation/nvme-help.html
@@ -794,7 +794,7 @@ Show help for nvme smart log:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-huawei-id-ctrl.1 b/Documentation/nvme-huawei-id-ctrl.1
index d5c1936..ba1d9f1 100644
--- a/Documentation/nvme-huawei-id-ctrl.1
+++ b/Documentation/nvme-huawei-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-huawei-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-HUAWEI\-ID\-CT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-HUAWEI\-ID\-CT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-huawei-id-ctrl.html b/Documentation/nvme-huawei-id-ctrl.html
index df4b05a..95c36e5 100644
--- a/Documentation/nvme-huawei-id-ctrl.html
+++ b/Documentation/nvme-huawei-id-ctrl.html
@@ -855,7 +855,7 @@ fields in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-huawei-list.1 b/Documentation/nvme-huawei-list.1
index c980f69..b3b71aa 100644
--- a/Documentation/nvme-huawei-list.1
+++ b/Documentation/nvme-huawei-list.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LIST" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-huawei-list.html b/Documentation/nvme-huawei-list.html
index 9fd7a0b..1ee53c8 100644
--- a/Documentation/nvme-huawei-list.html
+++ b/Documentation/nvme-huawei-list.html
@@ -797,7 +797,7 @@ for those Huawei devices as well as some pertinent information about them.</p></
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-ctrl.1 b/Documentation/nvme-id-ctrl.1
index 86f85b9..8993ff3 100644
--- a/Documentation/nvme-id-ctrl.1
+++ b/Documentation/nvme-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-CTRL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-CTRL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-ctrl.html b/Documentation/nvme-id-ctrl.html
index ec34164..f9502aa 100644
--- a/Documentation/nvme-id-ctrl.html
+++ b/Documentation/nvme-id-ctrl.html
@@ -910,7 +910,7 @@ int main(int argc, char **argv)
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-domain.1 b/Documentation/nvme-id-domain.1
index 603b20d..27e6bf3 100644
--- a/Documentation/nvme-id-domain.1
+++ b/Documentation/nvme-id-domain.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-domain
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-DOMAIN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-DOMAIN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-domain.html b/Documentation/nvme-id-domain.html
index 40d1f22..1d9b0f1 100644
--- a/Documentation/nvme-id-domain.html
+++ b/Documentation/nvme-id-domain.html
@@ -812,7 +812,7 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-iocs.1 b/Documentation/nvme-id-iocs.1
index e68b85e..03faa40 100644
--- a/Documentation/nvme-id-iocs.1
+++ b/Documentation/nvme-id-iocs.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-iocs
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-IOCS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-IOCS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-iocs.html b/Documentation/nvme-id-iocs.html
index e4b43ec..c6a0276 100644
--- a/Documentation/nvme-id-iocs.html
+++ b/Documentation/nvme-id-iocs.html
@@ -844,7 +844,7 @@ show the fields in human readable format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-ns.1 b/Documentation/nvme-id-ns.1
index 83ee071..2f5562b 100644
--- a/Documentation/nvme-id-ns.1
+++ b/Documentation/nvme-id-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-ns.html b/Documentation/nvme-id-ns.html
index dba3d3e..9fc3309 100644
--- a/Documentation/nvme-id-ns.html
+++ b/Documentation/nvme-id-ns.html
@@ -955,7 +955,7 @@ int main(int argc, char **argv)
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-nvmset.1 b/Documentation/nvme-id-nvmset.1
index 7737a4e..838758c 100644
--- a/Documentation/nvme-id-nvmset.1
+++ b/Documentation/nvme-id-nvmset.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-nvmset
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NVMSET" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-NVMSET" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-id-nvmset.html b/Documentation/nvme-id-nvmset.html
index 23ddc9f..b3701db 100644
--- a/Documentation/nvme-id-nvmset.html
+++ b/Documentation/nvme-id-nvmset.html
@@ -851,7 +851,7 @@ as shown in the above example, or you can <code>'cat'</code> a saved output buff
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-inspur-nvme-vendor-log.1 b/Documentation/nvme-inspur-nvme-vendor-log.1
index 5560efa..1114ea4 100644
--- a/Documentation/nvme-inspur-nvme-vendor-log.1
+++ b/Documentation/nvme-inspur-nvme-vendor-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-inspur-nvme-vendor-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INSPUR\-NVME\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INSPUR\-NVME\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-inspur-nvme-vendor-log.html b/Documentation/nvme-inspur-nvme-vendor-log.html
index 75c340c..54a7831 100644
--- a/Documentation/nvme-inspur-nvme-vendor-log.html
+++ b/Documentation/nvme-inspur-nvme-vendor-log.html
@@ -796,7 +796,7 @@ Print the Inspur Device Vendor log page in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-id-ctrl.1 b/Documentation/nvme-intel-id-ctrl.1
index b63b676..cc210d9 100644
--- a/Documentation/nvme-intel-id-ctrl.1
+++ b/Documentation/nvme-intel-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-ID\-CTR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-ID\-CTR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-id-ctrl.html b/Documentation/nvme-intel-id-ctrl.html
index 59e1817..e7b9b45 100644
--- a/Documentation/nvme-intel-id-ctrl.html
+++ b/Documentation/nvme-intel-id-ctrl.html
@@ -853,7 +853,7 @@ fields in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-internal-log.1 b/Documentation/nvme-intel-internal-log.1
index 0a101cf..c4a212a 100644
--- a/Documentation/nvme-intel-internal-log.1
+++ b/Documentation/nvme-intel-internal-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-internal-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-INTERNA" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-INTERNA" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-internal-log.html b/Documentation/nvme-intel-internal-log.html
index 9dce5f2..98046c6 100644
--- a/Documentation/nvme-intel-internal-log.html
+++ b/Documentation/nvme-intel-internal-log.html
@@ -873,7 +873,7 @@ Gets the event log from the device and saves to defined file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-lat-stats.1 b/Documentation/nvme-intel-lat-stats.1
index 4fbb9e3..4e5b079 100644
--- a/Documentation/nvme-intel-lat-stats.1
+++ b/Documentation/nvme-intel-lat-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-lat-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-LAT\-ST" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-LAT\-ST" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-lat-stats.html b/Documentation/nvme-intel-lat-stats.html
index 1396891..44d88ce 100644
--- a/Documentation/nvme-intel-lat-stats.html
+++ b/Documentation/nvme-intel-lat-stats.html
@@ -832,7 +832,7 @@ Get the write statistics
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-market-name.1 b/Documentation/nvme-intel-market-name.1
index 1326e1e..5993850 100644
--- a/Documentation/nvme-intel-market-name.1
+++ b/Documentation/nvme-intel-market-name.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-market-name
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-MARKET\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-MARKET\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-market-name.html b/Documentation/nvme-intel-market-name.html
index dd1855d..8a5b953 100644
--- a/Documentation/nvme-intel-market-name.html
+++ b/Documentation/nvme-intel-market-name.html
@@ -813,7 +813,7 @@ Get the marketing name
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-smart-log-add.1 b/Documentation/nvme-intel-smart-log-add.1
index 835e169..fc7d2a8 100644
--- a/Documentation/nvme-intel-smart-log-add.1
+++ b/Documentation/nvme-intel-smart-log-add.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-smart-log-add
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-SMART\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-SMART\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-smart-log-add.html b/Documentation/nvme-intel-smart-log-add.html
index ed0e6c2..172e7b7 100644
--- a/Documentation/nvme-intel-smart-log-add.html
+++ b/Documentation/nvme-intel-smart-log-add.html
@@ -850,7 +850,7 @@ Print the raw Intel Additional SMART log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-temp-stats.1 b/Documentation/nvme-intel-temp-stats.1
index bcdb571..7ac43c6 100644
--- a/Documentation/nvme-intel-temp-stats.1
+++ b/Documentation/nvme-intel-temp-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-intel-temp-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-INTEL\-TEMP\-S" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-INTEL\-TEMP\-S" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-intel-temp-stats.html b/Documentation/nvme-intel-temp-stats.html
index fd8e7a3..6dab395 100644
--- a/Documentation/nvme-intel-temp-stats.html
+++ b/Documentation/nvme-intel-temp-stats.html
@@ -822,7 +822,7 @@ Print the raw SMART log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-mgmt-recv.1 b/Documentation/nvme-io-mgmt-recv.1
index 076220a..3e98f9a 100644
--- a/Documentation/nvme-io-mgmt-recv.1
+++ b/Documentation/nvme-io-mgmt-recv.1
@@ -2,12 +2,12 @@
.\" Title: nvme-io-mgmt-recv
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-IO\-MGMT\-RECV" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-IO\-MGMT\-RECV" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-io-mgmt-recv.html b/Documentation/nvme-io-mgmt-recv.html
index 95d1eca..2d841fe 100644
--- a/Documentation/nvme-io-mgmt-recv.html
+++ b/Documentation/nvme-io-mgmt-recv.html
@@ -846,7 +846,7 @@ a hex dump, or binary.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-mgmt-send.1 b/Documentation/nvme-io-mgmt-send.1
index 8bb6538..206d4f4 100644
--- a/Documentation/nvme-io-mgmt-send.1
+++ b/Documentation/nvme-io-mgmt-send.1
@@ -2,12 +2,12 @@
.\" Title: nvme-io-mgmt-send
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-IO\-MGMT\-SEND" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-IO\-MGMT\-SEND" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-io-mgmt-send.html b/Documentation/nvme-io-mgmt-send.html
index 676544c..e806cf7 100644
--- a/Documentation/nvme-io-mgmt-send.html
+++ b/Documentation/nvme-io-mgmt-send.html
@@ -845,7 +845,7 @@ convenience parameters to produce the binary payload.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-passthru.1 b/Documentation/nvme-io-passthru.1
index f3bd35a..41c56f9 100644
--- a/Documentation/nvme-io-passthru.1
+++ b/Documentation/nvme-io-passthru.1
@@ -2,12 +2,12 @@
.\" Title: nvme-io-passthru
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-IO\-PASSTHRU" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-IO\-PASSTHRU" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-io-passthru.html b/Documentation/nvme-io-passthru.html
index c870983..2736afa 100644
--- a/Documentation/nvme-io-passthru.html
+++ b/Documentation/nvme-io-passthru.html
@@ -993,7 +993,7 @@ printed to stdout for another program to parse.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-lba-status-log.1 b/Documentation/nvme-lba-status-log.1
index 007c3b1..e225ec0 100644
--- a/Documentation/nvme-lba-status-log.1
+++ b/Documentation/nvme-lba-status-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-lba-status-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LBA\-STATUS\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LBA\-STATUS\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-lba-status-log.html b/Documentation/nvme-lba-status-log.html
index cf293dc..a5e2661 100644
--- a/Documentation/nvme-lba-status-log.html
+++ b/Documentation/nvme-lba-status-log.html
@@ -831,7 +831,7 @@ NVME</code></pre>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-ctrl.1 b/Documentation/nvme-list-ctrl.1
index c9f2202..359ba48 100644
--- a/Documentation/nvme-list-ctrl.1
+++ b/Documentation/nvme-list-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST\-CTRL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LIST\-CTRL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-ctrl.html b/Documentation/nvme-list-ctrl.html
index 9cd92f5..96a9a6f 100644
--- a/Documentation/nvme-list-ctrl.html
+++ b/Documentation/nvme-list-ctrl.html
@@ -828,7 +828,7 @@ OPTIONS</code></pre>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-endgrp.1 b/Documentation/nvme-list-endgrp.1
index e58a6a6..3cea643 100644
--- a/Documentation/nvme-list-endgrp.1
+++ b/Documentation/nvme-list-endgrp.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list-endgrp
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST\-ENDGRP" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LIST\-ENDGRP" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-endgrp.html b/Documentation/nvme-list-endgrp.html
index f5f6bc4..6e040c4 100644
--- a/Documentation/nvme-list-endgrp.html
+++ b/Documentation/nvme-list-endgrp.html
@@ -815,7 +815,7 @@ than or equal to the value specified in the CDW11.ENDGID field.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-ns.1 b/Documentation/nvme-list-ns.1
index f168dd3..7d7b8b7 100644
--- a/Documentation/nvme-list-ns.1
+++ b/Documentation/nvme-list-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-ns.html b/Documentation/nvme-list-ns.html
index f9fa3fc..b157c40 100644
--- a/Documentation/nvme-list-ns.html
+++ b/Documentation/nvme-list-ns.html
@@ -859,7 +859,7 @@ Print the namespaces present for NVM Command Set in normal format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-subsys.1 b/Documentation/nvme-list-subsys.1
index 85b1a3e..4438882 100644
--- a/Documentation/nvme-list-subsys.1
+++ b/Documentation/nvme-list-subsys.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list-subsys
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST\-SUBSYS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LIST\-SUBSYS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list-subsys.html b/Documentation/nvme-list-subsys.html
index a2ac8fe..6366d60 100644
--- a/Documentation/nvme-list-subsys.html
+++ b/Documentation/nvme-list-subsys.html
@@ -854,7 +854,7 @@ nvme-subsys1 - NQN=nvmf-test2
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list.1 b/Documentation/nvme-list.1
index 8533315..ed5f071 100644
--- a/Documentation/nvme-list.1
+++ b/Documentation/nvme-list.1
@@ -2,12 +2,12 @@
.\" Title: nvme-list
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LIST" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LIST" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-list.html b/Documentation/nvme-list.html
index 09cf858..3ee5809 100644
--- a/Documentation/nvme-list.html
+++ b/Documentation/nvme-list.html
@@ -816,7 +816,7 @@ for those devices as well as some pertinent information about them.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-lockdown.1 b/Documentation/nvme-lockdown.1
index 481e230..007b400 100644
--- a/Documentation/nvme-lockdown.1
+++ b/Documentation/nvme-lockdown.1
@@ -2,12 +2,12 @@
.\" Title: nvme-lockdown
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-LOCKDOWN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-LOCKDOWN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-lockdown.html b/Documentation/nvme-lockdown.html
index 0519b1d..a4cef9c 100644
--- a/Documentation/nvme-lockdown.html
+++ b/Documentation/nvme-lockdown.html
@@ -850,7 +850,7 @@ Identifier.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-mi-cmd-support-effects-log.1 b/Documentation/nvme-mi-cmd-support-effects-log.1
index af740c4..2048204 100644
--- a/Documentation/nvme-mi-cmd-support-effects-log.1
+++ b/Documentation/nvme-mi-cmd-support-effects-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-mi-cmd-support-effects-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MI\-CMD\-SUPPO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MI\-CMD\-SUPPO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-mi-cmd-support-effects-log.html b/Documentation/nvme-mi-cmd-support-effects-log.html
index 5a0008e..70100f3 100644
--- a/Documentation/nvme-mi-cmd-support-effects-log.html
+++ b/Documentation/nvme-mi-cmd-support-effects-log.html
@@ -815,7 +815,7 @@ raw buffer may be printed to stdout.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-clear-pcie-errors.1 b/Documentation/nvme-micron-clear-pcie-errors.1
index 588a9df..3093bec 100644
--- a/Documentation/nvme-micron-clear-pcie-errors.1
+++ b/Documentation/nvme-micron-clear-pcie-errors.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-clear-pcie-errors
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-CLEAR\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-CLEAR\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-clear-pcie-errors.html b/Documentation/nvme-micron-clear-pcie-errors.html
index cb25537..105f413 100644
--- a/Documentation/nvme-micron-clear-pcie-errors.html
+++ b/Documentation/nvme-micron-clear-pcie-errors.html
@@ -798,7 +798,7 @@ Retrieve NAND statistics information
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-internal-log.1 b/Documentation/nvme-micron-internal-log.1
index 71294aa..ba3d6f0 100644
--- a/Documentation/nvme-micron-internal-log.1
+++ b/Documentation/nvme-micron-internal-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-internal-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-INTERN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-INTERN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-internal-log.html b/Documentation/nvme-micron-internal-log.html
index 8d3fc4b..f1f0045 100644
--- a/Documentation/nvme-micron-internal-log.html
+++ b/Documentation/nvme-micron-internal-log.html
@@ -813,7 +813,7 @@ Gets the logs from the device and saves to micron_logs.zip file
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-nand-stats.1 b/Documentation/nvme-micron-nand-stats.1
index 5e9d9ab..eae9a9d 100644
--- a/Documentation/nvme-micron-nand-stats.1
+++ b/Documentation/nvme-micron-nand-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-nand-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-NAND\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-NAND\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-nand-stats.html b/Documentation/nvme-micron-nand-stats.html
index 59d08ae..fd0bf7e 100644
--- a/Documentation/nvme-micron-nand-stats.html
+++ b/Documentation/nvme-micron-nand-stats.html
@@ -799,7 +799,7 @@ Retrieve NAND statistics information
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-pcie-stats.1 b/Documentation/nvme-micron-pcie-stats.1
index 11281d9..f5f7668 100644
--- a/Documentation/nvme-micron-pcie-stats.1
+++ b/Documentation/nvme-micron-pcie-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-pcie-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-PCIE\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-PCIE\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-pcie-stats.html b/Documentation/nvme-micron-pcie-stats.html
index 6d1f2b1..05616f4 100644
--- a/Documentation/nvme-micron-pcie-stats.html
+++ b/Documentation/nvme-micron-pcie-stats.html
@@ -799,7 +799,7 @@ Retrieve PCIe error information
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-selective-download.1 b/Documentation/nvme-micron-selective-download.1
index 5ea20e0..48dd67f 100644
--- a/Documentation/nvme-micron-selective-download.1
+++ b/Documentation/nvme-micron-selective-download.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-selective-download
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-SELECT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-SELECT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-selective-download.html b/Documentation/nvme-micron-selective-download.html
index b55824b..4612e12 100644
--- a/Documentation/nvme-micron-selective-download.html
+++ b/Documentation/nvme-micron-selective-download.html
@@ -867,7 +867,7 @@ Update eeprom, OOB and main firmware
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-smart-add-log.1 b/Documentation/nvme-micron-smart-add-log.1
index 19e9cb8..b31da85 100644
--- a/Documentation/nvme-micron-smart-add-log.1
+++ b/Documentation/nvme-micron-smart-add-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-smart-add-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-SMART\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-SMART\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-smart-add-log.html b/Documentation/nvme-micron-smart-add-log.html
index b5e8974..3dae90d 100644
--- a/Documentation/nvme-micron-smart-add-log.html
+++ b/Documentation/nvme-micron-smart-add-log.html
@@ -808,7 +808,7 @@ Retrieve NAND/extended SMART data and display in json format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-temperature-stats.1 b/Documentation/nvme-micron-temperature-stats.1
index 363b1d2..f01ca22 100644
--- a/Documentation/nvme-micron-temperature-stats.1
+++ b/Documentation/nvme-micron-temperature-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-micron-temperature-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-MICRON\-TEMPER" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-MICRON\-TEMPER" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-micron-temperature-stats.html b/Documentation/nvme-micron-temperature-stats.html
index d622287..496028b 100644
--- a/Documentation/nvme-micron-temperature-stats.html
+++ b/Documentation/nvme-micron-temperature-stats.html
@@ -799,7 +799,7 @@ Retrieve temperature information
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-netapp-ontapdevices.1 b/Documentation/nvme-netapp-ontapdevices.1
index f71eeb8..84d3a22 100644
--- a/Documentation/nvme-netapp-ontapdevices.1
+++ b/Documentation/nvme-netapp-ontapdevices.1
@@ -2,12 +2,12 @@
.\" Title: nvme-netapp-ontapdevices
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-NETAPP\-ONTAPD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-NETAPP\-ONTAPD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-netapp-ontapdevices.html b/Documentation/nvme-netapp-ontapdevices.html
index 4888284..aeb30b1 100644
--- a/Documentation/nvme-netapp-ontapdevices.html
+++ b/Documentation/nvme-netapp-ontapdevices.html
@@ -807,7 +807,7 @@ Display information, in a column-based format, for ONTAP devices.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-netapp-smdevices.1 b/Documentation/nvme-netapp-smdevices.1
index 40b4bad..c55aa8b 100644
--- a/Documentation/nvme-netapp-smdevices.1
+++ b/Documentation/nvme-netapp-smdevices.1
@@ -2,12 +2,12 @@
.\" Title: nvme-netapp-smdevices
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-NETAPP\-SMDEVI" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-NETAPP\-SMDEVI" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-netapp-smdevices.html b/Documentation/nvme-netapp-smdevices.html
index 74dd0de..c0e00b5 100644
--- a/Documentation/nvme-netapp-smdevices.html
+++ b/Documentation/nvme-netapp-smdevices.html
@@ -809,7 +809,7 @@ namespace.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ns-descs.1 b/Documentation/nvme-ns-descs.1
index fdf6a36..1a9d09d 100644
--- a/Documentation/nvme-ns-descs.1
+++ b/Documentation/nvme-ns-descs.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ns-descs
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-NS\-DESCS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-NS\-DESCS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ns-descs.html b/Documentation/nvme-ns-descs.html
index 5435b7f..576c4c0 100644
--- a/Documentation/nvme-ns-descs.html
+++ b/Documentation/nvme-ns-descs.html
@@ -857,7 +857,7 @@ Have the program return the raw structure in binary:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ns-rescan.1 b/Documentation/nvme-ns-rescan.1
index c2e180b..ab54fac 100644
--- a/Documentation/nvme-ns-rescan.1
+++ b/Documentation/nvme-ns-rescan.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ns-rescan
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-NS\-RESCAN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-NS\-RESCAN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ns-rescan.html b/Documentation/nvme-ns-rescan.html
index 842496b..639cb47 100644
--- a/Documentation/nvme-ns-rescan.html
+++ b/Documentation/nvme-ns-rescan.html
@@ -794,7 +794,7 @@ Rescans the nvme namespaces.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-nvm-id-ctrl.1 b/Documentation/nvme-nvm-id-ctrl.1
index 034aa3b..d1b3de0 100644
--- a/Documentation/nvme-nvm-id-ctrl.1
+++ b/Documentation/nvme-nvm-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-nvm-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-NVM\-ID\-CTRL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-NVM\-ID\-CTRL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-nvm-id-ctrl.html b/Documentation/nvme-nvm-id-ctrl.html
index 3d27b2e..cd19c2f 100644
--- a/Documentation/nvme-nvm-id-ctrl.html
+++ b/Documentation/nvme-nvm-id-ctrl.html
@@ -821,7 +821,7 @@ Show the output in json format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-clear-fw-activate-history.1 b/Documentation/nvme-ocp-clear-fw-activate-history.1
index 82b63bd..e1896e5 100644
--- a/Documentation/nvme-ocp-clear-fw-activate-history.1
+++ b/Documentation/nvme-ocp-clear-fw-activate-history.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ocp-clear-fw-activate-history
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-OCP\-CLEAR\-FW" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-OCP\-CLEAR\-FW" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ocp-clear-fw-activate-history.html b/Documentation/nvme-ocp-clear-fw-activate-history.html
index f1121bb..c0eac89 100644
--- a/Documentation/nvme-ocp-clear-fw-activate-history.html
+++ b/Documentation/nvme-ocp-clear-fw-activate-history.html
@@ -817,7 +817,7 @@ Clears OCP Firmware Activation History Log for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-latency-monitor-log.1 b/Documentation/nvme-ocp-latency-monitor-log.1
index d5a7af5..d232408 100644
--- a/Documentation/nvme-ocp-latency-monitor-log.1
+++ b/Documentation/nvme-ocp-latency-monitor-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ocp-latency-monitor-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-OCP\-LATENCY\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-OCP\-LATENCY\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ocp-latency-monitor-log.html b/Documentation/nvme-ocp-latency-monitor-log.html
index 6a990a7..383c705 100644
--- a/Documentation/nvme-ocp-latency-monitor-log.html
+++ b/Documentation/nvme-ocp-latency-monitor-log.html
@@ -811,7 +811,7 @@ Displays the get latency monitor log for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-smart-add-log.1 b/Documentation/nvme-ocp-smart-add-log.1
index 9771ab0..c8f9f76 100644
--- a/Documentation/nvme-ocp-smart-add-log.1
+++ b/Documentation/nvme-ocp-smart-add-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-ocp-smart-add-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-OCP\-SMART\-AD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-OCP\-SMART\-AD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-ocp-smart-add-log.html b/Documentation/nvme-ocp-smart-add-log.html
index feee7d5..23c2e7f 100644
--- a/Documentation/nvme-ocp-smart-add-log.html
+++ b/Documentation/nvme-ocp-smart-add-log.html
@@ -812,7 +812,7 @@ Has the program issue a smart-add-log command to retrieve the 0xC0 log page.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-persistent-event-log.1 b/Documentation/nvme-persistent-event-log.1
index 8fae2c0..dc114c6 100644
--- a/Documentation/nvme-persistent-event-log.1
+++ b/Documentation/nvme-persistent-event-log.1
@@ -2,12 +2,12 @@
.\" Title: persistent-event-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "PERSISTENT\-EVENT\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "PERSISTENT\-EVENT\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-persistent-event-log.html b/Documentation/nvme-persistent-event-log.html
index 4c4ec5f..b976858 100644
--- a/Documentation/nvme-persistent-event-log.html
+++ b/Documentation/nvme-persistent-event-log.html
@@ -867,7 +867,7 @@ Print the raw persistent event log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-pred-lat-event-agg-log.1 b/Documentation/nvme-pred-lat-event-agg-log.1
index 82ce0ff..ceff595 100644
--- a/Documentation/nvme-pred-lat-event-agg-log.1
+++ b/Documentation/nvme-pred-lat-event-agg-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-pred-lat-event-agg-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-PRED\-LAT\-EVE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-PRED\-LAT\-EVE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-pred-lat-event-agg-log.html b/Documentation/nvme-pred-lat-event-agg-log.html
index 1620b63..5cd74cc 100644
--- a/Documentation/nvme-pred-lat-event-agg-log.html
+++ b/Documentation/nvme-pred-lat-event-agg-log.html
@@ -863,7 +863,7 @@ Print the raw Predictable Latency Event Aggregate log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-predictable-lat-log.1 b/Documentation/nvme-predictable-lat-log.1
index 68ae9e3..7891a51 100644
--- a/Documentation/nvme-predictable-lat-log.1
+++ b/Documentation/nvme-predictable-lat-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-predictable-lat-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-PREDICTABLE\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-PREDICTABLE\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-predictable-lat-log.html b/Documentation/nvme-predictable-lat-log.html
index f602015..86da3ff 100644
--- a/Documentation/nvme-predictable-lat-log.html
+++ b/Documentation/nvme-predictable-lat-log.html
@@ -850,7 +850,7 @@ Print the raw Predictable latency per NVM set log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-primary-ctrl-caps.1 b/Documentation/nvme-primary-ctrl-caps.1
index ed055aa..9338e26 100644
--- a/Documentation/nvme-primary-ctrl-caps.1
+++ b/Documentation/nvme-primary-ctrl-caps.1
@@ -2,12 +2,12 @@
.\" Title: nvme-primary-ctrl-caps
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-PRIMARY\-CTRL\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-PRIMARY\-CTRL\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-primary-ctrl-caps.html b/Documentation/nvme-primary-ctrl-caps.html
index 342ca5c..ac72c06 100644
--- a/Documentation/nvme-primary-ctrl-caps.html
+++ b/Documentation/nvme-primary-ctrl-caps.html
@@ -835,7 +835,7 @@ fields in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-read.1 b/Documentation/nvme-read.1
index 6a9f105..0ae330f 100644
--- a/Documentation/nvme-read.1
+++ b/Documentation/nvme-read.1
@@ -2,12 +2,12 @@
.\" Title: nvme-read
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-READ" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-READ" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -51,7 +51,7 @@ nvme-read \- Send an NVMe Read command, provide results
[\-\-dry\-run | \-w]
[\-\-latency | \-t]
[\-\-storage\-tag<storage\-tag> | \-g <storage\-tag>]
- [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
+ [\-\-storage\-tag\-check | \-C ]
[\-\-force]
.fi
.SH "DESCRIPTION"
@@ -182,14 +182,14 @@ be set\&. Otherwise \-\-dry\-run option will be
Print out the latency the IOCTL took (in us)\&.
.RE
.PP
-\-\-storage\-tag=<storage\-tag>, \-g <storage\-tag>
+\-g <storage\-tag>, \-\-storage\-tag=<storage\-tag>
.RS 4
Variable Sized Expected Logical Block Storage Tag(ELBST)\&.
.RE
.PP
-\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+\-C, \-\-storage\-tag\-check
.RS 4
-This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+This flag enables Storage Tag field checking as part of end\-to\-end data protection processing\&.
.RE
.PP
\-\-force
diff --git a/Documentation/nvme-read.html b/Documentation/nvme-read.html
index b6dee07..acd9b08 100644
--- a/Documentation/nvme-read.html
+++ b/Documentation/nvme-read.html
@@ -768,7 +768,7 @@ nvme-read(1) Manual Page
[--dry-run | -w]
[--latency | -t]
[--storage-tag&lt;storage-tag&gt; | -g &lt;storage-tag&gt;]
- [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]
+ [--storage-tag-check | -C ]
[--force]</pre>
<div class="attribution">
</div></div>
@@ -1017,10 +1017,10 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag=&lt;storage-tag&gt;
+-g &lt;storage-tag&gt;
</dt>
<dt class="hdlist1">
--g &lt;storage-tag&gt;
+--storage-tag=&lt;storage-tag&gt;
</dt>
<dd>
<p>
@@ -1028,14 +1028,14 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag-check=&lt;storage-tag-check&gt;
+-C
</dt>
<dt class="hdlist1">
--C &lt;storage-tag-check&gt;
+--storage-tag-check
</dt>
<dd>
<p>
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
</p>
</dd>
@@ -1044,8 +1044,8 @@ metadata is passes.</p></td>
</dt>
<dd>
<p>
- Ignore namespace is currently busy and performed the operation
- even though.
+ Ignore namespace is currently busy and performed the operation
+ even though.
</p>
</dd>
</dl></div>
@@ -1068,7 +1068,7 @@ metadata is passes.</p></td>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-read.txt b/Documentation/nvme-read.txt
index 1757fd3..3ceeba1 100644
--- a/Documentation/nvme-read.txt
+++ b/Documentation/nvme-read.txt
@@ -27,7 +27,7 @@ SYNOPSIS
[--dry-run | -w]
[--latency | -t]
[--storage-tag<storage-tag> | -g <storage-tag>]
- [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
+ [--storage-tag-check | -C ]
[--force]
DESCRIPTION
@@ -131,18 +131,18 @@ metadata is passes.
--latency::
Print out the latency the IOCTL took (in us).
---storage-tag=<storage-tag>::
-g <storage-tag>::
+--storage-tag=<storage-tag>::
Variable Sized Expected Logical Block Storage Tag(ELBST).
---storage-tag-check=<storage-tag-check>::
--C <storage-tag-check>::
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+-C::
+--storage-tag-check::
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
--force::
- Ignore namespace is currently busy and performed the operation
- even though.
+ Ignore namespace is currently busy and performed the operation
+ even though.
EXAMPLES
--------
diff --git a/Documentation/nvme-reset.1 b/Documentation/nvme-reset.1
index 57c1a5c..d276781 100644
--- a/Documentation/nvme-reset.1
+++ b/Documentation/nvme-reset.1
@@ -2,12 +2,12 @@
.\" Title: nvme-reset
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESET" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESET" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-reset.html b/Documentation/nvme-reset.html
index 1f0afcb..c2997dd 100644
--- a/Documentation/nvme-reset.html
+++ b/Documentation/nvme-reset.html
@@ -794,7 +794,7 @@ Resets the controller.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-acquire.1 b/Documentation/nvme-resv-acquire.1
index 7e29f9f..ad8a600 100644
--- a/Documentation/nvme-resv-acquire.1
+++ b/Documentation/nvme-resv-acquire.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-acquire
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-ACQUIRE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESV\-ACQUIRE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-acquire.html b/Documentation/nvme-resv-acquire.html
index 3a85d5c..ee014bb 100644
--- a/Documentation/nvme-resv-acquire.html
+++ b/Documentation/nvme-resv-acquire.html
@@ -948,7 +948,7 @@ cellspacing="0" cellpadding="4">
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-notif-log.1 b/Documentation/nvme-resv-notif-log.1
index f50f3de..5a7dd9b 100644
--- a/Documentation/nvme-resv-notif-log.1
+++ b/Documentation/nvme-resv-notif-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-notif-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-NOTIF\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESV\-NOTIF\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-notif-log.html b/Documentation/nvme-resv-notif-log.html
index c881555..2548add 100644
--- a/Documentation/nvme-resv-notif-log.html
+++ b/Documentation/nvme-resv-notif-log.html
@@ -822,7 +822,7 @@ Print the output in json format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-register.1 b/Documentation/nvme-resv-register.1
index bc1c43a..288c234 100644
--- a/Documentation/nvme-resv-register.1
+++ b/Documentation/nvme-resv-register.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-register
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-REGISTER" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESV\-REGISTER" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-register.html b/Documentation/nvme-resv-register.html
index 8fb803b..2369d82 100644
--- a/Documentation/nvme-resv-register.html
+++ b/Documentation/nvme-resv-register.html
@@ -937,7 +937,7 @@ cellspacing="0" cellpadding="4">
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-release.1 b/Documentation/nvme-resv-release.1
index 796da3e..e8ea517 100644
--- a/Documentation/nvme-resv-release.1
+++ b/Documentation/nvme-resv-release.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-release
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-RELEASE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESV\-RELEASE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-release.html b/Documentation/nvme-resv-release.html
index ff92bbd..6b42b75 100644
--- a/Documentation/nvme-resv-release.html
+++ b/Documentation/nvme-resv-release.html
@@ -930,7 +930,7 @@ cellspacing="0" cellpadding="4">
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-report.1 b/Documentation/nvme-resv-report.1
index 7ac1f2f..666927a 100644
--- a/Documentation/nvme-resv-report.1
+++ b/Documentation/nvme-resv-report.1
@@ -2,12 +2,12 @@
.\" Title: nvme-resv-report
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RESV\-REPORT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RESV\-REPORT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-resv-report.html b/Documentation/nvme-resv-report.html
index 8fa1019..ecd93bd 100644
--- a/Documentation/nvme-resv-report.html
+++ b/Documentation/nvme-resv-report.html
@@ -855,7 +855,7 @@ Controller data structure for each such controller).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-rpmb.1 b/Documentation/nvme-rpmb.1
index 8c62f9b..519040a 100644
--- a/Documentation/nvme-rpmb.1
+++ b/Documentation/nvme-rpmb.1
@@ -2,12 +2,12 @@
.\" Title: nvme-rpmb
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-RPMB" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-RPMB" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-rpmb.html b/Documentation/nvme-rpmb.html
index 136b2d5..23c6cb0 100644
--- a/Documentation/nvme-rpmb.html
+++ b/Documentation/nvme-rpmb.html
@@ -1001,7 +1001,7 @@ data onto output.bin
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-sanitize-log.1 b/Documentation/nvme-sanitize-log.1
index a1402a5..275d2fd 100644
--- a/Documentation/nvme-sanitize-log.1
+++ b/Documentation/nvme-sanitize-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-sanitize-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SANITIZE\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SANITIZE\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-sanitize-log.html b/Documentation/nvme-sanitize-log.html
index 1fe6e57..fb7ec1d 100644
--- a/Documentation/nvme-sanitize-log.html
+++ b/Documentation/nvme-sanitize-log.html
@@ -892,7 +892,7 @@ Has the program issue Sanitize-log Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-sanitize.1 b/Documentation/nvme-sanitize.1
index 39a21a2..4d02085 100644
--- a/Documentation/nvme-sanitize.1
+++ b/Documentation/nvme-sanitize.1
@@ -2,12 +2,12 @@
.\" Title: nvme-sanitize
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SANITIZE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SANITIZE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-sanitize.html b/Documentation/nvme-sanitize.html
index ce54a3a..63bef5d 100644
--- a/Documentation/nvme-sanitize.html
+++ b/Documentation/nvme-sanitize.html
@@ -938,7 +938,7 @@ Has the program issue Sanitize Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-clear-fw-activate-history.1 b/Documentation/nvme-seagate-clear-fw-activate-history.1
index aa2bf15..336d847 100644
--- a/Documentation/nvme-seagate-clear-fw-activate-history.1
+++ b/Documentation/nvme-seagate-clear-fw-activate-history.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-clear-fw-activate-history
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-CLEAR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-CLEAR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-clear-fw-activate-history.html b/Documentation/nvme-seagate-clear-fw-activate-history.html
index 3055004..d2a8dbd 100644
--- a/Documentation/nvme-seagate-clear-fw-activate-history.html
+++ b/Documentation/nvme-seagate-clear-fw-activate-history.html
@@ -792,7 +792,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-clear-pcie-correctable-errors.1 b/Documentation/nvme-seagate-clear-pcie-correctable-errors.1
index db25121..f4df592 100644
--- a/Documentation/nvme-seagate-clear-pcie-correctable-errors.1
+++ b/Documentation/nvme-seagate-clear-pcie-correctable-errors.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-clear-pcie-correctable-errors
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-CLEAR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-CLEAR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-clear-pcie-correctable-errors.html b/Documentation/nvme-seagate-clear-pcie-correctable-errors.html
index 41be17f..a5a24b9 100644
--- a/Documentation/nvme-seagate-clear-pcie-correctable-errors.html
+++ b/Documentation/nvme-seagate-clear-pcie-correctable-errors.html
@@ -802,7 +802,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-cloud-SSD-plugin-version.1 b/Documentation/nvme-seagate-cloud-SSD-plugin-version.1
index 61784d6..a77eaea 100644
--- a/Documentation/nvme-seagate-cloud-SSD-plugin-version.1
+++ b/Documentation/nvme-seagate-cloud-SSD-plugin-version.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-cloud-SSD-plugin-version
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-CLOUD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-CLOUD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-cloud-SSD-plugin-version.html b/Documentation/nvme-seagate-cloud-SSD-plugin-version.html
index d4a3490..7a45d51 100644
--- a/Documentation/nvme-seagate-cloud-SSD-plugin-version.html
+++ b/Documentation/nvme-seagate-cloud-SSD-plugin-version.html
@@ -787,7 +787,7 @@ nvme-seagate-cloud-SSD-plugin-version (1) Manual Page
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-get-ctrl-tele.1 b/Documentation/nvme-seagate-get-ctrl-tele.1
index db73c58..f8bccbf 100644
--- a/Documentation/nvme-seagate-get-ctrl-tele.1
+++ b/Documentation/nvme-seagate-get-ctrl-tele.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-get-ctrl-tele
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-GET\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-GET\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-get-ctrl-tele.html b/Documentation/nvme-seagate-get-ctrl-tele.html
index 7b229f1..b5e03cf 100644
--- a/Documentation/nvme-seagate-get-ctrl-tele.html
+++ b/Documentation/nvme-seagate-get-ctrl-tele.html
@@ -813,7 +813,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-get-host-tele.1 b/Documentation/nvme-seagate-get-host-tele.1
index e130550..8bc7df9 100644
--- a/Documentation/nvme-seagate-get-host-tele.1
+++ b/Documentation/nvme-seagate-get-host-tele.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-get-host-tele
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-GET\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-GET\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-get-host-tele.html b/Documentation/nvme-seagate-get-host-tele.html
index 7cc44ed..8cd9234 100644
--- a/Documentation/nvme-seagate-get-host-tele.html
+++ b/Documentation/nvme-seagate-get-host-tele.html
@@ -825,7 +825,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-help.1 b/Documentation/nvme-seagate-help.1
index 0b63798..f770686 100644
--- a/Documentation/nvme-seagate-help.1
+++ b/Documentation/nvme-seagate-help.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-help
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-HELP" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-HELP" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-help.html b/Documentation/nvme-seagate-help.html
index 6d16923..c56b98a 100644
--- a/Documentation/nvme-seagate-help.html
+++ b/Documentation/nvme-seagate-help.html
@@ -812,7 +812,7 @@ help Display this help</code></pre>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-plugin-version.1 b/Documentation/nvme-seagate-plugin-version.1
index 8d41181..8d08d4f 100644
--- a/Documentation/nvme-seagate-plugin-version.1
+++ b/Documentation/nvme-seagate-plugin-version.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-plugin-version
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-PLUGI" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-PLUGI" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-plugin-version.html b/Documentation/nvme-seagate-plugin-version.html
index a3238a0..6cfa944 100644
--- a/Documentation/nvme-seagate-plugin-version.html
+++ b/Documentation/nvme-seagate-plugin-version.html
@@ -787,7 +787,7 @@ nvme-seagate-plugin-version(1) Manual Page
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-version.1 b/Documentation/nvme-seagate-version.1
index ee5e0f5..0f92a62 100644
--- a/Documentation/nvme-seagate-version.1
+++ b/Documentation/nvme-seagate-version.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-version
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VERSI" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VERSI" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-version.html b/Documentation/nvme-seagate-version.html
index b76557b..6f3264d 100644
--- a/Documentation/nvme-seagate-version.html
+++ b/Documentation/nvme-seagate-version.html
@@ -787,7 +787,7 @@ nvme-seagate-version(1) Manual Page
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-fw-activate-history.1 b/Documentation/nvme-seagate-vs-fw-activate-history.1
index efdabb3..413fcb2 100644
--- a/Documentation/nvme-seagate-vs-fw-activate-history.1
+++ b/Documentation/nvme-seagate-vs-fw-activate-history.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-fw-activate-history
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-F" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-F" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-fw-activate-history.html b/Documentation/nvme-seagate-vs-fw-activate-history.html
index a9ee351..fc09bfb 100644
--- a/Documentation/nvme-seagate-vs-fw-activate-history.html
+++ b/Documentation/nvme-seagate-vs-fw-activate-history.html
@@ -813,7 +813,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-internal-log.1 b/Documentation/nvme-seagate-vs-internal-log.1
index d0ea5b4..b3544e4 100644
--- a/Documentation/nvme-seagate-vs-internal-log.1
+++ b/Documentation/nvme-seagate-vs-internal-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-internal-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-I" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-I" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-internal-log.html b/Documentation/nvme-seagate-vs-internal-log.html
index 91089aa..9a4f429 100644
--- a/Documentation/nvme-seagate-vs-internal-log.html
+++ b/Documentation/nvme-seagate-vs-internal-log.html
@@ -813,7 +813,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-log-page-sup.1 b/Documentation/nvme-seagate-vs-log-page-sup.1
index 2b91414..9228c4f 100644
--- a/Documentation/nvme-seagate-vs-log-page-sup.1
+++ b/Documentation/nvme-seagate-vs-log-page-sup.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-log-page-sup
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-L" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-L" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-log-page-sup.html b/Documentation/nvme-seagate-vs-log-page-sup.html
index a710266..9cd302d 100644
--- a/Documentation/nvme-seagate-vs-log-page-sup.html
+++ b/Documentation/nvme-seagate-vs-log-page-sup.html
@@ -814,7 +814,7 @@ LogPage-Id LogPage-Name
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-pcie-stats.1 b/Documentation/nvme-seagate-vs-pcie-stats.1
index 20b4f09..934ef1c 100644
--- a/Documentation/nvme-seagate-vs-pcie-stats.1
+++ b/Documentation/nvme-seagate-vs-pcie-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-pcie-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-P" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-P" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-pcie-stats.html b/Documentation/nvme-seagate-vs-pcie-stats.html
index 0d5427f..b3111ae 100644
--- a/Documentation/nvme-seagate-vs-pcie-stats.html
+++ b/Documentation/nvme-seagate-vs-pcie-stats.html
@@ -802,7 +802,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-smart-add-log.1 b/Documentation/nvme-seagate-vs-smart-add-log.1
index baf09d5..1585722 100644
--- a/Documentation/nvme-seagate-vs-smart-add-log.1
+++ b/Documentation/nvme-seagate-vs-smart-add-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-smart-add-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-S" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-S" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-smart-add-log.html b/Documentation/nvme-seagate-vs-smart-add-log.html
index 8e3aed5..9c150bd 100644
--- a/Documentation/nvme-seagate-vs-smart-add-log.html
+++ b/Documentation/nvme-seagate-vs-smart-add-log.html
@@ -830,7 +830,7 @@ all commands work across all product families.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-temperature-stats.1 b/Documentation/nvme-seagate-vs-temperature-stats.1
index ed67345..99ea833 100644
--- a/Documentation/nvme-seagate-vs-temperature-stats.1
+++ b/Documentation/nvme-seagate-vs-temperature-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-seagate-vs-temperature-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SEAGATE\-VS\-T" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SEAGATE\-VS\-T" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-seagate-vs-temperature-stats.html b/Documentation/nvme-seagate-vs-temperature-stats.html
index ef736b1..bc93899 100644
--- a/Documentation/nvme-seagate-vs-temperature-stats.html
+++ b/Documentation/nvme-seagate-vs-temperature-stats.html
@@ -802,7 +802,7 @@ nvme block device (ex: /dev/nvme0n1).</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-security-recv.1 b/Documentation/nvme-security-recv.1
index a9a61c5..7efef4c 100644
--- a/Documentation/nvme-security-recv.1
+++ b/Documentation/nvme-security-recv.1
@@ -2,12 +2,12 @@
.\" Title: nvme-security-recv
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SECURITY\-RECV" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SECURITY\-RECV" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-security-recv.html b/Documentation/nvme-security-recv.html
index 85e8a5a..6f71883 100644
--- a/Documentation/nvme-security-recv.html
+++ b/Documentation/nvme-security-recv.html
@@ -886,7 +886,7 @@ controller reset occurs.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-security-send.1 b/Documentation/nvme-security-send.1
index 36cd92e..8363fcb 100644
--- a/Documentation/nvme-security-send.1
+++ b/Documentation/nvme-security-send.1
@@ -2,12 +2,12 @@
.\" Title: nvme-security-send
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SECURITY\-SEND" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SECURITY\-SEND" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-security-send.html b/Documentation/nvme-security-send.html
index 8c5218c..ca0672f 100644
--- a/Documentation/nvme-security-send.html
+++ b/Documentation/nvme-security-send.html
@@ -872,7 +872,7 @@ Receive command is Security Protocol field dependent as defined in SPC-4.</p></d
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-self-test-log.1 b/Documentation/nvme-self-test-log.1
index 9b2b48d..6facd3f 100644
--- a/Documentation/nvme-self-test-log.1
+++ b/Documentation/nvme-self-test-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-self-test-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SELF\-TEST\-LO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SELF\-TEST\-LO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-self-test-log.html b/Documentation/nvme-self-test-log.html
index 13c26f0..bbf56d5 100644
--- a/Documentation/nvme-self-test-log.html
+++ b/Documentation/nvme-self-test-log.html
@@ -847,7 +847,7 @@ Get the self-test-log and print it in a json format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-set-feature.1 b/Documentation/nvme-set-feature.1
index 6749299..9420dbf 100644
--- a/Documentation/nvme-set-feature.1
+++ b/Documentation/nvme-set-feature.1
@@ -2,12 +2,12 @@
.\" Title: nvme-set-feature
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SET\-FEATURE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SET\-FEATURE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-set-feature.html b/Documentation/nvme-set-feature.html
index 57a5ccb..bc5c67b 100644
--- a/Documentation/nvme-set-feature.html
+++ b/Documentation/nvme-set-feature.html
@@ -899,7 +899,7 @@ Sets the host id to the ascii string.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-set-property.1 b/Documentation/nvme-set-property.1
index 3468f4b..bfff686 100644
--- a/Documentation/nvme-set-property.1
+++ b/Documentation/nvme-set-property.1
@@ -2,12 +2,12 @@
.\" Title: nvme-set-property
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SET\-PROPERTY" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SET\-PROPERTY" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-set-property.html b/Documentation/nvme-set-property.html
index 11e7dd8..c8da6ad 100644
--- a/Documentation/nvme-set-property.html
+++ b/Documentation/nvme-set-property.html
@@ -805,7 +805,7 @@ nvme-set-property(1) Manual Page
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-show-hostnqn.1 b/Documentation/nvme-show-hostnqn.1
index 424a32f..f240958 100644
--- a/Documentation/nvme-show-hostnqn.1
+++ b/Documentation/nvme-show-hostnqn.1
@@ -2,12 +2,12 @@
.\" Title: nvme-show-hostnqn
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SHOW\-HOSTNQN" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SHOW\-HOSTNQN" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-show-hostnqn.html b/Documentation/nvme-show-hostnqn.html
index 8e2b732..21bb597 100644
--- a/Documentation/nvme-show-hostnqn.html
+++ b/Documentation/nvme-show-hostnqn.html
@@ -785,7 +785,7 @@ this will show the systemd-generated host NQN for the system.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-show-regs.1 b/Documentation/nvme-show-regs.1
index 4466ded..8903738 100644
--- a/Documentation/nvme-show-regs.1
+++ b/Documentation/nvme-show-regs.1
@@ -2,12 +2,12 @@
.\" Title: nvme-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ID\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ID\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-show-regs.html b/Documentation/nvme-show-regs.html
index c807955..aa88265 100644
--- a/Documentation/nvme-show-regs.html
+++ b/Documentation/nvme-show-regs.html
@@ -848,7 +848,7 @@ in a json format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-show-topology.1 b/Documentation/nvme-show-topology.1
index 921f7a3..13f948d 100644
--- a/Documentation/nvme-show-topology.1
+++ b/Documentation/nvme-show-topology.1
@@ -2,12 +2,12 @@
.\" Title: nvme-show-topology
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SHOW\-TOPOLOGY" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SHOW\-TOPOLOGY" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-show-topology.html b/Documentation/nvme-show-topology.html
index f327eba..486d89f 100644
--- a/Documentation/nvme-show-topology.html
+++ b/Documentation/nvme-show-topology.html
@@ -822,7 +822,7 @@ nvme-show-topology(1) Manual Page
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-smart-log.1 b/Documentation/nvme-smart-log.1
index 2d21f33..a7992a8 100644
--- a/Documentation/nvme-smart-log.1
+++ b/Documentation/nvme-smart-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-smart-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SMART\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SMART\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-smart-log.html b/Documentation/nvme-smart-log.html
index f36af34..69836da 100644
--- a/Documentation/nvme-smart-log.html
+++ b/Documentation/nvme-smart-log.html
@@ -850,7 +850,7 @@ Print the raw SMART log to a file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-subsystem-reset.1 b/Documentation/nvme-subsystem-reset.1
index 8b845d5..753beae 100644
--- a/Documentation/nvme-subsystem-reset.1
+++ b/Documentation/nvme-subsystem-reset.1
@@ -2,12 +2,12 @@
.\" Title: nvme-subsystem-reset
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SUBSYSTEM\-RES" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SUBSYSTEM\-RES" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-subsystem-reset.html b/Documentation/nvme-subsystem-reset.html
index 256d09b..5863a80 100644
--- a/Documentation/nvme-subsystem-reset.html
+++ b/Documentation/nvme-subsystem-reset.html
@@ -794,7 +794,7 @@ Resets the subsystem.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-supported-log-pages.1 b/Documentation/nvme-supported-log-pages.1
index 8324afd..e088023 100644
--- a/Documentation/nvme-supported-log-pages.1
+++ b/Documentation/nvme-supported-log-pages.1
@@ -2,12 +2,12 @@
.\" Title: nvme-supported-log-pages
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-SUPPORTED\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-SUPPORTED\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -33,7 +33,7 @@ nvme-supported-log-pages \- Send NVMe Supported Log pages request, returns resul
.sp
.nf
\fInvme supported\-log\-pages\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>]
- [\-\-human\-readable | \-H]
+ [\-\-verbose | \-v]
.fi
.SH "DESCRIPTION"
.sp
@@ -49,9 +49,9 @@ On success, the returned supported log pages log structure will be printed for e
This option will set the reporting format to normal, json, or binary\&. Only one output format can be used at a time\&.
.RE
.PP
-\-H, \-\-human\-readable
+\-v, \-\-verbose
.RS 4
-This option will parse and format many of the bit fields into a human\-readable format\&.
+Show more information including LID Supported (LSUPP) and Index Offset Supported (IOP) details\&.
.RE
.SH "EXAMPLES"
.sp
diff --git a/Documentation/nvme-supported-log-pages.html b/Documentation/nvme-supported-log-pages.html
index 950dd49..f94007e 100644
--- a/Documentation/nvme-supported-log-pages.html
+++ b/Documentation/nvme-supported-log-pages.html
@@ -750,7 +750,7 @@ nvme-supported-log-pages(1) Manual Page
<div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>nvme supported-log-pages</em> &lt;device&gt; [--output-format=&lt;fmt&gt; | -o &lt;fmt&gt;]
- [--human-readable | -H]</pre>
+ [--verbose | -v]</pre>
<div class="attribution">
</div></div>
</div>
@@ -783,15 +783,14 @@ for each command that is supported.</p></div>
</p>
</dd>
<dt class="hdlist1">
--H
+-v
</dt>
<dt class="hdlist1">
---human-readable
+--verbose
</dt>
<dd>
<p>
- This option will parse and format many of the bit fields into a
- human-readable format.
+ Show more information including LID Supported (LSUPP) and Index Offset Supported (IOP) details.
</p>
</dd>
</dl></div>
@@ -814,7 +813,7 @@ for each command that is supported.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-supported-log-pages.txt b/Documentation/nvme-supported-log-pages.txt
index 32f95fe..f80aa5f 100644
--- a/Documentation/nvme-supported-log-pages.txt
+++ b/Documentation/nvme-supported-log-pages.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'nvme supported-log-pages' <device> [--output-format=<fmt> | -o <fmt>]
- [--human-readable | -H]
+ [--verbose | -v]
DESCRIPTION
-----------
@@ -30,10 +30,9 @@ OPTIONS
This option will set the reporting format to normal, json, or binary.
Only one output format can be used at a time.
--H::
---human-readable::
- This option will parse and format many of the bit fields into a
- human-readable format.
+-v::
+--verbose::
+ Show more information including LID Supported (LSUPP) and Index Offset Supported (IOP) details.
EXAMPLES
--------
@@ -41,4 +40,4 @@ No examples provided yet.
NVME
----
-Part of the nvme-user suite \ No newline at end of file
+Part of the nvme-user suite
diff --git a/Documentation/nvme-telemetry-log.1 b/Documentation/nvme-telemetry-log.1
index 92278a3..9802fc0 100644
--- a/Documentation/nvme-telemetry-log.1
+++ b/Documentation/nvme-telemetry-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-telemetry-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TELEMETRY\-LOG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TELEMETRY\-LOG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-telemetry-log.html b/Documentation/nvme-telemetry-log.html
index 5076c38..c403115 100644
--- a/Documentation/nvme-telemetry-log.html
+++ b/Documentation/nvme-telemetry-log.html
@@ -838,7 +838,7 @@ Retrieve Telemetry Host-Initiated data to telemetry_log.bin
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1 b/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1
index f8a5f28..c997950 100644
--- a/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1
+++ b/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1
@@ -2,12 +2,12 @@
.\" Title: nvme-toshiba-clear-pcie-correctable-errors
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TOSHIBA\-CLEAR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TOSHIBA\-CLEAR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-toshiba-clear-pcie-correctable-errors.html b/Documentation/nvme-toshiba-clear-pcie-correctable-errors.html
index 29663d2..c5caa5e 100644
--- a/Documentation/nvme-toshiba-clear-pcie-correctable-errors.html
+++ b/Documentation/nvme-toshiba-clear-pcie-correctable-errors.html
@@ -791,7 +791,7 @@ Clear the PCIe correctable errors count:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-toshiba-vs-internal-log.1 b/Documentation/nvme-toshiba-vs-internal-log.1
index 377fbac..994dbbf 100644
--- a/Documentation/nvme-toshiba-vs-internal-log.1
+++ b/Documentation/nvme-toshiba-vs-internal-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-toshiba-vs-internal-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TOSHIBA\-VS\-I" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TOSHIBA\-VS\-I" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-toshiba-vs-internal-log.html b/Documentation/nvme-toshiba-vs-internal-log.html
index ddf042a..f57f2a9 100644
--- a/Documentation/nvme-toshiba-vs-internal-log.html
+++ b/Documentation/nvme-toshiba-vs-internal-log.html
@@ -837,7 +837,7 @@ Get the previous log from the device and save to a binary file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-toshiba-vs-smart-add-log.1 b/Documentation/nvme-toshiba-vs-smart-add-log.1
index 2000a19..b00548d 100644
--- a/Documentation/nvme-toshiba-vs-smart-add-log.1
+++ b/Documentation/nvme-toshiba-vs-smart-add-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-toshiba-vs-smart-add-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TOSHIBA\-VS\-S" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TOSHIBA\-VS\-S" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-toshiba-vs-smart-add-log.html b/Documentation/nvme-toshiba-vs-smart-add-log.html
index 96608cd..cab2e10 100644
--- a/Documentation/nvme-toshiba-vs-smart-add-log.html
+++ b/Documentation/nvme-toshiba-vs-smart-add-log.html
@@ -840,7 +840,7 @@ Get the contents of log page 0xC0 from the device and save to a binary file:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-transcend-badblock.1 b/Documentation/nvme-transcend-badblock.1
index a6bb20e..abc6ebc 100644
--- a/Documentation/nvme-transcend-badblock.1
+++ b/Documentation/nvme-transcend-badblock.1
@@ -2,12 +2,12 @@
.\" Title: nvme-transcend-badblock
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TRANSCEND\-BAD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TRANSCEND\-BAD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-transcend-badblock.html b/Documentation/nvme-transcend-badblock.html
index 055b5aa..ab58f71 100644
--- a/Documentation/nvme-transcend-badblock.html
+++ b/Documentation/nvme-transcend-badblock.html
@@ -796,7 +796,7 @@ Print the Transcend device&#8217;s bad blocks in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-transcend-healthvalue.1 b/Documentation/nvme-transcend-healthvalue.1
index 90e6ff7..d8fad19 100644
--- a/Documentation/nvme-transcend-healthvalue.1
+++ b/Documentation/nvme-transcend-healthvalue.1
@@ -2,12 +2,12 @@
.\" Title: nvme-transcend-healthvalue
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-TRANSCEND\-HEA" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-TRANSCEND\-HEA" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-transcend-healthvalue.html b/Documentation/nvme-transcend-healthvalue.html
index 677d830..5e155e6 100644
--- a/Documentation/nvme-transcend-healthvalue.html
+++ b/Documentation/nvme-transcend-healthvalue.html
@@ -796,7 +796,7 @@ Print the Transcend Device health value in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-verify.1 b/Documentation/nvme-verify.1
index 7b5700c..4fa652d 100644
--- a/Documentation/nvme-verify.1
+++ b/Documentation/nvme-verify.1
@@ -2,12 +2,12 @@
.\" Title: nvme-verify
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-VERIFY" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-VERIFY" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -42,7 +42,7 @@ nvme-verify \- Send an NVMe Verify command, return results
[\-\-app\-tag\-mask=<appmask> | \-m <appmask>]
[\-\-app\-tag=<apptag> | \-a <apptag>]
[\-\-storage\-tag<storage\-tag> | \-S <storage\-tag>]
- [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
+ [\-\-storage\-tag\-check | \-C]
.fi
.SH "DESCRIPTION"
.sp
@@ -134,14 +134,14 @@ Optional application tag mask when used with protection information\&.
Optional application tag when used with protection information\&.
.RE
.PP
-\-\-storage\-tag=<storage\-tag>, \-S <storage\-tag>
+\-S <storage\-tag>, \-\-storage\-tag=<storage\-tag>
.RS 4
Variable Sized Expected Logical Block Storage Tag(ELBST)\&.
.RE
.PP
-\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+\-C, \-\-storage\-tag\-check
.RS 4
-This bit specifies the Storage Tag field shall be checked as part of Verify operation\&.
+This flag enables Storage Tag field checking as part of Verify operation\&.
.RE
.SH "EXAMPLES"
.sp
diff --git a/Documentation/nvme-verify.html b/Documentation/nvme-verify.html
index dc3d49d..a29b729 100644
--- a/Documentation/nvme-verify.html
+++ b/Documentation/nvme-verify.html
@@ -759,7 +759,7 @@ nvme-verify(1) Manual Page
[--app-tag-mask=&lt;appmask&gt; | -m &lt;appmask&gt;]
[--app-tag=&lt;apptag&gt; | -a &lt;apptag&gt;]
[--storage-tag&lt;storage-tag&gt; | -S &lt;storage-tag&gt;]
- [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]</pre>
+ [--storage-tag-check | -C]</pre>
<div class="attribution">
</div></div>
</div>
@@ -912,10 +912,10 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag=&lt;storage-tag&gt;
+-S &lt;storage-tag&gt;
</dt>
<dt class="hdlist1">
--S &lt;storage-tag&gt;
+--storage-tag=&lt;storage-tag&gt;
</dt>
<dd>
<p>
@@ -923,14 +923,14 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag-check=&lt;storage-tag-check&gt;
+-C
</dt>
<dt class="hdlist1">
--C &lt;storage-tag-check&gt;
+--storage-tag-check
</dt>
<dd>
<p>
- This bit specifies the Storage Tag field shall be checked as part of Verify operation.
+ This flag enables Storage Tag field checking as part of Verify operation.
</p>
</dd>
</dl></div>
@@ -953,7 +953,7 @@ metadata is passes.</p></td>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-verify.txt b/Documentation/nvme-verify.txt
index 75c1de0..3c8039a 100644
--- a/Documentation/nvme-verify.txt
+++ b/Documentation/nvme-verify.txt
@@ -18,7 +18,7 @@ SYNOPSIS
[--app-tag-mask=<appmask> | -m <appmask>]
[--app-tag=<apptag> | -a <apptag>]
[--storage-tag<storage-tag> | -S <storage-tag>]
- [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
+ [--storage-tag-check | -C]
DESCRIPTION
-----------
@@ -75,13 +75,13 @@ metadata is passes.
-a <apptag>::
Optional application tag when used with protection information.
---storage-tag=<storage-tag>::
-S <storage-tag>::
+--storage-tag=<storage-tag>::
Variable Sized Expected Logical Block Storage Tag(ELBST).
---storage-tag-check=<storage-tag-check>::
--C <storage-tag-check>::
- This bit specifies the Storage Tag field shall be checked as part of Verify operation.
+-C::
+--storage-tag-check::
+ This flag enables Storage Tag field checking as part of Verify operation.
EXAMPLES
--------
diff --git a/Documentation/nvme-virtium-save-smart-to-vtview-log.1 b/Documentation/nvme-virtium-save-smart-to-vtview-log.1
index 0209599..c981f44 100644
--- a/Documentation/nvme-virtium-save-smart-to-vtview-log.1
+++ b/Documentation/nvme-virtium-save-smart-to-vtview-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-virtium-save-smart-to-vtview-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-VIRTIUM\-SAVE\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-VIRTIUM\-SAVE\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-virtium-save-smart-to-vtview-log.html b/Documentation/nvme-virtium-save-smart-to-vtview-log.html
index b9e4efa..b105fc4 100644
--- a/Documentation/nvme-virtium-save-smart-to-vtview-log.html
+++ b/Documentation/nvme-virtium-save-smart-to-vtview-log.html
@@ -876,7 +876,7 @@ Just logging: Default logging is run for 20 hours and log every 10 hours.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-virtium-show-identify.1 b/Documentation/nvme-virtium-show-identify.1
index 41f1b44..9c81bb7 100644
--- a/Documentation/nvme-virtium-show-identify.1
+++ b/Documentation/nvme-virtium-show-identify.1
@@ -2,12 +2,12 @@
.\" Title: nvme-virtium-show-identify
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-VIRTIUM\-SHOW\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-VIRTIUM\-SHOW\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-virtium-show-identify.html b/Documentation/nvme-virtium-show-identify.html
index 0766c25..7faffdc 100644
--- a/Documentation/nvme-virtium-show-identify.html
+++ b/Documentation/nvme-virtium-show-identify.html
@@ -798,7 +798,7 @@ Show Identify Device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-cap-diag.1 b/Documentation/nvme-wdc-cap-diag.1
index 2b807ff..292caaa 100644
--- a/Documentation/nvme-wdc-cap-diag.1
+++ b/Documentation/nvme-wdc-cap-diag.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-cap-diag
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CAP\-DIAG" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CAP\-DIAG" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-cap-diag.html b/Documentation/nvme-wdc-cap-diag.html
index 4cec57a..c59711c 100644
--- a/Documentation/nvme-wdc-cap-diag.html
+++ b/Documentation/nvme-wdc-cap-diag.html
@@ -856,7 +856,7 @@ Gets the capture diagnostics log from the device transferring the data in 16k ch
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-capabilities.1 b/Documentation/nvme-wdc-capabilities.1
index 8b3feb1..cef12db 100644
--- a/Documentation/nvme-wdc-capabilities.1
+++ b/Documentation/nvme-wdc-capabilities.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-capabilities
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CAPABILIT" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CAPABILIT" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-capabilities.html b/Documentation/nvme-wdc-capabilities.html
index 2a102b6..ea7dad6 100644
--- a/Documentation/nvme-wdc-capabilities.html
+++ b/Documentation/nvme-wdc-capabilities.html
@@ -789,7 +789,7 @@ Displays the capabilities for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-clear-assert-dump.1 b/Documentation/nvme-wdc-clear-assert-dump.1
index cce63ab..72ecf09 100644
--- a/Documentation/nvme-wdc-clear-assert-dump.1
+++ b/Documentation/nvme-wdc-clear-assert-dump.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-clear-assert-dump
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CLEAR\-AS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CLEAR\-AS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-clear-assert-dump.html b/Documentation/nvme-wdc-clear-assert-dump.html
index 689e0cb..96afaac 100644
--- a/Documentation/nvme-wdc-clear-assert-dump.html
+++ b/Documentation/nvme-wdc-clear-assert-dump.html
@@ -798,7 +798,7 @@ Clears the assert dump (if present):
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-clear-fw-activate-history.1 b/Documentation/nvme-wdc-clear-fw-activate-history.1
index ec35b0e..74c48b3 100644
--- a/Documentation/nvme-wdc-clear-fw-activate-history.1
+++ b/Documentation/nvme-wdc-clear-fw-activate-history.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-clear-fw-activate-history
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CLEAR\-FW" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CLEAR\-FW" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-clear-fw-activate-history.html b/Documentation/nvme-wdc-clear-fw-activate-history.html
index ed707d9..5b0c6dd 100644
--- a/Documentation/nvme-wdc-clear-fw-activate-history.html
+++ b/Documentation/nvme-wdc-clear-fw-activate-history.html
@@ -797,7 +797,7 @@ Clears the firmware activate history table:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-clear-pcie-correctable-errors.1 b/Documentation/nvme-wdc-clear-pcie-correctable-errors.1
index 00c3bf3..0badbab 100644
--- a/Documentation/nvme-wdc-clear-pcie-correctable-errors.1
+++ b/Documentation/nvme-wdc-clear-pcie-correctable-errors.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-clear-pcie-correctable-errors
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CLEAR\-PC" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CLEAR\-PC" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-clear-pcie-correctable-errors.html b/Documentation/nvme-wdc-clear-pcie-correctable-errors.html
index eb0c15c..0281419 100644
--- a/Documentation/nvme-wdc-clear-pcie-correctable-errors.html
+++ b/Documentation/nvme-wdc-clear-pcie-correctable-errors.html
@@ -799,7 +799,7 @@ Clears the PCIe Correctable Error Count field returned in the smart-log-add comm
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-cloud-SSD-plugin-version.1 b/Documentation/nvme-wdc-cloud-SSD-plugin-version.1
index dac1dc0..a90b0e5 100644
--- a/Documentation/nvme-wdc-cloud-SSD-plugin-version.1
+++ b/Documentation/nvme-wdc-cloud-SSD-plugin-version.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-cloud-SSD-plugin-version
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CLOUD\-SS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CLOUD\-SS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-cloud-SSD-plugin-version.html b/Documentation/nvme-wdc-cloud-SSD-plugin-version.html
index 3e56a58..c59c75a 100644
--- a/Documentation/nvme-wdc-cloud-SSD-plugin-version.html
+++ b/Documentation/nvme-wdc-cloud-SSD-plugin-version.html
@@ -790,7 +790,7 @@ Displays the cloud ssd plugin version for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-cloud-boot-SSD-version.1 b/Documentation/nvme-wdc-cloud-boot-SSD-version.1
index 2fc7c85..4fdb3f6 100644
--- a/Documentation/nvme-wdc-cloud-boot-SSD-version.1
+++ b/Documentation/nvme-wdc-cloud-boot-SSD-version.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-cloud-boot-SSD-version
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-CLOUD\-BO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-CLOUD\-BO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-cloud-boot-SSD-version.html b/Documentation/nvme-wdc-cloud-boot-SSD-version.html
index 1250ba3..86ffb08 100644
--- a/Documentation/nvme-wdc-cloud-boot-SSD-version.html
+++ b/Documentation/nvme-wdc-cloud-boot-SSD-version.html
@@ -790,7 +790,7 @@ Displays the cloud boot ssd version for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-essentials.1 b/Documentation/nvme-wdc-drive-essentials.1
index dcaf7bb..b260445 100644
--- a/Documentation/nvme-wdc-drive-essentials.1
+++ b/Documentation/nvme-wdc-drive-essentials.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-drive-essentials
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-DRIVE\-ES" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-DRIVE\-ES" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-drive-essentials.html b/Documentation/nvme-wdc-drive-essentials.html
index 305c745..df70bbc 100644
--- a/Documentation/nvme-wdc-drive-essentials.html
+++ b/Documentation/nvme-wdc-drive-essentials.html
@@ -821,7 +821,7 @@ Gets the drive essentials data files from the device and saves the tar file to s
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-log.1 b/Documentation/nvme-wdc-drive-log.1
index 5dbfb9b..b795a78 100644
--- a/Documentation/nvme-wdc-drive-log.1
+++ b/Documentation/nvme-wdc-drive-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-drive-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-DRIVE\-LO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-DRIVE\-LO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-drive-log.html b/Documentation/nvme-wdc-drive-log.html
index 3310441..477fe10 100644
--- a/Documentation/nvme-wdc-drive-log.html
+++ b/Documentation/nvme-wdc-drive-log.html
@@ -829,7 +829,7 @@ Gets the drive log from the device and saves to defined file with pathname (e.g.
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-resize.1 b/Documentation/nvme-wdc-drive-resize.1
index 3493746..4ee3f76 100644
--- a/Documentation/nvme-wdc-drive-resize.1
+++ b/Documentation/nvme-wdc-drive-resize.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-drive-resize
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-DRIVE\-RE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-DRIVE\-RE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-drive-resize.html b/Documentation/nvme-wdc-drive-resize.html
index 5fe0dbf..685703d 100644
--- a/Documentation/nvme-wdc-drive-resize.html
+++ b/Documentation/nvme-wdc-drive-resize.html
@@ -810,7 +810,7 @@ Has the program issue WDC Resize Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-enc-get-log.1 b/Documentation/nvme-wdc-enc-get-log.1
index f92c66a..b486a30 100644
--- a/Documentation/nvme-wdc-enc-get-log.1
+++ b/Documentation/nvme-wdc-enc-get-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-enc-get-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-ENC\-GET\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-ENC\-GET\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-enc-get-log.html b/Documentation/nvme-wdc-enc-get-log.html
index 8073401..e86af7f 100644
--- a/Documentation/nvme-wdc-enc-get-log.html
+++ b/Documentation/nvme-wdc-enc-get-log.html
@@ -832,7 +832,7 @@ Gets the enclosure log from the device based on the log id(0xd2) with default tr
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-crash-dump.1 b/Documentation/nvme-wdc-get-crash-dump.1
index ce3ee03..22c8aa0 100644
--- a/Documentation/nvme-wdc-get-crash-dump.1
+++ b/Documentation/nvme-wdc-get-crash-dump.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-crash-dump
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-CRAS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-CRAS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-crash-dump.html b/Documentation/nvme-wdc-get-crash-dump.html
index d9c3dfb..462136d 100644
--- a/Documentation/nvme-wdc-get-crash-dump.html
+++ b/Documentation/nvme-wdc-get-crash-dump.html
@@ -830,7 +830,7 @@ Gets the crash dump from the device and saves to defined file with pathname (e.g
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-dev-capabilities-log.1 b/Documentation/nvme-wdc-get-dev-capabilities-log.1
index afe3aaf..bd152bd 100644
--- a/Documentation/nvme-wdc-get-dev-capabilities-log.1
+++ b/Documentation/nvme-wdc-get-dev-capabilities-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-dev-capabilities-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-DEV\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-DEV\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-dev-capabilities-log.html b/Documentation/nvme-wdc-get-dev-capabilities-log.html
index 612a2b2..282b70b 100644
--- a/Documentation/nvme-wdc-get-dev-capabilities-log.html
+++ b/Documentation/nvme-wdc-get-dev-capabilities-log.html
@@ -816,7 +816,7 @@ Has the program issue WDC get-dev-capabilities-log plugin command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-drive-status.1 b/Documentation/nvme-wdc-get-drive-status.1
index 03f04e9..e56a2a7 100644
--- a/Documentation/nvme-wdc-get-drive-status.1
+++ b/Documentation/nvme-wdc-get-drive-status.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-drive-status
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-DRIV" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-DRIV" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-drive-status.html b/Documentation/nvme-wdc-get-drive-status.html
index 4b67ad0..b46930b 100644
--- a/Documentation/nvme-wdc-get-drive-status.html
+++ b/Documentation/nvme-wdc-get-drive-status.html
@@ -836,7 +836,7 @@ Has the program issue WDC get-drive-status command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-error-recovery-log.1 b/Documentation/nvme-wdc-get-error-recovery-log.1
index 6590738..2f123c7 100644
--- a/Documentation/nvme-wdc-get-error-recovery-log.1
+++ b/Documentation/nvme-wdc-get-error-recovery-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-error-recovery-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-ERRO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-ERRO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-error-recovery-log.html b/Documentation/nvme-wdc-get-error-recovery-log.html
index 839074b..284fb69 100644
--- a/Documentation/nvme-wdc-get-error-recovery-log.html
+++ b/Documentation/nvme-wdc-get-error-recovery-log.html
@@ -816,7 +816,7 @@ Has the program issue WDC get-error-recovery-log plugin command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-latency-monitor-log.1 b/Documentation/nvme-wdc-get-latency-monitor-log.1
index 36c6fb9..466802f 100644
--- a/Documentation/nvme-wdc-get-latency-monitor-log.1
+++ b/Documentation/nvme-wdc-get-latency-monitor-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-latency-monitor-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-LATE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-LATE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-latency-monitor-log.html b/Documentation/nvme-wdc-get-latency-monitor-log.html
index 059301c..89a7ce1 100644
--- a/Documentation/nvme-wdc-get-latency-monitor-log.html
+++ b/Documentation/nvme-wdc-get-latency-monitor-log.html
@@ -810,7 +810,7 @@ Displays the get latency monitor log for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-pfail-dump.1 b/Documentation/nvme-wdc-get-pfail-dump.1
index d17abfa..d605f6c 100644
--- a/Documentation/nvme-wdc-get-pfail-dump.1
+++ b/Documentation/nvme-wdc-get-pfail-dump.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-pfail-dump
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-PFAI" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-PFAI" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-pfail-dump.html b/Documentation/nvme-wdc-get-pfail-dump.html
index ce5d4f6..cf5e940 100644
--- a/Documentation/nvme-wdc-get-pfail-dump.html
+++ b/Documentation/nvme-wdc-get-pfail-dump.html
@@ -832,7 +832,7 @@ Gets the pfail crash dump from the device and saves to defined file with pathnam
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-unsupported-reqs-log.1 b/Documentation/nvme-wdc-get-unsupported-reqs-log.1
index 57f0169..f066be0 100644
--- a/Documentation/nvme-wdc-get-unsupported-reqs-log.1
+++ b/Documentation/nvme-wdc-get-unsupported-reqs-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-get-unsupported-reqs-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-GET\-UNSU" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-GET\-UNSU" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-get-unsupported-reqs-log.html b/Documentation/nvme-wdc-get-unsupported-reqs-log.html
index bb81c98..aa8bb28 100644
--- a/Documentation/nvme-wdc-get-unsupported-reqs-log.html
+++ b/Documentation/nvme-wdc-get-unsupported-reqs-log.html
@@ -816,7 +816,7 @@ Has the program issue WDC get-unsupported-reqs-log plugin command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-id-ctrl.1 b/Documentation/nvme-wdc-id-ctrl.1
index a352201..b198a4b 100644
--- a/Documentation/nvme-wdc-id-ctrl.1
+++ b/Documentation/nvme-wdc-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-ID\-CTRL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-ID\-CTRL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-id-ctrl.html b/Documentation/nvme-wdc-id-ctrl.html
index 416b2cd..3d57fd7 100644
--- a/Documentation/nvme-wdc-id-ctrl.html
+++ b/Documentation/nvme-wdc-id-ctrl.html
@@ -856,7 +856,7 @@ fields in a human readable format:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-log-page-directory.1 b/Documentation/nvme-wdc-log-page-directory.1
index d7f81d1..4bf4d16 100644
--- a/Documentation/nvme-wdc-log-page-directory.1
+++ b/Documentation/nvme-wdc-log-page-directory.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-log-page-directory
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-LOG\-PAGE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-LOG\-PAGE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-log-page-directory.html b/Documentation/nvme-wdc-log-page-directory.html
index b86394c..21773d6 100644
--- a/Documentation/nvme-wdc-log-page-directory.html
+++ b/Documentation/nvme-wdc-log-page-directory.html
@@ -812,7 +812,7 @@ WDC log-page-directory example command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-namespace-resize.1 b/Documentation/nvme-wdc-namespace-resize.1
index ff38640..4343099 100644
--- a/Documentation/nvme-wdc-namespace-resize.1
+++ b/Documentation/nvme-wdc-namespace-resize.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-namespace-resize
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-NAMESPACE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-NAMESPACE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-namespace-resize.html b/Documentation/nvme-wdc-namespace-resize.html
index cb7451f..44b5053 100644
--- a/Documentation/nvme-wdc-namespace-resize.html
+++ b/Documentation/nvme-wdc-namespace-resize.html
@@ -838,7 +838,7 @@ Resizes namespace 2 to 7% of the original TNVMCAP reported value:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-purge-monitor.1 b/Documentation/nvme-wdc-purge-monitor.1
index 284f0d6..75d8fef 100644
--- a/Documentation/nvme-wdc-purge-monitor.1
+++ b/Documentation/nvme-wdc-purge-monitor.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-purge-monitor
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-PURGE\-MO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-PURGE\-MO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-purge-monitor.html b/Documentation/nvme-wdc-purge-monitor.html
index 54e9873..2113951 100644
--- a/Documentation/nvme-wdc-purge-monitor.html
+++ b/Documentation/nvme-wdc-purge-monitor.html
@@ -837,7 +837,7 @@ Has the program issue WDC Purge-Monitor Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-purge.1 b/Documentation/nvme-wdc-purge.1
index 82bedfd..fe36c1b 100644
--- a/Documentation/nvme-wdc-purge.1
+++ b/Documentation/nvme-wdc-purge.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-purge
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-PURGE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-PURGE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-purge.html b/Documentation/nvme-wdc-purge.html
index 4be35b4..eb1a13c 100644
--- a/Documentation/nvme-wdc-purge.html
+++ b/Documentation/nvme-wdc-purge.html
@@ -799,7 +799,7 @@ Has the program issue WDC Purge Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-cloud-log.1 b/Documentation/nvme-wdc-vs-cloud-log.1
index afd432b..e70e4fb 100644
--- a/Documentation/nvme-wdc-vs-cloud-log.1
+++ b/Documentation/nvme-wdc-vs-cloud-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-cloud-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-CLOUD" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-CLOUD" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-cloud-log.html b/Documentation/nvme-wdc-vs-cloud-log.html
index f4818a8..160a816 100644
--- a/Documentation/nvme-wdc-vs-cloud-log.html
+++ b/Documentation/nvme-wdc-vs-cloud-log.html
@@ -828,7 +828,7 @@ Has the program issue WDC vs-cloud-log Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-device-waf.1 b/Documentation/nvme-wdc-vs-device-waf.1
index baf7d1f..ca6514d 100644
--- a/Documentation/nvme-wdc-vs-device-waf.1
+++ b/Documentation/nvme-wdc-vs-device-waf.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-device-waf
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-DEVIC" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-DEVIC" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-device-waf.html b/Documentation/nvme-wdc-vs-device-waf.html
index e8826e9..12b66f6 100644
--- a/Documentation/nvme-wdc-vs-device-waf.html
+++ b/Documentation/nvme-wdc-vs-device-waf.html
@@ -828,7 +828,7 @@ Has the program issue WDC vs-device-waf plugin Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-drive-info.1 b/Documentation/nvme-wdc-vs-drive-info.1
index d5cba92..2ae4dd9 100644
--- a/Documentation/nvme-wdc-vs-drive-info.1
+++ b/Documentation/nvme-wdc-vs-drive-info.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-drive-info
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-DRIVE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-DRIVE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-drive-info.html b/Documentation/nvme-wdc-vs-drive-info.html
index e5895ee..7425bd5 100644
--- a/Documentation/nvme-wdc-vs-drive-info.html
+++ b/Documentation/nvme-wdc-vs-drive-info.html
@@ -795,7 +795,7 @@ on the drive:</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-error-reason-identifier.1 b/Documentation/nvme-wdc-vs-error-reason-identifier.1
index 64136b0..b4e7f29 100644
--- a/Documentation/nvme-wdc-vs-error-reason-identifier.1
+++ b/Documentation/nvme-wdc-vs-error-reason-identifier.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-error-reason-identifier
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-ERROR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-ERROR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-error-reason-identifier.html b/Documentation/nvme-wdc-vs-error-reason-identifier.html
index a0c2e8a..9b7c79d 100644
--- a/Documentation/nvme-wdc-vs-error-reason-identifier.html
+++ b/Documentation/nvme-wdc-vs-error-reason-identifier.html
@@ -836,7 +836,7 @@ Retrieves the controller initiated error reason identifier field and save it in
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-fw-activate-history.1 b/Documentation/nvme-wdc-vs-fw-activate-history.1
index 6ab9d47..675e8c5 100644
--- a/Documentation/nvme-wdc-vs-fw-activate-history.1
+++ b/Documentation/nvme-wdc-vs-fw-activate-history.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-fw-activate-history
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-FW\-A" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-FW\-A" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-fw-activate-history.html b/Documentation/nvme-wdc-vs-fw-activate-history.html
index c0b819f..95346f2 100644
--- a/Documentation/nvme-wdc-vs-fw-activate-history.html
+++ b/Documentation/nvme-wdc-vs-fw-activate-history.html
@@ -868,7 +868,7 @@ Has the program issue WDC vs-fw-activate-history Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-hw-rev-log.1 b/Documentation/nvme-wdc-vs-hw-rev-log.1
index c0e65a9..4c46d6f 100644
--- a/Documentation/nvme-wdc-vs-hw-rev-log.1
+++ b/Documentation/nvme-wdc-vs-hw-rev-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-hw-rev-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-HW\-R" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-HW\-R" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-hw-rev-log.html b/Documentation/nvme-wdc-vs-hw-rev-log.html
index 34799fb..ed107dd 100644
--- a/Documentation/nvme-wdc-vs-hw-rev-log.html
+++ b/Documentation/nvme-wdc-vs-hw-rev-log.html
@@ -827,7 +827,7 @@ Has the program issue WDC vs-hw-rev-log plugin Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-internal-log.1 b/Documentation/nvme-wdc-vs-internal-log.1
index 29a9974..95d14a6 100644
--- a/Documentation/nvme-wdc-vs-internal-log.1
+++ b/Documentation/nvme-wdc-vs-internal-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-internal-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-INTER" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-INTER" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-internal-log.html b/Documentation/nvme-wdc-vs-internal-log.html
index 0208ba0..5b7563e 100644
--- a/Documentation/nvme-wdc-vs-internal-log.html
+++ b/Documentation/nvme-wdc-vs-internal-log.html
@@ -950,7 +950,7 @@ Gets the controller telemetry log page to data area 3 from the device and stores
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-nand-stats.1 b/Documentation/nvme-wdc-vs-nand-stats.1
index 4f291a0..24506b0 100644
--- a/Documentation/nvme-wdc-vs-nand-stats.1
+++ b/Documentation/nvme-wdc-vs-nand-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-nand-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-NAND\" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-NAND\" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-nand-stats.html b/Documentation/nvme-wdc-vs-nand-stats.html
index 31c3632..c3a9c4b 100644
--- a/Documentation/nvme-wdc-vs-nand-stats.html
+++ b/Documentation/nvme-wdc-vs-nand-stats.html
@@ -814,7 +814,7 @@ Has the program issue WDC vs-nand-stats Vendor Unique Command :
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-smart-add-log.1 b/Documentation/nvme-wdc-vs-smart-add-log.1
index 3c334de..023f7e0 100644
--- a/Documentation/nvme-wdc-vs-smart-add-log.1
+++ b/Documentation/nvme-wdc-vs-smart-add-log.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-smart-add-log
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-SMART" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-SMART" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-smart-add-log.html b/Documentation/nvme-wdc-vs-smart-add-log.html
index 102ee6b..0ccc679 100644
--- a/Documentation/nvme-wdc-vs-smart-add-log.html
+++ b/Documentation/nvme-wdc-vs-smart-add-log.html
@@ -927,7 +927,7 @@ Has the program issue WDC vs-smart-add-log Vendor Unique Command for 0xC0 and 0x
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-telemetry-controller-option.1 b/Documentation/nvme-wdc-vs-telemetry-controller-option.1
index eb60777..b45e5e4 100644
--- a/Documentation/nvme-wdc-vs-telemetry-controller-option.1
+++ b/Documentation/nvme-wdc-vs-telemetry-controller-option.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-telemetry-controller-option
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-TELEM" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-TELEM" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-telemetry-controller-option.html b/Documentation/nvme-wdc-vs-telemetry-controller-option.html
index 92d7490..7a52695 100644
--- a/Documentation/nvme-wdc-vs-telemetry-controller-option.html
+++ b/Documentation/nvme-wdc-vs-telemetry-controller-option.html
@@ -853,7 +853,7 @@ Gets the current status (enabled or disabled) of the controller initiated option
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-temperature-stats.1 b/Documentation/nvme-wdc-vs-temperature-stats.1
index 92bfd86..da3f8ef 100644
--- a/Documentation/nvme-wdc-vs-temperature-stats.1
+++ b/Documentation/nvme-wdc-vs-temperature-stats.1
@@ -2,12 +2,12 @@
.\" Title: nvme-wdc-vs-temperature-stats
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WDC\-VS\-TEMPE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-TEMPE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-wdc-vs-temperature-stats.html b/Documentation/nvme-wdc-vs-temperature-stats.html
index 1eadf1e..427188a 100644
--- a/Documentation/nvme-wdc-vs-temperature-stats.html
+++ b/Documentation/nvme-wdc-vs-temperature-stats.html
@@ -857,7 +857,7 @@ Displays the temperature stats for the device:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write-uncor.1 b/Documentation/nvme-write-uncor.1
index 369a4d2..6bace47 100644
--- a/Documentation/nvme-write-uncor.1
+++ b/Documentation/nvme-write-uncor.1
@@ -2,12 +2,12 @@
.\" Title: nvme-uncor
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-UNCOR" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-UNCOR" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-write-uncor.html b/Documentation/nvme-write-uncor.html
index 5d2ae1e..e120835 100644
--- a/Documentation/nvme-write-uncor.html
+++ b/Documentation/nvme-write-uncor.html
@@ -830,7 +830,7 @@ blocks.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write-zeroes.1 b/Documentation/nvme-write-zeroes.1
index 3ddd1fa..0b9904e 100644
--- a/Documentation/nvme-write-zeroes.1
+++ b/Documentation/nvme-write-zeroes.1
@@ -2,12 +2,12 @@
.\" Title: nvme-write-zeroes
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WRITE\-ZEROES" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WRITE\-ZEROES" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-write-zeroes.html b/Documentation/nvme-write-zeroes.html
index c914b25..02d2046 100644
--- a/Documentation/nvme-write-zeroes.html
+++ b/Documentation/nvme-write-zeroes.html
@@ -975,7 +975,7 @@ metadata is passes.</p></td>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write.1 b/Documentation/nvme-write.1
index acd66fc..69ad4da 100644
--- a/Documentation/nvme-write.1
+++ b/Documentation/nvme-write.1
@@ -2,12 +2,12 @@
.\" Title: nvme-write
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-WRITE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-WRITE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -51,7 +51,7 @@ nvme-write \- Send an NVMe write command, provide results
[\-\-dry\-run | \-w]
[\-\-latency | \-t]
[\-\-storage\-tag<storage\-tag> | \-g <storage\-tag>]
- [\-\-storage\-tag\-check<storage\-tag\-check> | \-C <storage\-tag\-check>]
+ [\-\-storage\-tag\-check | \-C]
[\-\-force]
.fi
.SH "DESCRIPTION"
@@ -192,14 +192,14 @@ be set\&. Otherwise \-\-dry\-run option will be
Print out the latency the IOCTL took (in us)\&.
.RE
.PP
-\-\-storage\-tag=<storage\-tag>, \-g <storage\-tag>
+\-g <storage\-tag>, \-\-storage\-tag=<storage\-tag>
.RS 4
Variable Sized Expected Logical Block Storage Tag(ELBST)\&.
.RE
.PP
-\-\-storage\-tag\-check=<storage\-tag\-check>, \-C <storage\-tag\-check>
+\-C, \-\-storage\-tag\-check
.RS 4
-This bit specifies the Storage Tag field shall be checked as part of end\-to\-end data protection processing\&.
+This flag enables Storage Tag field checking as part of end\-to\-end data protection processing\&.
.RE
.PP
\-\-force
diff --git a/Documentation/nvme-write.html b/Documentation/nvme-write.html
index b6c2435..a888dd1 100644
--- a/Documentation/nvme-write.html
+++ b/Documentation/nvme-write.html
@@ -768,7 +768,7 @@ nvme-write(1) Manual Page
[--dry-run | -w]
[--latency | -t]
[--storage-tag&lt;storage-tag&gt; | -g &lt;storage-tag&gt;]
- [--storage-tag-check&lt;storage-tag-check&gt; | -C &lt;storage-tag-check&gt;]
+ [--storage-tag-check | -C]
[--force]</pre>
<div class="attribution">
</div></div>
@@ -1039,10 +1039,10 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag=&lt;storage-tag&gt;
+-g &lt;storage-tag&gt;
</dt>
<dt class="hdlist1">
--g &lt;storage-tag&gt;
+--storage-tag=&lt;storage-tag&gt;
</dt>
<dd>
<p>
@@ -1050,14 +1050,14 @@ metadata is passes.</p></td>
</p>
</dd>
<dt class="hdlist1">
---storage-tag-check=&lt;storage-tag-check&gt;
+-C
</dt>
<dt class="hdlist1">
--C &lt;storage-tag-check&gt;
+--storage-tag-check
</dt>
<dd>
<p>
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
</p>
</dd>
@@ -1090,7 +1090,7 @@ metadata is passes.</p></td>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write.txt b/Documentation/nvme-write.txt
index 89aa667..76cbd7a 100644
--- a/Documentation/nvme-write.txt
+++ b/Documentation/nvme-write.txt
@@ -27,7 +27,7 @@ SYNOPSIS
[--dry-run | -w]
[--latency | -t]
[--storage-tag<storage-tag> | -g <storage-tag>]
- [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
+ [--storage-tag-check | -C]
[--force]
DESCRIPTION
@@ -139,13 +139,13 @@ metadata is passes.
--latency::
Print out the latency the IOCTL took (in us).
---storage-tag=<storage-tag>::
-g <storage-tag>::
+--storage-tag=<storage-tag>::
Variable Sized Expected Logical Block Storage Tag(ELBST).
---storage-tag-check=<storage-tag-check>::
--C <storage-tag-check>::
- This bit specifies the Storage Tag field shall be checked as part of end-to-end
+-C::
+--storage-tag-check::
+ This flag enables Storage Tag field checking as part of end-to-end
data protection processing.
--force::
diff --git a/Documentation/nvme-zns-changed-zone-list.1 b/Documentation/nvme-zns-changed-zone-list.1
index f5e93c0..5034ef3 100644
--- a/Documentation/nvme-zns-changed-zone-list.1
+++ b/Documentation/nvme-zns-changed-zone-list.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-changed-zone-list
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-CHANGED\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-CHANGED\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-changed-zone-list.html b/Documentation/nvme-zns-changed-zone-list.html
index 75089f7..2ddb9f9 100644
--- a/Documentation/nvme-zns-changed-zone-list.html
+++ b/Documentation/nvme-zns-changed-zone-list.html
@@ -833,7 +833,7 @@ Show the output in json format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-close-zone.1 b/Documentation/nvme-zns-close-zone.1
index db7ba53..9da3395 100644
--- a/Documentation/nvme-zns-close-zone.1
+++ b/Documentation/nvme-zns-close-zone.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-close-zone
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-CLOSE\-ZO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-CLOSE\-ZO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-close-zone.html b/Documentation/nvme-zns-close-zone.html
index c4f4059..0afdc71 100644
--- a/Documentation/nvme-zns-close-zone.html
+++ b/Documentation/nvme-zns-close-zone.html
@@ -846,7 +846,7 @@ Close all zones on namespace 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-finish-zone.1 b/Documentation/nvme-zns-finish-zone.1
index 1c06319..27c497c 100644
--- a/Documentation/nvme-zns-finish-zone.1
+++ b/Documentation/nvme-zns-finish-zone.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-finish-zone
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-FINISH\-Z" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-FINISH\-Z" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-finish-zone.html b/Documentation/nvme-zns-finish-zone.html
index 8d46b67..0ebc00d 100644
--- a/Documentation/nvme-zns-finish-zone.html
+++ b/Documentation/nvme-zns-finish-zone.html
@@ -847,7 +847,7 @@ Finish all zones on namespace 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-id-ctrl.1 b/Documentation/nvme-zns-id-ctrl.1
index f31d7a6..5b4b912 100644
--- a/Documentation/nvme-zns-id-ctrl.1
+++ b/Documentation/nvme-zns-id-ctrl.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-id-ctrl
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-ID\-CTRL" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-ID\-CTRL" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-id-ctrl.html b/Documentation/nvme-zns-id-ctrl.html
index 24a757a..528412c 100644
--- a/Documentation/nvme-zns-id-ctrl.html
+++ b/Documentation/nvme-zns-id-ctrl.html
@@ -821,7 +821,7 @@ Show the output in json format
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-id-ns.1 b/Documentation/nvme-zns-id-ns.1
index c9ec69b..19804e8 100644
--- a/Documentation/nvme-zns-id-ns.1
+++ b/Documentation/nvme-zns-id-ns.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-id-ns
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-ID\-NS" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-ID\-NS" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-id-ns.html b/Documentation/nvme-zns-id-ns.html
index 306e585..3e9337e 100644
--- a/Documentation/nvme-zns-id-ns.html
+++ b/Documentation/nvme-zns-id-ns.html
@@ -847,7 +847,7 @@ Show the output in json format with extra details
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-offline-zone.1 b/Documentation/nvme-zns-offline-zone.1
index e2920d8..8894ef0 100644
--- a/Documentation/nvme-zns-offline-zone.1
+++ b/Documentation/nvme-zns-offline-zone.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-offline-zone
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-OFFLINE\-" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-OFFLINE\-" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-offline-zone.html b/Documentation/nvme-zns-offline-zone.html
index 216b3b4..cf48e4d 100644
--- a/Documentation/nvme-zns-offline-zone.html
+++ b/Documentation/nvme-zns-offline-zone.html
@@ -846,7 +846,7 @@ Offline all zones on namespace 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-open-zone.1 b/Documentation/nvme-zns-open-zone.1
index 5c4ae4f..a131c66 100644
--- a/Documentation/nvme-zns-open-zone.1
+++ b/Documentation/nvme-zns-open-zone.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-open-zone
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-OPEN\-ZON" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-OPEN\-ZON" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-open-zone.html b/Documentation/nvme-zns-open-zone.html
index aec35d0..9094c2e 100644
--- a/Documentation/nvme-zns-open-zone.html
+++ b/Documentation/nvme-zns-open-zone.html
@@ -858,7 +858,7 @@ Open the first zone on namespace 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-report-zones.1 b/Documentation/nvme-zns-report-zones.1
index 2bc1741..3f50d62 100644
--- a/Documentation/nvme-zns-report-zones.1
+++ b/Documentation/nvme-zns-report-zones.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-report-zones
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-REPORT\-Z" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-REPORT\-Z" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-report-zones.html b/Documentation/nvme-zns-report-zones.html
index 8dfbcff..df98960 100644
--- a/Documentation/nvme-zns-report-zones.html
+++ b/Documentation/nvme-zns-report-zones.html
@@ -957,7 +957,7 @@ Show the output in json format with extra details
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-reset-zone.1 b/Documentation/nvme-zns-reset-zone.1
index 487289b..f534232 100644
--- a/Documentation/nvme-zns-reset-zone.1
+++ b/Documentation/nvme-zns-reset-zone.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-reset-zone
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-RESET\-ZO" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-RESET\-ZO" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-reset-zone.html b/Documentation/nvme-zns-reset-zone.html
index 15bde7a..8b40b9a 100644
--- a/Documentation/nvme-zns-reset-zone.html
+++ b/Documentation/nvme-zns-reset-zone.html
@@ -847,7 +847,7 @@ Reset the first zone on namespace 1:
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-set-zone-desc.1 b/Documentation/nvme-zns-set-zone-desc.1
index 19e3b19..68ebd0f 100644
--- a/Documentation/nvme-zns-set-zone-desc.1
+++ b/Documentation/nvme-zns-set-zone-desc.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-set-zone-desc
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-SET\-ZONE" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-SET\-ZONE" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-set-zone-desc.html b/Documentation/nvme-zns-set-zone-desc.html
index 01774ef..474ba90 100644
--- a/Documentation/nvme-zns-set-zone-desc.html
+++ b/Documentation/nvme-zns-set-zone-desc.html
@@ -859,7 +859,7 @@ Write "hello world" into the zone descriptor for namespace 1&#8217;s first zone
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-append.1 b/Documentation/nvme-zns-zone-append.1
index bf7351d..bb296a6 100644
--- a/Documentation/nvme-zns-zone-append.1
+++ b/Documentation/nvme-zns-zone-append.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-zone-append
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-ZONE\-APP" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-ZONE\-APP" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-zone-append.html b/Documentation/nvme-zns-zone-append.html
index c7ecf31..260565d 100644
--- a/Documentation/nvme-zns-zone-append.html
+++ b/Documentation/nvme-zns-zone-append.html
@@ -940,7 +940,7 @@ Append the data "hello world" into 4k worth of blocks into the zone starting
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-mgmt-recv.1 b/Documentation/nvme-zns-zone-mgmt-recv.1
index 125e302..c882f31 100644
--- a/Documentation/nvme-zns-zone-mgmt-recv.1
+++ b/Documentation/nvme-zns-zone-mgmt-recv.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-zone-mgmt-recv
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-ZONE\-MGM" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-ZONE\-MGM" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-zone-mgmt-recv.html b/Documentation/nvme-zns-zone-mgmt-recv.html
index f2a6e09..25fc55b 100644
--- a/Documentation/nvme-zns-zone-mgmt-recv.html
+++ b/Documentation/nvme-zns-zone-mgmt-recv.html
@@ -882,7 +882,7 @@ Binary dump of a report all zones
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-mgmt-send.1 b/Documentation/nvme-zns-zone-mgmt-send.1
index 5d21bf5..6865a90 100644
--- a/Documentation/nvme-zns-zone-mgmt-send.1
+++ b/Documentation/nvme-zns-zone-mgmt-send.1
@@ -2,12 +2,12 @@
.\" Title: nvme-zns-zone-mgmt-send
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME\-ZNS\-ZONE\-MGM" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME\-ZNS\-ZONE\-MGM" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme-zns-zone-mgmt-send.html b/Documentation/nvme-zns-zone-mgmt-send.html
index 3a17aee..fa30711 100644
--- a/Documentation/nvme-zns-zone-mgmt-send.html
+++ b/Documentation/nvme-zns-zone-mgmt-send.html
@@ -916,7 +916,7 @@ Write "hello world" into the zone descriptor for namespace 1&#8217;s first zone
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme.1 b/Documentation/nvme.1
index c8348e8..ae3bb10 100644
--- a/Documentation/nvme.1
+++ b/Documentation/nvme.1
@@ -2,12 +2,12 @@
.\" Title: nvme
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 03/31/2023
.\" Manual: NVMe Manual
.\" Source: NVMe
.\" Language: English
.\"
-.TH "NVME" "1" "01/30/2023" "NVMe" "NVMe Manual"
+.TH "NVME" "1" "03/31/2023" "NVMe" "NVMe Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/Documentation/nvme.html b/Documentation/nvme.html
index 086a3b7..fda1e30 100644
--- a/Documentation/nvme.html
+++ b/Documentation/nvme.html
@@ -2114,7 +2114,7 @@ NVM-Express Site</a>.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2023-01-30 14:14:16 CET
+ 2023-03-31 16:17:28 CEST
</div>
</div>
</body>
diff --git a/README.md b/README.md
index 20fbd2e..da3a7de 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ run following commands
$ meson .build
$ ninja -C .build
-nvme-cli depends on zlib and json-c
+nvme-cli depends on json-c
To install, run:
diff --git a/completions/_nvme b/completions/_nvme
index 5910898..7702fcc 100644
--- a/completions/_nvme
+++ b/completions/_nvme
@@ -231,9 +231,23 @@ _nvme () {
--dps=':data protection?'
-d':alias of --dps'
--nmic=':multipath and sharing'
- -n':alias of --nmic'
+ -m':alias of --nmic'
+ --anagrp-id=':ANA Group Identifier'
+ -a':alias of --anagrp-id'
+ --nvmset-id=':NVM Set Identifier'
+ -i':alias of --nvmset-id'
+ --block-size=':target block size'
+ -b':alias of --block-size'
+ --timeout=':value for timeout'
+ -t':alias of --timeout'
--csi=':command set identifier'
-y':alias of --csi'
+ --lbstm=':logical block storage tag mask'
+ -l':alias of --lbstm'
+ --nsze-si=':size of ns (NSZE) in standard SI units'
+ -S':alias of --nsze-si'
+ --ncap-si=':capacity of ns (NCAP) in standard SI units'
+ -C':alias of --ncap-si'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme create-ns options" _createns
@@ -244,6 +258,8 @@ _nvme () {
/dev/nvme':supply a device to use (required)'
--namespace-id=':namespace to delete'
-n':alias of --namespace-id'
+ --timeout=':value for timeout'
+ -t':alias of --timeout'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme delete-ns options" _deletens
@@ -505,6 +521,8 @@ _nvme () {
/dev/nvme':supply a device to use (required)'
--namespace-id=':<nsid> of namespace to format (required)'
-n':alias of --namespace-id'
+ --timeout=':value for timeout'
+ -t':alias of --timeout'
--lbaf=':LBA format to apply to namespace (required)'
-l':alias of --lbaf'
--ses=':secure erase? 0 - no-op (default), 1 - user-data erase, 2 - cryptographic erase'
diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
index c5fbda0..fae3ab4 100644
--- a/completions/bash-nvme-completion.sh
+++ b/completions/bash-nvme-completion.sh
@@ -92,8 +92,9 @@ nvme_list_opts () {
;;
"create-ns")
opts+=" --nsze= -s --ncap= -c --flbas= -f \
- --dps= -d --nmic= -n --anagrp-id= -a --nvmset-id= -i \
- --block-size= -b --timeout= -t--csi= -y"
+ --dps= -d --nmic= -m --anagrp-id= -a --nvmset-id= -i \
+ --block-size= -b --timeout= -t --csi= -y --lbstm= -l \
+ --nsze-si= -S --ncap-si= -C"
;;
"delete-ns")
opts+=" -namespace-id= -n --timeout= -t"
@@ -312,7 +313,7 @@ nvme_list_opts () {
--dir-type= -T --dir-spec= -S --dsm= -D --show-command -v \
--dry-run -w --latency -t"
;;
- "write-zeros")
+ "write-zeroes")
opts+=" --namespace-id= -n --start-block= -s \
--block-count= -c --deac -d --limited-retry -l \
--force-unit-access -f --prinfo= -p --ref-tag= -r \
diff --git a/fabrics.c b/fabrics.c
index b94097b..087a56c 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -42,6 +42,7 @@
#include "nvme.h"
#include "libnvme.h"
#include "nvme-print.h"
+#include "nvme-print-json.h"
#define PATH_NVMF_DISC SYSCONFDIR "/nvme/discovery.conf"
#define PATH_NVMF_CONFIG SYSCONFDIR "/nvme/config.json"
@@ -74,21 +75,24 @@ static const char *nvmf_keep_alive_tmo = "keep alive timeout period in seconds";
static const char *nvmf_reconnect_delay = "reconnect timeout period in seconds";
static const char *nvmf_ctrl_loss_tmo = "controller loss timeout period in seconds";
static const char *nvmf_tos = "type of service";
+static const char *nvmf_keyring = "Keyring for TLS key lookup";
+static const char *nvmf_tls_key = "TLS key to use";
static const char *nvmf_dup_connect = "allow duplicate connections between same transport host and subsystem port";
static const char *nvmf_disable_sqflow = "disable controller sq flow control (default false)";
static const char *nvmf_hdr_digest = "enable transport protocol header digest (TCP transport)";
static const char *nvmf_data_digest = "enable transport protocol data digest (TCP transport)";
+static const char *nvmf_tls = "enable TLS";
static const char *nvmf_config_file = "Use specified JSON configuration file or 'none' to disable";
#define NVMF_OPTS(c) \
OPT_STRING("transport", 't', "STR", &transport, nvmf_tport), \
+ OPT_STRING("nqn", 'n', "STR", &subsysnqn, nvmf_nqn), \
OPT_STRING("traddr", 'a', "STR", &traddr, nvmf_traddr), \
OPT_STRING("trsvcid", 's', "STR", &trsvcid, nvmf_trsvcid), \
OPT_STRING("host-traddr", 'w', "STR", &c.host_traddr, nvmf_htraddr), \
OPT_STRING("host-iface", 'f', "STR", &c.host_iface, nvmf_hiface), \
OPT_STRING("hostnqn", 'q', "STR", &hostnqn, nvmf_hostnqn), \
OPT_STRING("hostid", 'I', "STR", &hostid, nvmf_hostid), \
- OPT_STRING("nqn", 'n', "STR", &subsysnqn, nvmf_nqn), \
OPT_STRING("dhchap-secret", 'S', "STR", &hostkey, nvmf_hostkey), \
OPT_INT("nr-io-queues", 'i', &c.nr_io_queues, nvmf_nr_io_queues), \
OPT_INT("nr-write-queues", 'W', &c.nr_write_queues, nvmf_nr_write_queues),\
@@ -98,10 +102,13 @@ static const char *nvmf_config_file = "Use specified JSON configuration file or
OPT_INT("reconnect-delay", 'c', &c.reconnect_delay, nvmf_reconnect_delay),\
OPT_INT("ctrl-loss-tmo", 'l', &c.ctrl_loss_tmo, nvmf_ctrl_loss_tmo), \
OPT_INT("tos", 'T', &c.tos, nvmf_tos), \
+ OPT_INT("keyring", 0, &c.keyring, nvmf_keyring), \
+ OPT_INT("tls_key", 0, &c.tls_key, nvmf_tls_key), \
OPT_FLAG("duplicate-connect", 'D', &c.duplicate_connect, nvmf_dup_connect), \
OPT_FLAG("disable-sqflow", 'd', &c.disable_sqflow, nvmf_disable_sqflow), \
OPT_FLAG("hdr-digest", 'g', &c.hdr_digest, nvmf_hdr_digest), \
- OPT_FLAG("data-digest", 'G', &c.data_digest, nvmf_data_digest) \
+ OPT_FLAG("data-digest", 'G', &c.data_digest, nvmf_data_digest), \
+ OPT_FLAG("tls", 0, &c.tls, nvmf_tls) \
struct tr_config {
const char *subsysnqn;
@@ -112,18 +119,6 @@ struct tr_config {
const char *trsvcid;
};
-static void space_strip_len(int max, char *str)
-{
- int i;
-
- for (i = max - 1; i >= 0; i--) {
- if (str[i] != '\0' && str[i] != ' ')
- return;
- else
- str[i] = '\0';
- }
-}
-
/*
* Compare two C strings and handle NULL pointers gracefully.
* If either of the two strings is NULL, return 0
@@ -304,9 +299,6 @@ static void print_discovery_log(struct nvmf_discovery_log *log, int numrec)
for (i = 0; i < numrec; i++) {
struct nvmf_disc_log_entry *e = &log->entries[i];
- space_strip_len(NVMF_TRSVCID_SIZE, e->trsvcid);
- space_strip_len(NVMF_TRADDR_SIZE, e->traddr);
-
printf("=====Discovery Log Entry %d======\n", i);
printf("trtype: %s\n", nvmf_trtype_str(e->trtype));
printf("adrfam: %s\n",
@@ -340,64 +332,6 @@ static void print_discovery_log(struct nvmf_discovery_log *log, int numrec)
}
}
-static void json_discovery_log(struct nvmf_discovery_log *log, int numrec)
-{
- struct json_object *root;
- struct json_object *entries;
- int i;
-
- root = json_create_object();
- entries = json_create_array();
- json_object_add_value_uint64(root, "genctr", le64_to_cpu(log->genctr));
- json_object_add_value_array(root, "records", entries);
-
- for (i = 0; i < numrec; i++) {
- struct nvmf_disc_log_entry *e = &log->entries[i];
- struct json_object *entry = json_create_object();
-
- space_strip_len(NVMF_TRSVCID_SIZE, e->trsvcid);
- space_strip_len(NVMF_NQN_SIZE, e->subnqn);
- space_strip_len(NVMF_TRADDR_SIZE, e->traddr);
-
- json_object_add_value_string(entry, "trtype",
- nvmf_trtype_str(e->trtype));
- json_object_add_value_string(entry, "adrfam",
- nvmf_adrfam_str(e->adrfam));
- json_object_add_value_string(entry, "subtype",
- nvmf_subtype_str(e->subtype));
- json_object_add_value_string(entry,"treq",
- nvmf_treq_str(e->treq));
- json_object_add_value_uint(entry, "portid",
- le16_to_cpu(e->portid));
- json_object_add_value_string(entry, "trsvcid", e->trsvcid);
- json_object_add_value_string(entry, "subnqn", e->subnqn);
- json_object_add_value_string(entry, "traddr", e->traddr);
- json_object_add_value_string(entry, "eflags",
- nvmf_eflags_str(le16_to_cpu(e->eflags)));
-
- switch (e->trtype) {
- case NVMF_TRTYPE_RDMA:
- json_object_add_value_string(entry, "rdma_prtype",
- nvmf_prtype_str(e->tsas.rdma.prtype));
- json_object_add_value_string(entry, "rdma_qptype",
- nvmf_qptype_str(e->tsas.rdma.qptype));
- json_object_add_value_string(entry, "rdma_cms",
- nvmf_cms_str(e->tsas.rdma.cms));
- json_object_add_value_uint(entry, "rdma_pkey",
- le16_to_cpu(e->tsas.rdma.pkey));
- break;
- case NVMF_TRTYPE_TCP:
- json_object_add_value_string(entry, "sectype",
- nvmf_sectype_str(e->tsas.tcp.sectype));
- break;
- }
- json_array_add_value_object(entries, entry);
- }
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void save_discovery_log(char *raw, struct nvmf_discovery_log *log)
{
uint64_t numrec = le64_to_cpu(log->numrec);
@@ -427,18 +361,6 @@ static void print_connect_msg(nvme_ctrl_t c)
printf("device: %s\n", nvme_ctrl_get_name(c));
}
-static void json_connect_msg(nvme_ctrl_t c)
-{
- struct json_object *root;
-
- root = json_create_object();
- json_object_add_value_string(root, "device", nvme_ctrl_get_name(c));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg,
char *raw, bool connect, bool persistent,
enum nvme_print_flags flags)
@@ -563,7 +485,6 @@ static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg,
} else if (errno == ENVME_CONNECT_ALREADY && !quiet) {
char *traddr = log->entries[i].traddr;
- space_strip_len(NVMF_TRADDR_SIZE, traddr);
fprintf(stderr,
"traddr=%s is already connected\n",
traddr);
@@ -908,6 +829,20 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
* on exit.
*/
persistent = true;
+ /*
+ * When --host-traddr/--host-iface are not specified on the
+ * command line, use the discovery controller's (c) host-
+ * traddr/host-iface for the connections to controllers
+ * returned in the Discovery Log Pages. This is essential
+ * when invoking "connect-all" with --device to reuse an
+ * existing persistent discovery controller (as is done
+ * for the udev rules). This ensures that host-traddr/
+ * host-iface are consistent with the discovery controller (c).
+ */
+ if (!cfg.host_traddr)
+ cfg.host_traddr = (char *)nvme_ctrl_get_host_traddr(c);
+ if (!cfg.host_iface)
+ cfg.host_iface = (char *)nvme_ctrl_get_host_iface(c);
}
} else {
/*
diff --git a/meson.build b/meson.build
index c05dc47..24fa16e 100644
--- a/meson.build
+++ b/meson.build
@@ -4,12 +4,13 @@ project(
'nvme-cli', ['c'],
meson_version: '>= 0.50.0',
license: 'GPL-2.0-only',
- version: '2.3',
+ version: '2.4',
default_options: [
'c_std=gnu99',
'buildtype=debug',
'prefix=/usr/local',
'warning_level=1',
+ 'sysconfdir=etc',
]
)
@@ -44,24 +45,25 @@ endif
conf.set('SYSCONFDIR', '"@0@"'.format(sysconfdir))
# Check for libnvme availability
-libnvme_dep = dependency('libnvme', version: '>=1.3', required: true,
+libnvme_dep = dependency('libnvme', version: '>=1.4', required: true,
fallback : ['libnvme', 'libnvme_dep'])
libnvme_mi_dep = dependency('libnvme-mi', required: true,
fallback : ['libnvme', 'libnvme_mi_dep'])
# Check for libjson-c availability
-json_c_dep = dependency('json-c', required: true, version: '>=0.13',
- fallback : ['json-c', 'json_c_dep'])
-if json_c_dep.version().version_compare('>=0.14')
- conf.set('CONFIG_JSONC_14', true, description: 'Is json-c at least 0.14?')
- requires = 'Requires: json-c >= 0.14'
+if get_option('json-c').disabled()
+ json_c_dep = dependency('', required: false)
else
- requires = 'Requires: json-c >= 0.13'
+ json_c_dep = dependency('json-c', required: true, version: '>=0.13',
+ fallback : ['json-c', 'json_c_dep'])
+ if json_c_dep.version().version_compare('>=0.14')
+ conf.set('CONFIG_JSONC_14', true, description: 'Is json-c at least 0.14?')
+ requires = 'Requires: json-c >= 0.14'
+ else
+ requires = 'Requires: json-c >= 0.13'
+ endif
endif
-
-# Check for zlib availability
-libz_dep = dependency('zlib', required: true,
- fallback : ['zlib', 'zlib_dep'])
+conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c available?')
# Check for libhugetlbfs availability (optional)
if cc.has_header('hugetlbfs.h')
@@ -248,6 +250,11 @@ sources = [
'plugin.c',
'libnvme-wrap.c',
]
+if json_c_dep.found()
+ sources += [
+ 'nvme-print-json.c',
+ ]
+endif
subdir('ccan')
subdir('plugins')
@@ -261,7 +268,7 @@ subdir('Documentation')
executable(
'nvme',
sources,
- dependencies: [ libnvme_dep, libnvme_mi_dep, json_c_dep, libz_dep,
+ dependencies: [ libnvme_dep, libnvme_mi_dep, json_c_dep,
libhugetlbfs_dep ],
link_args: '-ldl',
include_directories: incdir,
@@ -293,3 +300,19 @@ endforeach
install_data(disc,
install_dir: join_paths(sysconfdir, 'nvme'))
+
+################################################################################
+if meson.version().version_compare('>=0.53.0')
+ summary_dict = {
+ 'prefixdir': prefixdir,
+ 'sysconfdir': sysconfdir,
+ 'sbindir': sbindir,
+ 'datadir': datadir,
+ 'mandir': mandir,
+ 'udevrulesdir': udevrulesdir,
+ 'dracutrulesdir': dracutrulesdir,
+ 'systemddir': systemddir,
+ 'build location': meson.current_build_dir(),
+ }
+ summary(summary_dict)
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 04843ea..677942a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,3 +9,4 @@ option('nvme-tests', type : 'boolean', value : false, description: 'Run tests ag
option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation')
option('docs-build', type : 'boolean', value : false, description : 'build documentation')
option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior')
+option('json-c', type: 'feature', value: 'auto', description: 'JSON suppport')
diff --git a/nvme-print-json.c b/nvme-print-json.c
new file mode 100644
index 0000000..eb7e484
--- /dev/null
+++ b/nvme-print-json.c
@@ -0,0 +1,2856 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <assert.h>
+#include <errno.h>
+
+#include "nvme-print-json.h"
+
+#include "util/json.h"
+#include "nvme.h"
+#include "common.h"
+
+static const uint8_t zero_uuid[16] = { 0 };
+
+void json_nvme_id_ns(struct nvme_id_ns *ns, bool cap_only)
+{
+ char nguid_buf[2 * sizeof(ns->nguid) + 1],
+ eui64_buf[2 * sizeof(ns->eui64) + 1];
+ char *nguid = nguid_buf, *eui64 = eui64_buf;
+ struct json_object *root;
+ struct json_object *lbafs;
+ int i;
+
+ nvme_uint128_t nvmcap = le128_to_cpu(ns->nvmcap);
+
+ root = json_create_object();
+
+ if (!cap_only) {
+ json_object_add_value_uint64(root, "nsze", le64_to_cpu(ns->nsze));
+ json_object_add_value_uint64(root, "ncap", le64_to_cpu(ns->ncap));
+ json_object_add_value_uint64(root, "nuse", le64_to_cpu(ns->nuse));
+ json_object_add_value_int(root, "nsfeat", ns->nsfeat);
+ }
+ json_object_add_value_int(root, "nlbaf", ns->nlbaf);
+ if (!cap_only)
+ json_object_add_value_int(root, "flbas", ns->flbas);
+ json_object_add_value_int(root, "mc", ns->mc);
+ json_object_add_value_int(root, "dpc", ns->dpc);
+ if (!cap_only) {
+ json_object_add_value_int(root, "dps", ns->dps);
+ json_object_add_value_int(root, "nmic", ns->nmic);
+ json_object_add_value_int(root, "rescap", ns->rescap);
+ json_object_add_value_int(root, "fpi", ns->fpi);
+ json_object_add_value_int(root, "dlfeat", ns->dlfeat);
+ json_object_add_value_int(root, "nawun", le16_to_cpu(ns->nawun));
+ json_object_add_value_int(root, "nawupf", le16_to_cpu(ns->nawupf));
+ json_object_add_value_int(root, "nacwu", le16_to_cpu(ns->nacwu));
+ json_object_add_value_int(root, "nabsn", le16_to_cpu(ns->nabsn));
+ json_object_add_value_int(root, "nabo", le16_to_cpu(ns->nabo));
+ json_object_add_value_int(root, "nabspf", le16_to_cpu(ns->nabspf));
+ json_object_add_value_int(root, "noiob", le16_to_cpu(ns->noiob));
+ json_object_add_value_uint128(root, "nvmcap", nvmcap);
+ json_object_add_value_int(root, "nsattr", ns->nsattr);
+ json_object_add_value_int(root, "nvmsetid", le16_to_cpu(ns->nvmsetid));
+
+ if (ns->nsfeat & 0x10) {
+ json_object_add_value_int(root, "npwg", le16_to_cpu(ns->npwg));
+ json_object_add_value_int(root, "npwa", le16_to_cpu(ns->npwa));
+ json_object_add_value_int(root, "npdg", le16_to_cpu(ns->npdg));
+ json_object_add_value_int(root, "npda", le16_to_cpu(ns->npda));
+ json_object_add_value_int(root, "nows", le16_to_cpu(ns->nows));
+ }
+
+ json_object_add_value_int(root, "mssrl", le16_to_cpu(ns->mssrl));
+ json_object_add_value_uint(root, "mcl", le32_to_cpu(ns->mcl));
+ json_object_add_value_int(root, "msrc", ns->msrc);
+ }
+ json_object_add_value_int(root, "nulbaf", ns->nulbaf);
+
+ if (!cap_only) {
+ json_object_add_value_uint(root, "anagrpid", le32_to_cpu(ns->anagrpid));
+ json_object_add_value_int(root, "endgid", le16_to_cpu(ns->endgid));
+
+ memset(eui64, 0, sizeof(eui64_buf));
+ for (i = 0; i < sizeof(ns->eui64); i++)
+ eui64 += sprintf(eui64, "%02x", ns->eui64[i]);
+
+ memset(nguid, 0, sizeof(nguid_buf));
+ for (i = 0; i < sizeof(ns->nguid); i++)
+ nguid += sprintf(nguid, "%02x", ns->nguid[i]);
+
+ json_object_add_value_string(root, "eui64", eui64_buf);
+ json_object_add_value_string(root, "nguid", nguid_buf);
+ }
+
+ lbafs = json_create_array();
+ json_object_add_value_array(root, "lbafs", lbafs);
+
+ for (i = 0; i <= ns->nlbaf; i++) {
+ struct json_object *lbaf = json_create_object();
+
+ json_object_add_value_int(lbaf, "ms",
+ le16_to_cpu(ns->lbaf[i].ms));
+ json_object_add_value_int(lbaf, "ds", ns->lbaf[i].ds);
+ json_object_add_value_int(lbaf, "rp", ns->lbaf[i].rp);
+
+ json_array_add_value_object(lbafs, lbaf);
+ }
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+ void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl,
+ void (*vs)(__u8 *vs, struct json_object *root))
+{
+ struct json_object *root;
+ struct json_object *psds;
+
+ nvme_uint128_t tnvmcap = le128_to_cpu(ctrl->tnvmcap);
+ nvme_uint128_t unvmcap = le128_to_cpu(ctrl->unvmcap);
+ nvme_uint128_t megcap = le128_to_cpu(ctrl->megcap);
+ nvme_uint128_t maxdna = le128_to_cpu(ctrl->maxdna);
+
+ char sn[sizeof(ctrl->sn) + 1], mn[sizeof(ctrl->mn) + 1],
+ fr[sizeof(ctrl->fr) + 1], subnqn[sizeof(ctrl->subnqn) + 1];
+ __u32 ieee = ctrl->ieee[2] << 16 | ctrl->ieee[1] << 8 | ctrl->ieee[0];
+
+ int i;
+
+ snprintf(sn, sizeof(sn), "%-.*s", (int)sizeof(ctrl->sn), ctrl->sn);
+ snprintf(mn, sizeof(mn), "%-.*s", (int)sizeof(ctrl->mn), ctrl->mn);
+ snprintf(fr, sizeof(fr), "%-.*s", (int)sizeof(ctrl->fr), ctrl->fr);
+ snprintf(subnqn, sizeof(subnqn), "%-.*s", (int)sizeof(ctrl->subnqn), ctrl->subnqn);
+
+ root = json_create_object();
+
+ json_object_add_value_int(root, "vid", le16_to_cpu(ctrl->vid));
+ json_object_add_value_int(root, "ssvid", le16_to_cpu(ctrl->ssvid));
+ json_object_add_value_string(root, "sn", sn);
+ json_object_add_value_string(root, "mn", mn);
+ json_object_add_value_string(root, "fr", fr);
+ json_object_add_value_int(root, "rab", ctrl->rab);
+ json_object_add_value_int(root, "ieee", ieee);
+ json_object_add_value_int(root, "cmic", ctrl->cmic);
+ json_object_add_value_int(root, "mdts", ctrl->mdts);
+ json_object_add_value_int(root, "cntlid", le16_to_cpu(ctrl->cntlid));
+ json_object_add_value_uint(root, "ver", le32_to_cpu(ctrl->ver));
+ json_object_add_value_uint(root, "rtd3r", le32_to_cpu(ctrl->rtd3r));
+ json_object_add_value_uint(root, "rtd3e", le32_to_cpu(ctrl->rtd3e));
+ json_object_add_value_uint(root, "oaes", le32_to_cpu(ctrl->oaes));
+ json_object_add_value_uint(root, "ctratt", le32_to_cpu(ctrl->ctratt));
+ json_object_add_value_int(root, "rrls", le16_to_cpu(ctrl->rrls));
+ json_object_add_value_int(root, "cntrltype", ctrl->cntrltype);
+ json_object_add_value_string(root, "fguid", util_uuid_to_string(ctrl->fguid));
+ json_object_add_value_int(root, "crdt1", le16_to_cpu(ctrl->crdt1));
+ json_object_add_value_int(root, "crdt2", le16_to_cpu(ctrl->crdt2));
+ json_object_add_value_int(root, "crdt3", le16_to_cpu(ctrl->crdt3));
+ json_object_add_value_int(root, "nvmsr", ctrl->nvmsr);
+ json_object_add_value_int(root, "vwci", ctrl->vwci);
+ json_object_add_value_int(root, "mec", ctrl->mec);
+ json_object_add_value_int(root, "oacs", le16_to_cpu(ctrl->oacs));
+ json_object_add_value_int(root, "acl", ctrl->acl);
+ json_object_add_value_int(root, "aerl", ctrl->aerl);
+ json_object_add_value_int(root, "frmw", ctrl->frmw);
+ json_object_add_value_int(root, "lpa", ctrl->lpa);
+ json_object_add_value_int(root, "elpe", ctrl->elpe);
+ json_object_add_value_int(root, "npss", ctrl->npss);
+ json_object_add_value_int(root, "avscc", ctrl->avscc);
+ json_object_add_value_int(root, "apsta", ctrl->apsta);
+ json_object_add_value_int(root, "wctemp", le16_to_cpu(ctrl->wctemp));
+ json_object_add_value_int(root, "cctemp", le16_to_cpu(ctrl->cctemp));
+ json_object_add_value_int(root, "mtfa", le16_to_cpu(ctrl->mtfa));
+ json_object_add_value_uint(root, "hmpre", le32_to_cpu(ctrl->hmpre));
+ json_object_add_value_uint(root, "hmmin", le32_to_cpu(ctrl->hmmin));
+ json_object_add_value_uint128(root, "tnvmcap", tnvmcap);
+ json_object_add_value_uint128(root, "unvmcap", unvmcap);
+ json_object_add_value_uint(root, "rpmbs", le32_to_cpu(ctrl->rpmbs));
+ json_object_add_value_int(root, "edstt", le16_to_cpu(ctrl->edstt));
+ json_object_add_value_int(root, "dsto", ctrl->dsto);
+ json_object_add_value_int(root, "fwug", ctrl->fwug);
+ json_object_add_value_int(root, "kas", le16_to_cpu(ctrl->kas));
+ json_object_add_value_int(root, "hctma", le16_to_cpu(ctrl->hctma));
+ json_object_add_value_int(root, "mntmt", le16_to_cpu(ctrl->mntmt));
+ json_object_add_value_int(root, "mxtmt", le16_to_cpu(ctrl->mxtmt));
+ json_object_add_value_uint(root, "sanicap", le32_to_cpu(ctrl->sanicap));
+ json_object_add_value_uint(root, "hmminds", le32_to_cpu(ctrl->hmminds));
+ json_object_add_value_int(root, "hmmaxd", le16_to_cpu(ctrl->hmmaxd));
+ json_object_add_value_int(root, "nsetidmax",
+ le16_to_cpu(ctrl->nsetidmax));
+ json_object_add_value_int(root, "endgidmax", le16_to_cpu(ctrl->endgidmax));
+ json_object_add_value_int(root, "anatt",ctrl->anatt);
+ json_object_add_value_int(root, "anacap", ctrl->anacap);
+ json_object_add_value_uint(root, "anagrpmax",
+ le32_to_cpu(ctrl->anagrpmax));
+ json_object_add_value_uint(root, "nanagrpid",
+ le32_to_cpu(ctrl->nanagrpid));
+ json_object_add_value_uint(root, "pels", le32_to_cpu(ctrl->pels));
+ json_object_add_value_int(root, "domainid", le16_to_cpu(ctrl->domainid));
+ json_object_add_value_uint128(root, "megcap", megcap);
+ json_object_add_value_int(root, "sqes", ctrl->sqes);
+ json_object_add_value_int(root, "cqes", ctrl->cqes);
+ json_object_add_value_int(root, "maxcmd", le16_to_cpu(ctrl->maxcmd));
+ json_object_add_value_uint(root, "nn", le32_to_cpu(ctrl->nn));
+ json_object_add_value_int(root, "oncs", le16_to_cpu(ctrl->oncs));
+ json_object_add_value_int(root, "fuses", le16_to_cpu(ctrl->fuses));
+ json_object_add_value_int(root, "fna", ctrl->fna);
+ json_object_add_value_int(root, "vwc", ctrl->vwc);
+ json_object_add_value_int(root, "awun", le16_to_cpu(ctrl->awun));
+ json_object_add_value_int(root, "awupf", le16_to_cpu(ctrl->awupf));
+ json_object_add_value_int(root, "icsvscc", ctrl->icsvscc);
+ json_object_add_value_int(root, "nwpc", ctrl->nwpc);
+ json_object_add_value_int(root, "acwu", le16_to_cpu(ctrl->acwu));
+ json_object_add_value_int(root, "ocfs", le16_to_cpu(ctrl->ocfs));
+ json_object_add_value_uint(root, "sgls", le32_to_cpu(ctrl->sgls));
+ json_object_add_value_uint(root, "mnan", le32_to_cpu(ctrl->mnan));
+ json_object_add_value_uint128(root, "maxdna", maxdna);
+ json_object_add_value_uint(root, "maxcna", le32_to_cpu(ctrl->maxcna));
+
+ if (strlen(subnqn))
+ json_object_add_value_string(root, "subnqn", subnqn);
+
+ json_object_add_value_uint(root, "ioccsz", le32_to_cpu(ctrl->ioccsz));
+ json_object_add_value_uint(root, "iorcsz", le32_to_cpu(ctrl->iorcsz));
+ json_object_add_value_int(root, "icdoff", le16_to_cpu(ctrl->icdoff));
+ json_object_add_value_int(root, "fcatt", ctrl->fcatt);
+ json_object_add_value_int(root, "msdbd", ctrl->msdbd);
+ json_object_add_value_int(root, "ofcs", le16_to_cpu(ctrl->ofcs));
+
+ psds = json_create_array();
+ json_object_add_value_array(root, "psds", psds);
+
+ for (i = 0; i <= ctrl->npss; i++) {
+ struct json_object *psd = json_create_object();
+
+ json_object_add_value_int(psd, "max_power",
+ le16_to_cpu(ctrl->psd[i].mp));
+ json_object_add_value_int(psd, "flags", ctrl->psd[i].flags);
+ json_object_add_value_uint(psd, "entry_lat",
+ le32_to_cpu(ctrl->psd[i].enlat));
+ json_object_add_value_uint(psd, "exit_lat",
+ le32_to_cpu(ctrl->psd[i].exlat));
+ json_object_add_value_int(psd, "read_tput",
+ ctrl->psd[i].rrt);
+ json_object_add_value_int(psd, "read_lat",
+ ctrl->psd[i].rrl);
+ json_object_add_value_int(psd, "write_tput",
+ ctrl->psd[i].rwt);
+ json_object_add_value_int(psd, "write_lat",
+ ctrl->psd[i].rwl);
+ json_object_add_value_int(psd, "idle_power",
+ le16_to_cpu(ctrl->psd[i].idlp));
+ json_object_add_value_int(psd, "idle_scale",
+ nvme_psd_power_scale(ctrl->psd[i].ips));
+ json_object_add_value_int(psd, "active_power",
+ le16_to_cpu(ctrl->psd[i].actp));
+ json_object_add_value_int(psd, "active_power_work",
+ ctrl->psd[i].apws & 0x7);
+ json_object_add_value_int(psd, "active_scale",
+ nvme_psd_power_scale(ctrl->psd[i].apws));
+
+ json_array_add_value_object(psds, psd);
+ }
+
+ if(vs)
+ vs(ctrl->vs, root);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_error_log(struct nvme_error_log_page *err_log, int entries)
+{
+ struct json_object *root;
+ struct json_object *errors;
+ int i;
+
+ root = json_create_object();
+ errors = json_create_array();
+ json_object_add_value_array(root, "errors", errors);
+
+ for (i = 0; i < entries; i++) {
+ struct json_object *error = json_create_object();
+
+ json_object_add_value_uint64(error, "error_count",
+ le64_to_cpu(err_log[i].error_count));
+ json_object_add_value_int(error, "sqid",
+ le16_to_cpu(err_log[i].sqid));
+ json_object_add_value_int(error, "cmdid",
+ le16_to_cpu(err_log[i].cmdid));
+ json_object_add_value_int(error, "status_field",
+ le16_to_cpu(err_log[i].status_field >> 0x1));
+ json_object_add_value_int(error, "phase_tag",
+ le16_to_cpu(err_log[i].status_field & 0x1));
+ json_object_add_value_int(error, "parm_error_location",
+ le16_to_cpu(err_log[i].parm_error_location));
+ json_object_add_value_uint64(error, "lba",
+ le64_to_cpu(err_log[i].lba));
+ json_object_add_value_uint(error, "nsid",
+ le32_to_cpu(err_log[i].nsid));
+ json_object_add_value_int(error, "vs", err_log[i].vs);
+ json_object_add_value_int(error, "trtype", err_log[i].trtype);
+ json_object_add_value_uint64(error, "cs",
+ le64_to_cpu(err_log[i].cs));
+ json_object_add_value_int(error, "trtype_spec_info",
+ le16_to_cpu(err_log[i].trtype_spec_info));
+
+ json_array_add_value_object(errors, error);
+ }
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_resv_report(struct nvme_resv_status *status,
+ int bytes, bool eds)
+{
+ struct json_object *root;
+ struct json_object *rcs;
+ int i, j, regctl, entries;
+
+ regctl = status->regctl[0] | (status->regctl[1] << 8);
+
+ root = json_create_object();
+
+ json_object_add_value_uint(root, "gen", le32_to_cpu(status->gen));
+ json_object_add_value_int(root, "rtype", status->rtype);
+ json_object_add_value_int(root, "regctl", regctl);
+ json_object_add_value_int(root, "ptpls", status->ptpls);
+
+ rcs = json_create_array();
+ /* check Extended Data Structure bit */
+ if (!eds) {
+ /*
+ * if status buffer was too small, don't loop past the end of
+ * the buffer
+ */
+ entries = (bytes - 24) / 24;
+ if (entries < regctl)
+ regctl = entries;
+
+ json_object_add_value_array(root, "regctls", rcs);
+ for (i = 0; i < regctl; i++) {
+ struct json_object *rc = json_create_object();
+
+ json_object_add_value_int(rc, "cntlid",
+ le16_to_cpu(status->regctl_ds[i].cntlid));
+ json_object_add_value_int(rc, "rcsts",
+ status->regctl_ds[i].rcsts);
+ json_object_add_value_uint64(rc, "hostid",
+ le64_to_cpu(status->regctl_ds[i].hostid));
+ json_object_add_value_uint64(rc, "rkey",
+ le64_to_cpu(status->regctl_ds[i].rkey));
+
+ json_array_add_value_object(rcs, rc);
+ }
+ } else {
+ char hostid[33];
+
+ /* if status buffer was too small, don't loop past the end of the buffer */
+ entries = (bytes - 64) / 64;
+ if (entries < regctl)
+ regctl = entries;
+
+ json_object_add_value_array(root, "regctlext", rcs);
+ for (i = 0; i < regctl; i++) {
+ struct json_object *rc = json_create_object();
+
+ json_object_add_value_int(rc, "cntlid",
+ le16_to_cpu(status->regctl_eds[i].cntlid));
+ json_object_add_value_int(rc, "rcsts",
+ status->regctl_eds[i].rcsts);
+ json_object_add_value_uint64(rc, "rkey",
+ le64_to_cpu(status->regctl_eds[i].rkey));
+ for (j = 0; j < 16; j++)
+ sprintf(hostid + j * 2, "%02x",
+ status->regctl_eds[i].hostid[j]);
+
+ json_object_add_value_string(rc, "hostid", hostid);
+ json_array_add_value_object(rcs, rc);
+ }
+ }
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_fw_log(struct nvme_firmware_slot *fw_log, const char *devname)
+{
+ struct json_object *root;
+ struct json_object *fwsi;
+ char fmt[21];
+ char str[32];
+ int i;
+ __le64 *frs;
+
+ root = json_create_object();
+ fwsi = json_create_object();
+
+ json_object_add_value_int(fwsi, "Active Firmware Slot (afi)",
+ fw_log->afi);
+ for (i = 0; i < 7; i++) {
+ if (fw_log->frs[i][0]) {
+ snprintf(fmt, sizeof(fmt), "Firmware Rev Slot %d",
+ i + 1);
+ frs = (__le64 *)&fw_log->frs[i];
+ snprintf(str, sizeof(str), "%"PRIu64" (%s)",
+ le64_to_cpu(*frs),
+ util_fw_to_string(fw_log->frs[i]));
+ json_object_add_value_string(fwsi, fmt, str);
+ }
+ }
+ json_object_add_value_object(root, devname, fwsi);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_changed_ns_list_log(struct nvme_ns_list *log,
+ const char *devname)
+{
+ struct json_object *root;
+ struct json_object *nsi;
+ char fmt[32];
+ char str[32];
+ __u32 nsid;
+ int i;
+
+ if (log->ns[0] == cpu_to_le32(0xffffffff))
+ return;
+
+ root = json_create_object();
+ nsi = json_create_object();
+
+ json_object_add_value_string(root, "Changed Namespace List Log",
+ devname);
+
+ for (i = 0; i < NVME_ID_NS_LIST_MAX; i++) {
+ nsid = le32_to_cpu(log->ns[i]);
+
+ if (nsid == 0)
+ break;
+
+ snprintf(fmt, sizeof(fmt), "[%4u]", i + 1);
+ snprintf(str, sizeof(str), "%#x", nsid);
+ json_object_add_value_string(nsi, fmt, str);
+ }
+
+ json_object_add_value_object(root, devname, nsi);
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_endurance_log(struct nvme_endurance_group_log *endurance_group,
+ __u16 group_id)
+{
+ struct json_object *root;
+
+ nvme_uint128_t endurance_estimate =
+ le128_to_cpu(endurance_group->endurance_estimate);
+ nvme_uint128_t data_units_read =
+ le128_to_cpu(endurance_group->data_units_read);
+ nvme_uint128_t data_units_written =
+ le128_to_cpu(endurance_group->data_units_written);
+ nvme_uint128_t media_units_written =
+ le128_to_cpu(endurance_group->media_units_written);
+ nvme_uint128_t host_read_cmds =
+ le128_to_cpu(endurance_group->host_read_cmds);
+ nvme_uint128_t host_write_cmds =
+ le128_to_cpu(endurance_group->host_write_cmds);
+ nvme_uint128_t media_data_integrity_err =
+ le128_to_cpu(endurance_group->media_data_integrity_err);
+ nvme_uint128_t num_err_info_log_entries =
+ le128_to_cpu(endurance_group->num_err_info_log_entries);
+
+ root = json_create_object();
+
+ json_object_add_value_int(root, "critical_warning",
+ endurance_group->critical_warning);
+ json_object_add_value_int(root, "avl_spare",
+ endurance_group->avl_spare);
+ json_object_add_value_int(root, "avl_spare_threshold",
+ endurance_group->avl_spare_threshold);
+ json_object_add_value_int(root, "percent_used",
+ endurance_group->percent_used);
+ json_object_add_value_uint128(root, "endurance_estimate",
+ endurance_estimate);
+ json_object_add_value_uint128(root, "data_units_read", data_units_read);
+ json_object_add_value_uint128(root, "data_units_written",
+ data_units_written);
+ json_object_add_value_uint128(root, "media_units_written",
+ media_units_written);
+ json_object_add_value_uint128(root, "host_read_cmds", host_read_cmds);
+ json_object_add_value_uint128(root, "host_write_cmds", host_write_cmds);
+ json_object_add_value_uint128(root, "media_data_integrity_err",
+ media_data_integrity_err);
+ json_object_add_value_uint128(root, "num_err_info_log_entries",
+ num_err_info_log_entries);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
+ enum nvme_print_flags flags)
+{
+ int c, human = flags & VERBOSE;
+ struct json_object *root;
+ char key[21];
+
+ unsigned int temperature = ((smart->temperature[1] << 8) |
+ smart->temperature[0]);
+
+ nvme_uint128_t data_units_read = le128_to_cpu(smart->data_units_read);
+ nvme_uint128_t data_units_written = le128_to_cpu(smart->data_units_written);
+ nvme_uint128_t host_read_commands = le128_to_cpu(smart->host_reads);
+ nvme_uint128_t host_write_commands = le128_to_cpu(smart->host_writes);
+ nvme_uint128_t controller_busy_time = le128_to_cpu(smart->ctrl_busy_time);
+ nvme_uint128_t power_cycles = le128_to_cpu(smart->power_cycles);
+ nvme_uint128_t power_on_hours = le128_to_cpu(smart->power_on_hours);
+ nvme_uint128_t unsafe_shutdowns = le128_to_cpu(smart->unsafe_shutdowns);
+ nvme_uint128_t media_errors = le128_to_cpu(smart->media_errors);
+ nvme_uint128_t num_err_log_entries = le128_to_cpu(smart->num_err_log_entries);
+
+ root = json_create_object();
+
+ if (human) {
+ struct json_object *crt = json_create_object();
+
+ json_object_add_value_int(crt, "value", smart->critical_warning);
+ json_object_add_value_int(crt, "available_spare", smart->critical_warning & 0x01);
+ json_object_add_value_int(crt, "temp_threshold", (smart->critical_warning & 0x02) >> 1);
+ json_object_add_value_int(crt, "reliability_degraded", (smart->critical_warning & 0x04) >> 2);
+ json_object_add_value_int(crt, "ro", (smart->critical_warning & 0x08) >> 3);
+ json_object_add_value_int(crt, "vmbu_failed", (smart->critical_warning & 0x10) >> 4);
+ json_object_add_value_int(crt, "pmr_ro", (smart->critical_warning & 0x20) >> 5);
+
+ json_object_add_value_object(root, "critical_warning", crt);
+ } else
+ json_object_add_value_int(root, "critical_warning",
+ smart->critical_warning);
+
+ json_object_add_value_int(root, "temperature", temperature);
+ json_object_add_value_int(root, "avail_spare", smart->avail_spare);
+ json_object_add_value_int(root, "spare_thresh", smart->spare_thresh);
+ json_object_add_value_int(root, "percent_used", smart->percent_used);
+ json_object_add_value_int(root, "endurance_grp_critical_warning_summary",
+ smart->endu_grp_crit_warn_sumry);
+ json_object_add_value_uint128(root, "data_units_read", data_units_read);
+ json_object_add_value_uint128(root, "data_units_written",
+ data_units_written);
+ json_object_add_value_uint128(root, "host_read_commands",
+ host_read_commands);
+ json_object_add_value_uint128(root, "host_write_commands",
+ host_write_commands);
+ json_object_add_value_uint128(root, "controller_busy_time",
+ controller_busy_time);
+ json_object_add_value_uint128(root, "power_cycles", power_cycles);
+ json_object_add_value_uint128(root, "power_on_hours", power_on_hours);
+ json_object_add_value_uint128(root, "unsafe_shutdowns", unsafe_shutdowns);
+ json_object_add_value_uint128(root, "media_errors", media_errors);
+ json_object_add_value_uint128(root, "num_err_log_entries",
+ num_err_log_entries);
+ json_object_add_value_uint(root, "warning_temp_time",
+ le32_to_cpu(smart->warning_temp_time));
+ json_object_add_value_uint(root, "critical_comp_time",
+ le32_to_cpu(smart->critical_comp_time));
+
+ for (c=0; c < 8; c++) {
+ __s32 temp = le16_to_cpu(smart->temp_sensor[c]);
+
+ if (temp == 0)
+ continue;
+ sprintf(key, "temperature_sensor_%d",c+1);
+ json_object_add_value_int(root, key, temp);
+ }
+
+ json_object_add_value_uint(root, "thm_temp1_trans_count",
+ le32_to_cpu(smart->thm_temp1_trans_count));
+ json_object_add_value_uint(root, "thm_temp2_trans_count",
+ le32_to_cpu(smart->thm_temp2_trans_count));
+ json_object_add_value_uint(root, "thm_temp1_total_time",
+ le32_to_cpu(smart->thm_temp1_total_time));
+ json_object_add_value_uint(root, "thm_temp2_total_time",
+ le32_to_cpu(smart->thm_temp2_total_time));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_ana_log(struct nvme_ana_log *ana_log, const char *devname)
+{
+ int offset = sizeof(struct nvme_ana_log);
+ struct nvme_ana_log *hdr = ana_log;
+ struct nvme_ana_group_desc *ana_desc;
+ struct json_object *desc_list;
+ struct json_object *ns_list;
+ struct json_object *desc;
+ struct json_object *nsid;
+ struct json_object *root;
+ size_t nsid_buf_size;
+ void *base = ana_log;
+ __u32 nr_nsids;
+ int i, j;
+
+ root = json_create_object();
+ json_object_add_value_string(root,
+ "Asymmetric Namespace Access Log for NVMe device",
+ devname);
+ json_object_add_value_uint64(root, "chgcnt",
+ le64_to_cpu(hdr->chgcnt));
+ json_object_add_value_uint(root, "ngrps", le16_to_cpu(hdr->ngrps));
+
+ desc_list = json_create_array();
+ for (i = 0; i < le16_to_cpu(ana_log->ngrps); i++) {
+ desc = json_create_object();
+ ana_desc = base + offset;
+ nr_nsids = le32_to_cpu(ana_desc->nnsids);
+ nsid_buf_size = nr_nsids * sizeof(__le32);
+
+ offset += sizeof(*ana_desc);
+ json_object_add_value_uint(desc, "grpid",
+ le32_to_cpu(ana_desc->grpid));
+ json_object_add_value_uint(desc, "nnsids",
+ le32_to_cpu(ana_desc->nnsids));
+ json_object_add_value_uint(desc, "chgcnt",
+ le64_to_cpu(ana_desc->chgcnt));
+ json_object_add_value_string(desc, "state",
+ nvme_ana_state_to_string(ana_desc->state));
+
+ ns_list = json_create_array();
+ for (j = 0; j < le32_to_cpu(ana_desc->nnsids); j++) {
+ nsid = json_create_object();
+ json_object_add_value_uint(nsid, "nsid",
+ le32_to_cpu(ana_desc->nsids[j]));
+ json_array_add_value_object(ns_list, nsid);
+ }
+ json_object_add_value_array(desc, "NSIDS", ns_list);
+ offset += nsid_buf_size;
+ json_array_add_value_object(desc_list, desc);
+ }
+
+ json_object_add_value_array(root, "ANA DESC LIST ", desc_list);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries)
+{
+ struct json_object *valid_attrs;
+ struct json_object *root;
+ struct json_object *valid;
+ int i;
+ __u32 num_entries;
+
+ root = json_create_object();
+ json_object_add_value_int(root, "Current Device Self-Test Operation",
+ self_test->current_operation);
+ json_object_add_value_int(root, "Current Device Self-Test Completion",
+ self_test->completion);
+ valid = json_create_array();
+
+ num_entries = min(dst_entries, NVME_LOG_ST_MAX_RESULTS);
+ for (i = 0; i < num_entries; i++) {
+ valid_attrs = json_create_object();
+ json_object_add_value_int(valid_attrs, "Self test result",
+ self_test->result[i].dsts & 0xf);
+ if ((self_test->result[i].dsts & 0xf) == 0xf)
+ goto add;
+ json_object_add_value_int(valid_attrs, "Self test code",
+ self_test->result[i].dsts >> 4);
+ json_object_add_value_int(valid_attrs, "Segment number",
+ self_test->result[i].seg);
+ json_object_add_value_int(valid_attrs, "Valid Diagnostic Information",
+ self_test->result[i].vdi);
+ json_object_add_value_uint64(valid_attrs, "Power on hours",
+ le64_to_cpu(self_test->result[i].poh));
+ if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_NSID)
+ json_object_add_value_uint(valid_attrs, "Namespace Identifier",
+ le32_to_cpu(self_test->result[i].nsid));
+ if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_FLBA) {
+ json_object_add_value_uint64(valid_attrs, "Failing LBA",
+ le64_to_cpu(self_test->result[i].flba));
+ }
+ if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_SCT)
+ json_object_add_value_int(valid_attrs, "Status Code Type",
+ self_test->result[i].sct);
+ if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_SC)
+ json_object_add_value_int(valid_attrs, "Status Code",
+ self_test->result[i].sc);
+ json_object_add_value_int(valid_attrs, "Vendor Specific",
+ (self_test->result[i].vs[1] << 8) |
+ (self_test->result[i].vs[0]));
+add:
+ json_array_add_value_object(valid, valid_attrs);
+ }
+ json_object_add_value_array(root, "List of Valid Reports", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+struct json_object* json_effects_log(enum nvme_csi csi,
+ struct nvme_cmd_effects_log *effects_log)
+{
+ struct json_object *root;
+ struct json_object *acs;
+ struct json_object *iocs;
+ unsigned int opcode;
+ char key[128];
+ __u32 effect;
+
+ root = json_create_object();
+ json_object_add_value_uint(root, "command_set_identifier", csi);
+
+ acs = json_create_object();
+ for (opcode = 0; opcode < 256; opcode++) {
+ effect = le32_to_cpu(effects_log->acs[opcode]);
+ if (effect & NVME_CMD_EFFECTS_CSUPP) {
+ sprintf(key, "ACS_%u (%s)", opcode,
+ nvme_cmd_to_string(1, opcode));
+ json_object_add_value_uint(acs, key, effect);
+ }
+ }
+
+ json_object_add_value_object(root, "admin_cmd_set", acs);
+
+ iocs = json_create_object();
+ for (opcode = 0; opcode < 256; opcode++) {
+ effect = le32_to_cpu(effects_log->iocs[opcode]);
+ if (effect & NVME_CMD_EFFECTS_CSUPP) {
+ sprintf(key, "IOCS_%u (%s)", opcode,
+ nvme_cmd_to_string(0, opcode));
+ json_object_add_value_uint(iocs, key, effect);
+ }
+ }
+
+ json_object_add_value_object(root, "io_cmd_set", iocs);
+ return root;
+}
+
+void json_effects_log_list(struct list_head *list)
+{
+ struct json_object *json_list;
+ nvme_effects_log_node_t *node;
+
+ json_list = json_create_array();
+
+ list_for_each(list, node, node) {
+ struct json_object *json_page =
+ json_effects_log(node->csi, &node->effects);
+ json_array_add_value_object(json_list, json_page);
+ }
+
+ json_print_object(json_list, NULL);
+ printf("\n");
+ json_free_object(json_list);
+}
+
+void json_sanitize_log(struct nvme_sanitize_log_page *sanitize_log,
+ const char *devname)
+{
+ struct json_object *root;
+ struct json_object *dev;
+ struct json_object *sstat;
+ const char *status_str;
+ char str[128];
+ __u16 status = le16_to_cpu(sanitize_log->sstat);
+
+ root = json_create_object();
+ dev = json_create_object();
+ sstat = json_create_object();
+
+ json_object_add_value_int(dev, "sprog",
+ le16_to_cpu(sanitize_log->sprog));
+ json_object_add_value_int(sstat, "global_erased",
+ (status & NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED) >> 8);
+ json_object_add_value_int(sstat, "no_cmplted_passes",
+ (status >> NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT) &
+ NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK);
+
+ status_str = get_sanitize_log_sstat_status_str(status);
+ sprintf(str, "(%d) %s", status & NVME_SANITIZE_SSTAT_STATUS_MASK,
+ status_str);
+ json_object_add_value_string(sstat, "status", str);
+
+ json_object_add_value_object(dev, "sstat", sstat);
+ json_object_add_value_uint(dev, "cdw10_info",
+ le32_to_cpu(sanitize_log->scdw10));
+ json_object_add_value_uint(dev, "time_over_write",
+ le32_to_cpu(sanitize_log->eto));
+ json_object_add_value_uint(dev, "time_block_erase",
+ le32_to_cpu(sanitize_log->etbe));
+ json_object_add_value_uint(dev, "time_crypto_erase",
+ le32_to_cpu(sanitize_log->etce));
+
+ json_object_add_value_uint(dev, "time_over_write_no_dealloc",
+ le32_to_cpu(sanitize_log->etond));
+ json_object_add_value_uint(dev, "time_block_erase_no_dealloc",
+ le32_to_cpu(sanitize_log->etbend));
+ json_object_add_value_uint(dev, "time_crypto_erase_no_dealloc",
+ le32_to_cpu(sanitize_log->etcend));
+
+ json_object_add_value_object(root, devname, dev);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_predictable_latency_per_nvmset(
+ struct nvme_nvmset_predictable_lat_log *plpns_log,
+ __u16 nvmset_id)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+ json_object_add_value_uint(root, "nvmset_id",
+ le16_to_cpu(nvmset_id));
+ json_object_add_value_uint(root, "status",
+ plpns_log->status);
+ json_object_add_value_uint(root, "event_type",
+ le16_to_cpu(plpns_log->event_type));
+ json_object_add_value_uint64(root, "dtwin_reads_typical",
+ le64_to_cpu(plpns_log->dtwin_rt));
+ json_object_add_value_uint64(root, "dtwin_writes_typical",
+ le64_to_cpu(plpns_log->dtwin_wt));
+ json_object_add_value_uint64(root, "dtwin_time_maximum",
+ le64_to_cpu(plpns_log->dtwin_tmax));
+ json_object_add_value_uint64(root, "ndwin_time_minimum_high",
+ le64_to_cpu(plpns_log->ndwin_tmin_hi));
+ json_object_add_value_uint64(root, "ndwin_time_minimum_low",
+ le64_to_cpu(plpns_log->ndwin_tmin_lo));
+ json_object_add_value_uint64(root, "dtwin_reads_estimate",
+ le64_to_cpu(plpns_log->dtwin_re));
+ json_object_add_value_uint64(root, "dtwin_writes_estimate",
+ le64_to_cpu(plpns_log->dtwin_we));
+ json_object_add_value_uint64(root, "dtwin_time_estimate",
+ le64_to_cpu(plpns_log->dtwin_te));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_predictable_latency_event_agg_log(
+ struct nvme_aggregate_predictable_lat_event *pea_log,
+ __u64 log_entries)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+ __u64 num_iter;
+ __u64 num_entries;
+
+ root = json_create_object();
+ num_entries = le64_to_cpu(pea_log->num_entries);
+ json_object_add_value_uint64(root, "num_entries_avail",
+ num_entries);
+ valid = json_create_array();
+
+ num_iter = min(num_entries, log_entries);
+ for (int i = 0; i < num_iter; i++) {
+ valid_attrs = json_create_object();
+ json_object_add_value_uint(valid_attrs, "entry",
+ le16_to_cpu(pea_log->entries[i]));
+ json_array_add_value_object(valid, valid_attrs);
+ }
+ json_object_add_value_array(root, "list_of_entries", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void add_bitmap(int i, __u8 seb, struct json_object *root, int json_flag)
+{
+ char evt_str[50];
+ char key[128];
+
+ for (int bit = 0; bit < 8; bit++) {
+ if (nvme_pel_event_to_string(bit + i * 8)) {
+ if (json_flag == 1) {
+ sprintf(key, "bitmap_%x", (bit + i * 8));
+ if ((seb >> bit) & 0x1)
+ snprintf(evt_str, sizeof(evt_str), "Support %s",
+ nvme_pel_event_to_string(bit + i * 8));
+ json_object_add_value_string(root, key, evt_str);
+ } else {
+ if (nvme_pel_event_to_string(bit + i * 8))
+ if ((seb >> bit) & 0x1)
+ printf(" Support %s\n",
+ nvme_pel_event_to_string(bit + i * 8));
+ }
+ }
+ }
+}
+
+void json_persistent_event_log(void *pevent_log_info, __u32 size)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+ __u32 offset, por_info_len, por_info_list;
+ __u64 *fw_rev;
+ char key[128];
+ char fw_str[50];
+
+ struct nvme_smart_log *smart_event;
+ struct nvme_fw_commit_event *fw_commit_event;
+ struct nvme_time_stamp_change_event *ts_change_event;
+ struct nvme_power_on_reset_info_list *por_event;
+ struct nvme_nss_hw_err_event *nss_hw_err_event;
+ struct nvme_change_ns_event *ns_event;
+ struct nvme_format_nvm_start_event *format_start_event;
+ struct nvme_format_nvm_compln_event *format_cmpln_event;
+ struct nvme_sanitize_start_event *sanitize_start_event;
+ struct nvme_sanitize_compln_event *sanitize_cmpln_event;
+ struct nvme_thermal_exc_event *thermal_exc_event;
+ struct nvme_persistent_event_log *pevent_log_head;
+ struct nvme_persistent_event_entry *pevent_entry_head;
+
+ root = json_create_object();
+ valid = json_create_array();
+
+ offset = sizeof(*pevent_log_head);
+ if (size >= offset) {
+ pevent_log_head = pevent_log_info;
+ char sn[sizeof(pevent_log_head->sn) + 1],
+ mn[sizeof(pevent_log_head->mn) + 1],
+ subnqn[sizeof(pevent_log_head->subnqn) + 1];
+
+ snprintf(sn, sizeof(sn), "%-.*s",
+ (int)sizeof(pevent_log_head->sn), pevent_log_head->sn);
+ snprintf(mn, sizeof(mn), "%-.*s",
+ (int)sizeof(pevent_log_head->mn), pevent_log_head->mn);
+ snprintf(subnqn, sizeof(subnqn), "%-.*s",
+ (int)sizeof(pevent_log_head->subnqn), pevent_log_head->subnqn);
+
+ json_object_add_value_uint(root, "log_id",
+ pevent_log_head->lid);
+ json_object_add_value_uint(root, "total_num_of_events",
+ le32_to_cpu(pevent_log_head->tnev));
+ json_object_add_value_uint64(root, "total_log_len",
+ le64_to_cpu(pevent_log_head->tll));
+ json_object_add_value_uint(root, "log_revision",
+ pevent_log_head->rv);
+ json_object_add_value_uint(root, "log_header_len",
+ le16_to_cpu(pevent_log_head->lhl));
+ json_object_add_value_uint64(root, "timestamp",
+ le64_to_cpu(pevent_log_head->ts));
+ json_object_add_value_uint128(root, "power_on_hours",
+ le128_to_cpu(pevent_log_head->poh));
+ json_object_add_value_uint64(root, "power_cycle_count",
+ le64_to_cpu(pevent_log_head->pcc));
+ json_object_add_value_uint(root, "pci_vid",
+ le16_to_cpu(pevent_log_head->vid));
+ json_object_add_value_uint(root, "pci_ssvid",
+ le16_to_cpu(pevent_log_head->ssvid));
+ json_object_add_value_string(root, "sn", sn);
+ json_object_add_value_string(root, "mn", mn);
+ json_object_add_value_string(root, "subnqn", subnqn);
+ json_object_add_value_uint(root, "gen_number",
+ le16_to_cpu(pevent_log_head->gen_number));
+ json_object_add_value_uint(root, "rci",
+ le32_to_cpu(pevent_log_head->rci));
+ for (int i = 0; i < 32; i++) {
+ if (pevent_log_head->seb[i] == 0)
+ continue;
+ add_bitmap(i, pevent_log_head->seb[i], root, 1);
+ }
+ } else {
+ printf("No log data can be shown with this log len at least " \
+ "512 bytes is required or can be 0 to read the complete "\
+ "log page after context established\n");
+ return;
+ }
+ for (int i = 0; i < le32_to_cpu(pevent_log_head->tnev); i++) {
+ if (offset + sizeof(*pevent_entry_head) >= size)
+ break;
+
+ pevent_entry_head = pevent_log_info + offset;
+
+ if ((offset + pevent_entry_head->ehl + 3 +
+ le16_to_cpu(pevent_entry_head->el)) >= size)
+ break;
+ valid_attrs = json_create_object();
+
+ json_object_add_value_uint(valid_attrs, "event_number", i);
+ json_object_add_value_string(valid_attrs, "event_type",
+ nvme_pel_event_to_string(pevent_entry_head->etype));
+ json_object_add_value_uint(valid_attrs, "event_type_rev",
+ pevent_entry_head->etype_rev);
+ json_object_add_value_uint(valid_attrs, "event_header_len",
+ pevent_entry_head->ehl);
+ json_object_add_value_uint(valid_attrs, "event_header_additional_info",
+ pevent_entry_head->ehai);
+ json_object_add_value_uint(valid_attrs, "ctrl_id",
+ le16_to_cpu(pevent_entry_head->cntlid));
+ json_object_add_value_uint64(valid_attrs, "event_time_stamp",
+ le64_to_cpu(pevent_entry_head->ets));
+ json_object_add_value_uint(valid_attrs, "port_id",
+ le16_to_cpu(pevent_entry_head->pelpid));
+ json_object_add_value_uint(valid_attrs, "vu_info_len",
+ le16_to_cpu(pevent_entry_head->vsil));
+ json_object_add_value_uint(valid_attrs, "event_len",
+ le16_to_cpu(pevent_entry_head->el));
+
+ offset += pevent_entry_head->ehl + 3;
+
+ switch (pevent_entry_head->etype) {
+ case NVME_PEL_SMART_HEALTH_EVENT:
+ smart_event = pevent_log_info + offset;
+ unsigned int temperature = ((smart_event->temperature[1] << 8) |
+ smart_event->temperature[0]);
+
+ nvme_uint128_t data_units_read = le128_to_cpu(smart_event->data_units_read);
+ nvme_uint128_t data_units_written = le128_to_cpu(smart_event->data_units_written);
+ nvme_uint128_t host_read_commands = le128_to_cpu(smart_event->host_reads);
+ nvme_uint128_t host_write_commands = le128_to_cpu(smart_event->host_writes);
+ nvme_uint128_t controller_busy_time = le128_to_cpu(smart_event->ctrl_busy_time);
+ nvme_uint128_t power_cycles = le128_to_cpu(smart_event->power_cycles);
+ nvme_uint128_t power_on_hours = le128_to_cpu(smart_event->power_on_hours);
+ nvme_uint128_t unsafe_shutdowns = le128_to_cpu(smart_event->unsafe_shutdowns);
+ nvme_uint128_t media_errors = le128_to_cpu(smart_event->media_errors);
+ nvme_uint128_t num_err_log_entries = le128_to_cpu(smart_event->num_err_log_entries);
+ json_object_add_value_int(valid_attrs, "critical_warning",
+ smart_event->critical_warning);
+
+ json_object_add_value_int(valid_attrs, "temperature",
+ temperature);
+ json_object_add_value_int(valid_attrs, "avail_spare",
+ smart_event->avail_spare);
+ json_object_add_value_int(valid_attrs, "spare_thresh",
+ smart_event->spare_thresh);
+ json_object_add_value_int(valid_attrs, "percent_used",
+ smart_event->percent_used);
+ json_object_add_value_int(valid_attrs,
+ "endurance_grp_critical_warning_summary",
+ smart_event->endu_grp_crit_warn_sumry);
+ json_object_add_value_uint128(valid_attrs, "data_units_read",
+ data_units_read);
+ json_object_add_value_uint128(valid_attrs, "data_units_written",
+ data_units_written);
+ json_object_add_value_uint128(valid_attrs, "host_read_commands",
+ host_read_commands);
+ json_object_add_value_uint128(valid_attrs, "host_write_commands",
+ host_write_commands);
+ json_object_add_value_uint128(valid_attrs, "controller_busy_time",
+ controller_busy_time);
+ json_object_add_value_uint128(valid_attrs, "power_cycles",
+ power_cycles);
+ json_object_add_value_uint128(valid_attrs, "power_on_hours",
+ power_on_hours);
+ json_object_add_value_uint128(valid_attrs, "unsafe_shutdowns",
+ unsafe_shutdowns);
+ json_object_add_value_uint128(valid_attrs, "media_errors",
+ media_errors);
+ json_object_add_value_uint128(valid_attrs, "num_err_log_entries",
+ num_err_log_entries);
+ json_object_add_value_uint(valid_attrs, "warning_temp_time",
+ le32_to_cpu(smart_event->warning_temp_time));
+ json_object_add_value_uint(valid_attrs, "critical_comp_time",
+ le32_to_cpu(smart_event->critical_comp_time));
+
+ for (int c = 0; c < 8; c++) {
+ __s32 temp = le16_to_cpu(smart_event->temp_sensor[c]);
+ if (temp == 0)
+ continue;
+ sprintf(key, "temperature_sensor_%d",c + 1);
+ json_object_add_value_int(valid_attrs, key, temp);
+ }
+
+ json_object_add_value_uint(valid_attrs, "thm_temp1_trans_count",
+ le32_to_cpu(smart_event->thm_temp1_trans_count));
+ json_object_add_value_uint(valid_attrs, "thm_temp2_trans_count",
+ le32_to_cpu(smart_event->thm_temp2_trans_count));
+ json_object_add_value_uint(valid_attrs, "thm_temp1_total_time",
+ le32_to_cpu(smart_event->thm_temp1_total_time));
+ json_object_add_value_uint(valid_attrs, "thm_temp2_total_time",
+ le32_to_cpu(smart_event->thm_temp2_total_time));
+ break;
+ case NVME_PEL_FW_COMMIT_EVENT:
+ fw_commit_event = pevent_log_info + offset;
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(fw_commit_event->old_fw_rev),
+ util_fw_to_string((char *)&fw_commit_event->old_fw_rev));
+ json_object_add_value_string(valid_attrs, "old_fw_rev", fw_str);
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(fw_commit_event->new_fw_rev),
+ util_fw_to_string((char *)&fw_commit_event->new_fw_rev));
+ json_object_add_value_string(valid_attrs, "new_fw_rev", fw_str);
+ json_object_add_value_uint(valid_attrs, "fw_commit_action",
+ fw_commit_event->fw_commit_action);
+ json_object_add_value_uint(valid_attrs, "fw_slot",
+ fw_commit_event->fw_slot);
+ json_object_add_value_uint(valid_attrs, "sct_fw",
+ fw_commit_event->sct_fw);
+ json_object_add_value_uint(valid_attrs, "sc_fw",
+ fw_commit_event->sc_fw);
+ json_object_add_value_uint(valid_attrs,
+ "vu_assign_fw_commit_rc",
+ le16_to_cpu(fw_commit_event->vndr_assign_fw_commit_rc));
+ break;
+ case NVME_PEL_TIMESTAMP_EVENT:
+ ts_change_event = pevent_log_info + offset;
+ json_object_add_value_uint64(valid_attrs, "prev_ts",
+ le64_to_cpu(ts_change_event->previous_timestamp));
+ json_object_add_value_uint64(valid_attrs,
+ "ml_secs_since_reset",
+ le64_to_cpu(ts_change_event->ml_secs_since_reset));
+ break;
+ case NVME_PEL_POWER_ON_RESET_EVENT:
+ por_info_len = (le16_to_cpu(pevent_entry_head->el) -
+ le16_to_cpu(pevent_entry_head->vsil) - sizeof(*fw_rev));
+
+ por_info_list = por_info_len / sizeof(*por_event);
+
+ fw_rev = pevent_log_info + offset;
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
+ le64_to_cpu(*fw_rev),
+ util_fw_to_string((char *)fw_rev));
+ json_object_add_value_string(valid_attrs, "fw_rev", fw_str);
+ for (int i = 0; i < por_info_list; i++) {
+ por_event = pevent_log_info + offset +
+ sizeof(*fw_rev) + i * sizeof(*por_event);
+ json_object_add_value_uint(valid_attrs, "ctrl_id",
+ le16_to_cpu(por_event->cid));
+ json_object_add_value_uint(valid_attrs, "fw_act",
+ por_event->fw_act);
+ json_object_add_value_uint(valid_attrs, "op_in_prog",
+ por_event->op_in_prog);
+ json_object_add_value_uint(valid_attrs, "ctrl_power_cycle",
+ le32_to_cpu(por_event->ctrl_power_cycle));
+ json_object_add_value_uint64(valid_attrs, "power_on_ml_secs",
+ le64_to_cpu(por_event->power_on_ml_seconds));
+ json_object_add_value_uint64(valid_attrs, "ctrl_time_stamp",
+ le64_to_cpu(por_event->ctrl_time_stamp));
+ }
+ break;
+ case NVME_PEL_NSS_HW_ERROR_EVENT:
+ nss_hw_err_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "nss_hw_err_code",
+ le16_to_cpu(nss_hw_err_event->nss_hw_err_event_code));
+ break;
+ case NVME_PEL_CHANGE_NS_EVENT:
+ ns_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "nsmgt_cdw10",
+ le32_to_cpu(ns_event->nsmgt_cdw10));
+ json_object_add_value_uint64(valid_attrs, "nsze",
+ le64_to_cpu(ns_event->nsze));
+ json_object_add_value_uint64(valid_attrs, "nscap",
+ le64_to_cpu(ns_event->nscap));
+ json_object_add_value_uint(valid_attrs, "flbas",
+ ns_event->flbas);
+ json_object_add_value_uint(valid_attrs, "dps",
+ ns_event->dps);
+ json_object_add_value_uint(valid_attrs, "nmic",
+ ns_event->nmic);
+ json_object_add_value_uint(valid_attrs, "ana_grp_id",
+ le32_to_cpu(ns_event->ana_grp_id));
+ json_object_add_value_uint(valid_attrs, "nvmset_id",
+ le16_to_cpu(ns_event->nvmset_id));
+ json_object_add_value_uint(valid_attrs, "nsid",
+ le32_to_cpu(ns_event->nsid));
+ break;
+ case NVME_PEL_FORMAT_START_EVENT:
+ format_start_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "nsid",
+ le32_to_cpu(format_start_event->nsid));
+ json_object_add_value_uint(valid_attrs, "fna",
+ format_start_event->fna);
+ json_object_add_value_uint(valid_attrs, "format_nvm_cdw10",
+ le32_to_cpu(format_start_event->format_nvm_cdw10));
+ break;
+ case NVME_PEL_FORMAT_COMPLETION_EVENT:
+ format_cmpln_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "nsid",
+ le32_to_cpu(format_cmpln_event->nsid));
+ json_object_add_value_uint(valid_attrs, "smallest_fpi",
+ format_cmpln_event->smallest_fpi);
+ json_object_add_value_uint(valid_attrs, "format_nvm_status",
+ format_cmpln_event->format_nvm_status);
+ json_object_add_value_uint(valid_attrs, "compln_info",
+ le16_to_cpu(format_cmpln_event->compln_info));
+ json_object_add_value_uint(valid_attrs, "status_field",
+ le32_to_cpu(format_cmpln_event->status_field));
+ break;
+ case NVME_PEL_SANITIZE_START_EVENT:
+ sanitize_start_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "SANICAP",
+ le32_to_cpu(sanitize_start_event->sani_cap));
+ json_object_add_value_uint(valid_attrs, "sani_cdw10",
+ le32_to_cpu(sanitize_start_event->sani_cdw10));
+ json_object_add_value_uint(valid_attrs, "sani_cdw11",
+ le32_to_cpu(sanitize_start_event->sani_cdw11));
+ break;
+ case NVME_PEL_SANITIZE_COMPLETION_EVENT:
+ sanitize_cmpln_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "sani_prog",
+ le16_to_cpu(sanitize_cmpln_event->sani_prog));
+ json_object_add_value_uint(valid_attrs, "sani_status",
+ le16_to_cpu(sanitize_cmpln_event->sani_status));
+ json_object_add_value_uint(valid_attrs, "cmpln_info",
+ le16_to_cpu(sanitize_cmpln_event->cmpln_info));
+ break;
+ case NVME_PEL_THERMAL_EXCURSION_EVENT:
+ thermal_exc_event = pevent_log_info + offset;
+ json_object_add_value_uint(valid_attrs, "over_temp",
+ thermal_exc_event->over_temp);
+ json_object_add_value_uint(valid_attrs, "threshold",
+ thermal_exc_event->threshold);
+ break;
+ }
+
+ json_array_add_value_object(valid, valid_attrs);
+ offset += le16_to_cpu(pevent_entry_head->el);
+ }
+
+ json_object_add_value_array(root, "list_of_event_entries", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_endurance_group_event_agg_log(
+ struct nvme_aggregate_predictable_lat_event *endurance_log,
+ __u64 log_entries)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+
+ root = json_create_object();
+ json_object_add_value_uint64(root, "num_entries_avail",
+ le64_to_cpu(endurance_log->num_entries));
+ valid = json_create_array();
+
+ for (int i = 0; i < log_entries; i++) {
+ valid_attrs = json_create_object();
+ json_object_add_value_uint(valid_attrs, "entry",
+ le16_to_cpu(endurance_log->entries[i]));
+ json_array_add_value_object(valid, valid_attrs);
+ }
+ json_object_add_value_array(root, "list_of_entries", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_lba_status_log(void *lba_status)
+{
+ struct json_object *root;
+ struct json_object *desc;
+ struct json_object *element;
+ struct json_object *desc_list;
+ struct json_object *elements_list;
+ struct nvme_lba_status_log *hdr;
+ struct nvme_lbas_ns_element *ns_element;
+ struct nvme_lba_rd *range_desc;
+ int offset = sizeof(*hdr);
+ __u32 num_lba_desc, num_elements;
+
+ root = json_create_object();
+ hdr = lba_status;
+ json_object_add_value_uint(root, "lslplen", le32_to_cpu(hdr->lslplen));
+ num_elements = le32_to_cpu(hdr->nlslne);
+ json_object_add_value_uint(root, "nlslne", num_elements);
+ json_object_add_value_uint(root, "estulb", le32_to_cpu(hdr->estulb));
+ json_object_add_value_uint(root, "lsgc", le16_to_cpu(hdr->lsgc));
+
+ elements_list = json_create_array();
+ for (int ele = 0; ele < num_elements; ele++) {
+ ns_element = lba_status + offset;
+ element = json_create_object();
+ json_object_add_value_uint(element, "neid",
+ le32_to_cpu(ns_element->neid));
+ num_lba_desc = le32_to_cpu(ns_element->nlrd);
+ json_object_add_value_uint(element, "nlrd", num_lba_desc);
+ json_object_add_value_uint(element, "ratype", ns_element->ratype);
+
+ offset += sizeof(*ns_element);
+ desc_list = json_create_array();
+ if (num_lba_desc != 0xffffffff) {
+ for (int i = 0; i < num_lba_desc; i++) {
+ range_desc = lba_status + offset;
+ desc = json_create_object();
+ json_object_add_value_uint64(desc, "rslba",
+ le64_to_cpu(range_desc->rslba));
+ json_object_add_value_uint(desc, "rnlb",
+ le32_to_cpu(range_desc->rnlb));
+
+ offset += sizeof(*range_desc);
+ json_array_add_value_object(desc_list, desc);
+ }
+ } else {
+ printf("Number of LBA Range Descriptors (NLRD) set to %#x for " \
+ "NS element %d", num_lba_desc, ele);
+ }
+
+ json_object_add_value_array(element, "descs", desc_list);
+ json_array_add_value_object(elements_list, element);
+ }
+
+ json_object_add_value_array(root, "ns_elements", elements_list);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_resv_notif_log(struct nvme_resv_notification_log *resv)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+ json_object_add_value_uint64(root, "count",
+ le64_to_cpu(resv->lpc));
+ json_object_add_value_uint(root, "rn_log_type",
+ resv->rnlpt);
+ json_object_add_value_uint(root, "num_logs",
+ resv->nalp);
+ json_object_add_value_uint(root, "nsid",
+ le32_to_cpu(resv->nsid));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log)
+{
+ struct json_object *root;
+ struct json_object *fids;
+ struct json_object *fids_list;
+ unsigned int fid;
+ char key[128];
+ __u32 fid_support;
+
+ root = json_create_object();
+ fids_list = json_create_array();
+ for (fid = 0; fid < 256; fid++) {
+ fid_support = le32_to_cpu(fid_log->fid_support[fid]);
+ if (fid_support & NVME_FID_SUPPORTED_EFFECTS_FSUPP) {
+ fids = json_create_object();
+ sprintf(key, "fid_%u", fid);
+ json_object_add_value_uint(fids, key, fid_support);
+ json_array_add_value_object(fids_list, fids);
+ }
+ }
+
+ json_object_add_value_object(root, "fid_support", fids_list);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log)
+{
+ struct json_object *root;
+ struct json_object *mi_cmds;
+ struct json_object *mi_cmds_list;
+ unsigned int mi_cmd;
+ char key[128];
+ __u32 mi_cmd_support;
+
+ root = json_create_object();
+ mi_cmds_list = json_create_array();
+ for (mi_cmd = 0; mi_cmd < 256; mi_cmd++) {
+ mi_cmd_support = le32_to_cpu(mi_cmd_log->mi_cmd_support[mi_cmd]);
+ if (mi_cmd_support & NVME_MI_CMD_SUPPORTED_EFFECTS_CSUPP) {
+ mi_cmds = json_create_object();
+ sprintf(key, "mi_cmd_%u", mi_cmd);
+ json_object_add_value_uint(mi_cmds, key, mi_cmd_support);
+ json_array_add_value_object(mi_cmds_list, mi_cmds);
+ }
+ }
+
+ json_object_add_value_object(root, "mi_command_support", mi_cmds_list);
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_boot_part_log(void *bp_log)
+{
+ struct nvme_boot_partition *hdr;
+ struct json_object *root;
+
+ hdr = bp_log;
+ root = json_create_object();
+
+ json_object_add_value_uint(root, "count", hdr->lid);
+ json_object_add_value_uint(root, "abpid",
+ (le32_to_cpu(hdr->bpinfo) >> 31) & 0x1);
+ json_object_add_value_uint(root, "bpsz",
+ le32_to_cpu(hdr->bpinfo) & 0x7fff);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_media_unit_stat_log(struct nvme_media_unit_stat_log *mus)
+{
+ struct json_object *root;
+ struct json_object *entries;
+ struct json_object *entry;
+ int i;
+
+ root = json_create_object();
+ entries = json_create_array();
+
+ json_object_add_value_uint(root, "nmu", le16_to_cpu(mus->nmu));
+ json_object_add_value_uint(root, "cchans", le16_to_cpu(mus->cchans));
+ json_object_add_value_uint(root, "sel_config", le16_to_cpu(mus->sel_config));
+
+ for (i = 0; i < mus->nmu; i++) {
+ entry = json_create_object();
+ json_object_add_value_uint(entry, "muid", le16_to_cpu(mus->mus_desc[i].muid));
+ json_object_add_value_uint(entry, "domainid", le16_to_cpu(mus->mus_desc[i].domainid));
+ json_object_add_value_uint(entry, "endgid", le16_to_cpu(mus->mus_desc[i].endgid));
+ json_object_add_value_uint(entry, "nvmsetid", le16_to_cpu(mus->mus_desc[i].nvmsetid));
+ json_object_add_value_uint(entry, "cap_adj_fctr", le16_to_cpu(mus->mus_desc[i].cap_adj_fctr));
+ json_object_add_value_uint(entry, "avl_spare", mus->mus_desc[i].avl_spare);
+ json_object_add_value_uint(entry, "percent_used", mus->mus_desc[i].percent_used);
+ json_object_add_value_uint(entry, "mucs", mus->mus_desc[i].mucs);
+ json_object_add_value_uint(entry, "cio", mus->mus_desc[i].cio);
+ json_array_add_value_object(entries, entry);
+ }
+
+ json_object_add_value_array(root, "mus_list", entries);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_supported_cap_config_log(
+ struct nvme_supported_cap_config_list_log *cap_log)
+{
+ struct json_object *root;
+ struct json_object *cap_list;
+ struct json_object *capacity;
+ struct json_object *end_list;
+ struct json_object *set_list;
+ struct json_object *set;
+ struct json_object *chan_list;
+ struct json_object *channel;
+ struct json_object *media_list;
+ struct json_object *media;
+ struct json_object *endurance;
+ struct nvme_end_grp_chan_desc *chan_desc;
+ int i, j, k, l, m, sccn, egcn, egsets, egchans, chmus;
+
+ root = json_create_object();
+
+ json_object_add_value_uint(root, "sccn", cap_log->sccn);
+ cap_list = json_create_array();
+ sccn = cap_log->sccn;
+ for (i = 0; i < sccn; i++) {
+ capacity = json_create_object();
+ json_object_add_value_uint(capacity, "cap_config_id",
+ le16_to_cpu(cap_log->cap_config_desc[i].cap_config_id));
+ json_object_add_value_uint(capacity, "domainid",
+ le16_to_cpu(cap_log->cap_config_desc[i].domainid));
+ json_object_add_value_uint(capacity, "egcn",
+ le16_to_cpu(cap_log->cap_config_desc[i].egcn));
+ end_list = json_create_array();
+ egcn = le16_to_cpu(cap_log->cap_config_desc[i].egcn);
+ for (j = 0; j < egcn; j++) {
+ endurance = json_create_object();
+ json_object_add_value_uint(endurance, "endgid",
+ le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].endgid));
+ json_object_add_value_uint(endurance, "cap_adj_factor",
+ le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].cap_adj_factor));
+ json_object_add_value_uint128(endurance, "tegcap",
+ le128_to_cpu(cap_log->cap_config_desc[i].egcd[j].tegcap));
+ json_object_add_value_uint128(endurance, "segcap",
+ le128_to_cpu(cap_log->cap_config_desc[i].egcd[j].segcap));
+ json_object_add_value_uint(endurance, "egsets",
+ le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].egsets));
+ egsets = le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].egsets);
+ set_list = json_create_array();
+ for (k = 0; k < egsets; k++) {
+ set = json_create_object();
+ json_object_add_value_uint(set, "nvmsetid",
+ le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].nvmsetid[k]));
+ json_array_add_value_object(set_list, set);
+ }
+ chan_desc = (struct nvme_end_grp_chan_desc *) \
+ ((cap_log->cap_config_desc[i].egcd[j].nvmsetid[0]) * (sizeof(__u16)*egsets));
+ egchans = le16_to_cpu(chan_desc->egchans);
+ json_object_add_value_uint(endurance, "egchans",
+ le16_to_cpu(chan_desc->egchans));
+ chan_list = json_create_array();
+ for (l = 0; l < egchans; l++) {
+ channel = json_create_object();
+ json_object_add_value_uint(channel, "chanid",
+ le16_to_cpu(chan_desc->chan_config_desc[l].chanid));
+ json_object_add_value_uint(channel, "chmus",
+ le16_to_cpu(chan_desc->chan_config_desc[l].chmus));
+ chmus = le16_to_cpu(chan_desc->chan_config_desc[l].chmus);
+ media_list = json_create_array();
+ for (m = 0; m < chmus; m++) {
+ media = json_create_object();
+ json_object_add_value_uint(media, "chanid",
+ le16_to_cpu(chan_desc->chan_config_desc[l].mu_config_desc[m].muid));
+ json_object_add_value_uint(media, "chmus",
+ le16_to_cpu(chan_desc->chan_config_desc[l].mu_config_desc[m].mudl));
+ json_array_add_value_object(media_list, media);
+ }
+ json_object_add_value_array(channel, "Media Descriptor", media_list);
+ json_array_add_value_object(chan_list, channel);
+ }
+ json_object_add_value_array(endurance, "Channel Descriptor", chan_list);
+ json_object_add_value_array(endurance, "NVM Set IDs", set_list);
+ json_array_add_value_object(end_list, endurance);
+ }
+ json_object_add_value_array(capacity, "Endurance Descriptor", end_list);
+ json_array_add_value_object(cap_list, capacity);
+ }
+
+ json_object_add_value_array(root, "Capacity Descriptor", cap_list);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_fdp_configs(struct nvme_fdp_config_log *log, size_t len)
+{
+ struct json_object *root, *obj_configs;
+ uint16_t n;
+
+ void *p = log->configs;
+
+ root = json_create_object();
+ obj_configs = json_create_array();
+
+ n = le16_to_cpu(log->n);
+
+ json_object_add_value_uint(root, "n", n);
+
+ for (int i = 0; i < n + 1; i++) {
+ struct nvme_fdp_config_desc *config = p;
+
+ struct json_object *obj_config = json_create_object();
+ struct json_object *obj_ruhs = json_create_array();
+
+ json_object_add_value_uint(obj_config, "fdpa", config->fdpa);
+ json_object_add_value_uint(obj_config, "vss", config->vss);
+ json_object_add_value_uint(obj_config, "nrg", le32_to_cpu(config->nrg));
+ json_object_add_value_uint(obj_config, "nruh", le16_to_cpu(config->nruh));
+ json_object_add_value_uint(obj_config, "nnss", le32_to_cpu(config->nnss));
+ json_object_add_value_uint64(obj_config, "runs", le64_to_cpu(config->runs));
+ json_object_add_value_uint(obj_config, "erutl", le32_to_cpu(config->erutl));
+
+ for (int j = 0; j < le16_to_cpu(config->nruh); j++) {
+ struct nvme_fdp_ruh_desc *ruh = &config->ruhs[j];
+
+ struct json_object *obj_ruh = json_create_object();
+
+ json_object_add_value_uint(obj_ruh, "ruht", ruh->ruht);
+
+ json_array_add_value_object(obj_ruhs, obj_ruh);
+ }
+
+ json_array_add_value_object(obj_configs, obj_config);
+
+ p += config->size;
+ }
+
+ json_object_add_value_array(root, "configs", obj_configs);
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_nvme_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len)
+{
+ struct json_object *root, *obj_ruhus;
+ uint16_t nruh;
+
+ root = json_create_object();
+ obj_ruhus = json_create_array();
+
+ nruh = le16_to_cpu(log->nruh);
+
+ json_object_add_value_uint(root, "nruh", nruh);
+
+ for (int i = 0; i < nruh; i++) {
+ struct nvme_fdp_ruhu_desc *ruhu = &log->ruhus[i];
+
+ struct json_object *obj_ruhu = json_create_object();
+
+ json_object_add_value_uint(obj_ruhu, "ruha", ruhu->ruha);
+
+ json_array_add_value_object(obj_ruhus, obj_ruhu);
+ }
+
+ json_object_add_value_array(root, "ruhus", obj_ruhus);
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_nvme_fdp_stats(struct nvme_fdp_stats_log *log)
+{
+ struct json_object *root = json_create_object();
+
+ json_object_add_value_uint128(root, "hbmw", le128_to_cpu(log->hbmw));
+ json_object_add_value_uint128(root, "mbmw", le128_to_cpu(log->mbmw));
+ json_object_add_value_uint128(root, "mbe", le128_to_cpu(log->mbe));
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_nvme_fdp_events(struct nvme_fdp_events_log *log)
+{
+ struct json_object *root, *obj_events;
+ uint32_t n;
+
+ root = json_create_object();
+ obj_events = json_create_array();
+
+ n = le32_to_cpu(log->n);
+
+ json_object_add_value_uint(root, "n", n);
+
+ for (unsigned int i = 0; i < n; i++) {
+ struct nvme_fdp_event *event = &log->events[i];
+
+ struct json_object *obj_event = json_create_object();
+
+ json_object_add_value_uint(obj_event, "type", event->type);
+ json_object_add_value_uint(obj_event, "fdpef", event->flags);
+ json_object_add_value_uint(obj_event, "pid", le16_to_cpu(event->pid));
+ json_object_add_value_uint64(obj_event, "timestamp", le64_to_cpu(*(uint64_t *)&event->ts));
+ json_object_add_value_uint(obj_event, "nsid", le32_to_cpu(event->nsid));
+
+ if (event->type == NVME_FDP_EVENT_REALLOC) {
+ struct nvme_fdp_event_realloc *mr;
+ mr = (struct nvme_fdp_event_realloc *)&event->type_specific;
+
+ json_object_add_value_uint(obj_event, "nlbam", le16_to_cpu(mr->nlbam));
+
+ if (mr->flags & NVME_FDP_EVENT_REALLOC_F_LBAV)
+ json_object_add_value_uint64(obj_event, "lba", le64_to_cpu(mr->lba));
+ }
+
+ json_array_add_value_object(obj_events, obj_event);
+ }
+
+ json_object_add_value_array(root, "events", obj_events);
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_nvme_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len)
+{
+ struct json_object *root, *obj_ruhss;
+ uint16_t nruhsd;
+
+ root = json_create_object();
+ obj_ruhss = json_create_array();
+
+ nruhsd = le16_to_cpu(status->nruhsd);
+
+ json_object_add_value_uint(root, "nruhsd", nruhsd);
+
+ for (unsigned int i = 0; i < nruhsd; i++) {
+ struct nvme_fdp_ruh_status_desc *ruhs = &status->ruhss[i];
+
+ struct json_object *obj_ruhs = json_create_object();
+
+ json_object_add_value_uint(obj_ruhs, "pid", le16_to_cpu(ruhs->pid));
+ json_object_add_value_uint(obj_ruhs, "ruhid", le16_to_cpu(ruhs->ruhid));
+ json_object_add_value_uint(obj_ruhs, "earutr", le32_to_cpu(ruhs->earutr));
+ json_object_add_value_uint64(obj_ruhs, "ruamw", le64_to_cpu(ruhs->ruamw));
+
+ json_array_add_value_object(obj_ruhss, obj_ruhs);
+ }
+
+ json_object_add_value_array(root, "ruhss", obj_ruhss);
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+static unsigned int json_print_nvme_subsystem_multipath(nvme_subsystem_t s,
+ bool show_ana,
+ json_object *paths)
+{
+ nvme_ns_t n;
+ nvme_path_t p;
+ unsigned int i = 0;
+
+ n = nvme_subsystem_first_ns(s);
+ if (!n)
+ return 0;
+
+ nvme_namespace_for_each_path(n, p) {
+ struct json_object *path_attrs;
+ nvme_ctrl_t c = nvme_path_get_ctrl(p);
+
+ path_attrs = json_create_object();
+ json_object_add_value_string(path_attrs, "Name",
+ nvme_ctrl_get_name(c));
+ json_object_add_value_string(path_attrs, "Transport",
+ nvme_ctrl_get_transport(c));
+ json_object_add_value_string(path_attrs, "Address",
+ nvme_ctrl_get_address(c));
+ json_object_add_value_string(path_attrs, "State",
+ nvme_ctrl_get_state(c));
+ if (show_ana)
+ json_object_add_value_string(path_attrs, "ANAState",
+ nvme_path_get_ana_state(p));
+ json_array_add_value_object(paths, path_attrs);
+ i++;
+ }
+
+ return i;
+}
+
+static void json_print_nvme_subsystem_ctrls(nvme_subsystem_t s,
+ json_object *paths)
+{
+ nvme_ctrl_t c;
+
+ nvme_subsystem_for_each_ctrl(s, c) {
+ struct json_object *path_attrs;
+
+ path_attrs = json_create_object();
+ json_object_add_value_string(path_attrs, "Name",
+ nvme_ctrl_get_name(c));
+ json_object_add_value_string(path_attrs, "Transport",
+ nvme_ctrl_get_transport(c));
+ json_object_add_value_string(path_attrs, "Address",
+ nvme_ctrl_get_address(c));
+ json_object_add_value_string(path_attrs, "State",
+ nvme_ctrl_get_state(c));
+ json_array_add_value_object(paths, path_attrs);
+ }
+}
+
+void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana)
+{
+ struct json_object *host_attrs, *subsystem_attrs;
+ struct json_object *subsystems, *paths;
+ struct json_object *root;
+ nvme_host_t h;
+
+ root = json_create_array();
+
+ nvme_for_each_host(r, h) {
+ nvme_subsystem_t s;
+ const char *hostid;
+
+ host_attrs = json_create_object();
+ json_object_add_value_string(host_attrs, "HostNQN",
+ nvme_host_get_hostnqn(h));
+ hostid = nvme_host_get_hostid(h);
+ if (hostid)
+ json_object_add_value_string(host_attrs, "HostID", hostid);
+ subsystems = json_create_array();
+ nvme_for_each_subsystem(h, s) {
+ subsystem_attrs = json_create_object();
+ json_object_add_value_string(subsystem_attrs, "Name",
+ nvme_subsystem_get_name(s));
+ json_object_add_value_string(subsystem_attrs, "NQN",
+ nvme_subsystem_get_nqn(s));
+
+ json_array_add_value_object(subsystems, subsystem_attrs);
+ paths = json_create_array();
+
+ if (!json_print_nvme_subsystem_multipath(s, show_ana, paths))
+ json_print_nvme_subsystem_ctrls(s, paths);
+
+ json_object_add_value_array(subsystem_attrs, "Paths",
+ paths);
+ }
+ json_object_add_value_array(host_attrs, "Subsystems", subsystems);
+ json_array_add_value_object(root, host_attrs);
+ }
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_ctrl_registers(void *bar)
+{
+ uint64_t cap, asq, acq, bpmbl, cmbmsc;
+ uint32_t vs, intms, intmc, cc, csts, nssr, crto, aqa, cmbsz, cmbloc,
+ bpinfo, bprsel, cmbsts, pmrcap, pmrctl, pmrsts, pmrebs, pmrswtp,
+ pmrmscl, pmrmscu;
+ struct json_object *root;
+
+ cap = mmio_read64(bar + NVME_REG_CAP);
+ vs = mmio_read32(bar + NVME_REG_VS);
+ intms = mmio_read32(bar + NVME_REG_INTMS);
+ intmc = mmio_read32(bar + NVME_REG_INTMC);
+ cc = mmio_read32(bar + NVME_REG_CC);
+ csts = mmio_read32(bar + NVME_REG_CSTS);
+ nssr = mmio_read32(bar + NVME_REG_NSSR);
+ crto = mmio_read32(bar + NVME_REG_CRTO);
+ aqa = mmio_read32(bar + NVME_REG_AQA);
+ asq = mmio_read64(bar + NVME_REG_ASQ);
+ acq = mmio_read64(bar + NVME_REG_ACQ);
+ cmbloc = mmio_read32(bar + NVME_REG_CMBLOC);
+ cmbsz = mmio_read32(bar + NVME_REG_CMBSZ);
+ bpinfo = mmio_read32(bar + NVME_REG_BPINFO);
+ bprsel = mmio_read32(bar + NVME_REG_BPRSEL);
+ bpmbl = mmio_read64(bar + NVME_REG_BPMBL);
+ cmbmsc = mmio_read64(bar + NVME_REG_CMBMSC);
+ cmbsts = mmio_read32(bar + NVME_REG_CMBSTS);
+ pmrcap = mmio_read32(bar + NVME_REG_PMRCAP);
+ pmrctl = mmio_read32(bar + NVME_REG_PMRCTL);
+ pmrsts = mmio_read32(bar + NVME_REG_PMRSTS);
+ pmrebs = mmio_read32(bar + NVME_REG_PMREBS);
+ pmrswtp = mmio_read32(bar + NVME_REG_PMRSWTP);
+ pmrmscl = mmio_read32(bar + NVME_REG_PMRMSCL);
+ pmrmscu = mmio_read32(bar + NVME_REG_PMRMSCU);
+
+ root = json_create_object();
+ json_object_add_value_uint64(root, "cap", cap);
+ json_object_add_value_int(root, "vs", vs);
+ json_object_add_value_int(root, "intms", intms);
+ json_object_add_value_int(root, "intmc", intmc);
+ json_object_add_value_int(root, "cc", cc);
+ json_object_add_value_int(root, "csts", csts);
+ json_object_add_value_int(root, "nssr", nssr);
+ json_object_add_value_int(root, "crto", crto);
+ json_object_add_value_int(root, "aqa", aqa);
+ json_object_add_value_uint64(root, "asq", asq);
+ json_object_add_value_uint64(root, "acq", acq);
+ json_object_add_value_int(root, "cmbloc", cmbloc);
+ json_object_add_value_int(root, "cmbsz", cmbsz);
+ json_object_add_value_int(root, "bpinfo", bpinfo);
+ json_object_add_value_int(root, "bprsel", bprsel);
+ json_object_add_value_uint64(root, "bpmbl", bpmbl);
+ json_object_add_value_uint64(root, "cmbmsc", cmbmsc);
+ json_object_add_value_int(root, "cmbsts", cmbsts);
+ json_object_add_value_int(root, "pmrcap", pmrcap);
+ json_object_add_value_int(root, "pmrctl", pmrctl);
+ json_object_add_value_int(root, "pmrsts", pmrsts);
+ json_object_add_value_int(root, "pmrebs", pmrebs);
+ json_object_add_value_int(root, "pmrswtp", pmrswtp);
+ json_object_add_value_uint(root, "pmrmscl", pmrmscl);
+ json_object_add_value_uint(root, "pmrmscu", pmrmscu);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+static void d_json(unsigned char *buf, int len, int width, int group,
+ struct json_object *array)
+{
+ int i, line_done = 0;
+ char ascii[32 + 1];
+ assert(width < sizeof(ascii));
+
+ for (i = 0; i < len; i++) {
+ line_done = 0;
+ ascii[i % width] = (buf[i] >= '!' && buf[i] <= '~') ? buf[i] : '.';
+ if (((i + 1) % width) == 0) {
+ ascii[i % width + 1] = '\0';
+ json_array_add_value_string(array, ascii);
+ line_done = 1;
+ }
+ }
+ if (!line_done) {
+ ascii[i % width + 1] = '\0';
+ json_array_add_value_string(array, ascii);
+ }
+}
+
+void json_nvme_cmd_set_independent_id_ns(
+ struct nvme_id_independent_id_ns *ns)
+{
+ struct json_object *root;
+ root = json_create_object();
+
+ json_object_add_value_int(root, "nsfeat", ns->nsfeat);
+ json_object_add_value_int(root, "nmic", ns->nmic);
+ json_object_add_value_int(root, "rescap", ns->rescap);
+ json_object_add_value_int(root, "fpi", ns->fpi);
+ json_object_add_value_uint(root, "anagrpid", le32_to_cpu(ns->anagrpid));
+ json_object_add_value_int(root, "nsattr", ns->nsattr);
+ json_object_add_value_int(root, "nvmsetid", le16_to_cpu(ns->nvmsetid));
+ json_object_add_value_int(root, "endgid", le16_to_cpu(ns->endgid));
+ json_object_add_value_int(root, "nstat", ns->nstat);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_id_ns_descs(void *data)
+{
+ /* large enough to hold uuid str (37) or nguid str (32) + zero byte */
+ char json_str[40];
+ char *json_str_p;
+
+ union {
+ __u8 eui64[NVME_NIDT_EUI64_LEN];
+ __u8 nguid[NVME_NIDT_NGUID_LEN];
+ __u8 uuid[NVME_UUID_LEN];
+ __u8 csi;
+ } desc;
+
+ struct json_object *root;
+ struct json_object *json_array = NULL;
+
+ off_t off;
+ int pos, len = 0;
+ int i;
+
+ for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) {
+ struct nvme_ns_id_desc *cur = data + pos;
+ const char *nidt_name = NULL;
+
+ if (cur->nidl == 0)
+ break;
+
+ memset(json_str, 0, sizeof(json_str));
+ json_str_p = json_str;
+ off = pos + sizeof(*cur);
+
+ switch (cur->nidt) {
+ case NVME_NIDT_EUI64:
+ memcpy(desc.eui64, data + off, sizeof(desc.eui64));
+ for (i = 0; i < sizeof(desc.eui64); i++)
+ json_str_p += sprintf(json_str_p, "%02x", desc.eui64[i]);
+ len = sizeof(desc.eui64);
+ nidt_name = "eui64";
+ break;
+
+ case NVME_NIDT_NGUID:
+ memcpy(desc.nguid, data + off, sizeof(desc.nguid));
+ for (i = 0; i < sizeof(desc.nguid); i++)
+ json_str_p += sprintf(json_str_p, "%02x", desc.nguid[i]);
+ len = sizeof(desc.nguid);
+ nidt_name = "nguid";
+ break;
+
+ case NVME_NIDT_UUID:
+ memcpy(desc.uuid, data + off, sizeof(desc.uuid));
+ nvme_uuid_to_string(desc.uuid, json_str);
+ len = sizeof(desc.uuid);
+ nidt_name = "uuid";
+ break;
+
+ case NVME_NIDT_CSI:
+ memcpy(&desc.csi, data + off, sizeof(desc.csi));
+ sprintf(json_str_p, "%#x", desc.csi);
+ len += sizeof(desc.csi);
+ nidt_name = "csi";
+ break;
+ default:
+ /* Skip unknown types */
+ len = cur->nidl;
+ break;
+ }
+
+ if (nidt_name) {
+ struct json_object *elem = json_create_object();
+
+ json_object_add_value_int(elem, "loc", pos);
+ json_object_add_value_int(elem, "nidt", (int)cur->nidt);
+ json_object_add_value_int(elem, "nidl", (int)cur->nidl);
+ json_object_add_value_string(elem, "type", nidt_name);
+ json_object_add_value_string(elem, nidt_name, json_str);
+
+ if (!json_array) {
+ json_array = json_create_array();
+ }
+ json_array_add_value_object(json_array, elem);
+ }
+
+ len += sizeof(*cur);
+ }
+
+ root = json_create_object();
+
+ if (json_array)
+ json_object_add_value_array(root, "ns-descs", json_array);
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
+}
+
+void json_nvme_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+ json_object_add_value_uint(root, "vsl", ctrl_nvm->vsl);
+ json_object_add_value_uint(root, "wzsl", ctrl_nvm->wzsl);
+ json_object_add_value_uint(root, "wusl", ctrl_nvm->wusl);
+ json_object_add_value_uint(root, "dmrl", ctrl_nvm->dmrl);
+ json_object_add_value_uint(root, "dmrsl", le32_to_cpu(ctrl_nvm->dmrsl));
+ json_object_add_value_uint64(root, "dmsl", le64_to_cpu(ctrl_nvm->dmsl));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns,
+ struct nvme_id_ns *ns, bool cap_only)
+{
+ struct json_object *root;
+ struct json_object *elbafs;
+ int i;
+
+ root = json_create_object();
+
+ if (!cap_only) {
+ json_object_add_value_uint64(root, "lbstm", le64_to_cpu(nvm_ns->lbstm));
+ }
+ json_object_add_value_int(root, "pic", nvm_ns->pic);
+
+ elbafs = json_create_array();
+ json_object_add_value_array(root, "elbafs", elbafs);
+
+ for (i = 0; i <= ns->nlbaf; i++) {
+ struct json_object *elbaf = json_create_object();
+ unsigned int elbaf_val = le32_to_cpu(nvm_ns->elbaf[i]);
+
+ json_object_add_value_uint(elbaf, "sts", elbaf_val & 0x7F);
+ json_object_add_value_uint(elbaf, "pif", (elbaf_val >> 7) & 0x3);
+
+ json_array_add_value_object(elbafs, elbaf);
+ }
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+ json_object_add_value_int(root, "zasl", ctrl->zasl);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_zns_id_ns(struct nvme_zns_id_ns *ns,
+ struct nvme_id_ns *id_ns)
+{
+ struct json_object *root;
+ struct json_object *lbafs;
+ int i;
+
+ root = json_create_object();
+ json_object_add_value_int(root, "zoc", le16_to_cpu(ns->zoc));
+ json_object_add_value_int(root, "ozcs", le16_to_cpu(ns->ozcs));
+ json_object_add_value_uint(root, "mar", le32_to_cpu(ns->mar));
+ json_object_add_value_uint(root, "mor", le32_to_cpu(ns->mor));
+ json_object_add_value_uint(root, "rrl", le32_to_cpu(ns->rrl));
+ json_object_add_value_uint(root, "frl", le32_to_cpu(ns->frl));
+ json_object_add_value_uint(root, "rrl1", le32_to_cpu(ns->rrl1));
+ json_object_add_value_uint(root, "rrl2", le32_to_cpu(ns->rrl2));
+ json_object_add_value_uint(root, "rrl3", le32_to_cpu(ns->rrl3));
+ json_object_add_value_uint(root, "frl1", le32_to_cpu(ns->frl1));
+ json_object_add_value_uint(root, "frl2", le32_to_cpu(ns->frl2));
+ json_object_add_value_uint(root, "frl3", le32_to_cpu(ns->frl3));
+ json_object_add_value_uint(root, "numzrwa", le32_to_cpu(ns->numzrwa));
+ json_object_add_value_int(root, "zrwafg", le16_to_cpu(ns->zrwafg));
+ json_object_add_value_int(root, "zrwasz", le16_to_cpu(ns->zrwasz));
+ json_object_add_value_int(root, "zrwacap", ns->zrwacap);
+
+ lbafs = json_create_array();
+ json_object_add_value_array(root, "lbafe", lbafs);
+
+ for (i = 0; i <= id_ns->nlbaf; i++) {
+ struct json_object *lbaf = json_create_object();
+
+ json_object_add_value_int(lbaf, "zsze",
+ le64_to_cpu(ns->lbafe[i].zsze));
+ json_object_add_value_int(lbaf, "zdes", ns->lbafe[i].zdes);
+
+ json_array_add_value_object(lbafs, lbaf);
+ }
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_list_ns(struct nvme_ns_list *ns_list)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+ int i;
+
+ root = json_create_object();
+ valid = json_create_array();
+
+ for (i = 0; i < 1024; i++) {
+ if (ns_list->ns[i]) {
+ valid_attrs = json_create_object();
+ json_object_add_value_uint(valid_attrs, "nsid",
+ le32_to_cpu(ns_list->ns[i]));
+ json_array_add_value_object(valid, valid_attrs);
+ }
+ }
+ json_object_add_value_array(root, "nsid_list", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_finish_zone_list(__u64 nr_zones,
+ struct json_object *zone_list)
+{
+ struct json_object *root = json_create_object();
+ json_object_add_value_uint(root, "nr_zones", nr_zones);
+ json_object_add_value_array(root, "zone_list", zone_list);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_zns_report_zones(void *report, __u32 descs,
+ __u8 ext_size, __u32 report_size,
+ struct json_object *zone_list)
+{
+ struct json_object *zone;
+ struct json_object *ext_data;
+ struct nvme_zone_report *r = report;
+ struct nvme_zns_desc *desc;
+ int i;
+
+ for (i = 0; i < descs; i++) {
+ desc = (struct nvme_zns_desc *)
+ (report + sizeof(*r) + i * (sizeof(*desc) + ext_size));
+ zone = json_create_object();
+
+ json_object_add_value_uint64(zone, "slba",
+ le64_to_cpu(desc->zslba));
+ json_object_add_value_uint64(zone, "wp",
+ le64_to_cpu(desc->wp));
+ json_object_add_value_uint64(zone, "cap",
+ le64_to_cpu(desc->zcap));
+ json_object_add_value_string(zone, "state",
+ zone_state_to_string(desc->zs >> 4));
+ json_object_add_value_string(zone, "type",
+ zone_type_to_string(desc->zt));
+ json_object_add_value_uint(zone, "attrs", desc->za);
+ json_object_add_value_uint(zone, "attrs_info", desc->zai);
+
+ if (ext_size) {
+ if (desc->za & NVME_ZNS_ZA_ZDEV) {
+ ext_data = json_create_array();
+ d_json((unsigned char *)desc + sizeof(*desc),
+ ext_size, 16, 1, ext_data);
+ json_object_add_value_array(zone, "ext_data",
+ ext_data);
+ } else {
+ json_object_add_value_string(zone, "ext_data", "Not valid");
+ }
+ }
+
+ json_array_add_value_object(zone_list, zone);
+ }
+}
+
+void json_nvme_list_ctrl(struct nvme_ctrl_list *ctrl_list, __u16 num)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+ int i;
+
+ root = json_create_object();
+ valid = json_create_array();
+
+ json_object_add_value_uint(root, "num_ctrl",
+ le16_to_cpu(ctrl_list->num));
+
+ for (i = 0; i < min(num, 2047); i++) {
+
+ valid_attrs = json_create_object();
+ json_object_add_value_uint(valid_attrs, "ctrl_id",
+ le16_to_cpu(ctrl_list->identifier[i]));
+ json_array_add_value_object(valid, valid_attrs);
+ }
+
+ json_object_add_value_array(root, "ctrl_list", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_id_nvmset(struct nvme_id_nvmset_list *nvmset)
+{
+ __u32 nent = nvmset->nid;
+ struct json_object *entries;
+ struct json_object *root;
+ int i;
+
+ root = json_create_object();
+
+ json_object_add_value_int(root, "nid", nent);
+
+ entries = json_create_array();
+ for (i = 0; i < nent; i++) {
+ struct json_object *entry = json_create_object();
+
+ json_object_add_value_int(entry, "nvmset_id",
+ le16_to_cpu(nvmset->ent[i].nvmsetid));
+ json_object_add_value_int(entry, "endurance_group_id",
+ le16_to_cpu(nvmset->ent[i].endgid));
+ json_object_add_value_uint(entry, "random_4k_read_typical",
+ le32_to_cpu(nvmset->ent[i].rr4kt));
+ json_object_add_value_uint(entry, "optimal_write_size",
+ le32_to_cpu(nvmset->ent[i].ows));
+ json_object_add_value_uint128(entry, "total_nvmset_cap",
+ le128_to_cpu(nvmset->ent[i].tnvmsetcap));
+ json_object_add_value_uint128(entry, "unalloc_nvmset_cap",
+ le128_to_cpu(nvmset->ent[i].unvmsetcap));
+ json_array_add_value_object(entries, entry);
+ }
+
+ json_object_add_value_array(root, "NVMSet", entries);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+
+ json_object_add_value_uint(root, "cntlid", le16_to_cpu(caps->cntlid));
+ json_object_add_value_uint(root, "portid", le16_to_cpu(caps->portid));
+ json_object_add_value_uint(root, "crt", caps->crt);
+
+ json_object_add_value_uint(root, "vqfrt", le32_to_cpu(caps->vqfrt));
+ json_object_add_value_uint(root, "vqrfa", le32_to_cpu(caps->vqrfa));
+ json_object_add_value_int(root, "vqrfap", le16_to_cpu(caps->vqrfap));
+ json_object_add_value_int(root, "vqprt", le16_to_cpu(caps->vqprt));
+ json_object_add_value_int(root, "vqfrsm", le16_to_cpu(caps->vqfrsm));
+ json_object_add_value_int(root, "vqgran", le16_to_cpu(caps->vqgran));
+
+ json_object_add_value_uint(root, "vifrt", le32_to_cpu(caps->vifrt));
+ json_object_add_value_uint(root, "virfa", le32_to_cpu(caps->virfa));
+ json_object_add_value_int(root, "virfap", le16_to_cpu(caps->virfap));
+ json_object_add_value_int(root, "viprt", le16_to_cpu(caps->viprt));
+ json_object_add_value_int(root, "vifrsm", le16_to_cpu(caps->vifrsm));
+ json_object_add_value_int(root, "vigran", le16_to_cpu(caps->vigran));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_list_secondary_ctrl(const struct nvme_secondary_ctrl_list *sc_list,
+ __u32 count)
+{
+ const struct nvme_secondary_ctrl *sc_entry = &sc_list->sc_entry[0];
+ __u32 nent = min(sc_list->num, count);
+ struct json_object *entries;
+ struct json_object *root;
+ int i;
+
+ root = json_create_object();
+
+ json_object_add_value_int(root, "num", nent);
+
+ entries = json_create_array();
+ for (i = 0; i < nent; i++) {
+ struct json_object *entry = json_create_object();
+
+ json_object_add_value_int(entry,
+ "secondary-controller-identifier",
+ le16_to_cpu(sc_entry[i].scid));
+ json_object_add_value_int(entry,
+ "primary-controller-identifier",
+ le16_to_cpu(sc_entry[i].pcid));
+ json_object_add_value_int(entry, "secondary-controller-state",
+ sc_entry[i].scs);
+ json_object_add_value_int(entry, "virtual-function-number",
+ le16_to_cpu(sc_entry[i].vfn));
+ json_object_add_value_int(entry, "num-virtual-queues",
+ le16_to_cpu(sc_entry[i].nvq));
+ json_object_add_value_int(entry, "num-virtual-interrupts",
+ le16_to_cpu(sc_entry[i].nvi));
+ json_array_add_value_object(entries, entry);
+ }
+
+ json_object_add_value_array(root, "secondary-controllers", entries);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_id_ns_granularity_list(
+ const struct nvme_id_ns_granularity_list *glist)
+{
+ int i;
+ struct json_object *root;
+ struct json_object *entries;
+
+ root = json_create_object();
+
+ json_object_add_value_int(root, "attributes", glist->attributes);
+ json_object_add_value_int(root, "num-descriptors",
+ glist->num_descriptors);
+
+ entries = json_create_array();
+ for (i = 0; i <= glist->num_descriptors; i++) {
+ struct json_object *entry = json_create_object();
+
+ json_object_add_value_uint64(entry, "namespace-size-granularity",
+ le64_to_cpu(glist->entry[i].nszegran));
+ json_object_add_value_uint64(entry, "namespace-capacity-granularity",
+ le64_to_cpu(glist->entry[i].ncapgran));
+ json_array_add_value_object(entries, entry);
+ }
+
+ json_object_add_value_array(root, "namespace-granularity-list", entries);
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_id_uuid_list(const struct nvme_id_uuid_list *uuid_list)
+{
+ struct json_object *root;
+ struct json_object *entries;
+ int i;
+
+ root = json_create_object();
+ entries = json_create_array();
+ /* The 0th entry is reserved */
+ for (i = 1; i < NVME_ID_UUID_LIST_MAX; i++) {
+ __u8 uuid[NVME_UUID_LEN];
+ struct json_object *entry = json_create_object();
+
+ /* The list is terminated by a zero UUID value */
+ if (memcmp(uuid_list->entry[i].uuid, zero_uuid, sizeof(zero_uuid)) == 0)
+ break;
+ memcpy(&uuid, uuid_list->entry[i].uuid, sizeof(uuid));
+ json_object_add_value_int(entry, "association",
+ uuid_list->entry[i].header & 0x3);
+ json_object_add_value_string(entry, "uuid",
+ util_uuid_to_string(uuid));
+ json_array_add_value_object(entries, entry);
+ }
+ json_object_add_value_array(root, "UUID-list", entries);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_id_domain_list(struct nvme_id_domain_list *id_dom)
+{
+ struct json_object *root;
+ struct json_object *entries;
+ struct json_object *entry;
+ int i;
+ nvme_uint128_t dom_cap, unalloc_dom_cap, max_egrp_dom_cap;
+
+ root = json_create_object();
+ entries = json_create_array();
+
+ json_object_add_value_uint(root, "num_dom_entries", id_dom->num);
+
+ for (i = 0; i < id_dom->num; i++) {
+ entry = json_create_object();
+ dom_cap = le128_to_cpu(id_dom->domain_attr[i].dom_cap);
+ unalloc_dom_cap = le128_to_cpu(id_dom->domain_attr[i].unalloc_dom_cap);
+ max_egrp_dom_cap = le128_to_cpu(id_dom->domain_attr[i].max_egrp_dom_cap);
+
+ json_object_add_value_uint(entry, "dom_id", le16_to_cpu(id_dom->domain_attr[i].dom_id));
+ json_object_add_value_uint128(entry, "dom_cap", dom_cap);
+ json_object_add_value_uint128(entry, "unalloc_dom_cap", unalloc_dom_cap);
+ json_object_add_value_uint128(entry, "max_egrp_dom_cap", max_egrp_dom_cap);
+
+ json_array_add_value_object(entries, entry);
+ }
+
+ json_object_add_value_array(root, "domain_list", entries);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_nvme_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list)
+{
+ struct json_object *root;
+ struct json_object *valid_attrs;
+ struct json_object *valid;
+ int i;
+
+ root = json_create_object();
+ valid = json_create_array();
+
+ json_object_add_value_uint(root, "num_endgrp_id",
+ le16_to_cpu(endgrp_list->num));
+
+ for (i = 0; i < min(le16_to_cpu(endgrp_list->num), 2047); i++) {
+ valid_attrs = json_create_object();
+ json_object_add_value_uint(valid_attrs, "endgrp_id",
+ le16_to_cpu(endgrp_list->identifier[i]));
+ json_array_add_value_object(valid, valid_attrs);
+ }
+
+ json_object_add_value_array(root, "endgrp_list", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_support_log(struct nvme_supported_log_pages *support_log)
+{
+ struct json_object *root;
+ struct json_object *valid;
+ struct json_object *valid_attrs;
+ unsigned int lid;
+ char key[128];
+ __u32 support;
+
+ root = json_create_object();
+ valid = json_create_array();
+
+ for (lid = 0; lid < 256; lid++) {
+ support = le32_to_cpu(support_log->lid_support[lid]);
+ if (support & 0x1) {
+ valid_attrs = json_create_object();
+ sprintf(key, "lid_0x%x ", lid);
+ json_object_add_value_uint(valid_attrs, key, support);
+ json_array_add_value_object(valid, valid_attrs);
+ }
+ }
+
+ json_object_add_value_object(root, "supported_logs", valid);
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+static void json_detail_list(nvme_root_t r)
+{
+ struct json_object *jroot = json_create_object();
+ struct json_object *jdev = json_create_array();
+
+ nvme_host_t h;
+ nvme_subsystem_t s;
+ nvme_ctrl_t c;
+ nvme_path_t p;
+ nvme_ns_t n;
+
+ nvme_for_each_host(r, h) {
+ struct json_object *hss = json_create_object();
+ struct json_object *jsslist = json_create_array();
+ const char *hostid;
+
+ json_object_add_value_string(hss, "HostNQN", nvme_host_get_hostnqn(h));
+ hostid = nvme_host_get_hostid(h);
+ if (hostid)
+ json_object_add_value_string(hss, "HostID", hostid);
+
+ nvme_for_each_subsystem(h , s) {
+ struct json_object *jss = json_create_object();
+ struct json_object *jctrls = json_create_array();
+ struct json_object *jnss = json_create_array();
+
+ json_object_add_value_string(jss, "Subsystem", nvme_subsystem_get_name(s));
+ json_object_add_value_string(jss, "SubsystemNQN", nvme_subsystem_get_nqn(s));
+
+ nvme_subsystem_for_each_ctrl(s, c) {
+ struct json_object *jctrl = json_create_object();
+ struct json_object *jnss = json_create_array();
+ struct json_object *jpaths = json_create_array();
+
+ json_object_add_value_string(jctrl, "Controller", nvme_ctrl_get_name(c));
+ json_object_add_value_string(jctrl, "SerialNumber", nvme_ctrl_get_serial(c));
+ json_object_add_value_string(jctrl, "ModelNumber", nvme_ctrl_get_model(c));
+ json_object_add_value_string(jctrl, "Firmware", nvme_ctrl_get_firmware(c));
+ json_object_add_value_string(jctrl, "Transport", nvme_ctrl_get_transport(c));
+ json_object_add_value_string(jctrl, "Address", nvme_ctrl_get_address(c));
+
+ nvme_ctrl_for_each_ns(c, n) {
+ struct json_object *jns = json_create_object();
+ int lba = nvme_ns_get_lba_size(n);
+ uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
+ uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
+
+ json_object_add_value_string(jns, "NameSpace", nvme_ns_get_name(n));
+ json_object_add_value_string(jns, "Generic", nvme_ns_get_generic_name(n));
+ json_object_add_value_int(jns, "NSID", nvme_ns_get_nsid(n));
+ json_object_add_value_uint64(jns, "UsedBytes", nuse);
+ json_object_add_value_uint64(jns, "MaximumLBA", nvme_ns_get_lba_count(n));
+ json_object_add_value_uint64(jns, "PhysicalSize", nsze);
+ json_object_add_value_int(jns, "SectorSize", lba);
+
+ json_array_add_value_object(jnss, jns);
+ }
+ json_object_add_value_object(jctrl, "Namespaces", jnss);
+
+ nvme_ctrl_for_each_path(c, p) {
+ struct json_object *jpath = json_create_object();
+
+ json_object_add_value_string(jpath, "Path", nvme_path_get_name(p));
+ json_object_add_value_string(jpath, "ANAState", nvme_path_get_ana_state(p));
+
+ json_array_add_value_object(jpaths, jpath);
+ }
+ json_object_add_value_object(jctrl, "Paths", jpaths);
+
+ json_array_add_value_object(jctrls, jctrl);
+ }
+ json_object_add_value_object(jss, "Controllers", jctrls);
+
+ nvme_subsystem_for_each_ns(s, n) {
+ struct json_object *jns = json_create_object();
+
+ int lba = nvme_ns_get_lba_size(n);
+ uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
+ uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
+
+ json_object_add_value_string(jns, "NameSpace", nvme_ns_get_name(n));
+ json_object_add_value_string(jns, "Generic", nvme_ns_get_generic_name(n));
+ json_object_add_value_int(jns, "NSID", nvme_ns_get_nsid(n));
+ json_object_add_value_uint64(jns, "UsedBytes", nuse);
+ json_object_add_value_uint64(jns, "MaximumLBA", nvme_ns_get_lba_count(n));
+ json_object_add_value_uint64(jns, "PhysicalSize", nsze);
+ json_object_add_value_int(jns, "SectorSize", lba);
+
+ json_array_add_value_object(jnss, jns);
+ }
+ json_object_add_value_object(jss, "Namespaces", jnss);
+
+ json_array_add_value_object(jsslist, jss);
+ }
+
+ json_object_add_value_object(hss, "Subsystems", jsslist);
+ json_array_add_value_object(jdev, hss);
+ }
+ json_object_add_value_array(jroot, "Devices", jdev);
+ json_print_object(jroot, NULL);
+ printf("\n");
+ json_free_object(jroot);
+}
+
+static struct json_object *json_list_item(nvme_ns_t n)
+{
+ struct json_object *jdevice = json_create_object();
+ char devname[128] = { 0 };
+ char genname[128] = { 0 };
+
+ int lba = nvme_ns_get_lba_size(n);
+ uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
+ uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
+
+ nvme_dev_full_path(n, devname, sizeof(devname));
+ nvme_generic_full_path(n, genname, sizeof(genname));
+
+ json_object_add_value_int(jdevice, "NameSpace", nvme_ns_get_nsid(n));
+ json_object_add_value_string(jdevice, "DevicePath", devname);
+ json_object_add_value_string(jdevice, "GenericPath", genname);
+ json_object_add_value_string(jdevice, "Firmware", nvme_ns_get_firmware(n));
+ json_object_add_value_string(jdevice, "ModelNumber", nvme_ns_get_model(n));
+ json_object_add_value_string(jdevice, "SerialNumber", nvme_ns_get_serial(n));
+ json_object_add_value_uint64(jdevice, "UsedBytes", nuse);
+ json_object_add_value_uint64(jdevice, "MaximumLBA", nvme_ns_get_lba_count(n));
+ json_object_add_value_uint64(jdevice, "PhysicalSize", nsze);
+ json_object_add_value_int(jdevice, "SectorSize", lba);
+
+ return jdevice;
+}
+
+static void json_simple_list(nvme_root_t r)
+{
+ struct json_object *jroot = json_create_object();
+ struct json_object *jdevices = json_create_array();
+
+ nvme_host_t h;
+ nvme_subsystem_t s;
+ nvme_ctrl_t c;
+ nvme_ns_t n;
+
+ nvme_for_each_host(r, h) {
+ nvme_for_each_subsystem(h, s) {
+ nvme_subsystem_for_each_ns(s, n)
+ json_array_add_value_object(jdevices,
+ json_list_item(n));
+
+ nvme_subsystem_for_each_ctrl(s, c)
+ nvme_ctrl_for_each_ns(c, n)
+ json_array_add_value_object(jdevices,
+ json_list_item(n));
+ }
+ }
+ json_object_add_value_array(jroot, "Devices", jdevices);
+ json_print_object(jroot, NULL);
+ printf("\n");
+ json_free_object(jroot);
+}
+
+void json_print_list_items(nvme_root_t r,
+ enum nvme_print_flags flags)
+{
+ if (flags & VERBOSE)
+ json_detail_list(r);
+ else
+ json_simple_list(r);
+}
+
+static unsigned int json_subsystem_topology_multipath(nvme_subsystem_t s,
+ json_object *namespaces)
+{
+ nvme_ns_t n;
+ nvme_path_t p;
+ unsigned int i = 0;
+
+ nvme_subsystem_for_each_ns(s, n) {
+ struct json_object *ns_attrs;
+ struct json_object *paths;
+
+ ns_attrs = json_create_object();
+ json_object_add_value_int(ns_attrs, "NSID",
+ nvme_ns_get_nsid(n));
+
+ paths = json_create_array();
+ nvme_namespace_for_each_path(n, p) {
+ struct json_object *path_attrs;
+
+ nvme_ctrl_t c = nvme_path_get_ctrl(p);
+
+ path_attrs = json_create_object();
+ json_object_add_value_string(path_attrs, "Name",
+ nvme_ctrl_get_name(c));
+ json_object_add_value_string(path_attrs, "Transport",
+ nvme_ctrl_get_transport(c));
+ json_object_add_value_string(path_attrs, "Address",
+ nvme_ctrl_get_address(c));
+ json_object_add_value_string(path_attrs, "State",
+ nvme_ctrl_get_state(c));
+ json_object_add_value_string(path_attrs, "ANAState",
+ nvme_path_get_ana_state(p));
+ json_array_add_value_object(paths, path_attrs);
+ }
+ json_object_add_value_array(ns_attrs, "Paths", paths);
+ json_array_add_value_object(namespaces, ns_attrs);
+ i++;
+ }
+
+ return i;
+}
+
+void json_print_nvme_subsystem_topology(nvme_subsystem_t s,
+ json_object *namespaces)
+{
+ nvme_ctrl_t c;
+ nvme_ns_t n;
+
+ nvme_subsystem_for_each_ctrl(s, c) {
+ nvme_ctrl_for_each_ns(c, n) {
+ struct json_object *ctrl_attrs;
+ struct json_object *ns_attrs;
+ struct json_object *ctrl;
+
+ ns_attrs = json_create_object();
+ json_object_add_value_int(ns_attrs, "NSID",
+ nvme_ns_get_nsid(n));
+
+ ctrl = json_create_array();
+ ctrl_attrs = json_create_object();
+ json_object_add_value_string(ctrl_attrs, "Name",
+ nvme_ctrl_get_name(c));
+ json_object_add_value_string(ctrl_attrs, "Transport",
+ nvme_ctrl_get_transport(c));
+ json_object_add_value_string(ctrl_attrs, "Address",
+ nvme_ctrl_get_address(c));
+ json_object_add_value_string(ctrl_attrs, "State",
+ nvme_ctrl_get_state(c));
+
+ json_array_add_value_object(ctrl, ctrl_attrs);
+ json_object_add_value_array(ns_attrs, "Controller", ctrl);
+ json_array_add_value_object(namespaces, ns_attrs);
+ }
+ }
+}
+
+void json_simple_topology(nvme_root_t r)
+{
+ struct json_object *host_attrs, *subsystem_attrs;
+ struct json_object *subsystems, *namespaces;
+ struct json_object *root;
+ nvme_host_t h;
+
+ root = json_create_array();
+
+ nvme_for_each_host(r, h) {
+ nvme_subsystem_t s;
+ const char *hostid;
+
+ host_attrs = json_create_object();
+ json_object_add_value_string(host_attrs, "HostNQN",
+ nvme_host_get_hostnqn(h));
+ hostid = nvme_host_get_hostid(h);
+ if (hostid)
+ json_object_add_value_string(host_attrs, "HostID", hostid);
+ subsystems = json_create_array();
+ nvme_for_each_subsystem(h, s) {
+ subsystem_attrs = json_create_object();
+ json_object_add_value_string(subsystem_attrs, "Name",
+ nvme_subsystem_get_name(s));
+ json_object_add_value_string(subsystem_attrs, "NQN",
+ nvme_subsystem_get_nqn(s));
+
+ json_array_add_value_object(subsystems, subsystem_attrs);
+ namespaces = json_create_array();
+
+ if (!json_subsystem_topology_multipath(s, namespaces))
+ json_print_nvme_subsystem_topology(s, namespaces);
+
+ json_object_add_value_array(subsystem_attrs, "Namespaces",
+ namespaces);
+ }
+ json_object_add_value_array(host_attrs, "Subsystems", subsystems);
+ json_array_add_value_object(root, host_attrs);
+ }
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+/* fabrics.c */
+void json_discovery_log(struct nvmf_discovery_log *log, int numrec)
+{
+ struct json_object *root;
+ struct json_object *entries;
+ int i;
+
+ root = json_create_object();
+ entries = json_create_array();
+ json_object_add_value_uint64(root, "genctr", le64_to_cpu(log->genctr));
+ json_object_add_value_array(root, "records", entries);
+
+ for (i = 0; i < numrec; i++) {
+ struct nvmf_disc_log_entry *e = &log->entries[i];
+ struct json_object *entry = json_create_object();
+
+ json_object_add_value_string(entry, "trtype",
+ nvmf_trtype_str(e->trtype));
+ json_object_add_value_string(entry, "adrfam",
+ nvmf_adrfam_str(e->adrfam));
+ json_object_add_value_string(entry, "subtype",
+ nvmf_subtype_str(e->subtype));
+ json_object_add_value_string(entry,"treq",
+ nvmf_treq_str(e->treq));
+ json_object_add_value_uint(entry, "portid",
+ le16_to_cpu(e->portid));
+ json_object_add_value_string(entry, "trsvcid", e->trsvcid);
+ json_object_add_value_string(entry, "subnqn", e->subnqn);
+ json_object_add_value_string(entry, "traddr", e->traddr);
+ json_object_add_value_string(entry, "eflags",
+ nvmf_eflags_str(le16_to_cpu(e->eflags)));
+
+ switch (e->trtype) {
+ case NVMF_TRTYPE_RDMA:
+ json_object_add_value_string(entry, "rdma_prtype",
+ nvmf_prtype_str(e->tsas.rdma.prtype));
+ json_object_add_value_string(entry, "rdma_qptype",
+ nvmf_qptype_str(e->tsas.rdma.qptype));
+ json_object_add_value_string(entry, "rdma_cms",
+ nvmf_cms_str(e->tsas.rdma.cms));
+ json_object_add_value_uint(entry, "rdma_pkey",
+ le16_to_cpu(e->tsas.rdma.pkey));
+ break;
+ case NVMF_TRTYPE_TCP:
+ json_object_add_value_string(entry, "sectype",
+ nvmf_sectype_str(e->tsas.tcp.sectype));
+ break;
+ }
+ json_array_add_value_object(entries, entry);
+ }
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_connect_msg(nvme_ctrl_t c)
+{
+ struct json_object *root;
+
+ root = json_create_object();
+ json_object_add_value_string(root, "device", nvme_ctrl_get_name(c));
+
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+static void json_output_object(struct json_object *root)
+{
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+void json_output_status(int status)
+{
+ struct json_object *root = json_create_object();
+ int val;
+ int type;
+
+ if (status < 0) {
+ json_object_add_value_string(root, "error", nvme_strerror(errno));
+ return json_output_object(root);
+ }
+
+ val = nvme_status_get_value(status);
+ type = nvme_status_get_type(status);
+
+ switch (type) {
+ case NVME_STATUS_TYPE_NVME:
+ json_object_add_value_string(root, "error", nvme_status_to_string(val, false));
+ json_object_add_value_string(root, "type", "nvme");
+ break;
+ case NVME_STATUS_TYPE_MI:
+ json_object_add_value_string(root, "error", nvme_mi_status_to_string(val));
+ json_object_add_value_string(root, "type", "nvme-mi");
+ break;
+ default:
+ json_object_add_value_string(root, "type", "unknow");
+ break;
+ }
+
+ json_object_add_value_int(root, "value", val);
+
+ json_output_object(root);
+}
diff --git a/nvme-print-json.h b/nvme-print-json.h
new file mode 100644
index 0000000..3641c80
--- /dev/null
+++ b/nvme-print-json.h
@@ -0,0 +1,148 @@
+#ifndef NVME_PRINT_JSON_H_
+#define NVME_PRINT_JSON_H_
+
+#include "nvme-print.h"
+
+#ifdef CONFIG_JSONC
+
+void json_simple_topology(nvme_root_t r);
+void json_print_list_items(nvme_root_t r,
+ enum nvme_print_flags flags);
+void json_sanitize_log(struct nvme_sanitize_log_page *sanitize_log,
+ const char *devname);
+
+void json_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries);
+void json_ana_log(struct nvme_ana_log *ana_log, const char *devname);
+void json_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
+ enum nvme_print_flags flags);
+void json_support_log(struct nvme_supported_log_pages *support_log);
+void json_endurance_log(struct nvme_endurance_group_log *endurance_group,
+ __u16 group_id);
+void json_effects_log_list(struct list_head *list);
+void json_changed_ns_list_log(struct nvme_ns_list *log,
+ const char *devname);
+void json_fw_log(struct nvme_firmware_slot *fw_log, const char *devname);
+void json_error_log(struct nvme_error_log_page *err_log, int entries);
+void json_nvme_resv_report(struct nvme_resv_status *status,
+ int bytes, bool eds);
+void json_nvme_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list);
+void json_id_domain_list(struct nvme_id_domain_list *id_dom);
+void json_nvme_id_uuid_list(const struct nvme_id_uuid_list *uuid_list);
+void json_nvme_id_ns_granularity_list(
+ const struct nvme_id_ns_granularity_list *glist);
+void json_nvme_list_secondary_ctrl(const struct nvme_secondary_ctrl_list *sc_list,
+ __u32 count);
+void json_nvme_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps);
+void json_nvme_id_nvmset(struct nvme_id_nvmset_list *nvmset);
+void json_nvme_list_ctrl(struct nvme_ctrl_list *ctrl_list, __u16 num);
+void json_nvme_zns_report_zones(void *report, __u32 descs,
+ __u8 ext_size, __u32 report_size,
+ struct json_object *zone_list);
+void json_nvme_list_ctrl(struct nvme_ctrl_list *ctrl_list, __u16 num);
+void json_nvme_list_ns(struct nvme_ns_list *ns_list);
+void json_nvme_zns_id_ns(struct nvme_zns_id_ns *ns,
+ struct nvme_id_ns *id_ns);
+void json_nvme_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl);
+void json_nvme_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns,
+ struct nvme_id_ns *ns, bool cap_only);
+void json_nvme_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm);
+void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl,
+ void (*vs)(__u8 *vs, struct json_object *root));
+void json_nvme_id_ns_descs(void *data);
+void json_nvme_cmd_set_independent_id_ns(
+ struct nvme_id_independent_id_ns *ns);
+void json_ctrl_registers(void *bar);
+void json_nvme_id_ns(struct nvme_id_ns *ns, bool cap_only);
+void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana);
+void json_supported_cap_config_log(
+ struct nvme_supported_cap_config_list_log *cap_log);
+void json_nvme_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len);
+void json_nvme_fdp_events(struct nvme_fdp_events_log *log);
+void json_nvme_fdp_stats(struct nvme_fdp_stats_log *log);
+void json_nvme_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len);
+void json_nvme_fdp_configs(struct nvme_fdp_config_log *log, size_t len);
+void json_media_unit_stat_log(struct nvme_media_unit_stat_log *mus);
+void json_boot_part_log(void *bp_log);
+void json_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log);
+void json_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log);
+void json_resv_notif_log(struct nvme_resv_notification_log *resv);
+void json_endurance_group_event_agg_log(
+ struct nvme_aggregate_predictable_lat_event *endurance_log,
+ __u64 log_entries);
+void json_lba_status_log(void *lba_status);
+void add_bitmap(int i, __u8 seb, struct json_object *root, int json_flag);
+void json_persistent_event_log(void *pevent_log_info, __u32 size);
+void json_predictable_latency_event_agg_log(
+ struct nvme_aggregate_predictable_lat_event *pea_log,
+ __u64 log_entries);
+void json_predictable_latency_per_nvmset(
+ struct nvme_nvmset_predictable_lat_log *plpns_log,
+ __u16 nvmset_id);
+void json_output_status(int status);
+
+/* fabrics.c */
+void json_discovery_log(struct nvmf_discovery_log *log, int numrec);
+void json_connect_msg(nvme_ctrl_t c);
+
+#else /* !CONFIG_JSONC */
+
+#define json_simple_topology(r)
+#define json_print_list_items(r, flags)
+#define json_sanitize_log(sanitize_log, devname)
+#define json_self_test_log(self_test, dst_entries)
+#define json_ana_log(ana_log, devname)
+#define json_smart_log(smart, nsid, flags)
+#define json_support_log(support_log)
+#define json_endurance_log(endurance_group, group_id)
+#define json_effects_log_list(list)
+#define json_changed_ns_list_log(log, devname)
+#define json_fw_log(fw_log, devname)
+#define json_error_log(err_log, entries)
+#define json_nvme_resv_report(status, bytes, eds)
+#define json_nvme_endurance_group_list(endgrp_list)
+#define json_id_domain_list(id_dom)
+#define json_nvme_id_uuid_list(uuid_list)
+#define json_nvme_id_ns_granularity_list(glist)
+#define json_nvme_list_secondary_ctrl(sc_list, count)
+#define json_nvme_primary_ctrl_cap(caps)
+#define json_nvme_id_nvmset(nvmset)
+#define json_nvme_list_ctrl(ctrl_list, num)
+#define json_nvme_zns_report_zones(report, descs, ext_size, report_size, zone_list)
+#define json_nvme_list_ctrl(ctrl_list, num)
+#define json_nvme_list_ns(ns_list)
+#define json_nvme_zns_id_ns(ns, id_ns)
+#define json_nvme_zns_id_ctrl(ctrl)
+#define json_nvme_nvm_id_ns(nvm_ns, ns, cap_only)
+#define json_nvme_id_ctrl_nvm(ctrl_nvm)
+#define json_nvme_id_ctrl(ctrl, vs)
+#define json_nvme_id_ns_descs(data)
+#define json_nvme_cmd_set_independent_id_ns(ns)
+#define json_ctrl_registers(bar)
+#define json_nvme_id_ns(ns, cap_only)
+#define json_print_nvme_subsystem_list(r, show_ana)
+#define json_supported_cap_config_log(cap_log)
+#define json_nvme_fdp_ruh_status(status, len)
+#define json_nvme_fdp_events(log)
+#define json_nvme_fdp_stats(log)
+#define json_nvme_fdp_usage(log, len)
+#define json_nvme_fdp_configs(log, len)
+#define json_media_unit_stat_log(mus)
+#define json_boot_part_log(bp_log)
+#define json_mi_cmd_support_effects_log(mi_cmd_log)
+#define json_fid_support_effects_log(fid_log)
+#define json_resv_notif_log(resv)
+#define json_endurance_group_event_agg_log(endurance_log, log_entries)
+#define json_lba_status_log(lba_status)
+#define add_bitmap(i, seb, root, json_flag)
+#define json_persistent_event_log(pevent_log_info, size)
+#define json_predictable_latency_event_agg_log(pea_log, log_entries)
+#define json_predictable_latency_per_nvmset(plpns_log, nvmset_id)
+#define json_output_status(status)
+
+/* fabrics.c */
+#define json_discovery_log(log, numrec)
+#define json_connect_msg(c)
+
+#endif /* !CONFIG_JSONC */
+
+#endif // NVME_PRINT_JSON_H_
diff --git a/nvme-print.c b/nvme-print.c
index cabce68..1174699 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -10,6 +10,7 @@
#include "nvme.h"
#include "libnvme.h"
#include "nvme-print.h"
+#include "nvme-print-json.h"
#include "nvme-models.h"
#include "util/suffix.h"
#include "util/types.h"
@@ -28,7 +29,7 @@ struct nvme_bar_cap {
__u8 rsvd_crms_nsss_cmbs_pmrs;
};
-static const char *nvme_ana_state_to_string(enum nvme_ana_state state)
+const char *nvme_ana_state_to_string(enum nvme_ana_state state)
{
switch (state) {
case NVME_ANA_STATE_OPTIMIZED:
@@ -101,7 +102,7 @@ const char *nvme_cmd_to_string(int admin, __u8 opcode)
return "Unknown";
}
-static const char *get_sanitize_log_sstat_status_str(__u16 status)
+const char *get_sanitize_log_sstat_status_str(__u16 status)
{
switch (status & NVME_SANITIZE_SSTAT_STATUS_MASK) {
case NVME_SANITIZE_SSTAT_STATUS_NEVER_SANITIZED:
@@ -119,834 +120,6 @@ static const char *get_sanitize_log_sstat_status_str(__u16 status)
}
}
-static void json_nvme_id_ns(struct nvme_id_ns *ns, bool cap_only)
-{
- char nguid_buf[2 * sizeof(ns->nguid) + 1],
- eui64_buf[2 * sizeof(ns->eui64) + 1];
- char *nguid = nguid_buf, *eui64 = eui64_buf;
- struct json_object *root;
- struct json_object *lbafs;
- int i;
-
- nvme_uint128_t nvmcap = le128_to_cpu(ns->nvmcap);
-
- root = json_create_object();
-
- if (!cap_only) {
- json_object_add_value_uint64(root, "nsze", le64_to_cpu(ns->nsze));
- json_object_add_value_uint64(root, "ncap", le64_to_cpu(ns->ncap));
- json_object_add_value_uint64(root, "nuse", le64_to_cpu(ns->nuse));
- json_object_add_value_int(root, "nsfeat", ns->nsfeat);
- }
- json_object_add_value_int(root, "nlbaf", ns->nlbaf);
- if (!cap_only)
- json_object_add_value_int(root, "flbas", ns->flbas);
- json_object_add_value_int(root, "mc", ns->mc);
- json_object_add_value_int(root, "dpc", ns->dpc);
- if (!cap_only) {
- json_object_add_value_int(root, "dps", ns->dps);
- json_object_add_value_int(root, "nmic", ns->nmic);
- json_object_add_value_int(root, "rescap", ns->rescap);
- json_object_add_value_int(root, "fpi", ns->fpi);
- json_object_add_value_int(root, "dlfeat", ns->dlfeat);
- json_object_add_value_int(root, "nawun", le16_to_cpu(ns->nawun));
- json_object_add_value_int(root, "nawupf", le16_to_cpu(ns->nawupf));
- json_object_add_value_int(root, "nacwu", le16_to_cpu(ns->nacwu));
- json_object_add_value_int(root, "nabsn", le16_to_cpu(ns->nabsn));
- json_object_add_value_int(root, "nabo", le16_to_cpu(ns->nabo));
- json_object_add_value_int(root, "nabspf", le16_to_cpu(ns->nabspf));
- json_object_add_value_int(root, "noiob", le16_to_cpu(ns->noiob));
- json_object_add_value_uint128(root, "nvmcap", nvmcap);
- json_object_add_value_int(root, "nsattr", ns->nsattr);
- json_object_add_value_int(root, "nvmsetid", le16_to_cpu(ns->nvmsetid));
-
- if (ns->nsfeat & 0x10) {
- json_object_add_value_int(root, "npwg", le16_to_cpu(ns->npwg));
- json_object_add_value_int(root, "npwa", le16_to_cpu(ns->npwa));
- json_object_add_value_int(root, "npdg", le16_to_cpu(ns->npdg));
- json_object_add_value_int(root, "npda", le16_to_cpu(ns->npda));
- json_object_add_value_int(root, "nows", le16_to_cpu(ns->nows));
- }
-
- json_object_add_value_int(root, "mssrl", le16_to_cpu(ns->mssrl));
- json_object_add_value_uint(root, "mcl", le32_to_cpu(ns->mcl));
- json_object_add_value_int(root, "msrc", ns->msrc);
- }
- json_object_add_value_int(root, "nulbaf", ns->nulbaf);
-
- if (!cap_only) {
- json_object_add_value_uint(root, "anagrpid", le32_to_cpu(ns->anagrpid));
- json_object_add_value_int(root, "endgid", le16_to_cpu(ns->endgid));
-
- memset(eui64, 0, sizeof(eui64_buf));
- for (i = 0; i < sizeof(ns->eui64); i++)
- eui64 += sprintf(eui64, "%02x", ns->eui64[i]);
-
- memset(nguid, 0, sizeof(nguid_buf));
- for (i = 0; i < sizeof(ns->nguid); i++)
- nguid += sprintf(nguid, "%02x", ns->nguid[i]);
-
- json_object_add_value_string(root, "eui64", eui64_buf);
- json_object_add_value_string(root, "nguid", nguid_buf);
- }
-
- lbafs = json_create_array();
- json_object_add_value_array(root, "lbafs", lbafs);
-
- for (i = 0; i <= ns->nlbaf; i++) {
- struct json_object *lbaf = json_create_object();
-
- json_object_add_value_int(lbaf, "ms",
- le16_to_cpu(ns->lbaf[i].ms));
- json_object_add_value_int(lbaf, "ds", ns->lbaf[i].ds);
- json_object_add_value_int(lbaf, "rp", ns->lbaf[i].rp);
-
- json_array_add_value_object(lbafs, lbaf);
- }
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl,
- void (*vs)(__u8 *vs, struct json_object *root))
-{
- struct json_object *root;
- struct json_object *psds;
-
- nvme_uint128_t tnvmcap = le128_to_cpu(ctrl->tnvmcap);
- nvme_uint128_t unvmcap = le128_to_cpu(ctrl->unvmcap);
- nvme_uint128_t megcap = le128_to_cpu(ctrl->megcap);
- nvme_uint128_t maxdna = le128_to_cpu(ctrl->maxdna);
-
- char sn[sizeof(ctrl->sn) + 1], mn[sizeof(ctrl->mn) + 1],
- fr[sizeof(ctrl->fr) + 1], subnqn[sizeof(ctrl->subnqn) + 1];
- __u32 ieee = ctrl->ieee[2] << 16 | ctrl->ieee[1] << 8 | ctrl->ieee[0];
-
- int i;
-
- snprintf(sn, sizeof(sn), "%-.*s", (int)sizeof(ctrl->sn), ctrl->sn);
- snprintf(mn, sizeof(mn), "%-.*s", (int)sizeof(ctrl->mn), ctrl->mn);
- snprintf(fr, sizeof(fr), "%-.*s", (int)sizeof(ctrl->fr), ctrl->fr);
- snprintf(subnqn, sizeof(subnqn), "%-.*s", (int)sizeof(ctrl->subnqn), ctrl->subnqn);
-
- root = json_create_object();
-
- json_object_add_value_int(root, "vid", le16_to_cpu(ctrl->vid));
- json_object_add_value_int(root, "ssvid", le16_to_cpu(ctrl->ssvid));
- json_object_add_value_string(root, "sn", sn);
- json_object_add_value_string(root, "mn", mn);
- json_object_add_value_string(root, "fr", fr);
- json_object_add_value_int(root, "rab", ctrl->rab);
- json_object_add_value_int(root, "ieee", ieee);
- json_object_add_value_int(root, "cmic", ctrl->cmic);
- json_object_add_value_int(root, "mdts", ctrl->mdts);
- json_object_add_value_int(root, "cntlid", le16_to_cpu(ctrl->cntlid));
- json_object_add_value_uint(root, "ver", le32_to_cpu(ctrl->ver));
- json_object_add_value_uint(root, "rtd3r", le32_to_cpu(ctrl->rtd3r));
- json_object_add_value_uint(root, "rtd3e", le32_to_cpu(ctrl->rtd3e));
- json_object_add_value_uint(root, "oaes", le32_to_cpu(ctrl->oaes));
- json_object_add_value_uint(root, "ctratt", le32_to_cpu(ctrl->ctratt));
- json_object_add_value_int(root, "rrls", le16_to_cpu(ctrl->rrls));
- json_object_add_value_int(root, "cntrltype", ctrl->cntrltype);
- json_object_add_value_string(root, "fguid", util_uuid_to_string(ctrl->fguid));
- json_object_add_value_int(root, "crdt1", le16_to_cpu(ctrl->crdt1));
- json_object_add_value_int(root, "crdt2", le16_to_cpu(ctrl->crdt2));
- json_object_add_value_int(root, "crdt3", le16_to_cpu(ctrl->crdt3));
- json_object_add_value_int(root, "nvmsr", ctrl->nvmsr);
- json_object_add_value_int(root, "vwci", ctrl->vwci);
- json_object_add_value_int(root, "mec", ctrl->mec);
- json_object_add_value_int(root, "oacs", le16_to_cpu(ctrl->oacs));
- json_object_add_value_int(root, "acl", ctrl->acl);
- json_object_add_value_int(root, "aerl", ctrl->aerl);
- json_object_add_value_int(root, "frmw", ctrl->frmw);
- json_object_add_value_int(root, "lpa", ctrl->lpa);
- json_object_add_value_int(root, "elpe", ctrl->elpe);
- json_object_add_value_int(root, "npss", ctrl->npss);
- json_object_add_value_int(root, "avscc", ctrl->avscc);
- json_object_add_value_int(root, "apsta", ctrl->apsta);
- json_object_add_value_int(root, "wctemp", le16_to_cpu(ctrl->wctemp));
- json_object_add_value_int(root, "cctemp", le16_to_cpu(ctrl->cctemp));
- json_object_add_value_int(root, "mtfa", le16_to_cpu(ctrl->mtfa));
- json_object_add_value_uint(root, "hmpre", le32_to_cpu(ctrl->hmpre));
- json_object_add_value_uint(root, "hmmin", le32_to_cpu(ctrl->hmmin));
- json_object_add_value_uint128(root, "tnvmcap", tnvmcap);
- json_object_add_value_uint128(root, "unvmcap", unvmcap);
- json_object_add_value_uint(root, "rpmbs", le32_to_cpu(ctrl->rpmbs));
- json_object_add_value_int(root, "edstt", le16_to_cpu(ctrl->edstt));
- json_object_add_value_int(root, "dsto", ctrl->dsto);
- json_object_add_value_int(root, "fwug", ctrl->fwug);
- json_object_add_value_int(root, "kas", le16_to_cpu(ctrl->kas));
- json_object_add_value_int(root, "hctma", le16_to_cpu(ctrl->hctma));
- json_object_add_value_int(root, "mntmt", le16_to_cpu(ctrl->mntmt));
- json_object_add_value_int(root, "mxtmt", le16_to_cpu(ctrl->mxtmt));
- json_object_add_value_uint(root, "sanicap", le32_to_cpu(ctrl->sanicap));
- json_object_add_value_uint(root, "hmminds", le32_to_cpu(ctrl->hmminds));
- json_object_add_value_int(root, "hmmaxd", le16_to_cpu(ctrl->hmmaxd));
- json_object_add_value_int(root, "nsetidmax",
- le16_to_cpu(ctrl->nsetidmax));
- json_object_add_value_int(root, "endgidmax", le16_to_cpu(ctrl->endgidmax));
- json_object_add_value_int(root, "anatt",ctrl->anatt);
- json_object_add_value_int(root, "anacap", ctrl->anacap);
- json_object_add_value_uint(root, "anagrpmax",
- le32_to_cpu(ctrl->anagrpmax));
- json_object_add_value_uint(root, "nanagrpid",
- le32_to_cpu(ctrl->nanagrpid));
- json_object_add_value_uint(root, "pels", le32_to_cpu(ctrl->pels));
- json_object_add_value_int(root, "domainid", le16_to_cpu(ctrl->domainid));
- json_object_add_value_uint128(root, "megcap", megcap);
- json_object_add_value_int(root, "sqes", ctrl->sqes);
- json_object_add_value_int(root, "cqes", ctrl->cqes);
- json_object_add_value_int(root, "maxcmd", le16_to_cpu(ctrl->maxcmd));
- json_object_add_value_uint(root, "nn", le32_to_cpu(ctrl->nn));
- json_object_add_value_int(root, "oncs", le16_to_cpu(ctrl->oncs));
- json_object_add_value_int(root, "fuses", le16_to_cpu(ctrl->fuses));
- json_object_add_value_int(root, "fna", ctrl->fna);
- json_object_add_value_int(root, "vwc", ctrl->vwc);
- json_object_add_value_int(root, "awun", le16_to_cpu(ctrl->awun));
- json_object_add_value_int(root, "awupf", le16_to_cpu(ctrl->awupf));
- json_object_add_value_int(root, "icsvscc", ctrl->icsvscc);
- json_object_add_value_int(root, "nwpc", ctrl->nwpc);
- json_object_add_value_int(root, "acwu", le16_to_cpu(ctrl->acwu));
- json_object_add_value_int(root, "ocfs", le16_to_cpu(ctrl->ocfs));
- json_object_add_value_uint(root, "sgls", le32_to_cpu(ctrl->sgls));
- json_object_add_value_uint(root, "mnan", le32_to_cpu(ctrl->mnan));
- json_object_add_value_uint128(root, "maxdna", maxdna);
- json_object_add_value_uint(root, "maxcna", le32_to_cpu(ctrl->maxcna));
-
- if (strlen(subnqn))
- json_object_add_value_string(root, "subnqn", subnqn);
-
- json_object_add_value_uint(root, "ioccsz", le32_to_cpu(ctrl->ioccsz));
- json_object_add_value_uint(root, "iorcsz", le32_to_cpu(ctrl->iorcsz));
- json_object_add_value_int(root, "icdoff", le16_to_cpu(ctrl->icdoff));
- json_object_add_value_int(root, "fcatt", ctrl->fcatt);
- json_object_add_value_int(root, "msdbd", ctrl->msdbd);
- json_object_add_value_int(root, "ofcs", le16_to_cpu(ctrl->ofcs));
-
- psds = json_create_array();
- json_object_add_value_array(root, "psds", psds);
-
- for (i = 0; i <= ctrl->npss; i++) {
- struct json_object *psd = json_create_object();
-
- json_object_add_value_int(psd, "max_power",
- le16_to_cpu(ctrl->psd[i].mp));
- json_object_add_value_int(psd, "flags", ctrl->psd[i].flags);
- json_object_add_value_uint(psd, "entry_lat",
- le32_to_cpu(ctrl->psd[i].enlat));
- json_object_add_value_uint(psd, "exit_lat",
- le32_to_cpu(ctrl->psd[i].exlat));
- json_object_add_value_int(psd, "read_tput",
- ctrl->psd[i].rrt);
- json_object_add_value_int(psd, "read_lat",
- ctrl->psd[i].rrl);
- json_object_add_value_int(psd, "write_tput",
- ctrl->psd[i].rwt);
- json_object_add_value_int(psd, "write_lat",
- ctrl->psd[i].rwl);
- json_object_add_value_int(psd, "idle_power",
- le16_to_cpu(ctrl->psd[i].idlp));
- json_object_add_value_int(psd, "idle_scale",
- nvme_psd_power_scale(ctrl->psd[i].ips));
- json_object_add_value_int(psd, "active_power",
- le16_to_cpu(ctrl->psd[i].actp));
- json_object_add_value_int(psd, "active_power_work",
- ctrl->psd[i].apws & 0x7);
- json_object_add_value_int(psd, "active_scale",
- nvme_psd_power_scale(ctrl->psd[i].apws));
-
- json_array_add_value_object(psds, psd);
- }
-
- if(vs)
- vs(ctrl->vs, root);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_error_log(struct nvme_error_log_page *err_log, int entries)
-{
- struct json_object *root;
- struct json_object *errors;
- int i;
-
- root = json_create_object();
- errors = json_create_array();
- json_object_add_value_array(root, "errors", errors);
-
- for (i = 0; i < entries; i++) {
- struct json_object *error = json_create_object();
-
- json_object_add_value_uint64(error, "error_count",
- le64_to_cpu(err_log[i].error_count));
- json_object_add_value_int(error, "sqid",
- le16_to_cpu(err_log[i].sqid));
- json_object_add_value_int(error, "cmdid",
- le16_to_cpu(err_log[i].cmdid));
- json_object_add_value_int(error, "status_field",
- le16_to_cpu(err_log[i].status_field >> 0x1));
- json_object_add_value_int(error, "phase_tag",
- le16_to_cpu(err_log[i].status_field & 0x1));
- json_object_add_value_int(error, "parm_error_location",
- le16_to_cpu(err_log[i].parm_error_location));
- json_object_add_value_uint64(error, "lba",
- le64_to_cpu(err_log[i].lba));
- json_object_add_value_uint(error, "nsid",
- le32_to_cpu(err_log[i].nsid));
- json_object_add_value_int(error, "vs", err_log[i].vs);
- json_object_add_value_int(error, "trtype", err_log[i].trtype);
- json_object_add_value_uint64(error, "cs",
- le64_to_cpu(err_log[i].cs));
- json_object_add_value_int(error, "trtype_spec_info",
- le16_to_cpu(err_log[i].trtype_spec_info));
-
- json_array_add_value_object(errors, error);
- }
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_nvme_resv_report(struct nvme_resv_status *status,
- int bytes, bool eds)
-{
- struct json_object *root;
- struct json_object *rcs;
- int i, j, regctl, entries;
-
- regctl = status->regctl[0] | (status->regctl[1] << 8);
-
- root = json_create_object();
-
- json_object_add_value_uint(root, "gen", le32_to_cpu(status->gen));
- json_object_add_value_int(root, "rtype", status->rtype);
- json_object_add_value_int(root, "regctl", regctl);
- json_object_add_value_int(root, "ptpls", status->ptpls);
-
- rcs = json_create_array();
- /* check Extended Data Structure bit */
- if (!eds) {
- /*
- * if status buffer was too small, don't loop past the end of
- * the buffer
- */
- entries = (bytes - 24) / 24;
- if (entries < regctl)
- regctl = entries;
-
- json_object_add_value_array(root, "regctls", rcs);
- for (i = 0; i < regctl; i++) {
- struct json_object *rc = json_create_object();
-
- json_object_add_value_int(rc, "cntlid",
- le16_to_cpu(status->regctl_ds[i].cntlid));
- json_object_add_value_int(rc, "rcsts",
- status->regctl_ds[i].rcsts);
- json_object_add_value_uint64(rc, "hostid",
- le64_to_cpu(status->regctl_ds[i].hostid));
- json_object_add_value_uint64(rc, "rkey",
- le64_to_cpu(status->regctl_ds[i].rkey));
-
- json_array_add_value_object(rcs, rc);
- }
- } else {
- char hostid[33];
-
- /* if status buffer was too small, don't loop past the end of the buffer */
- entries = (bytes - 64) / 64;
- if (entries < regctl)
- regctl = entries;
-
- json_object_add_value_array(root, "regctlext", rcs);
- for (i = 0; i < regctl; i++) {
- struct json_object *rc = json_create_object();
-
- json_object_add_value_int(rc, "cntlid",
- le16_to_cpu(status->regctl_eds[i].cntlid));
- json_object_add_value_int(rc, "rcsts",
- status->regctl_eds[i].rcsts);
- json_object_add_value_uint64(rc, "rkey",
- le64_to_cpu(status->regctl_eds[i].rkey));
- for (j = 0; j < 16; j++)
- sprintf(hostid + j * 2, "%02x",
- status->regctl_eds[i].hostid[j]);
-
- json_object_add_value_string(rc, "hostid", hostid);
- json_array_add_value_object(rcs, rc);
- }
- }
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_fw_log(struct nvme_firmware_slot *fw_log, const char *devname)
-{
- struct json_object *root;
- struct json_object *fwsi;
- char fmt[21];
- char str[32];
- int i;
- __le64 *frs;
-
- root = json_create_object();
- fwsi = json_create_object();
-
- json_object_add_value_int(fwsi, "Active Firmware Slot (afi)",
- fw_log->afi);
- for (i = 0; i < 7; i++) {
- if (fw_log->frs[i][0]) {
- snprintf(fmt, sizeof(fmt), "Firmware Rev Slot %d",
- i + 1);
- frs = (__le64 *)&fw_log->frs[i];
- snprintf(str, sizeof(str), "%"PRIu64" (%s)",
- le64_to_cpu(*frs),
- util_fw_to_string(fw_log->frs[i]));
- json_object_add_value_string(fwsi, fmt, str);
- }
- }
- json_object_add_value_object(root, devname, fwsi);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_changed_ns_list_log(struct nvme_ns_list *log,
- const char *devname)
-{
- struct json_object *root;
- struct json_object *nsi;
- char fmt[32];
- char str[32];
- __u32 nsid;
- int i;
-
- if (log->ns[0] == cpu_to_le32(0xffffffff))
- return;
-
- root = json_create_object();
- nsi = json_create_object();
-
- json_object_add_value_string(root, "Changed Namespace List Log",
- devname);
-
- for (i = 0; i < NVME_ID_NS_LIST_MAX; i++) {
- nsid = le32_to_cpu(log->ns[i]);
-
- if (nsid == 0)
- break;
-
- snprintf(fmt, sizeof(fmt), "[%4u]", i + 1);
- snprintf(str, sizeof(str), "%#x", nsid);
- json_object_add_value_string(nsi, fmt, str);
- }
-
- json_object_add_value_object(root, devname, nsi);
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
-static void json_endurance_log(struct nvme_endurance_group_log *endurance_group,
- __u16 group_id)
-{
- struct json_object *root;
-
- nvme_uint128_t endurance_estimate =
- le128_to_cpu(endurance_group->endurance_estimate);
- nvme_uint128_t data_units_read =
- le128_to_cpu(endurance_group->data_units_read);
- nvme_uint128_t data_units_written =
- le128_to_cpu(endurance_group->data_units_written);
- nvme_uint128_t media_units_written =
- le128_to_cpu(endurance_group->media_units_written);
- nvme_uint128_t host_read_cmds =
- le128_to_cpu(endurance_group->host_read_cmds);
- nvme_uint128_t host_write_cmds =
- le128_to_cpu(endurance_group->host_write_cmds);
- nvme_uint128_t media_data_integrity_err =
- le128_to_cpu(endurance_group->media_data_integrity_err);
- nvme_uint128_t num_err_info_log_entries =
- le128_to_cpu(endurance_group->num_err_info_log_entries);
-
- root = json_create_object();
-
- json_object_add_value_int(root, "critical_warning",
- endurance_group->critical_warning);
- json_object_add_value_int(root, "avl_spare",
- endurance_group->avl_spare);
- json_object_add_value_int(root, "avl_spare_threshold",
- endurance_group->avl_spare_threshold);
- json_object_add_value_int(root, "percent_used",
- endurance_group->percent_used);
- json_object_add_value_uint128(root, "endurance_estimate",
- endurance_estimate);
- json_object_add_value_uint128(root, "data_units_read", data_units_read);
- json_object_add_value_uint128(root, "data_units_written",
- data_units_written);
- json_object_add_value_uint128(root, "media_units_written",
- media_units_written);
- json_object_add_value_uint128(root, "host_read_cmds", host_read_cmds);
- json_object_add_value_uint128(root, "host_write_cmds", host_write_cmds);
- json_object_add_value_uint128(root, "media_data_integrity_err",
- media_data_integrity_err);
- json_object_add_value_uint128(root, "num_err_info_log_entries",
- num_err_info_log_entries);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
- enum nvme_print_flags flags)
-{
- int c, human = flags & VERBOSE;
- struct json_object *root;
- char key[21];
-
- unsigned int temperature = ((smart->temperature[1] << 8) |
- smart->temperature[0]);
-
- nvme_uint128_t data_units_read = le128_to_cpu(smart->data_units_read);
- nvme_uint128_t data_units_written = le128_to_cpu(smart->data_units_written);
- nvme_uint128_t host_read_commands = le128_to_cpu(smart->host_reads);
- nvme_uint128_t host_write_commands = le128_to_cpu(smart->host_writes);
- nvme_uint128_t controller_busy_time = le128_to_cpu(smart->ctrl_busy_time);
- nvme_uint128_t power_cycles = le128_to_cpu(smart->power_cycles);
- nvme_uint128_t power_on_hours = le128_to_cpu(smart->power_on_hours);
- nvme_uint128_t unsafe_shutdowns = le128_to_cpu(smart->unsafe_shutdowns);
- nvme_uint128_t media_errors = le128_to_cpu(smart->media_errors);
- nvme_uint128_t num_err_log_entries = le128_to_cpu(smart->num_err_log_entries);
-
- root = json_create_object();
-
- if (human) {
- struct json_object *crt = json_create_object();
-
- json_object_add_value_int(crt, "value", smart->critical_warning);
- json_object_add_value_int(crt, "available_spare", smart->critical_warning & 0x01);
- json_object_add_value_int(crt, "temp_threshold", (smart->critical_warning & 0x02) >> 1);
- json_object_add_value_int(crt, "reliability_degraded", (smart->critical_warning & 0x04) >> 2);
- json_object_add_value_int(crt, "ro", (smart->critical_warning & 0x08) >> 3);
- json_object_add_value_int(crt, "vmbu_failed", (smart->critical_warning & 0x10) >> 4);
- json_object_add_value_int(crt, "pmr_ro", (smart->critical_warning & 0x20) >> 5);
-
- json_object_add_value_object(root, "critical_warning", crt);
- } else
- json_object_add_value_int(root, "critical_warning",
- smart->critical_warning);
-
- json_object_add_value_int(root, "temperature", temperature);
- json_object_add_value_int(root, "avail_spare", smart->avail_spare);
- json_object_add_value_int(root, "spare_thresh", smart->spare_thresh);
- json_object_add_value_int(root, "percent_used", smart->percent_used);
- json_object_add_value_int(root, "endurance_grp_critical_warning_summary",
- smart->endu_grp_crit_warn_sumry);
- json_object_add_value_uint128(root, "data_units_read", data_units_read);
- json_object_add_value_uint128(root, "data_units_written",
- data_units_written);
- json_object_add_value_uint128(root, "host_read_commands",
- host_read_commands);
- json_object_add_value_uint128(root, "host_write_commands",
- host_write_commands);
- json_object_add_value_uint128(root, "controller_busy_time",
- controller_busy_time);
- json_object_add_value_uint128(root, "power_cycles", power_cycles);
- json_object_add_value_uint128(root, "power_on_hours", power_on_hours);
- json_object_add_value_uint128(root, "unsafe_shutdowns", unsafe_shutdowns);
- json_object_add_value_uint128(root, "media_errors", media_errors);
- json_object_add_value_uint128(root, "num_err_log_entries",
- num_err_log_entries);
- json_object_add_value_uint(root, "warning_temp_time",
- le32_to_cpu(smart->warning_temp_time));
- json_object_add_value_uint(root, "critical_comp_time",
- le32_to_cpu(smart->critical_comp_time));
-
- for (c=0; c < 8; c++) {
- __s32 temp = le16_to_cpu(smart->temp_sensor[c]);
-
- if (temp == 0)
- continue;
- sprintf(key, "temperature_sensor_%d",c+1);
- json_object_add_value_int(root, key, temp);
- }
-
- json_object_add_value_uint(root, "thm_temp1_trans_count",
- le32_to_cpu(smart->thm_temp1_trans_count));
- json_object_add_value_uint(root, "thm_temp2_trans_count",
- le32_to_cpu(smart->thm_temp2_trans_count));
- json_object_add_value_uint(root, "thm_temp1_total_time",
- le32_to_cpu(smart->thm_temp1_total_time));
- json_object_add_value_uint(root, "thm_temp2_total_time",
- le32_to_cpu(smart->thm_temp2_total_time));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_ana_log(struct nvme_ana_log *ana_log, const char *devname)
-{
- int offset = sizeof(struct nvme_ana_log);
- struct nvme_ana_log *hdr = ana_log;
- struct nvme_ana_group_desc *ana_desc;
- struct json_object *desc_list;
- struct json_object *ns_list;
- struct json_object *desc;
- struct json_object *nsid;
- struct json_object *root;
- size_t nsid_buf_size;
- void *base = ana_log;
- __u32 nr_nsids;
- int i, j;
-
- root = json_create_object();
- json_object_add_value_string(root,
- "Asymmetric Namespace Access Log for NVMe device",
- devname);
- json_object_add_value_uint64(root, "chgcnt",
- le64_to_cpu(hdr->chgcnt));
- json_object_add_value_uint(root, "ngrps", le16_to_cpu(hdr->ngrps));
-
- desc_list = json_create_array();
- for (i = 0; i < le16_to_cpu(ana_log->ngrps); i++) {
- desc = json_create_object();
- ana_desc = base + offset;
- nr_nsids = le32_to_cpu(ana_desc->nnsids);
- nsid_buf_size = nr_nsids * sizeof(__le32);
-
- offset += sizeof(*ana_desc);
- json_object_add_value_uint(desc, "grpid",
- le32_to_cpu(ana_desc->grpid));
- json_object_add_value_uint(desc, "nnsids",
- le32_to_cpu(ana_desc->nnsids));
- json_object_add_value_uint(desc, "chgcnt",
- le64_to_cpu(ana_desc->chgcnt));
- json_object_add_value_string(desc, "state",
- nvme_ana_state_to_string(ana_desc->state));
-
- ns_list = json_create_array();
- for (j = 0; j < le32_to_cpu(ana_desc->nnsids); j++) {
- nsid = json_create_object();
- json_object_add_value_uint(nsid, "nsid",
- le32_to_cpu(ana_desc->nsids[j]));
- json_array_add_value_object(ns_list, nsid);
- }
- json_object_add_value_array(desc, "NSIDS", ns_list);
- offset += nsid_buf_size;
- json_array_add_value_object(desc_list, desc);
- }
-
- json_object_add_value_array(root, "ANA DESC LIST ", desc_list);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries)
-{
- struct json_object *valid_attrs;
- struct json_object *root;
- struct json_object *valid;
- int i;
- __u32 num_entries;
-
- root = json_create_object();
- json_object_add_value_int(root, "Current Device Self-Test Operation",
- self_test->current_operation);
- json_object_add_value_int(root, "Current Device Self-Test Completion",
- self_test->completion);
- valid = json_create_array();
-
- num_entries = min(dst_entries, NVME_LOG_ST_MAX_RESULTS);
- for (i = 0; i < num_entries; i++) {
- valid_attrs = json_create_object();
- json_object_add_value_int(valid_attrs, "Self test result",
- self_test->result[i].dsts & 0xf);
- if ((self_test->result[i].dsts & 0xf) == 0xf)
- goto add;
- json_object_add_value_int(valid_attrs, "Self test code",
- self_test->result[i].dsts >> 4);
- json_object_add_value_int(valid_attrs, "Segment number",
- self_test->result[i].seg);
- json_object_add_value_int(valid_attrs, "Valid Diagnostic Information",
- self_test->result[i].vdi);
- json_object_add_value_uint64(valid_attrs, "Power on hours",
- le64_to_cpu(self_test->result[i].poh));
- if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_NSID)
- json_object_add_value_uint(valid_attrs, "Namespace Identifier",
- le32_to_cpu(self_test->result[i].nsid));
- if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_FLBA) {
- json_object_add_value_uint64(valid_attrs, "Failing LBA",
- le64_to_cpu(self_test->result[i].flba));
- }
- if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_SCT)
- json_object_add_value_int(valid_attrs, "Status Code Type",
- self_test->result[i].sct);
- if (self_test->result[i].vdi & NVME_ST_VALID_DIAG_INFO_SC)
- json_object_add_value_int(valid_attrs, "Status Code",
- self_test->result[i].sc);
- json_object_add_value_int(valid_attrs, "Vendor Specific",
- (self_test->result[i].vs[1] << 8) |
- (self_test->result[i].vs[0]));
-add:
- json_array_add_value_object(valid, valid_attrs);
- }
- json_object_add_value_array(root, "List of Valid Reports", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-struct json_object* json_effects_log(enum nvme_csi csi,
- struct nvme_cmd_effects_log *effects_log)
-{
- struct json_object *root;
- struct json_object *acs;
- struct json_object *iocs;
- unsigned int opcode;
- char key[128];
- __u32 effect;
-
- root = json_create_object();
- json_object_add_value_uint(root, "command_set_identifier", csi);
-
- acs = json_create_object();
- for (opcode = 0; opcode < 256; opcode++) {
- effect = le32_to_cpu(effects_log->acs[opcode]);
- if (effect & NVME_CMD_EFFECTS_CSUPP) {
- sprintf(key, "ACS_%u (%s)", opcode,
- nvme_cmd_to_string(1, opcode));
- json_object_add_value_uint(acs, key, effect);
- }
- }
-
- json_object_add_value_object(root, "admin_cmd_set", acs);
-
- iocs = json_create_object();
- for (opcode = 0; opcode < 256; opcode++) {
- effect = le32_to_cpu(effects_log->iocs[opcode]);
- if (effect & NVME_CMD_EFFECTS_CSUPP) {
- sprintf(key, "IOCS_%u (%s)", opcode,
- nvme_cmd_to_string(0, opcode));
- json_object_add_value_uint(iocs, key, effect);
- }
- }
-
- json_object_add_value_object(root, "io_cmd_set", iocs);
- return root;
-}
-
-void json_effects_log_list(struct list_head *list) {
- struct json_object *json_list;
- nvme_effects_log_node_t *node;
-
- json_list = json_create_array();
-
- list_for_each(list, node, node) {
- struct json_object *json_page =
- json_effects_log(node->csi, &node->effects);
- json_array_add_value_object(json_list, json_page);
- }
-
- json_print_object(json_list, NULL);
- printf("\n");
- json_free_object(json_list);
-}
-
-static void json_sanitize_log(struct nvme_sanitize_log_page *sanitize_log,
- const char *devname)
-{
- struct json_object *root;
- struct json_object *dev;
- struct json_object *sstat;
- const char *status_str;
- char str[128];
- __u16 status = le16_to_cpu(sanitize_log->sstat);
-
- root = json_create_object();
- dev = json_create_object();
- sstat = json_create_object();
-
- json_object_add_value_int(dev, "sprog",
- le16_to_cpu(sanitize_log->sprog));
- json_object_add_value_int(sstat, "global_erased",
- (status & NVME_SANITIZE_SSTAT_GLOBAL_DATA_ERASED) >> 8);
- json_object_add_value_int(sstat, "no_cmplted_passes",
- (status >> NVME_SANITIZE_SSTAT_COMPLETED_PASSES_SHIFT) &
- NVME_SANITIZE_SSTAT_COMPLETED_PASSES_MASK);
-
- status_str = get_sanitize_log_sstat_status_str(status);
- sprintf(str, "(%d) %s", status & NVME_SANITIZE_SSTAT_STATUS_MASK,
- status_str);
- json_object_add_value_string(sstat, "status", str);
-
- json_object_add_value_object(dev, "sstat", sstat);
- json_object_add_value_uint(dev, "cdw10_info",
- le32_to_cpu(sanitize_log->scdw10));
- json_object_add_value_uint(dev, "time_over_write",
- le32_to_cpu(sanitize_log->eto));
- json_object_add_value_uint(dev, "time_block_erase",
- le32_to_cpu(sanitize_log->etbe));
- json_object_add_value_uint(dev, "time_crypto_erase",
- le32_to_cpu(sanitize_log->etce));
-
- json_object_add_value_uint(dev, "time_over_write_no_dealloc",
- le32_to_cpu(sanitize_log->etond));
- json_object_add_value_uint(dev, "time_block_erase_no_dealloc",
- le32_to_cpu(sanitize_log->etbend));
- json_object_add_value_uint(dev, "time_crypto_erase_no_dealloc",
- le32_to_cpu(sanitize_log->etcend));
-
- json_object_add_value_object(root, devname, dev);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_predictable_latency_per_nvmset(
- struct nvme_nvmset_predictable_lat_log *plpns_log,
- __u16 nvmset_id)
-{
- struct json_object *root;
-
- root = json_create_object();
- json_object_add_value_uint(root, "nvmset_id",
- le16_to_cpu(nvmset_id));
- json_object_add_value_uint(root, "status",
- plpns_log->status);
- json_object_add_value_uint(root, "event_type",
- le16_to_cpu(plpns_log->event_type));
- json_object_add_value_uint64(root, "dtwin_reads_typical",
- le64_to_cpu(plpns_log->dtwin_rt));
- json_object_add_value_uint64(root, "dtwin_writes_typical",
- le64_to_cpu(plpns_log->dtwin_wt));
- json_object_add_value_uint64(root, "dtwin_time_maximum",
- le64_to_cpu(plpns_log->dtwin_tmax));
- json_object_add_value_uint64(root, "ndwin_time_minimum_high",
- le64_to_cpu(plpns_log->ndwin_tmin_hi));
- json_object_add_value_uint64(root, "ndwin_time_minimum_low",
- le64_to_cpu(plpns_log->ndwin_tmin_lo));
- json_object_add_value_uint64(root, "dtwin_reads_estimate",
- le64_to_cpu(plpns_log->dtwin_re));
- json_object_add_value_uint64(root, "dtwin_writes_estimate",
- le64_to_cpu(plpns_log->dtwin_we));
- json_object_add_value_uint64(root, "dtwin_time_estimate",
- le64_to_cpu(plpns_log->dtwin_te));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_predictable_latency_per_nvmset(
struct nvme_nvmset_predictable_lat_log *plpns_log,
__u16 nvmset_id, const char *devname,
@@ -984,35 +157,6 @@ void nvme_show_predictable_latency_per_nvmset(
le64_to_cpu(plpns_log->dtwin_te));
}
-static void json_predictable_latency_event_agg_log(
- struct nvme_aggregate_predictable_lat_event *pea_log,
- __u64 log_entries)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
- __u64 num_iter;
- __u64 num_entries;
-
- root = json_create_object();
- num_entries = le64_to_cpu(pea_log->num_entries);
- json_object_add_value_uint64(root, "num_entries_avail",
- num_entries);
- valid = json_create_array();
-
- num_iter = min(num_entries, log_entries);
- for (int i = 0; i < num_iter; i++) {
- valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "entry",
- le16_to_cpu(pea_log->entries[i]));
- json_array_add_value_object(valid, valid_attrs);
- }
- json_object_add_value_array(root, "list_of_entries", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_predictable_latency_event_agg_log(
struct nvme_aggregate_predictable_lat_event *pea_log,
__u64 log_entries, __u32 size, const char *devname,
@@ -1091,356 +235,6 @@ static const char *nvme_show_nss_hw_error(__u16 error_code)
}
}
-static void add_bitmap(int i, __u8 seb, struct json_object *root, int json_flag)
-{
- char evt_str[50];
- char key[128];
-
- for (int bit = 0; bit < 8; bit++) {
- if (nvme_pel_event_to_string(bit + i * 8)) {
- if (json_flag == 1) {
- sprintf(key, "bitmap_%x", (bit + i * 8));
- if ((seb >> bit) & 0x1)
- snprintf(evt_str, sizeof(evt_str), "Support %s",
- nvme_pel_event_to_string(bit + i * 8));
- json_object_add_value_string(root, key, evt_str);
- } else {
- if (nvme_pel_event_to_string(bit + i * 8))
- if ((seb >> bit) & 0x1)
- printf(" Support %s\n",
- nvme_pel_event_to_string(bit + i * 8));
- }
- }
- }
-}
-
-static void json_persistent_event_log(void *pevent_log_info, __u32 size)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
- __u32 offset, por_info_len, por_info_list;
- __u64 *fw_rev;
- char key[128];
- char fw_str[50];
-
- struct nvme_smart_log *smart_event;
- struct nvme_fw_commit_event *fw_commit_event;
- struct nvme_time_stamp_change_event *ts_change_event;
- struct nvme_power_on_reset_info_list *por_event;
- struct nvme_nss_hw_err_event *nss_hw_err_event;
- struct nvme_change_ns_event *ns_event;
- struct nvme_format_nvm_start_event *format_start_event;
- struct nvme_format_nvm_compln_event *format_cmpln_event;
- struct nvme_sanitize_start_event *sanitize_start_event;
- struct nvme_sanitize_compln_event *sanitize_cmpln_event;
- struct nvme_thermal_exc_event *thermal_exc_event;
- struct nvme_persistent_event_log *pevent_log_head;
- struct nvme_persistent_event_entry *pevent_entry_head;
-
- root = json_create_object();
- valid = json_create_array();
-
- offset = sizeof(*pevent_log_head);
- if (size >= offset) {
- pevent_log_head = pevent_log_info;
- char sn[sizeof(pevent_log_head->sn) + 1],
- mn[sizeof(pevent_log_head->mn) + 1],
- subnqn[sizeof(pevent_log_head->subnqn) + 1];
-
- snprintf(sn, sizeof(sn), "%-.*s",
- (int)sizeof(pevent_log_head->sn), pevent_log_head->sn);
- snprintf(mn, sizeof(mn), "%-.*s",
- (int)sizeof(pevent_log_head->mn), pevent_log_head->mn);
- snprintf(subnqn, sizeof(subnqn), "%-.*s",
- (int)sizeof(pevent_log_head->subnqn), pevent_log_head->subnqn);
-
- json_object_add_value_uint(root, "log_id",
- pevent_log_head->lid);
- json_object_add_value_uint(root, "total_num_of_events",
- le32_to_cpu(pevent_log_head->tnev));
- json_object_add_value_uint64(root, "total_log_len",
- le64_to_cpu(pevent_log_head->tll));
- json_object_add_value_uint(root, "log_revision",
- pevent_log_head->rv);
- json_object_add_value_uint(root, "log_header_len",
- le16_to_cpu(pevent_log_head->lhl));
- json_object_add_value_uint64(root, "timestamp",
- le64_to_cpu(pevent_log_head->ts));
- json_object_add_value_uint128(root, "power_on_hours",
- le128_to_cpu(pevent_log_head->poh));
- json_object_add_value_uint64(root, "power_cycle_count",
- le64_to_cpu(pevent_log_head->pcc));
- json_object_add_value_uint(root, "pci_vid",
- le16_to_cpu(pevent_log_head->vid));
- json_object_add_value_uint(root, "pci_ssvid",
- le16_to_cpu(pevent_log_head->ssvid));
- json_object_add_value_string(root, "sn", sn);
- json_object_add_value_string(root, "mn", mn);
- json_object_add_value_string(root, "subnqn", subnqn);
- json_object_add_value_uint(root, "gen_number",
- le16_to_cpu(pevent_log_head->gen_number));
- json_object_add_value_uint(root, "rci",
- le32_to_cpu(pevent_log_head->rci));
- for (int i = 0; i < 32; i++) {
- if (pevent_log_head->seb[i] == 0)
- continue;
- add_bitmap(i, pevent_log_head->seb[i], root, 1);
- }
- } else {
- printf("No log data can be shown with this log len at least " \
- "512 bytes is required or can be 0 to read the complete "\
- "log page after context established\n");
- return;
- }
- for (int i = 0; i < le32_to_cpu(pevent_log_head->tnev); i++) {
- if (offset + sizeof(*pevent_entry_head) >= size)
- break;
-
- pevent_entry_head = pevent_log_info + offset;
-
- if ((offset + pevent_entry_head->ehl + 3 +
- le16_to_cpu(pevent_entry_head->el)) >= size)
- break;
- valid_attrs = json_create_object();
-
- json_object_add_value_uint(valid_attrs, "event_number", i);
- json_object_add_value_string(valid_attrs, "event_type",
- nvme_pel_event_to_string(pevent_entry_head->etype));
- json_object_add_value_uint(valid_attrs, "event_type_rev",
- pevent_entry_head->etype_rev);
- json_object_add_value_uint(valid_attrs, "event_header_len",
- pevent_entry_head->ehl);
- json_object_add_value_uint(valid_attrs, "event_header_additional_info",
- pevent_entry_head->ehai);
- json_object_add_value_uint(valid_attrs, "ctrl_id",
- le16_to_cpu(pevent_entry_head->cntlid));
- json_object_add_value_uint64(valid_attrs, "event_time_stamp",
- le64_to_cpu(pevent_entry_head->ets));
- json_object_add_value_uint(valid_attrs, "port_id",
- le16_to_cpu(pevent_entry_head->pelpid));
- json_object_add_value_uint(valid_attrs, "vu_info_len",
- le16_to_cpu(pevent_entry_head->vsil));
- json_object_add_value_uint(valid_attrs, "event_len",
- le16_to_cpu(pevent_entry_head->el));
-
- offset += pevent_entry_head->ehl + 3;
-
- switch (pevent_entry_head->etype) {
- case NVME_PEL_SMART_HEALTH_EVENT:
- smart_event = pevent_log_info + offset;
- unsigned int temperature = ((smart_event->temperature[1] << 8) |
- smart_event->temperature[0]);
-
- nvme_uint128_t data_units_read = le128_to_cpu(smart_event->data_units_read);
- nvme_uint128_t data_units_written = le128_to_cpu(smart_event->data_units_written);
- nvme_uint128_t host_read_commands = le128_to_cpu(smart_event->host_reads);
- nvme_uint128_t host_write_commands = le128_to_cpu(smart_event->host_writes);
- nvme_uint128_t controller_busy_time = le128_to_cpu(smart_event->ctrl_busy_time);
- nvme_uint128_t power_cycles = le128_to_cpu(smart_event->power_cycles);
- nvme_uint128_t power_on_hours = le128_to_cpu(smart_event->power_on_hours);
- nvme_uint128_t unsafe_shutdowns = le128_to_cpu(smart_event->unsafe_shutdowns);
- nvme_uint128_t media_errors = le128_to_cpu(smart_event->media_errors);
- nvme_uint128_t num_err_log_entries = le128_to_cpu(smart_event->num_err_log_entries);
- json_object_add_value_int(valid_attrs, "critical_warning",
- smart_event->critical_warning);
-
- json_object_add_value_int(valid_attrs, "temperature",
- temperature);
- json_object_add_value_int(valid_attrs, "avail_spare",
- smart_event->avail_spare);
- json_object_add_value_int(valid_attrs, "spare_thresh",
- smart_event->spare_thresh);
- json_object_add_value_int(valid_attrs, "percent_used",
- smart_event->percent_used);
- json_object_add_value_int(valid_attrs,
- "endurance_grp_critical_warning_summary",
- smart_event->endu_grp_crit_warn_sumry);
- json_object_add_value_uint128(valid_attrs, "data_units_read",
- data_units_read);
- json_object_add_value_uint128(valid_attrs, "data_units_written",
- data_units_written);
- json_object_add_value_uint128(valid_attrs, "host_read_commands",
- host_read_commands);
- json_object_add_value_uint128(valid_attrs, "host_write_commands",
- host_write_commands);
- json_object_add_value_uint128(valid_attrs, "controller_busy_time",
- controller_busy_time);
- json_object_add_value_uint128(valid_attrs, "power_cycles",
- power_cycles);
- json_object_add_value_uint128(valid_attrs, "power_on_hours",
- power_on_hours);
- json_object_add_value_uint128(valid_attrs, "unsafe_shutdowns",
- unsafe_shutdowns);
- json_object_add_value_uint128(valid_attrs, "media_errors",
- media_errors);
- json_object_add_value_uint128(valid_attrs, "num_err_log_entries",
- num_err_log_entries);
- json_object_add_value_uint(valid_attrs, "warning_temp_time",
- le32_to_cpu(smart_event->warning_temp_time));
- json_object_add_value_uint(valid_attrs, "critical_comp_time",
- le32_to_cpu(smart_event->critical_comp_time));
-
- for (int c = 0; c < 8; c++) {
- __s32 temp = le16_to_cpu(smart_event->temp_sensor[c]);
- if (temp == 0)
- continue;
- sprintf(key, "temperature_sensor_%d",c + 1);
- json_object_add_value_int(valid_attrs, key, temp);
- }
-
- json_object_add_value_uint(valid_attrs, "thm_temp1_trans_count",
- le32_to_cpu(smart_event->thm_temp1_trans_count));
- json_object_add_value_uint(valid_attrs, "thm_temp2_trans_count",
- le32_to_cpu(smart_event->thm_temp2_trans_count));
- json_object_add_value_uint(valid_attrs, "thm_temp1_total_time",
- le32_to_cpu(smart_event->thm_temp1_total_time));
- json_object_add_value_uint(valid_attrs, "thm_temp2_total_time",
- le32_to_cpu(smart_event->thm_temp2_total_time));
- break;
- case NVME_PEL_FW_COMMIT_EVENT:
- fw_commit_event = pevent_log_info + offset;
- snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
- le64_to_cpu(fw_commit_event->old_fw_rev),
- util_fw_to_string((char *)&fw_commit_event->old_fw_rev));
- json_object_add_value_string(valid_attrs, "old_fw_rev", fw_str);
- snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
- le64_to_cpu(fw_commit_event->new_fw_rev),
- util_fw_to_string((char *)&fw_commit_event->new_fw_rev));
- json_object_add_value_string(valid_attrs, "new_fw_rev", fw_str);
- json_object_add_value_uint(valid_attrs, "fw_commit_action",
- fw_commit_event->fw_commit_action);
- json_object_add_value_uint(valid_attrs, "fw_slot",
- fw_commit_event->fw_slot);
- json_object_add_value_uint(valid_attrs, "sct_fw",
- fw_commit_event->sct_fw);
- json_object_add_value_uint(valid_attrs, "sc_fw",
- fw_commit_event->sc_fw);
- json_object_add_value_uint(valid_attrs,
- "vu_assign_fw_commit_rc",
- le16_to_cpu(fw_commit_event->vndr_assign_fw_commit_rc));
- break;
- case NVME_PEL_TIMESTAMP_EVENT:
- ts_change_event = pevent_log_info + offset;
- json_object_add_value_uint64(valid_attrs, "prev_ts",
- le64_to_cpu(ts_change_event->previous_timestamp));
- json_object_add_value_uint64(valid_attrs,
- "ml_secs_since_reset",
- le64_to_cpu(ts_change_event->ml_secs_since_reset));
- break;
- case NVME_PEL_POWER_ON_RESET_EVENT:
- por_info_len = (le16_to_cpu(pevent_entry_head->el) -
- le16_to_cpu(pevent_entry_head->vsil) - sizeof(*fw_rev));
-
- por_info_list = por_info_len / sizeof(*por_event);
-
- fw_rev = pevent_log_info + offset;
- snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
- le64_to_cpu(*fw_rev),
- util_fw_to_string((char *)fw_rev));
- json_object_add_value_string(valid_attrs, "fw_rev", fw_str);
- for (int i = 0; i < por_info_list; i++) {
- por_event = pevent_log_info + offset +
- sizeof(*fw_rev) + i * sizeof(*por_event);
- json_object_add_value_uint(valid_attrs, "ctrl_id",
- le16_to_cpu(por_event->cid));
- json_object_add_value_uint(valid_attrs, "fw_act",
- por_event->fw_act);
- json_object_add_value_uint(valid_attrs, "op_in_prog",
- por_event->op_in_prog);
- json_object_add_value_uint(valid_attrs, "ctrl_power_cycle",
- le32_to_cpu(por_event->ctrl_power_cycle));
- json_object_add_value_uint64(valid_attrs, "power_on_ml_secs",
- le64_to_cpu(por_event->power_on_ml_seconds));
- json_object_add_value_uint64(valid_attrs, "ctrl_time_stamp",
- le64_to_cpu(por_event->ctrl_time_stamp));
- }
- break;
- case NVME_PEL_NSS_HW_ERROR_EVENT:
- nss_hw_err_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "nss_hw_err_code",
- le16_to_cpu(nss_hw_err_event->nss_hw_err_event_code));
- break;
- case NVME_PEL_CHANGE_NS_EVENT:
- ns_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "nsmgt_cdw10",
- le32_to_cpu(ns_event->nsmgt_cdw10));
- json_object_add_value_uint64(valid_attrs, "nsze",
- le64_to_cpu(ns_event->nsze));
- json_object_add_value_uint64(valid_attrs, "nscap",
- le64_to_cpu(ns_event->nscap));
- json_object_add_value_uint(valid_attrs, "flbas",
- ns_event->flbas);
- json_object_add_value_uint(valid_attrs, "dps",
- ns_event->dps);
- json_object_add_value_uint(valid_attrs, "nmic",
- ns_event->nmic);
- json_object_add_value_uint(valid_attrs, "ana_grp_id",
- le32_to_cpu(ns_event->ana_grp_id));
- json_object_add_value_uint(valid_attrs, "nvmset_id",
- le16_to_cpu(ns_event->nvmset_id));
- json_object_add_value_uint(valid_attrs, "nsid",
- le32_to_cpu(ns_event->nsid));
- break;
- case NVME_PEL_FORMAT_START_EVENT:
- format_start_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "nsid",
- le32_to_cpu(format_start_event->nsid));
- json_object_add_value_uint(valid_attrs, "fna",
- format_start_event->fna);
- json_object_add_value_uint(valid_attrs, "format_nvm_cdw10",
- le32_to_cpu(format_start_event->format_nvm_cdw10));
- break;
- case NVME_PEL_FORMAT_COMPLETION_EVENT:
- format_cmpln_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "nsid",
- le32_to_cpu(format_cmpln_event->nsid));
- json_object_add_value_uint(valid_attrs, "smallest_fpi",
- format_cmpln_event->smallest_fpi);
- json_object_add_value_uint(valid_attrs, "format_nvm_status",
- format_cmpln_event->format_nvm_status);
- json_object_add_value_uint(valid_attrs, "compln_info",
- le16_to_cpu(format_cmpln_event->compln_info));
- json_object_add_value_uint(valid_attrs, "status_field",
- le32_to_cpu(format_cmpln_event->status_field));
- break;
- case NVME_PEL_SANITIZE_START_EVENT:
- sanitize_start_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "SANICAP",
- le32_to_cpu(sanitize_start_event->sani_cap));
- json_object_add_value_uint(valid_attrs, "sani_cdw10",
- le32_to_cpu(sanitize_start_event->sani_cdw10));
- json_object_add_value_uint(valid_attrs, "sani_cdw11",
- le32_to_cpu(sanitize_start_event->sani_cdw11));
- break;
- case NVME_PEL_SANITIZE_COMPLETION_EVENT:
- sanitize_cmpln_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "sani_prog",
- le16_to_cpu(sanitize_cmpln_event->sani_prog));
- json_object_add_value_uint(valid_attrs, "sani_status",
- le16_to_cpu(sanitize_cmpln_event->sani_status));
- json_object_add_value_uint(valid_attrs, "cmpln_info",
- le16_to_cpu(sanitize_cmpln_event->cmpln_info));
- break;
- case NVME_PEL_THERMAL_EXCURSION_EVENT:
- thermal_exc_event = pevent_log_info + offset;
- json_object_add_value_uint(valid_attrs, "over_temp",
- thermal_exc_event->over_temp);
- json_object_add_value_uint(valid_attrs, "threshold",
- thermal_exc_event->threshold);
- break;
- }
-
- json_array_add_value_object(valid, valid_attrs);
- offset += le16_to_cpu(pevent_entry_head->el);
- }
-
- json_object_add_value_array(root, "list_of_event_entries", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void nvme_show_persistent_event_log_rci(__le32 pel_header_rci)
{
__u32 rci = le32_to_cpu(pel_header_rci);
@@ -1518,7 +312,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
printf("Timestamp: %"PRIu64"\n",
le64_to_cpu(pevent_log_head->ts));
printf("Power On Hours (POH): %s",
- uint128_t_to_string(le128_to_cpu(pevent_log_head->poh)));
+ uint128_t_to_l10n_string(le128_to_cpu(pevent_log_head->poh)));
printf("Power Cycle Count: %"PRIu64"\n",
le64_to_cpu(pevent_log_head->pcc));
printf("PCI Vendor ID (VID): %u\n",
@@ -1740,31 +534,6 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
}
}
-void json_endurance_group_event_agg_log(
- struct nvme_aggregate_predictable_lat_event *endurance_log,
- __u64 log_entries)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
-
- root = json_create_object();
- json_object_add_value_uint64(root, "num_entries_avail",
- le64_to_cpu(endurance_log->num_entries));
- valid = json_create_array();
-
- for (int i = 0; i < log_entries; i++) {
- valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "entry",
- le16_to_cpu(endurance_log->entries[i]));
- json_array_add_value_object(valid, valid_attrs);
- }
- json_object_add_value_array(root, "list_of_entries", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_endurance_group_event_agg_log(
struct nvme_aggregate_predictable_lat_event *endurance_log,
__u64 log_entries, __u32 size, const char *devname,
@@ -1789,66 +558,6 @@ void nvme_show_endurance_group_event_agg_log(
}
}
-static void json_lba_status_log(void *lba_status)
-{
- struct json_object *root;
- struct json_object *desc;
- struct json_object *element;
- struct json_object *desc_list;
- struct json_object *elements_list;
- struct nvme_lba_status_log *hdr;
- struct nvme_lbas_ns_element *ns_element;
- struct nvme_lba_rd *range_desc;
- int offset = sizeof(*hdr);
- __u32 num_lba_desc, num_elements;
-
- root = json_create_object();
- hdr = lba_status;
- json_object_add_value_uint(root, "lslplen", le32_to_cpu(hdr->lslplen));
- num_elements = le32_to_cpu(hdr->nlslne);
- json_object_add_value_uint(root, "nlslne", num_elements);
- json_object_add_value_uint(root, "estulb", le32_to_cpu(hdr->estulb));
- json_object_add_value_uint(root, "lsgc", le16_to_cpu(hdr->lsgc));
-
- elements_list = json_create_array();
- for (int ele = 0; ele < num_elements; ele++) {
- ns_element = lba_status + offset;
- element = json_create_object();
- json_object_add_value_uint(element, "neid",
- le32_to_cpu(ns_element->neid));
- num_lba_desc = le32_to_cpu(ns_element->nlrd);
- json_object_add_value_uint(element, "nlrd", num_lba_desc);
- json_object_add_value_uint(element, "ratype", ns_element->ratype);
-
- offset += sizeof(*ns_element);
- desc_list = json_create_array();
- if (num_lba_desc != 0xffffffff) {
- for (int i = 0; i < num_lba_desc; i++) {
- range_desc = lba_status + offset;
- desc = json_create_object();
- json_object_add_value_uint64(desc, "rslba",
- le64_to_cpu(range_desc->rslba));
- json_object_add_value_uint(desc, "rnlb",
- le32_to_cpu(range_desc->rnlb));
-
- offset += sizeof(*range_desc);
- json_array_add_value_object(desc_list, desc);
- }
- } else {
- printf("Number of LBA Range Descriptors (NLRD) set to %#x for " \
- "NS element %d", num_lba_desc, ele);
- }
-
- json_object_add_value_array(element, "descs", desc_list);
- json_array_add_value_object(elements_list, element);
- }
-
- json_object_add_value_array(root, "ns_elements", elements_list);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_lba_status_log(void *lba_status, __u32 size,
const char *devname, enum nvme_print_flags flags)
{
@@ -1909,25 +618,6 @@ static const char *resv_notif_to_string(__u8 type)
}
}
-static void json_resv_notif_log(struct nvme_resv_notification_log *resv)
-{
- struct json_object *root;
-
- root = json_create_object();
- json_object_add_value_uint64(root, "count",
- le64_to_cpu(resv->lpc));
- json_object_add_value_uint(root, "rn_log_type",
- resv->rnlpt);
- json_object_add_value_uint(root, "num_logs",
- resv->nalp);
- json_object_add_value_uint(root, "nsid",
- le32_to_cpu(resv->nsid));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv,
const char *devname, enum nvme_print_flags flags)
{
@@ -1947,33 +637,6 @@ void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv,
le32_to_cpu(resv->nsid));
}
-static void json_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log)
-{
- struct json_object *root;
- struct json_object *fids;
- struct json_object *fids_list;
- unsigned int fid;
- char key[128];
- __u32 fid_support;
-
- root = json_create_object();
- fids_list = json_create_array();
- for (fid = 0; fid < 256; fid++) {
- fid_support = le32_to_cpu(fid_log->fid_support[fid]);
- if (fid_support & NVME_FID_SUPPORTED_EFFECTS_FSUPP) {
- fids = json_create_object();
- sprintf(key, "fid_%u", fid);
- json_object_add_value_uint(fids, key, fid_support);
- json_array_add_value_object(fids_list, fids);
- }
- }
-
- json_object_add_value_object(root, "fid_support", fids_list);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void nvme_show_fid_support_effects_log_human(__u32 fid_support)
{
const char *set = "+";
@@ -2023,34 +686,6 @@ void nvme_show_fid_support_effects_log(struct nvme_fid_supported_effects_log *fi
}
}
-static void json_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log)
-{
- struct json_object *root;
- struct json_object *mi_cmds;
- struct json_object *mi_cmds_list;
- unsigned int mi_cmd;
- char key[128];
- __u32 mi_cmd_support;
-
- root = json_create_object();
- mi_cmds_list = json_create_array();
- for (mi_cmd = 0; mi_cmd < 256; mi_cmd++) {
- mi_cmd_support = le32_to_cpu(mi_cmd_log->mi_cmd_support[mi_cmd]);
- if (mi_cmd_support & NVME_MI_CMD_SUPPORTED_EFFECTS_CSUPP) {
- mi_cmds = json_create_object();
- sprintf(key, "mi_cmd_%u", mi_cmd);
- json_object_add_value_uint(mi_cmds, key, mi_cmd_support);
- json_array_add_value_object(mi_cmds_list, mi_cmds);
- }
- }
-
- json_object_add_value_object(root, "mi_command_support", mi_cmds_list);
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
static void nvme_show_mi_cmd_support_effects_log_human(__u32 mi_cmd_support)
{
const char *set = "+";
@@ -2099,25 +734,6 @@ void nvme_show_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_l
}
}
-static void json_boot_part_log(void *bp_log)
-{
- struct nvme_boot_partition *hdr;
- struct json_object *root;
-
- hdr = bp_log;
- root = json_create_object();
-
- json_object_add_value_uint(root, "count", hdr->lid);
- json_object_add_value_uint(root, "abpid",
- (le32_to_cpu(hdr->bpinfo) >> 31) & 0x1);
- json_object_add_value_uint(root, "bpsz",
- le32_to_cpu(hdr->bpinfo) & 0x7fff);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_boot_part_log(void *bp_log, const char *devname,
__u32 size, enum nvme_print_flags flags)
{
@@ -2134,40 +750,6 @@ void nvme_show_boot_part_log(void *bp_log, const char *devname,
printf("Active BPID: %u\n", (le32_to_cpu(hdr->bpinfo) >> 31) & 0x1);
}
-static void json_media_unit_stat_log(struct nvme_media_unit_stat_log *mus)
-{
- struct json_object *root;
- struct json_object *entries;
- struct json_object *entry;
- int i;
-
- root = json_create_object();
- entries = json_create_array();
-
- json_object_add_value_uint(root, "nmu", le16_to_cpu(mus->nmu));
- json_object_add_value_uint(root, "cchans", le16_to_cpu(mus->cchans));
- json_object_add_value_uint(root, "sel_config", le16_to_cpu(mus->sel_config));
-
- for (i = 0; i < mus->nmu; i++) {
- entry = json_create_object();
- json_object_add_value_uint(entry, "muid", le16_to_cpu(mus->mus_desc[i].muid));
- json_object_add_value_uint(entry, "domainid", le16_to_cpu(mus->mus_desc[i].domainid));
- json_object_add_value_uint(entry, "endgid", le16_to_cpu(mus->mus_desc[i].endgid));
- json_object_add_value_uint(entry, "nvmsetid", le16_to_cpu(mus->mus_desc[i].nvmsetid));
- json_object_add_value_uint(entry, "cap_adj_fctr", le16_to_cpu(mus->mus_desc[i].cap_adj_fctr));
- json_object_add_value_uint(entry, "avl_spare", mus->mus_desc[i].avl_spare);
- json_object_add_value_uint(entry, "percent_used", mus->mus_desc[i].percent_used);
- json_object_add_value_uint(entry, "mucs", mus->mus_desc[i].mucs);
- json_object_add_value_uint(entry, "cio", mus->mus_desc[i].cio);
- json_array_add_value_object(entries, entry);
- }
-
- json_object_add_value_array(root, "mus_list", entries);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus_log,
enum nvme_print_flags flags)
{
@@ -2201,148 +783,6 @@ void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus_log,
}
}
-static void json_supported_cap_config_log(
- struct nvme_supported_cap_config_list_log *cap_log)
-{
- struct json_object *root;
- struct json_object *cap_list;
- struct json_object *capacity;
- struct json_object *end_list;
- struct json_object *set_list;
- struct json_object *set;
- struct json_object *chan_list;
- struct json_object *channel;
- struct json_object *media_list;
- struct json_object *media;
- struct json_object *endurance;
- struct nvme_end_grp_chan_desc *chan_desc;
- int i, j, k, l, m, sccn, egcn, egsets, egchans, chmus;
-
- root = json_create_object();
-
- json_object_add_value_uint(root, "sccn", cap_log->sccn);
- cap_list = json_create_array();
- sccn = cap_log->sccn;
- for (i = 0; i < sccn; i++) {
- capacity = json_create_object();
- json_object_add_value_uint(capacity, "cap_config_id",
- le16_to_cpu(cap_log->cap_config_desc[i].cap_config_id));
- json_object_add_value_uint(capacity, "domainid",
- le16_to_cpu(cap_log->cap_config_desc[i].domainid));
- json_object_add_value_uint(capacity, "egcn",
- le16_to_cpu(cap_log->cap_config_desc[i].egcn));
- end_list = json_create_array();
- egcn = le16_to_cpu(cap_log->cap_config_desc[i].egcn);
- for (j = 0; j < egcn; j++) {
- endurance = json_create_object();
- json_object_add_value_uint(endurance, "endgid",
- le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].endgid));
- json_object_add_value_uint(endurance, "cap_adj_factor",
- le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].cap_adj_factor));
- json_object_add_value_uint128(endurance, "tegcap",
- le128_to_cpu(cap_log->cap_config_desc[i].egcd[j].tegcap));
- json_object_add_value_uint128(endurance, "segcap",
- le128_to_cpu(cap_log->cap_config_desc[i].egcd[j].segcap));
- json_object_add_value_uint(endurance, "egsets",
- le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].egsets));
- egsets = le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].egsets);
- set_list = json_create_array();
- for (k = 0; k < egsets; k++) {
- set = json_create_object();
- json_object_add_value_uint(set, "nvmsetid",
- le16_to_cpu(cap_log->cap_config_desc[i].egcd[j].nvmsetid[k]));
- json_array_add_value_object(set_list, set);
- }
- chan_desc = (struct nvme_end_grp_chan_desc *) \
- ((cap_log->cap_config_desc[i].egcd[j].nvmsetid[0]) * (sizeof(__u16)*egsets));
- egchans = le16_to_cpu(chan_desc->egchans);
- json_object_add_value_uint(endurance, "egchans",
- le16_to_cpu(chan_desc->egchans));
- chan_list = json_create_array();
- for (l = 0; l < egchans; l++) {
- channel = json_create_object();
- json_object_add_value_uint(channel, "chanid",
- le16_to_cpu(chan_desc->chan_config_desc[l].chanid));
- json_object_add_value_uint(channel, "chmus",
- le16_to_cpu(chan_desc->chan_config_desc[l].chmus));
- chmus = le16_to_cpu(chan_desc->chan_config_desc[l].chmus);
- media_list = json_create_array();
- for (m = 0; m < chmus; m++) {
- media = json_create_object();
- json_object_add_value_uint(media, "chanid",
- le16_to_cpu(chan_desc->chan_config_desc[l].mu_config_desc[m].muid));
- json_object_add_value_uint(media, "chmus",
- le16_to_cpu(chan_desc->chan_config_desc[l].mu_config_desc[m].mudl));
- json_array_add_value_object(media_list, media);
- }
- json_object_add_value_array(channel, "Media Descriptor", media_list);
- json_array_add_value_object(chan_list, channel);
- }
- json_object_add_value_array(endurance, "Channel Descriptor", chan_list);
- json_object_add_value_array(endurance, "NVM Set IDs", set_list);
- json_array_add_value_object(end_list, endurance);
- }
- json_object_add_value_array(capacity, "Endurance Descriptor", end_list);
- json_array_add_value_object(cap_list, capacity);
- }
-
- json_object_add_value_array(root, "Capacity Descriptor", cap_list);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_nvme_fdp_configs(struct nvme_fdp_config_log *log, size_t len)
-{
- struct json_object *root, *obj_configs;
- uint16_t n;
-
- void *p = log->configs;
-
- root = json_create_object();
- obj_configs = json_create_array();
-
- n = le16_to_cpu(log->n);
-
- json_object_add_value_uint(root, "n", n);
-
- for (int i = 0; i < n + 1; i++) {
- struct nvme_fdp_config_desc *config = p;
-
- struct json_object *obj_config = json_create_object();
- struct json_object *obj_ruhs = json_create_array();
-
- json_object_add_value_uint(obj_config, "fdpa", config->fdpa);
- json_object_add_value_uint(obj_config, "vss", config->vss);
- json_object_add_value_uint(obj_config, "nrg", le32_to_cpu(config->nrg));
- json_object_add_value_uint(obj_config, "nruh", le16_to_cpu(config->nruh));
- json_object_add_value_uint(obj_config, "nnss", le32_to_cpu(config->nnss));
- json_object_add_value_uint64(obj_config, "runs", le64_to_cpu(config->runs));
- json_object_add_value_uint(obj_config, "erutl", le32_to_cpu(config->erutl));
-
- for (int j = 0; j < le16_to_cpu(config->nruh); j++) {
- struct nvme_fdp_ruh_desc *ruh = &config->ruhs[j];
-
- struct json_object *obj_ruh = json_create_object();
-
- json_object_add_value_uint(obj_ruh, "ruht", ruh->ruht);
-
- json_array_add_value_object(obj_ruhs, obj_ruh);
- }
-
- json_array_add_value_object(obj_configs, obj_config);
-
- p += config->size;
- }
-
- json_object_add_value_array(root, "configs", obj_configs);
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
void nvme_show_fdp_config_fdpa(uint8_t fdpa)
{
__u8 valid = (fdpa >> 7) & 0x1;
@@ -2398,36 +838,6 @@ void nvme_show_fdp_configs(struct nvme_fdp_config_log *log, size_t len,
}
}
-static void json_nvme_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len)
-{
- struct json_object *root, *obj_ruhus;
- uint16_t nruh;
-
- root = json_create_object();
- obj_ruhus = json_create_array();
-
- nruh = le16_to_cpu(log->nruh);
-
- json_object_add_value_uint(root, "nruh", nruh);
-
- for (int i = 0; i < nruh; i++) {
- struct nvme_fdp_ruhu_desc *ruhu = &log->ruhus[i];
-
- struct json_object *obj_ruhu = json_create_object();
-
- json_object_add_value_uint(obj_ruhu, "ruha", ruhu->ruha);
-
- json_array_add_value_object(obj_ruhus, obj_ruhu);
- }
-
- json_object_add_value_array(root, "ruhus", obj_ruhus);
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len,
enum nvme_print_flags flags)
{
@@ -2448,20 +858,6 @@ void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len,
}
}
-static void json_nvme_fdp_stats(struct nvme_fdp_stats_log *log)
-{
- struct json_object *root = json_create_object();
-
- json_object_add_value_uint128(root, "hbmw", le128_to_cpu(log->hbmw));
- json_object_add_value_uint128(root, "mbmw", le128_to_cpu(log->mbmw));
- json_object_add_value_uint128(root, "mbe", le128_to_cpu(log->mbe));
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log,
enum nvme_print_flags flags)
{
@@ -2471,55 +867,11 @@ void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log,
return json_nvme_fdp_stats(log);
printf("Host Bytes with Metadata Written (HBMW): %s\n",
- uint128_t_to_string(le128_to_cpu(log->hbmw)));
+ uint128_t_to_l10n_string(le128_to_cpu(log->hbmw)));
printf("Media Bytes with Metadata Written (MBMW): %s\n",
- uint128_t_to_string(le128_to_cpu(log->mbmw)));
+ uint128_t_to_l10n_string(le128_to_cpu(log->mbmw)));
printf("Media Bytes Erased (MBE): %s\n",
- uint128_t_to_string(le128_to_cpu(log->mbe)));
-}
-
-static void json_nvme_fdp_events(struct nvme_fdp_events_log *log)
-{
- struct json_object *root, *obj_events;
- uint32_t n;
-
- root = json_create_object();
- obj_events = json_create_array();
-
- n = le32_to_cpu(log->n);
-
- json_object_add_value_uint(root, "n", n);
-
- for (unsigned int i = 0; i < n; i++) {
- struct nvme_fdp_event *event = &log->events[i];
-
- struct json_object *obj_event = json_create_object();
-
- json_object_add_value_uint(obj_event, "type", event->type);
- json_object_add_value_uint(obj_event, "fdpef", event->flags);
- json_object_add_value_uint(obj_event, "pid", le16_to_cpu(event->pid));
- json_object_add_value_uint64(obj_event, "timestamp", le64_to_cpu(*(uint64_t *)&event->ts));
- json_object_add_value_uint(obj_event, "nsid", le32_to_cpu(event->nsid));
-
- if (event->type == NVME_FDP_EVENT_REALLOC) {
- struct nvme_fdp_event_realloc *mr;
- mr = (struct nvme_fdp_event_realloc *)&event->type_specific;
-
- json_object_add_value_uint(obj_event, "nlbam", le16_to_cpu(mr->nlbam));
-
- if (mr->flags & NVME_FDP_EVENT_REALLOC_F_LBAV)
- json_object_add_value_uint64(obj_event, "lba", le64_to_cpu(mr->lba));
- }
-
- json_array_add_value_object(obj_events, obj_event);
- }
-
- json_object_add_value_array(root, "events", obj_events);
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
+ uint128_t_to_l10n_string(le128_to_cpu(log->mbe)));
}
static const char *nvme_fdp_event_to_string(enum nvme_fdp_event_type event)
@@ -2587,39 +939,6 @@ void nvme_show_fdp_events(struct nvme_fdp_events_log *log,
}
}
-static void json_nvme_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len)
-{
- struct json_object *root, *obj_ruhss;
- uint16_t nruhsd;
-
- root = json_create_object();
- obj_ruhss = json_create_array();
-
- nruhsd = le16_to_cpu(status->nruhsd);
-
- json_object_add_value_uint(root, "nruhsd", nruhsd);
-
- for (unsigned int i = 0; i < nruhsd; i++) {
- struct nvme_fdp_ruh_status_desc *ruhs = &status->ruhss[i];
-
- struct json_object *obj_ruhs = json_create_object();
-
- json_object_add_value_uint(obj_ruhs, "pid", le16_to_cpu(ruhs->pid));
- json_object_add_value_uint(obj_ruhs, "ruhid", le16_to_cpu(ruhs->ruhid));
- json_object_add_value_uint(obj_ruhs, "earutr", le32_to_cpu(ruhs->earutr));
- json_object_add_value_uint64(obj_ruhs, "ruamw", le64_to_cpu(ruhs->ruamw));
-
- json_array_add_value_object(obj_ruhss, obj_ruhs);
- }
-
- json_object_add_value_array(root, "ruhss", obj_ruhss);
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
void nvme_show_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len,
enum nvme_print_flags flags)
{
@@ -2672,13 +991,13 @@ void nvme_show_supported_cap_config_log(
printf("Capacity Adjustment Factor: %u\n",
le16_to_cpu(cap->cap_config_desc[i].egcd[j].cap_adj_factor));
printf("Total Endurance Group Capacity: %s\n",
- uint128_t_to_string(le128_to_cpu(
+ uint128_t_to_l10n_string(le128_to_cpu(
cap->cap_config_desc[i].egcd[j].tegcap)));
printf("Spare Endurance Group Capacity: %s\n",
- uint128_t_to_string(le128_to_cpu(
+ uint128_t_to_l10n_string(le128_to_cpu(
cap->cap_config_desc[i].egcd[j].segcap)));
printf("Endurance Estimate: %s\n",
- uint128_t_to_string(le128_to_cpu(
+ uint128_t_to_l10n_string(le128_to_cpu(
cap->cap_config_desc[i].egcd[j].end_est)));
egsets = le16_to_cpu(cap->cap_config_desc[i].egcd[j].egsets);
printf("Number of NVM Sets: %u\n", egsets);
@@ -2767,106 +1086,6 @@ static void nvme_show_subsystem(nvme_root_t r, bool show_ana)
}
}
-static unsigned int json_print_nvme_subsystem_multipath(nvme_subsystem_t s,
- bool show_ana,
- json_object *paths)
-{
- nvme_ns_t n;
- nvme_path_t p;
- unsigned int i = 0;
-
- n = nvme_subsystem_first_ns(s);
- if (!n)
- return 0;
-
- nvme_namespace_for_each_path(n, p) {
- struct json_object *path_attrs;
- nvme_ctrl_t c = nvme_path_get_ctrl(p);
-
- path_attrs = json_create_object();
- json_object_add_value_string(path_attrs, "Name",
- nvme_ctrl_get_name(c));
- json_object_add_value_string(path_attrs, "Transport",
- nvme_ctrl_get_transport(c));
- json_object_add_value_string(path_attrs, "Address",
- nvme_ctrl_get_address(c));
- json_object_add_value_string(path_attrs, "State",
- nvme_ctrl_get_state(c));
- if (show_ana)
- json_object_add_value_string(path_attrs, "ANAState",
- nvme_path_get_ana_state(p));
- json_array_add_value_object(paths, path_attrs);
- i++;
- }
-
- return i;
-}
-
-static void json_print_nvme_subsystem_ctrls(nvme_subsystem_t s,
- json_object *paths)
-{
- nvme_ctrl_t c;
-
- nvme_subsystem_for_each_ctrl(s, c) {
- struct json_object *path_attrs;
-
- path_attrs = json_create_object();
- json_object_add_value_string(path_attrs, "Name",
- nvme_ctrl_get_name(c));
- json_object_add_value_string(path_attrs, "Transport",
- nvme_ctrl_get_transport(c));
- json_object_add_value_string(path_attrs, "Address",
- nvme_ctrl_get_address(c));
- json_object_add_value_string(path_attrs, "State",
- nvme_ctrl_get_state(c));
- json_array_add_value_object(paths, path_attrs);
- }
-}
-
-static void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana)
-{
- struct json_object *host_attrs, *subsystem_attrs;
- struct json_object *subsystems, *paths;
- struct json_object *root;
- nvme_host_t h;
-
- root = json_create_array();
-
- nvme_for_each_host(r, h) {
- nvme_subsystem_t s;
- const char *hostid;
-
- host_attrs = json_create_object();
- json_object_add_value_string(host_attrs, "HostNQN",
- nvme_host_get_hostnqn(h));
- hostid = nvme_host_get_hostid(h);
- if (hostid)
- json_object_add_value_string(host_attrs, "HostID", hostid);
- subsystems = json_create_array();
- nvme_for_each_subsystem(h, s) {
- subsystem_attrs = json_create_object();
- json_object_add_value_string(subsystem_attrs, "Name",
- nvme_subsystem_get_name(s));
- json_object_add_value_string(subsystem_attrs, "NQN",
- nvme_subsystem_get_nqn(s));
-
- json_array_add_value_object(subsystems, subsystem_attrs);
- paths = json_create_array();
-
- if (!json_print_nvme_subsystem_multipath(s, show_ana, paths))
- json_print_nvme_subsystem_ctrls(s, paths);
-
- json_object_add_value_array(subsystem_attrs, "Paths",
- paths);
- }
- json_object_add_value_array(host_attrs, "Subsystems", subsystems);
- json_array_add_value_object(root, host_attrs);
- }
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_subsystem_list(nvme_root_t r, bool show_ana,
enum nvme_print_flags flags)
{
@@ -3251,71 +1470,6 @@ static void nvme_show_registers_pmrmscu(uint32_t pmrmscu)
pmrmscu);
}
-static void json_ctrl_registers(void *bar)
-{
- uint64_t cap, asq, acq, bpmbl, cmbmsc;
- uint32_t vs, intms, intmc, cc, csts, nssr, crto, aqa, cmbsz, cmbloc,
- bpinfo, bprsel, cmbsts, pmrcap, pmrctl, pmrsts, pmrebs, pmrswtp,
- pmrmscl, pmrmscu;
- struct json_object *root;
-
- cap = mmio_read64(bar + NVME_REG_CAP);
- vs = mmio_read32(bar + NVME_REG_VS);
- intms = mmio_read32(bar + NVME_REG_INTMS);
- intmc = mmio_read32(bar + NVME_REG_INTMC);
- cc = mmio_read32(bar + NVME_REG_CC);
- csts = mmio_read32(bar + NVME_REG_CSTS);
- nssr = mmio_read32(bar + NVME_REG_NSSR);
- crto = mmio_read32(bar + NVME_REG_CRTO);
- aqa = mmio_read32(bar + NVME_REG_AQA);
- asq = mmio_read64(bar + NVME_REG_ASQ);
- acq = mmio_read64(bar + NVME_REG_ACQ);
- cmbloc = mmio_read32(bar + NVME_REG_CMBLOC);
- cmbsz = mmio_read32(bar + NVME_REG_CMBSZ);
- bpinfo = mmio_read32(bar + NVME_REG_BPINFO);
- bprsel = mmio_read32(bar + NVME_REG_BPRSEL);
- bpmbl = mmio_read64(bar + NVME_REG_BPMBL);
- cmbmsc = mmio_read64(bar + NVME_REG_CMBMSC);
- cmbsts = mmio_read32(bar + NVME_REG_CMBSTS);
- pmrcap = mmio_read32(bar + NVME_REG_PMRCAP);
- pmrctl = mmio_read32(bar + NVME_REG_PMRCTL);
- pmrsts = mmio_read32(bar + NVME_REG_PMRSTS);
- pmrebs = mmio_read32(bar + NVME_REG_PMREBS);
- pmrswtp = mmio_read32(bar + NVME_REG_PMRSWTP);
- pmrmscl = mmio_read32(bar + NVME_REG_PMRMSCL);
- pmrmscu = mmio_read32(bar + NVME_REG_PMRMSCU);
-
- root = json_create_object();
- json_object_add_value_uint64(root, "cap", cap);
- json_object_add_value_int(root, "vs", vs);
- json_object_add_value_int(root, "intms", intms);
- json_object_add_value_int(root, "intmc", intmc);
- json_object_add_value_int(root, "cc", cc);
- json_object_add_value_int(root, "csts", csts);
- json_object_add_value_int(root, "nssr", nssr);
- json_object_add_value_int(root, "crto", crto);
- json_object_add_value_int(root, "aqa", aqa);
- json_object_add_value_uint64(root, "asq", asq);
- json_object_add_value_uint64(root, "acq", acq);
- json_object_add_value_int(root, "cmbloc", cmbloc);
- json_object_add_value_int(root, "cmbsz", cmbsz);
- json_object_add_value_int(root, "bpinfo", bpinfo);
- json_object_add_value_int(root, "bprsel", bprsel);
- json_object_add_value_uint64(root, "bpmbl", bpmbl);
- json_object_add_value_uint64(root, "cmbmsc", cmbmsc);
- json_object_add_value_int(root, "cmbsts", cmbsts);
- json_object_add_value_int(root, "pmrcap", pmrcap);
- json_object_add_value_int(root, "pmrctl", pmrctl);
- json_object_add_value_int(root, "pmrsts", pmrsts);
- json_object_add_value_int(root, "pmrebs", pmrebs);
- json_object_add_value_int(root, "pmrswtp", pmrswtp);
- json_object_add_value_uint(root, "pmrmscl", pmrmscl);
- json_object_add_value_uint(root, "pmrmscu", pmrmscu);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags)
{
const unsigned int reg_size = 0x0e1c; /* 0x0000 to 0x0e1b */
@@ -3543,28 +1697,6 @@ void nvme_show_relatives(const char *name)
/* XXX: TBD */
}
-static void d_json(unsigned char *buf, int len, int width, int group,
- struct json_object *array)
-{
- int i, line_done = 0;
- char ascii[32 + 1];
- assert(width < sizeof(ascii));
-
- for (i = 0; i < len; i++) {
- line_done = 0;
- ascii[i % width] = (buf[i] >= '!' && buf[i] <= '~') ? buf[i] : '.';
- if (((i + 1) % width) == 0) {
- ascii[i % width + 1] = '\0';
- json_array_add_value_string(array, ascii);
- line_done = 1;
- }
- }
- if (!line_done) {
- ascii[i % width + 1] = '\0';
- json_array_add_value_string(array, ascii);
- }
-}
-
void d(unsigned char *buf, int len, int width, int group)
{
int i, offset = 0, line_done = 0;
@@ -3609,30 +1741,38 @@ void d_raw(unsigned char *buf, unsigned len)
void nvme_show_status(int status)
{
- int val = nvme_status_get_value(status);
- int type = nvme_status_get_type(status);
-
- /* Callers should be checking for negative values first, but provide a
- * sensible fallback anyway
- */
- if (status < 0) {
- fprintf(stderr, "Error: %s\n", nvme_strerror(errno));
- return;
- }
-
- switch (type) {
- case NVME_STATUS_TYPE_NVME:
- fprintf(stderr, "NVMe status: %s(%#x)\n",
- nvme_status_to_string(val, false), val);
- break;
- case NVME_STATUS_TYPE_MI:
- fprintf(stderr, "NVMe-MI status: %s(%#x)\n",
- nvme_mi_status_to_string(val), val);
- break;
- default:
- fprintf(stderr, "Unknown status type %d, value %#x\n",
- type, val);
- }
+ int val;
+ int type;
+
+ if (argconfig_output_format_json(false))
+ return json_output_status(status);
+
+ /*
+ * Callers should be checking for negative values first, but provide a
+ * sensible fallback anyway
+ */
+ if (status < 0) {
+ fprintf(stderr, "Error: %s\n", nvme_strerror(errno));
+ return;
+ }
+
+ val = nvme_status_get_value(status);
+ type = nvme_status_get_type(status);
+
+ switch (type) {
+ case NVME_STATUS_TYPE_NVME:
+ fprintf(stderr, "NVMe status: %s(%#x)\n",
+ nvme_status_to_string(val, false), val);
+ break;
+ case NVME_STATUS_TYPE_MI:
+ fprintf(stderr, "NVMe-MI status: %s(%#x)\n",
+ nvme_mi_status_to_string(val), val);
+ break;
+ default:
+ fprintf(stderr, "Unknown status type %d, value %#x\n", type,
+ val);
+ break;
+ }
}
static void nvme_show_id_ctrl_cmic(__u8 cmic)
@@ -3955,27 +2095,27 @@ static void nvme_show_id_ctrl_apsta(__u8 apsta)
static void nvme_show_id_ctrl_wctemp(__le16 wctemp)
{
- printf(" [15:0] : %ld°C (%u Kelvin)\tWarning Composite Temperature Threshold (WCTEMP)\n",
+ printf(" [15:0] : %ld °C (%u K)\tWarning Composite Temperature Threshold (WCTEMP)\n",
kelvin_to_celsius(le16_to_cpu(wctemp)), le16_to_cpu(wctemp));
printf("\n");
}
static void nvme_show_id_ctrl_cctemp(__le16 cctemp)
{
- printf(" [15:0] : %ld°C (%u Kelvin)\tCritical Composite Temperature Threshold (CCTEMP)\n",
+ printf(" [15:0] : %ld °C (%u K)\tCritical Composite Temperature Threshold (CCTEMP)\n",
kelvin_to_celsius(le16_to_cpu(cctemp)), le16_to_cpu(cctemp));
printf("\n");
}
static void nvme_show_id_ctrl_tnvmcap(__u8 *tnvmcap)
{
- printf("[127:0] : %s\n", uint128_t_to_string(le128_to_cpu(tnvmcap)));
+ printf("[127:0] : %s\n", uint128_t_to_l10n_string(le128_to_cpu(tnvmcap)));
printf("\tTotal NVM Capacity (TNVMCAP)\n\n");
}
static void nvme_show_id_ctrl_unvmcap(__u8 *unvmcap)
{
- printf("[127:0] : %s\n", uint128_t_to_string(le128_to_cpu(unvmcap)));
+ printf("[127:0] : %s\n", uint128_t_to_l10n_string(le128_to_cpu(unvmcap)));
printf("\tUnallocated NVM Capacity (UNVMCAP)\n\n");
}
@@ -4012,14 +2152,14 @@ static void nvme_show_id_ctrl_hctma(__le16 ctrl_hctma)
static void nvme_show_id_ctrl_mntmt(__le16 mntmt)
{
- printf(" [15:0] : %ld°C (%u Kelvin)\tMinimum Thermal Management Temperature (MNTMT)\n",
+ printf(" [15:0] : %ld °C (%u K)\tMinimum Thermal Management Temperature (MNTMT)\n",
kelvin_to_celsius(le16_to_cpu(mntmt)), le16_to_cpu(mntmt));
printf("\n");
}
static void nvme_show_id_ctrl_mxtmt(__le16 mxtmt)
{
- printf(" [15:0] : %ld°C (%u Kelvin)\tMaximum Thermal Management Temperature (MXTMT)\n",
+ printf(" [15:0] : %ld °C (%u K)\tMaximum Thermal Management Temperature (MXTMT)\n",
kelvin_to_celsius(le16_to_cpu(mxtmt)), le16_to_cpu(mxtmt));
printf("\n");
}
@@ -4558,7 +2698,7 @@ void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid,
printf("nabspf : %d\n", le16_to_cpu(ns->nabspf));
printf("noiob : %d\n", le16_to_cpu(ns->noiob));
printf("nvmcap : %s\n",
- uint128_t_to_string(le128_to_cpu(ns->nvmcap)));
+ uint128_t_to_l10n_string(le128_to_cpu(ns->nvmcap)));
if (ns->nsfeat & 0x10) {
printf("npwg : %u\n", le16_to_cpu(ns->npwg));
printf("npwa : %u\n", le16_to_cpu(ns->npwa));
@@ -4639,27 +2779,6 @@ static void nvme_show_cmd_set_independent_id_ns_nstat(__u8 nstat)
printf("\n");
}
-static void json_nvme_cmd_set_independent_id_ns(
- struct nvme_id_independent_id_ns *ns)
-{
- struct json_object *root;
- root = json_create_object();
-
- json_object_add_value_int(root, "nsfeat", ns->nsfeat);
- json_object_add_value_int(root, "nmic", ns->nmic);
- json_object_add_value_int(root, "rescap", ns->rescap);
- json_object_add_value_int(root, "fpi", ns->fpi);
- json_object_add_value_uint(root, "anagrpid", le32_to_cpu(ns->anagrpid));
- json_object_add_value_int(root, "nsattr", ns->nsattr);
- json_object_add_value_int(root, "nvmsetid", le16_to_cpu(ns->nvmsetid));
- json_object_add_value_int(root, "endgid", le16_to_cpu(ns->endgid));
- json_object_add_value_int(root, "nstat", ns->nstat);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_cmd_set_independent_id_ns(
struct nvme_id_independent_id_ns *ns, unsigned int nsid,
enum nvme_print_flags flags)
@@ -4696,102 +2815,6 @@ void nvme_show_cmd_set_independent_id_ns(
nvme_show_cmd_set_independent_id_ns_nstat(ns->nstat);
}
-static void json_nvme_id_ns_descs(void *data)
-{
- /* large enough to hold uuid str (37) or nguid str (32) + zero byte */
- char json_str[40];
- char *json_str_p;
-
- union {
- __u8 eui64[NVME_NIDT_EUI64_LEN];
- __u8 nguid[NVME_NIDT_NGUID_LEN];
- __u8 uuid[NVME_UUID_LEN];
- __u8 csi;
- } desc;
-
- struct json_object *root;
- struct json_object *json_array = NULL;
-
- off_t off;
- int pos, len = 0;
- int i;
-
- for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) {
- struct nvme_ns_id_desc *cur = data + pos;
- const char *nidt_name = NULL;
-
- if (cur->nidl == 0)
- break;
-
- memset(json_str, 0, sizeof(json_str));
- json_str_p = json_str;
- off = pos + sizeof(*cur);
-
- switch (cur->nidt) {
- case NVME_NIDT_EUI64:
- memcpy(desc.eui64, data + off, sizeof(desc.eui64));
- for (i = 0; i < sizeof(desc.eui64); i++)
- json_str_p += sprintf(json_str_p, "%02x", desc.eui64[i]);
- len = sizeof(desc.eui64);
- nidt_name = "eui64";
- break;
-
- case NVME_NIDT_NGUID:
- memcpy(desc.nguid, data + off, sizeof(desc.nguid));
- for (i = 0; i < sizeof(desc.nguid); i++)
- json_str_p += sprintf(json_str_p, "%02x", desc.nguid[i]);
- len = sizeof(desc.nguid);
- nidt_name = "nguid";
- break;
-
- case NVME_NIDT_UUID:
- memcpy(desc.uuid, data + off, sizeof(desc.uuid));
- nvme_uuid_to_string(desc.uuid, json_str);
- len = sizeof(desc.uuid);
- nidt_name = "uuid";
- break;
-
- case NVME_NIDT_CSI:
- memcpy(&desc.csi, data + off, sizeof(desc.csi));
- sprintf(json_str_p, "%#x", desc.csi);
- len += sizeof(desc.csi);
- nidt_name = "csi";
- break;
- default:
- /* Skip unknown types */
- len = cur->nidl;
- break;
- }
-
- if (nidt_name) {
- struct json_object *elem = json_create_object();
-
- json_object_add_value_int(elem, "loc", pos);
- json_object_add_value_int(elem, "nidt", (int)cur->nidt);
- json_object_add_value_int(elem, "nidl", (int)cur->nidl);
- json_object_add_value_string(elem, "type", nidt_name);
- json_object_add_value_string(elem, nidt_name, json_str);
-
- if (!json_array) {
- json_array = json_create_array();
- }
- json_array_add_value_object(json_array, elem);
- }
-
- len += sizeof(*cur);
- }
-
- root = json_create_object();
-
- if (json_array)
- json_object_add_value_array(root, "ns-descs", json_array);
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
-}
-
void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flags)
{
int pos, len = 0;
@@ -5016,14 +3039,14 @@ void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
if (human)
nvme_show_id_ctrl_cctemp(ctrl->cctemp);
printf("mtfa : %d\n", le16_to_cpu(ctrl->mtfa));
- printf("hmpre : %d\n", le32_to_cpu(ctrl->hmpre));
- printf("hmmin : %d\n", le32_to_cpu(ctrl->hmmin));
+ printf("hmpre : %u\n", le32_to_cpu(ctrl->hmpre));
+ printf("hmmin : %u\n", le32_to_cpu(ctrl->hmmin));
printf("tnvmcap : %s\n",
- uint128_t_to_string(le128_to_cpu(ctrl->tnvmcap)));
+ uint128_t_to_l10n_string(le128_to_cpu(ctrl->tnvmcap)));
if (human)
nvme_show_id_ctrl_tnvmcap(ctrl->tnvmcap);
printf("unvmcap : %s\n",
- uint128_t_to_string(le128_to_cpu(ctrl->unvmcap)));
+ uint128_t_to_l10n_string(le128_to_cpu(ctrl->unvmcap)));
if (human)
nvme_show_id_ctrl_unvmcap(ctrl->unvmcap);
printf("rpmbs : %#x\n", le32_to_cpu(ctrl->rpmbs));
@@ -5058,7 +3081,7 @@ void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
printf("pels : %u\n", le32_to_cpu(ctrl->pels));
printf("domainid : %d\n", le16_to_cpu(ctrl->domainid));
printf("megcap : %s\n",
- uint128_t_to_string(le128_to_cpu(ctrl->megcap)));
+ uint128_t_to_l10n_string(le128_to_cpu(ctrl->megcap)));
printf("sqes : %#x\n", ctrl->sqes);
if (human)
nvme_show_id_ctrl_sqes(ctrl->sqes);
@@ -5066,7 +3089,7 @@ void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
if (human)
nvme_show_id_ctrl_cqes(ctrl->cqes);
printf("maxcmd : %d\n", le16_to_cpu(ctrl->maxcmd));
- printf("nn : %d\n", le32_to_cpu(ctrl->nn));
+ printf("nn : %u\n", le32_to_cpu(ctrl->nn));
printf("oncs : %#x\n", le16_to_cpu(ctrl->oncs));
if (human)
nvme_show_id_ctrl_oncs(ctrl->oncs);
@@ -5096,7 +3119,7 @@ void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
nvme_show_id_ctrl_sgls(ctrl->sgls);
printf("mnan : %u\n", le32_to_cpu(ctrl->mnan));
printf("maxdna : %s\n",
- uint128_t_to_string(le128_to_cpu(ctrl->maxdna)));
+ uint128_t_to_l10n_string(le128_to_cpu(ctrl->maxdna)));
printf("maxcna : %u\n", le32_to_cpu(ctrl->maxcna));
printf("subnqn : %-.*s\n", (int)sizeof(ctrl->subnqn), ctrl->subnqn);
printf("ioccsz : %u\n", le32_to_cpu(ctrl->ioccsz));
@@ -5119,23 +3142,6 @@ void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags,
}
}
-static void json_nvme_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm)
-{
- struct json_object *root;
-
- root = json_create_object();
- json_object_add_value_uint(root, "vsl", ctrl_nvm->vsl);
- json_object_add_value_uint(root, "wzsl", ctrl_nvm->wzsl);
- json_object_add_value_uint(root, "wusl", ctrl_nvm->wusl);
- json_object_add_value_uint(root, "dmrl", ctrl_nvm->dmrl);
- json_object_add_value_uint(root, "dmrsl", le32_to_cpu(ctrl_nvm->dmrsl));
- json_object_add_value_uint64(root, "dmsl", le64_to_cpu(ctrl_nvm->dmsl));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm,
enum nvme_print_flags flags)
{
@@ -5153,38 +3159,6 @@ void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm,
printf("dmsl : %"PRIu64"\n", le64_to_cpu(ctrl_nvm->dmsl));
}
-static void json_nvme_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns,
- struct nvme_id_ns *ns, bool cap_only)
-{
- struct json_object *root;
- struct json_object *elbafs;
- int i;
-
- root = json_create_object();
-
- if (!cap_only) {
- json_object_add_value_uint64(root, "lbstm", le64_to_cpu(nvm_ns->lbstm));
- }
- json_object_add_value_int(root, "pic", nvm_ns->pic);
-
- elbafs = json_create_array();
- json_object_add_value_array(root, "elbafs", elbafs);
-
- for (i = 0; i <= ns->nlbaf; i++) {
- struct json_object *elbaf = json_create_object();
- unsigned int elbaf_val = le32_to_cpu(nvm_ns->elbaf[i]);
-
- json_object_add_value_uint(elbaf, "sts", elbaf_val & 0x7F);
- json_object_add_value_uint(elbaf, "pif", (elbaf_val >> 7) & 0x3);
-
- json_array_add_value_object(elbafs, elbaf);
- }
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void nvme_show_nvm_id_ns_pic(__u8 pic)
{
__u8 rsvd = (pic & 0xF8) >> 3;
@@ -5244,18 +3218,6 @@ void nvme_show_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid,
}
}
-static void json_nvme_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl)
-{
- struct json_object *root;
-
- root = json_create_object();
- json_object_add_value_int(root, "zasl", ctrl->zasl);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, unsigned int mode)
{
if (mode & BINARY)
@@ -5267,48 +3229,6 @@ void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, unsigned int mode)
printf("zasl : %u\n", ctrl->zasl);
}
-static void json_nvme_zns_id_ns(struct nvme_zns_id_ns *ns,
- struct nvme_id_ns *id_ns)
-{
- struct json_object *root;
- struct json_object *lbafs;
- int i;
-
- root = json_create_object();
- json_object_add_value_int(root, "zoc", le16_to_cpu(ns->zoc));
- json_object_add_value_int(root, "ozcs", le16_to_cpu(ns->ozcs));
- json_object_add_value_uint(root, "mar", le32_to_cpu(ns->mar));
- json_object_add_value_uint(root, "mor", le32_to_cpu(ns->mor));
- json_object_add_value_uint(root, "rrl", le32_to_cpu(ns->rrl));
- json_object_add_value_uint(root, "frl", le32_to_cpu(ns->frl));
- json_object_add_value_uint(root, "rrl1", le32_to_cpu(ns->rrl1));
- json_object_add_value_uint(root, "rrl2", le32_to_cpu(ns->rrl2));
- json_object_add_value_uint(root, "rrl3", le32_to_cpu(ns->rrl3));
- json_object_add_value_uint(root, "frl1", le32_to_cpu(ns->frl1));
- json_object_add_value_uint(root, "frl2", le32_to_cpu(ns->frl2));
- json_object_add_value_uint(root, "frl3", le32_to_cpu(ns->frl3));
- json_object_add_value_uint(root, "numzrwa", le32_to_cpu(ns->numzrwa));
- json_object_add_value_int(root, "zrwafg", le16_to_cpu(ns->zrwafg));
- json_object_add_value_int(root, "zrwasz", le16_to_cpu(ns->zrwasz));
- json_object_add_value_int(root, "zrwacap", ns->zrwacap);
-
- lbafs = json_create_array();
- json_object_add_value_array(root, "lbafe", lbafs);
-
- for (i = 0; i <= id_ns->nlbaf; i++) {
- struct json_object *lbaf = json_create_object();
-
- json_object_add_value_int(lbaf, "zsze",
- le64_to_cpu(ns->lbafe[i].zsze));
- json_object_add_value_int(lbaf, "zdes", ns->lbafe[i].zdes);
-
- json_array_add_value_object(lbafs, lbaf);
- }
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void show_nvme_id_ns_zoned_zoc(__le16 ns_zoc)
{
__u16 zoc = le16_to_cpu(ns_zoc);
@@ -5447,30 +3367,6 @@ void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns,
}
}
-static void json_nvme_list_ns(struct nvme_ns_list *ns_list)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
- int i;
-
- root = json_create_object();
- valid = json_create_array();
-
- for (i = 0; i < 1024; i++) {
- if (ns_list->ns[i]) {
- valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "nsid",
- le32_to_cpu(ns_list->ns[i]));
- json_array_add_value_object(valid, valid_attrs);
- }
- }
- json_object_add_value_array(root, "nsid_list", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_list_ns(struct nvme_ns_list *ns_list, enum nvme_print_flags flags)
{
int i;
@@ -5505,7 +3401,7 @@ void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log,
printf("zid %03d: %"PRIu64"\n", i, (uint64_t)le64_to_cpu(log->zid[i]));
}
-static char *zone_type_to_string(__u8 cond)
+char *zone_type_to_string(__u8 cond)
{
switch (cond) {
case NVME_ZONE_TYPE_SEQWRITE_REQ:
@@ -5515,7 +3411,7 @@ static char *zone_type_to_string(__u8 cond)
}
}
-static char *zone_state_to_string(__u8 state)
+char *zone_state_to_string(__u8 state)
{
switch (state) {
case NVME_ZNS_ZS_EMPTY:
@@ -5537,61 +3433,6 @@ static char *zone_state_to_string(__u8 state)
}
}
-void json_nvme_finish_zone_list(__u64 nr_zones,
- struct json_object *zone_list)
-{
- struct json_object *root = json_create_object();
- json_object_add_value_uint(root, "nr_zones", nr_zones);
- json_object_add_value_array(root, "zone_list", zone_list);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
-static void json_nvme_zns_report_zones(void *report, __u32 descs,
- __u8 ext_size, __u32 report_size,
- struct json_object *zone_list)
-{
- struct json_object *zone;
- struct json_object *ext_data;
- struct nvme_zone_report *r = report;
- struct nvme_zns_desc *desc;
- int i;
-
- for (i = 0; i < descs; i++) {
- desc = (struct nvme_zns_desc *)
- (report + sizeof(*r) + i * (sizeof(*desc) + ext_size));
- zone = json_create_object();
-
- json_object_add_value_uint64(zone, "slba",
- le64_to_cpu(desc->zslba));
- json_object_add_value_uint64(zone, "wp",
- le64_to_cpu(desc->wp));
- json_object_add_value_uint64(zone, "cap",
- le64_to_cpu(desc->zcap));
- json_object_add_value_string(zone, "state",
- zone_state_to_string(desc->zs >> 4));
- json_object_add_value_string(zone, "type",
- zone_type_to_string(desc->zt));
- json_object_add_value_uint(zone, "attrs", desc->za);
- json_object_add_value_uint(zone, "attrs", desc->zai);
-
- if (ext_size) {
- if (desc->za & NVME_ZNS_ZA_ZDEV) {
- ext_data = json_create_array();
- d_json((unsigned char *)desc + sizeof(*desc),
- ext_size, 16, 1, ext_data);
- json_object_add_value_array(zone, "ext_data",
- ext_data);
- } else {
- json_object_add_value_string(zone, "ext_data", "Not valid");
- }
- }
-
- json_array_add_value_object(zone_list, zone);
- }
-}
-
static void nvme_show_zns_report_zone_attributes(__u8 za, __u8 zai)
{
const char *const recommended_limit[4] = {"","1","2","3"};
@@ -5653,33 +3494,6 @@ void nvme_show_zns_report_zones(void *report, __u32 descs,
}
}
-static void json_nvme_list_ctrl(struct nvme_ctrl_list *ctrl_list, __u16 num)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
- int i;
-
- root = json_create_object();
- valid = json_create_array();
-
- json_object_add_value_uint(root, "num_ctrl",
- le16_to_cpu(ctrl_list->num));
-
- for (i = 0; i < min(num, 2047); i++) {
-
- valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "ctrl_id",
- le16_to_cpu(ctrl_list->identifier[i]));
- json_array_add_value_object(valid, valid_attrs);
- }
-
- json_object_add_value_array(root, "ctrl_list", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list,
enum nvme_print_flags flags)
{
@@ -5697,42 +3511,6 @@ void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list,
}
}
-static void json_nvme_id_nvmset(struct nvme_id_nvmset_list *nvmset)
-{
- __u32 nent = nvmset->nid;
- struct json_object *entries;
- struct json_object *root;
- int i;
-
- root = json_create_object();
-
- json_object_add_value_int(root, "nid", nent);
-
- entries = json_create_array();
- for (i = 0; i < nent; i++) {
- struct json_object *entry = json_create_object();
-
- json_object_add_value_int(entry, "nvmset_id",
- le16_to_cpu(nvmset->ent[i].nvmsetid));
- json_object_add_value_int(entry, "endurance_group_id",
- le16_to_cpu(nvmset->ent[i].endgid));
- json_object_add_value_uint(entry, "random_4k_read_typical",
- le32_to_cpu(nvmset->ent[i].rr4kt));
- json_object_add_value_uint(entry, "optimal_write_size",
- le32_to_cpu(nvmset->ent[i].ows));
- json_object_add_value_uint128(entry, "total_nvmset_cap",
- le128_to_cpu(nvmset->ent[i].tnvmsetcap));
- json_object_add_value_uint128(entry, "unalloc_nvmset_cap",
- le128_to_cpu(nvmset->ent[i].unvmsetcap));
- json_array_add_value_object(entries, entry);
- }
-
- json_object_add_value_array(root, "NVMSet", entries);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id,
enum nvme_print_flags flags)
{
@@ -5758,44 +3536,15 @@ void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id,
printf("optimal_write_size : %u\n",
le32_to_cpu(nvmset->ent[i].ows));
printf("total_nvmset_cap : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(nvmset->ent[i].tnvmsetcap)));
printf("unalloc_nvmset_cap : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(nvmset->ent[i].unvmsetcap)));
printf(".................\n");
}
}
-static void json_nvme_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps)
-{
- struct json_object *root;
-
- root = json_create_object();
-
- json_object_add_value_uint(root, "cntlid", le16_to_cpu(caps->cntlid));
- json_object_add_value_uint(root, "portid", le16_to_cpu(caps->portid));
- json_object_add_value_uint(root, "crt", caps->crt);
-
- json_object_add_value_uint(root, "vqfrt", le32_to_cpu(caps->vqfrt));
- json_object_add_value_uint(root, "vqrfa", le32_to_cpu(caps->vqrfa));
- json_object_add_value_int(root, "vqrfap", le16_to_cpu(caps->vqrfap));
- json_object_add_value_int(root, "vqprt", le16_to_cpu(caps->vqprt));
- json_object_add_value_int(root, "vqfrsm", le16_to_cpu(caps->vqfrsm));
- json_object_add_value_int(root, "vqgran", le16_to_cpu(caps->vqgran));
-
- json_object_add_value_uint(root, "vifrt", le32_to_cpu(caps->vifrt));
- json_object_add_value_uint(root, "virfa", le32_to_cpu(caps->virfa));
- json_object_add_value_int(root, "virfap", le16_to_cpu(caps->virfap));
- json_object_add_value_int(root, "viprt", le16_to_cpu(caps->viprt));
- json_object_add_value_int(root, "vifrsm", le16_to_cpu(caps->vifrsm));
- json_object_add_value_int(root, "vigran", le16_to_cpu(caps->vigran));
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static void nvme_show_primary_ctrl_caps_crt(__u8 crt)
{
__u8 rsvd = (crt & 0xFC) >> 2;
@@ -5838,47 +3587,6 @@ void nvme_show_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps,
printf("vigran : %d\n", le16_to_cpu(caps->vigran));
}
-static void json_nvme_list_secondary_ctrl(const struct nvme_secondary_ctrl_list *sc_list,
- __u32 count)
-{
- const struct nvme_secondary_ctrl *sc_entry = &sc_list->sc_entry[0];
- __u32 nent = min(sc_list->num, count);
- struct json_object *entries;
- struct json_object *root;
- int i;
-
- root = json_create_object();
-
- json_object_add_value_int(root, "num", nent);
-
- entries = json_create_array();
- for (i = 0; i < nent; i++) {
- struct json_object *entry = json_create_object();
-
- json_object_add_value_int(entry,
- "secondary-controller-identifier",
- le16_to_cpu(sc_entry[i].scid));
- json_object_add_value_int(entry,
- "primary-controller-identifier",
- le16_to_cpu(sc_entry[i].pcid));
- json_object_add_value_int(entry, "secondary-controller-state",
- sc_entry[i].scs);
- json_object_add_value_int(entry, "virtual-function-number",
- le16_to_cpu(sc_entry[i].vfn));
- json_object_add_value_int(entry, "num-virtual-queues",
- le16_to_cpu(sc_entry[i].nvq));
- json_object_add_value_int(entry, "num-virtual-interrupts",
- le16_to_cpu(sc_entry[i].nvi));
- json_array_add_value_object(entries, entry);
- }
-
- json_object_add_value_array(root, "secondary-controllers", entries);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_list_secondary_ctrl(
const struct nvme_secondary_ctrl_list *sc_list,
__u32 count, enum nvme_print_flags flags)
@@ -5918,37 +3626,6 @@ void nvme_show_list_secondary_ctrl(
}
}
-static void json_nvme_id_ns_granularity_list(
- const struct nvme_id_ns_granularity_list *glist)
-{
- int i;
- struct json_object *root;
- struct json_object *entries;
-
- root = json_create_object();
-
- json_object_add_value_int(root, "attributes", glist->attributes);
- json_object_add_value_int(root, "num-descriptors",
- glist->num_descriptors);
-
- entries = json_create_array();
- for (i = 0; i <= glist->num_descriptors; i++) {
- struct json_object *entry = json_create_object();
-
- json_object_add_value_uint64(entry, "namespace-size-granularity",
- le64_to_cpu(glist->entry[i].nszegran));
- json_object_add_value_uint64(entry, "namespace-capacity-granularity",
- le64_to_cpu(glist->entry[i].ncapgran));
- json_array_add_value_object(entries, entry);
- }
-
- json_object_add_value_array(root, "namespace-granularity-list", entries);
-
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *glist,
enum nvme_print_flags flags)
{
@@ -5976,35 +3653,6 @@ void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *
}
}
-static void json_nvme_id_uuid_list(const struct nvme_id_uuid_list *uuid_list)
-{
- struct json_object *root;
- struct json_object *entries;
- int i;
-
- root = json_create_object();
- entries = json_create_array();
- /* The 0th entry is reserved */
- for (i = 1; i < NVME_ID_UUID_LIST_MAX; i++) {
- __u8 uuid[NVME_UUID_LEN];
- struct json_object *entry = json_create_object();
-
- /* The list is terminated by a zero UUID value */
- if (memcmp(uuid_list->entry[i].uuid, zero_uuid, sizeof(zero_uuid)) == 0)
- break;
- memcpy(&uuid, uuid_list->entry[i].uuid, sizeof(uuid));
- json_object_add_value_int(entry, "association",
- uuid_list->entry[i].header & 0x3);
- json_object_add_value_string(entry, "uuid",
- util_uuid_to_string(uuid));
- json_array_add_value_object(entries, entry);
- }
- json_object_add_value_array(root, "UUID-list", entries);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list,
enum nvme_print_flags flags)
{
@@ -6052,39 +3700,6 @@ void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list,
}
}
-static void json_id_domain_list(struct nvme_id_domain_list *id_dom)
-{
- struct json_object *root;
- struct json_object *entries;
- struct json_object *entry;
- int i;
- nvme_uint128_t dom_cap, unalloc_dom_cap, max_egrp_dom_cap;
-
- root = json_create_object();
- entries = json_create_array();
-
- json_object_add_value_uint(root, "num_dom_entries", id_dom->num);
-
- for (i = 0; i < id_dom->num; i++) {
- entry = json_create_object();
- dom_cap = le128_to_cpu(id_dom->domain_attr[i].dom_cap);
- unalloc_dom_cap = le128_to_cpu(id_dom->domain_attr[i].unalloc_dom_cap);
- max_egrp_dom_cap = le128_to_cpu(id_dom->domain_attr[i].max_egrp_dom_cap);
-
- json_object_add_value_uint(entry, "dom_id", le16_to_cpu(id_dom->domain_attr[i].dom_id));
- json_object_add_value_uint128(entry, "dom_cap", dom_cap);
- json_object_add_value_uint128(entry, "unalloc_dom_cap", unalloc_dom_cap);
- json_object_add_value_uint128(entry, "max_egrp_dom_cap", max_egrp_dom_cap);
-
- json_array_add_value_object(entries, entry);
- }
-
- json_object_add_value_array(root, "domain_list", entries);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom,
enum nvme_print_flags flags)
{
@@ -6099,43 +3714,17 @@ void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom,
printf("Domain Id for Attr Entry[%u]: %u\n", i,
le16_to_cpu(id_dom->domain_attr[i].dom_id));
printf("Domain Capacity for Attr Entry[%u]: %s\n", i,
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(id_dom->domain_attr[i].dom_cap)));
printf("Unallocated Domain Capacity for Attr Entry[%u]: %s\n", i,
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(id_dom->domain_attr[i].unalloc_dom_cap)));
printf("Max Endurance Group Domain Capacity for Attr Entry[%u]: %s\n", i,
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(id_dom->domain_attr[i].max_egrp_dom_cap)));
}
}
-static void json_nvme_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list)
-{
- struct json_object *root;
- struct json_object *valid_attrs;
- struct json_object *valid;
- int i;
-
- root = json_create_object();
- valid = json_create_array();
-
- json_object_add_value_uint(root, "num_endgrp_id",
- le16_to_cpu(endgrp_list->num));
-
- for (i = 0; i < min(le16_to_cpu(endgrp_list->num), 2047); i++) {
- valid_attrs = json_create_object();
- json_object_add_value_uint(valid_attrs, "endgrp_id",
- le16_to_cpu(endgrp_list->identifier[i]));
- json_array_add_value_object(valid, valid_attrs);
- }
-
- json_object_add_value_array(root, "endgrp_list", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list,
enum nvme_print_flags flags)
{
@@ -6209,9 +3798,12 @@ void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries,
printf("vs : %d\n", err_log[i].vs);
printf("trtype : %s\n",
nvme_trtype_to_string(err_log[i].trtype));
+ printf("csi : %d\n", err_log[i].csi);
+ printf("opcode : %#x\n", err_log[i].opcode);
printf("cs : %#"PRIx64"\n",
le64_to_cpu(err_log[i].cs));
printf("trtype_spec_info: %#x\n", err_log[i].trtype_spec_info);
+ printf("log_page_version: %d\n", err_log[i].log_page_version);
printf(".................\n");
}
}
@@ -6481,34 +4073,6 @@ static void nvme_show_support_log_human(__u32 support, __u8 lid)
}
}
-static void json_support_log(struct nvme_supported_log_pages *support_log)
-{
- struct json_object *root;
- struct json_object *valid;
- struct json_object *valid_attrs;
- unsigned int lid;
- char key[128];
- __u32 support;
-
- root = json_create_object();
- valid = json_create_object();
-
- for (lid = 0; lid < 256; lid++) {
- support = le32_to_cpu(support_log->lid_support[lid]);
- if (support & 0x1) {
- valid_attrs = json_create_object();
- sprintf(key, "lid_0x%x ", lid);
- json_object_add_value_uint(valid_attrs, key, support);
- json_array_add_value_object(valid, valid_attrs);
- }
- }
-
- json_object_add_value_object(root, "supported_logs", valid);
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
void nvme_show_supported_log(struct nvme_supported_log_pages *support_log,
const char *devname, enum nvme_print_flags flags)
{
@@ -6524,12 +4088,9 @@ void nvme_show_supported_log(struct nvme_supported_log_pages *support_log,
for (lid = 0; lid < 256; lid++) {
support = le32_to_cpu(support_log->lid_support[lid]);
if (support & 0x1) {
- printf("LID 0x%x (%s), supports 0x%x\n", lid, nvme_log_to_string(lid),
- support);
+ printf("LID 0x%x - %s\n", lid, nvme_log_to_string(lid));
if (human)
nvme_show_support_log_human(support, lid);
- else
- printf("\n");
}
}
}
@@ -6553,28 +4114,28 @@ void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log,
endurance_log->avl_spare_threshold);
printf("percent_used : %u%%\n", endurance_log->percent_used);
printf("endurance_estimate : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->endurance_estimate)));
printf("data_units_read : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->data_units_read)));
printf("data_units_written : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->data_units_written)));
printf("media_units_written : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->media_units_written)));
printf("host_read_cmds : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->host_read_cmds)));
printf("host_write_cmds : %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->host_write_cmds)));
printf("media_data_integrity_err: %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->media_data_integrity_err)));
printf("num_err_info_log_entries: %s\n",
- uint128_t_to_string(
+ uint128_t_to_l10n_string(
le128_to_cpu(endurance_log->num_err_info_log_entries)));
}
@@ -6603,7 +4164,7 @@ void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
printf(" Persistent Mem. RO[5] : %d\n", (smart->critical_warning & 0x20) >> 5);
}
- printf("temperature : %ld°C (%u Kelvin)\n",
+ printf("temperature : %ld °C (%u K)\n",
kelvin_to_celsius(temperature), temperature);
printf("available_spare : %u%%\n",
smart->avail_spare);
@@ -6614,29 +4175,29 @@ void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
printf("endurance group critical warning summary: %#x\n",
smart->endu_grp_crit_warn_sumry);
printf("Data Units Read : %s (%s)\n",
- uint128_t_to_string(le128_to_cpu(smart->data_units_read)),
+ uint128_t_to_l10n_string(le128_to_cpu(smart->data_units_read)),
uint128_t_to_si_string(le128_to_cpu(smart->data_units_read),
1000 * 512));
printf("Data Units Written : %s (%s)\n",
- uint128_t_to_string(le128_to_cpu(smart->data_units_written)),
+ uint128_t_to_l10n_string(le128_to_cpu(smart->data_units_written)),
uint128_t_to_si_string(le128_to_cpu(smart->data_units_written),
1000 * 512));
printf("host_read_commands : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->host_reads)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->host_reads)));
printf("host_write_commands : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->host_writes)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->host_writes)));
printf("controller_busy_time : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->ctrl_busy_time)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->ctrl_busy_time)));
printf("power_cycles : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->power_cycles)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->power_cycles)));
printf("power_on_hours : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->power_on_hours)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->power_on_hours)));
printf("unsafe_shutdowns : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->unsafe_shutdowns)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->unsafe_shutdowns)));
printf("media_errors : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->media_errors)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->media_errors)));
printf("num_err_log_entries : %s\n",
- uint128_t_to_string(le128_to_cpu(smart->num_err_log_entries)));
+ uint128_t_to_l10n_string(le128_to_cpu(smart->num_err_log_entries)));
printf("Warning Temperature Time : %u\n",
le32_to_cpu(smart->warning_temp_time));
printf("Critical Composite Temperature Time : %u\n",
@@ -6646,7 +4207,7 @@ void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid,
if (temp == 0)
continue;
- printf("Temperature Sensor %d : %ld°C (%u Kelvin)\n",
+ printf("Temperature Sensor %d : %ld °C (%u K)\n",
i + 1, kelvin_to_celsius(temp), temp);
}
printf("Thermal Management T1 Trans Count : %u\n",
@@ -7346,7 +4907,7 @@ void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, un
field = (result & 0x000f0000) >> 16;
printf("\tThreshold Temperature Select (TMPSEL): %u - %s\n",
field, nvme_feature_temp_sel_to_string(field));
- printf("\tTemperature Threshold (TMPTH): %ld°C (%u Kelvin)\n",
+ printf("\tTemperature Threshold (TMPTH): %ld °C (%u K)\n",
kelvin_to_celsius(result & 0x0000ffff), result & 0x0000ffff);
break;
case NVME_FEAT_FID_ERR_RECOVERY:
@@ -7412,9 +4973,9 @@ void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, un
printf("\tKeep Alive Timeout (KATO) in milliseconds: %u\n", result);
break;
case NVME_FEAT_FID_HCTM:
- printf("\tThermal Management Temperature 1 (TMT1) : %u Kelvin (%ld°C)\n",
+ printf("\tThermal Management Temperature 1 (TMT1) : %u K (%ld °C)\n",
result >> 16, kelvin_to_celsius(result >> 16));
- printf("\tThermal Management Temperature 2 (TMT2) : %u Kelvin (%ld°C)\n",
+ printf("\tThermal Management Temperature 2 (TMT2) : %u K (%ld °C)\n",
result & 0x0000ffff, kelvin_to_celsius(result & 0x0000ffff));
break;
case NVME_FEAT_FID_NOPSC:
@@ -7536,7 +5097,7 @@ void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len,
}
}
-static void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len)
+void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len)
{
struct stat st;
@@ -7555,7 +5116,7 @@ static void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len)
snprintf(path, len, "%s", nvme_ns_get_name(n));
}
-static void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len)
+void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len)
{
int head_instance;
int instance;
@@ -7567,7 +5128,7 @@ static void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len)
if (stat(path, &st) == 0)
return;
- snprintf(path, len, "/dev/spkd/ng%dn%d", instance, head_instance);
+ snprintf(path, len, "/dev/spdk/ng%dn%d", instance, head_instance);
if (stat(path, &st) == 0)
return;
/*
@@ -7598,7 +5159,7 @@ void nvme_show_list_item(nvme_ns_t n)
nvme_dev_full_path(n, devname, sizeof(devname));
nvme_generic_full_path(n, genname, sizeof(genname));
- printf("%-21s %-21s %-20s %-40s %-9d %-26s %-16s %-8s\n",
+ printf("%-21s %-21s %-20s %-40s %#-10x %-26s %-16s %-8s\n",
devname, genname, nvme_ns_get_serial(n),
nvme_ns_get_model(n), nvme_ns_get_nsid(n), usage, format,
nvme_ns_get_firmware(n));
@@ -7611,9 +5172,9 @@ static void nvme_show_simple_list(nvme_root_t r)
nvme_ctrl_t c;
nvme_ns_t n;
- printf("%-21s %-21s %-20s %-40s %-9s %-26s %-16s %-8s\n",
+ printf("%-21s %-21s %-20s %-40s %-10s %-26s %-16s %-8s\n",
"Node", "Generic", "SN", "Model", "Namespace", "Usage", "Format", "FW Rev");
- printf("%-.21s %-.21s %-.20s %-.40s %-.9s %-.26s %-.16s %-.8s\n",
+ printf("%-.21s %-.21s %-.20s %-.40s %-.10s %-.26s %-.16s %-.8s\n",
dash, dash, dash, dash, dash, dash, dash, dash);
nvme_for_each_host(r, h) {
@@ -7648,7 +5209,7 @@ static void nvme_show_ns_details(nvme_ns_t n)
nvme_dev_full_path(n, devname, sizeof(devname));
nvme_generic_full_path(n, genname, sizeof(genname));
- printf("%-12s %-12s %-8x %-26s %-16s ", devname,
+ printf("%-12s %-12s %#-10x %-26s %-16s ", devname,
genname, nvme_ns_get_nsid(n), usage, format);
}
@@ -7718,9 +5279,9 @@ static void nvme_show_detailed_list(nvme_root_t r)
}
printf("\n");
- printf("%-12s %-12s %-8s %-26s %-16s %-16s\n", "Device", "Generic",
+ printf("%-12s %-12s %-10s %-26s %-16s %-16s\n", "Device", "Generic",
"NSID", "Usage", "Format", "Controllers");
- printf("%-.12s %-.12s %-.8s %-.26s %-.16s %-.16s\n", dash, dash, dash,
+ printf("%-.12s %-.12s %-.10s %-.26s %-.16s %-.16s\n", dash, dash, dash,
dash, dash, dash);
nvme_for_each_host(r, h) {
@@ -7747,169 +5308,6 @@ static void nvme_show_detailed_list(nvme_root_t r)
}
}
-static void json_detail_list(nvme_root_t r)
-{
- struct json_object *jroot = json_create_object();
- struct json_object *jdev = json_create_array();
-
- nvme_host_t h;
- nvme_subsystem_t s;
- nvme_ctrl_t c;
- nvme_path_t p;
- nvme_ns_t n;
-
- nvme_for_each_host(r, h) {
- struct json_object *hss = json_create_object();
- struct json_object *jsslist = json_create_array();
- const char *hostid;
-
- json_object_add_value_string(hss, "HostNQN", nvme_host_get_hostnqn(h));
- hostid = nvme_host_get_hostid(h);
- if (hostid)
- json_object_add_value_string(hss, "HostID", hostid);
-
- nvme_for_each_subsystem(h , s) {
- struct json_object *jss = json_create_object();
- struct json_object *jctrls = json_create_array();
- struct json_object *jnss = json_create_array();
-
- json_object_add_value_string(jss, "Subsystem", nvme_subsystem_get_name(s));
- json_object_add_value_string(jss, "SubsystemNQN", nvme_subsystem_get_nqn(s));
-
- nvme_subsystem_for_each_ctrl(s, c) {
- struct json_object *jctrl = json_create_object();
- struct json_object *jnss = json_create_array();
- struct json_object *jpaths = json_create_array();
-
- json_object_add_value_string(jctrl, "Controller", nvme_ctrl_get_name(c));
- json_object_add_value_string(jctrl, "SerialNumber", nvme_ctrl_get_serial(c));
- json_object_add_value_string(jctrl, "ModelNumber", nvme_ctrl_get_model(c));
- json_object_add_value_string(jctrl, "Firmware", nvme_ctrl_get_firmware(c));
- json_object_add_value_string(jctrl, "Transport", nvme_ctrl_get_transport(c));
- json_object_add_value_string(jctrl, "Address", nvme_ctrl_get_address(c));
-
- nvme_ctrl_for_each_ns(c, n) {
- struct json_object *jns = json_create_object();
- int lba = nvme_ns_get_lba_size(n);
- uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
- uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
-
- json_object_add_value_string(jns, "NameSpace", nvme_ns_get_name(n));
- json_object_add_value_int(jns, "NSID", nvme_ns_get_nsid(n));
- json_object_add_value_uint64(jns, "UsedBytes", nuse);
- json_object_add_value_uint64(jns, "MaximumLBA", nvme_ns_get_lba_count(n));
- json_object_add_value_uint64(jns, "PhysicalSize", nsze);
- json_object_add_value_int(jns, "SectorSize", lba);
-
- json_array_add_value_object(jnss, jns);
- }
- json_object_add_value_object(jctrl, "Namespaces", jnss);
-
- nvme_ctrl_for_each_path(c, p) {
- struct json_object *jpath = json_create_object();
-
- json_object_add_value_string(jpath, "Path", nvme_path_get_name(p));
- json_object_add_value_string(jpath, "ANAState", nvme_path_get_ana_state(p));
-
- json_array_add_value_object(jpaths, jpath);
- }
- json_object_add_value_object(jctrl, "Paths", jpaths);
-
- json_array_add_value_object(jctrls, jctrl);
- }
- json_object_add_value_object(jss, "Controllers", jctrls);
-
- nvme_subsystem_for_each_ns(s, n) {
- struct json_object *jns = json_create_object();
-
- int lba = nvme_ns_get_lba_size(n);
- uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
- uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
-
- json_object_add_value_string(jns, "NameSpace", nvme_ns_get_name(n));
- json_object_add_value_int(jns, "NSID", nvme_ns_get_nsid(n));
- json_object_add_value_uint64(jns, "UsedBytes", nuse);
- json_object_add_value_uint64(jns, "MaximumLBA", nvme_ns_get_lba_count(n));
- json_object_add_value_uint64(jns, "PhysicalSize", nsze);
- json_object_add_value_int(jns, "SectorSize", lba);
-
- json_array_add_value_object(jnss, jns);
- }
- json_object_add_value_object(jss, "Namespaces", jnss);
-
- json_array_add_value_object(jsslist, jss);
- }
-
- json_object_add_value_object(hss, "Subsystems", jsslist);
- json_array_add_value_object(jdev, hss);
- }
- json_object_add_value_array(jroot, "Devices", jdev);
- json_print_object(jroot, NULL);
- printf("\n");
- json_free_object(jroot);
-}
-
-static struct json_object *json_list_item(nvme_ns_t n)
-{
- struct json_object *jdevice = json_create_object();
- char devname[128] = { 0 };
-
- int lba = nvme_ns_get_lba_size(n);
- uint64_t nsze = nvme_ns_get_lba_count(n) * lba;
- uint64_t nuse = nvme_ns_get_lba_util(n) * lba;
-
- nvme_dev_full_path(n, devname, sizeof(devname));
-
- json_object_add_value_int(jdevice, "NameSpace", nvme_ns_get_nsid(n));
- json_object_add_value_string(jdevice, "DevicePath", devname);
- json_object_add_value_string(jdevice, "Firmware", nvme_ns_get_firmware(n));
- json_object_add_value_string(jdevice, "ModelNumber", nvme_ns_get_model(n));
- json_object_add_value_string(jdevice, "SerialNumber", nvme_ns_get_serial(n));
- json_object_add_value_uint64(jdevice, "UsedBytes", nuse);
- json_object_add_value_uint64(jdevice, "MaximumLBA", nvme_ns_get_lba_count(n));
- json_object_add_value_uint64(jdevice, "PhysicalSize", nsze);
- json_object_add_value_int(jdevice, "SectorSize", lba);
-
- return jdevice;
-}
-
-static void json_simple_list(nvme_root_t r)
-{
- struct json_object *jroot = json_create_object();
- struct json_object *jdevices = json_create_array();
-
- nvme_host_t h;
- nvme_subsystem_t s;
- nvme_ctrl_t c;
- nvme_ns_t n;
-
- nvme_for_each_host(r, h) {
- nvme_for_each_subsystem(h, s) {
- nvme_subsystem_for_each_ns(s, n)
- json_array_add_value_object(jdevices,
- json_list_item(n));
-
- nvme_subsystem_for_each_ctrl(s, c)
- nvme_ctrl_for_each_ns(c, n)
- json_array_add_value_object(jdevices,
- json_list_item(n));
- }
- }
- json_object_add_value_array(jroot, "Devices", jdevices);
- json_print_object(jroot, NULL);
- printf("\n");
- json_free_object(jroot);
-}
-
-static void json_print_list_items(nvme_root_t r,
- enum nvme_print_flags flags)
-{
- if (flags & VERBOSE)
- json_detail_list(r);
- else
- json_simple_list(r);
-}
-
void nvme_show_list_items(nvme_root_t r, enum nvme_print_flags flags)
{
if (flags & JSON)
@@ -7920,126 +5318,6 @@ void nvme_show_list_items(nvme_root_t r, enum nvme_print_flags flags)
nvme_show_simple_list(r);
}
-static unsigned int json_subsystem_topology_multipath(nvme_subsystem_t s,
- json_object *namespaces)
-{
- nvme_ns_t n;
- nvme_path_t p;
- unsigned int i = 0;
-
- nvme_subsystem_for_each_ns(s, n) {
- struct json_object *ns_attrs;
- struct json_object *paths;
-
- ns_attrs = json_create_object();
- json_object_add_value_int(ns_attrs, "NSID",
- nvme_ns_get_nsid(n));
-
- paths = json_create_array();
- nvme_namespace_for_each_path(n, p) {
- struct json_object *path_attrs;
-
- nvme_ctrl_t c = nvme_path_get_ctrl(p);
-
- path_attrs = json_create_object();
- json_object_add_value_string(path_attrs, "Name",
- nvme_ctrl_get_name(c));
- json_object_add_value_string(path_attrs, "Transport",
- nvme_ctrl_get_transport(c));
- json_object_add_value_string(path_attrs, "Address",
- nvme_ctrl_get_address(c));
- json_object_add_value_string(path_attrs, "State",
- nvme_ctrl_get_state(c));
- json_object_add_value_string(path_attrs, "ANAState",
- nvme_path_get_ana_state(p));
- json_array_add_value_object(paths, path_attrs);
- }
- json_object_add_value_array(ns_attrs, "Paths", paths);
- json_array_add_value_object(namespaces, ns_attrs);
- i++;
- }
-
- return i;
-}
-
-static void json_print_nvme_subsystem_topology(nvme_subsystem_t s,
- json_object *namespaces)
-{
- nvme_ctrl_t c;
- nvme_ns_t n;
-
- nvme_subsystem_for_each_ctrl(s, c) {
- nvme_ctrl_for_each_ns(c, n) {
- struct json_object *ctrl_attrs;
- struct json_object *ns_attrs;
- struct json_object *ctrl;
-
- ns_attrs = json_create_object();
- json_object_add_value_int(ns_attrs, "NSID",
- nvme_ns_get_nsid(n));
-
- ctrl = json_create_array();
- ctrl_attrs = json_create_object();
- json_object_add_value_string(ctrl_attrs, "Name",
- nvme_ctrl_get_name(c));
- json_object_add_value_string(ctrl_attrs, "Transport",
- nvme_ctrl_get_transport(c));
- json_object_add_value_string(ctrl_attrs, "Address",
- nvme_ctrl_get_address(c));
- json_object_add_value_string(ctrl_attrs, "State",
- nvme_ctrl_get_state(c));
-
- json_array_add_value_object(ctrl, ctrl_attrs);
- json_object_add_value_array(ns_attrs, "Controller", ctrl);
- json_array_add_value_object(namespaces, ns_attrs);
- }
- }
-}
-
-static void json_simple_topology(nvme_root_t r)
-{
- struct json_object *host_attrs, *subsystem_attrs;
- struct json_object *subsystems, *namespaces;
- struct json_object *root;
- nvme_host_t h;
-
- root = json_create_array();
-
- nvme_for_each_host(r, h) {
- nvme_subsystem_t s;
- const char *hostid;
-
- host_attrs = json_create_object();
- json_object_add_value_string(host_attrs, "HostNQN",
- nvme_host_get_hostnqn(h));
- hostid = nvme_host_get_hostid(h);
- if (hostid)
- json_object_add_value_string(host_attrs, "HostID", hostid);
- subsystems = json_create_array();
- nvme_for_each_subsystem(h, s) {
- subsystem_attrs = json_create_object();
- json_object_add_value_string(subsystem_attrs, "Name",
- nvme_subsystem_get_name(s));
- json_object_add_value_string(subsystem_attrs, "NQN",
- nvme_subsystem_get_nqn(s));
-
- json_array_add_value_object(subsystems, subsystem_attrs);
- namespaces = json_create_array();
-
- if (!json_subsystem_topology_multipath(s, namespaces))
- json_print_nvme_subsystem_topology(s, namespaces);
-
- json_object_add_value_array(subsystem_attrs, "Namespaces",
- namespaces);
- }
- json_object_add_value_array(host_attrs, "Subsystems", subsystems);
- json_array_add_value_object(root, host_attrs);
- }
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
-}
-
static bool nvme_is_multipath(nvme_subsystem_t s)
{
nvme_ns_t n;
diff --git a/nvme-print.h b/nvme-print.h
index 35a9aa8..7a4ceee 100644
--- a/nvme-print.h
+++ b/nvme-print.h
@@ -148,4 +148,12 @@ const char *nvme_select_to_string(int sel);
const char *nvme_feature_to_string(enum nvme_features_id feature);
const char *nvme_register_to_string(int reg);
+void nvme_dev_full_path(nvme_ns_t n, char *path, size_t len);
+void nvme_generic_full_path(nvme_ns_t n, char *path, size_t len);
+char *zone_type_to_string(__u8 cond);
+char *zone_state_to_string(__u8 state);
+const char *nvme_pel_event_to_string(int type);
+const char *get_sanitize_log_sstat_status_str(__u16 status);
+const char *nvme_ana_state_to_string(enum nvme_ana_state state);
+
#endif
diff --git a/nvme-wrap.c b/nvme-wrap.c
index ae7cd92..cee9b23 100644
--- a/nvme-wrap.c
+++ b/nvme-wrap.c
@@ -158,6 +158,12 @@ int nvme_cli_get_log(struct nvme_dev *dev, struct nvme_get_log_args *args)
return do_admin_args_op(get_log, dev, args);
}
+int nvme_cli_get_log_page(struct nvme_dev *dev, __u32 xfer_len,
+ struct nvme_get_log_args *args)
+{
+ return do_admin_op(get_log_page, dev, xfer_len, args);
+}
+
int nvme_cli_get_nsid_log(struct nvme_dev *dev, bool rae,
enum nvme_cmd_get_log_lid lid,
__u32 nsid, __u32 len, void *log)
diff --git a/nvme-wrap.h b/nvme-wrap.h
index 4dcc665..e44a4f2 100644
--- a/nvme-wrap.h
+++ b/nvme-wrap.h
@@ -51,6 +51,9 @@ int nvme_cli_get_features(struct nvme_dev *dev,
int nvme_cli_get_log(struct nvme_dev *dev, struct nvme_get_log_args *args);
+int nvme_cli_get_log_page(struct nvme_dev *dev,
+ __u32 xfer_len,
+ struct nvme_get_log_args *args);
int nvme_cli_get_nsid_log(struct nvme_dev *dev, bool rae,
enum nvme_cmd_get_log_lid lid,
diff --git a/nvme.c b/nvme.c
index 350e823..26ddc24 100644
--- a/nvme.c
+++ b/nvme.c
@@ -39,7 +39,6 @@
#include <math.h>
#include <dirent.h>
#include <libgen.h>
-#include <zlib.h>
#include <signal.h>
#ifdef CONFIG_LIBHUGETLBFS
@@ -62,6 +61,7 @@
#include "nvme-print.h"
#include "plugin.h"
#include "util/base64.h"
+#include "util/crc32.h"
#include "nvme-wrap.h"
#include "util/argconfig.h"
@@ -408,7 +408,7 @@ static int get_dev(struct nvme_dev **dev, int argc, char **argv, int flags)
int parse_and_open(struct nvme_dev **dev, int argc, char **argv,
const char *desc,
- const struct argconfig_commandline_options *opts)
+ struct argconfig_commandline_options *opts)
{
int ret;
@@ -595,99 +595,174 @@ ret:
return err;
}
-static int get_telemetry_log_helper(struct nvme_dev *dev, bool create,
- bool ctrl, struct nvme_telemetry_log **buf,
- enum nvme_telemetry_da da,
- size_t *size)
+static int parse_telemetry_da(struct nvme_dev *dev,
+ enum nvme_telemetry_da da,
+ struct nvme_telemetry_log *telem,
+ size_t *size)
+
{
- static const __u32 xfer = NVME_LOG_TELEM_BLOCK_SIZE;
- struct nvme_telemetry_log *telem;
struct nvme_id_ctrl id_ctrl;
- void *log, *tmp;
- int err;
- *size = 0;
-
- log = calloc(1, xfer);
- if (!log)
- return -ENOMEM;
-
- if (ctrl) {
- /* set rae = true so it won't clear the current telemetry log in controller */
- err = nvme_cli_get_log_telemetry_ctrl(dev, true, 0, xfer, log);
- } else {
- if (create)
- err = nvme_cli_get_log_create_telemetry_host(dev, log);
- else
- err = nvme_cli_get_log_telemetry_host(dev, 0, xfer, log);
- }
-
- if (err)
- goto free;
-
- telem = log;
- if (ctrl && !telem->ctrlavail) {
- *buf = log;
- *size = xfer;
- printf("Warning: Telemetry Controller-Initiated Data Not Available.\n");
- return 0;
- }
switch (da) {
case NVME_TELEMETRY_DA_1:
case NVME_TELEMETRY_DA_2:
case NVME_TELEMETRY_DA_3:
/* dalb3 >= dalb2 >= dalb1 */
- *size = (le16_to_cpu(telem->dalb3) + 1) * xfer;
+ *size = (le16_to_cpu(telem->dalb3) + 1) *
+ NVME_LOG_TELEM_BLOCK_SIZE;
break;
case NVME_TELEMETRY_DA_4:
- err = nvme_cli_identify_ctrl(dev, &id_ctrl);
- if (err) {
+ if (nvme_cli_identify_ctrl(dev, &id_ctrl)) {
perror("identify-ctrl");
- goto free;
+ return -errno;
}
if (id_ctrl.lpa & 0x40) {
- *size = (le32_to_cpu(telem->dalb4) + 1) * xfer;
+ *size = (le32_to_cpu(telem->dalb4) + 1) *
+ NVME_LOG_TELEM_BLOCK_SIZE;
} else {
- fprintf(stderr, "Data area 4 unsupported, bit 6 of Log Page Attributes not set\n");
- err = -EINVAL;
- goto free;
+ fprintf(stderr, "Data area 4 unsupported, bit 6 "
+ "of Log Page Attributes not set\n");
+ return -EINVAL;
}
break;
default:
fprintf(stderr, "Invalid data area parameter - %d\n", da);
- err = -EINVAL;
- goto free;
+ return -EINVAL;
}
- if (xfer == *size) {
- fprintf(stderr, "ERRO: No telemetry data block\n");
- err = -ENOENT;
- goto free;
+ if (*size == NVME_LOG_TELEM_BLOCK_SIZE) {
+ fprintf(stderr, "ERROR: No telemetry data block\n");
+ return -ENOENT;
}
+ return 0;
+}
- tmp = realloc(log, *size);
- if (!tmp) {
- err = -ENOMEM;
- goto free;
+static int get_log_telemetry_ctrl(struct nvme_dev *dev, bool rae, size_t size,
+ struct nvme_telemetry_log **buf)
+{
+ struct nvme_telemetry_log *log;
+ int err;
+
+ log = calloc(1, size);
+ if (!log)
+ return -errno;
+
+ err = nvme_cli_get_log_telemetry_ctrl(dev, rae, 0, size, log);
+ if (err) {
+ free(log);
+ return -errno;
}
- log = tmp;
- if (ctrl) {
- err = nvme_cli_get_log_telemetry_ctrl(dev, true, 0, *size, log);
- } else {
- err = nvme_cli_get_log_telemetry_host(dev, 0, *size, log);
+ *buf = log;
+ return 0;
+}
+
+static int get_log_telemetry_host(struct nvme_dev *dev, size_t size,
+ struct nvme_telemetry_log **buf)
+{
+ struct nvme_telemetry_log *log;
+ int err;
+
+ log = calloc(1, size);
+ if (!log)
+ return -errno;
+
+ err = nvme_cli_get_log_telemetry_host(dev, 0, size, log);
+ if (err) {
+ free(log);
+ return -errno;
}
- if (!err) {
+ *buf = log;
+ return 0;
+}
+
+static int __create_telemetry_log_host(struct nvme_dev *dev,
+ enum nvme_telemetry_da da,
+ size_t *size,
+ struct nvme_telemetry_log **buf)
+{
+ struct nvme_telemetry_log log = { 0 };
+ int err;
+
+ err = nvme_cli_get_log_create_telemetry_host(dev, &log);
+ if (err)
+ return -errno;
+
+ *size = NVME_LOG_TELEM_BLOCK_SIZE;
+ return get_log_telemetry_host(dev, NVME_LOG_TELEM_BLOCK_SIZE, buf);
+}
+
+static int __get_telemetry_log_ctrl(struct nvme_dev *dev,
+ bool rae,
+ enum nvme_telemetry_da da,
+ size_t *size,
+ struct nvme_telemetry_log **buf)
+{
+ struct nvme_telemetry_log *log;
+ int err;
+
+ log = calloc(1, NVME_LOG_TELEM_BLOCK_SIZE);
+ if (!log)
+ return -errno;
+
+ /*
+ * set rae = true so it won't clear the current telemetry log in
+ * controller
+ */
+ err = nvme_cli_get_log_telemetry_ctrl(dev, true, 0,
+ NVME_LOG_TELEM_BLOCK_SIZE,
+ log);
+ if (err)
+ goto free;
+
+ if (!log->ctrlavail) {
+ if (!rae) {
+ err = nvme_cli_get_log_telemetry_ctrl(dev, rae, 0,
+ NVME_LOG_TELEM_BLOCK_SIZE,
+ log);
+ goto free;
+ }
+
+ *size = NVME_LOG_TELEM_BLOCK_SIZE;
*buf = log;
+
+ printf("Warning: Telemetry Controller-Initiated Data Not Available.\n");
return 0;
}
+
+ err = parse_telemetry_da(dev, da, log, size);
+ if (err)
+ goto free;
+
+ return get_log_telemetry_ctrl(dev, rae, *size, buf);
+
free:
free(log);
return err;
}
+static int __get_telemetry_log_host(struct nvme_dev *dev,
+ enum nvme_telemetry_da da,
+ size_t *size,
+ struct nvme_telemetry_log **buf)
+{
+ struct nvme_telemetry_log log = { 0 };
+ int err;
+
+ err = nvme_cli_get_log_telemetry_host(dev, 0,
+ NVME_LOG_TELEM_BLOCK_SIZE,
+ &log);
+ if (err)
+ return err;
+
+ err = parse_telemetry_da(dev, da, &log, size);
+ if (err)
+ return err;
+
+ return get_log_telemetry_host(dev, *size, buf);
+}
static int get_telemetry_log(int argc, char **argv, struct command *cmd,
struct plugin *plugin)
@@ -697,7 +772,7 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd,
const char *hgen = "Have the host tell the controller to generate the report";
const char *cgen = "Gather report generated by the controller.";
const char *dgen = "Pick which telemetry data area to report. Default is 3 to fetch areas 1-3. Valid options are 1, 2, 3, 4.";
- struct nvme_telemetry_log *log;
+ struct nvme_telemetry_log *log = NULL;
int err = 0, output;
size_t total_size;
__u8 *data_ptr = NULL;
@@ -709,12 +784,14 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd,
__u32 host_gen;
bool ctrl_init;
int data_area;
+ bool rae;
};
struct config cfg = {
.file_name = NULL,
.host_gen = 1,
.ctrl_init = false,
.data_area = 3,
+ .rae = true,
};
OPT_ARGS(opts) = {
@@ -722,6 +799,7 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd,
OPT_UINT("host-generate", 'g', &cfg.host_gen, hgen),
OPT_FLAG("controller-init", 'c', &cfg.ctrl_init, cgen),
OPT_UINT("data-area", 'd', &cfg.data_area, dgen),
+ OPT_FLAG("rae", 'r', &cfg.rae, rae),
OPT_END()
};
@@ -745,17 +823,14 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd,
}
if (cfg.ctrl_init)
- /* Create Telemetry Host-Initiated Data = false, Controller-Initiated = true */
- err = get_telemetry_log_helper(dev, false, true, &log,
- cfg.data_area, &total_size);
+ err = __get_telemetry_log_ctrl(dev, cfg.rae, cfg.data_area,
+ &total_size, &log);
else if (cfg.host_gen)
- /* Create Telemetry Host-Initiated Data = true, Controller-Initiated = false */
- err = get_telemetry_log_helper(dev, true, false, &log,
- cfg.data_area, &total_size);
+ err = __create_telemetry_log_host(dev, cfg.data_area,
+ &total_size, &log);
else
- /* Create Telemetry Host-Initiated Data = false, Controller-Initiated = false */
- err = get_telemetry_log_helper(dev, false, false, &log,
- cfg.data_area, &total_size);
+ err = __get_telemetry_log_host(dev, cfg.data_area,
+ &total_size, &log);
if (err < 0) {
fprintf(stderr, "get-telemetry-log: %s\n",
@@ -921,31 +996,36 @@ static int get_effects_log(int argc, char **argv, struct command *cmd, struct pl
list_head_init(&log_pages);
if (cfg.csi < 0) {
- nvme_root_t nvme_root;
- uint64_t cap;
- int nvme_command_set_supported;
- int other_command_sets_supported;
- nvme_root = nvme_scan(NULL);
- bar = mmap_registers(nvme_root, dev);
- nvme_free_tree(nvme_root);
-
- if (!bar) {
- goto close_dev;
- }
- cap = mmio_read64(bar + NVME_REG_CAP);
- munmap(bar, getpagesize());
+ nvme_root_t r;
+ __u64 cap;
- nvme_command_set_supported = NVME_CAP_CSS(cap) & NVME_CAP_CSS_NVM;
- other_command_sets_supported = NVME_CAP_CSS(cap) & NVME_CAP_CSS_CSI;
+ r = nvme_scan(NULL);
+ bar = mmap_registers(r, dev);
+ nvme_free_tree(r);
+
+ if (bar) {
+ cap = mmio_read64(bar + NVME_REG_CAP);
+ munmap(bar, getpagesize());
+ } else {
+ struct nvme_get_property_args args = {
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .offset = NVME_REG_CAP,
+ .value = &cap,
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ };
+ err = nvme_get_property(&args);
+ if (err)
+ goto close_dev;
+ }
- if (nvme_command_set_supported)
+ if (NVME_CAP_CSS(cap) & NVME_CAP_CSS_NVM)
err = collect_effects_log(dev, NVME_CSI_NVM,
&log_pages, flags);
- if (!err && other_command_sets_supported)
+ if (!err && (NVME_CAP_CSS(cap) & NVME_CAP_CSS_CSI))
err = collect_effects_log(dev, NVME_CSI_ZNS,
&log_pages, flags);
-
} else {
err = collect_effects_log(dev, cfg.csi, &log_pages, flags);
}
@@ -1735,7 +1815,7 @@ static int get_boot_part_log(int argc, char **argv, struct command *cmd, struct
goto close_dev;
}
- if (cfg.lsp > 128) {
+ if (cfg.lsp > 127) {
fprintf(stderr, "invalid lsp param: %u\n", cfg.lsp);
err = -1;
goto close_dev;
@@ -2114,6 +2194,7 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
const char *raw = "output in raw format";
const char *csi = "command set identifier";
const char *offset_type = "offset type";
+ const char *xfer_len = "read chunk size (default 4k)";
struct nvme_dev *dev;
unsigned char *log;
int err;
@@ -2131,6 +2212,7 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
bool raw_binary;
__u8 csi;
bool ot;
+ __u32 xfer_len;
};
struct config cfg = {
@@ -2146,6 +2228,7 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
.raw_binary = false,
.csi = NVME_CSI_NVM,
.ot = false,
+ .xfer_len = 4096,
};
OPT_ARGS(opts) = {
@@ -2161,6 +2244,7 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
OPT_FLAG("raw-binary", 'b', &cfg.raw_binary, raw),
OPT_BYTE("csi", 'y', &cfg.csi, csi),
OPT_FLAG("ot", 'O', &cfg.ot, offset_type),
+ OPT_UINT("xfer-len", 'x', &cfg.xfer_len, xfer_len),
OPT_END()
};
@@ -2173,20 +2257,26 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
cfg.log_id = (cfg.aen >> 16) & 0xff;
}
- if (!cfg.log_len) {
- perror("non-zero log-len is required param\n");
+ if (!cfg.log_len || cfg.log_len & 0x3) {
+ fprintf(stderr, "non-zero or non-dw alignment log-len is required param\n");
err = -EINVAL;
goto close_dev;
}
- if (cfg.lsp > 128) {
- perror("invalid lsp param\n");
+ if (cfg.lsp > 127) {
+ fprintf(stderr, "invalid lsp param\n");
err = -EINVAL;
goto close_dev;
}
- if (cfg.uuid_index > 128) {
- perror("invalid uuid index param\n");
+ if (cfg.uuid_index > 127) {
+ fprintf(stderr, "invalid uuid index param\n");
+ err = -EINVAL;
+ goto close_dev;
+ }
+
+ if (cfg.xfer_len == 0 || cfg.xfer_len % 4096) {
+ fprintf(stderr, "xfer-len argument invalid. It needs to be mulitple of 4k");
err = -EINVAL;
goto close_dev;
}
@@ -2213,7 +2303,7 @@ static int get_log(int argc, char **argv, struct command *cmd, struct plugin *pl
.log = log,
.result = NULL,
};
- err = nvme_cli_get_log(dev, &args);
+ err = nvme_cli_get_log_page(dev, cfg.xfer_len, &args);
if (!err) {
if (!cfg.raw_binary) {
printf("Device:%s log-id:%d namespace-id:%#x\n",
@@ -2809,10 +2899,10 @@ static int detach_ns(int argc, char **argv, struct command *cmd, struct plugin *
static int parse_lba_num_si(struct nvme_dev *dev, const char *opt,
const char *val, __u8 flbas, __u64 *num)
{
- bool suffixed = false;
struct nvme_id_ctrl ctrl;
__u32 nsid = 1;
struct nvme_id_ns ns;
+ char *endptr;
int err = -EINVAL;
int i;
int lbas;
@@ -2873,17 +2963,17 @@ static int parse_lba_num_si(struct nvme_dev *dev, const char *opt,
i = flbas & NVME_NS_FLBAS_LOWER_MASK;
lbas = (1 << ns.lbaf[i].ds) + ns.lbaf[i].ms;
- *num = suffix_si_parse(val, &suffixed);
-
- if (errno)
+ if (suffix_si_parse(val, &endptr, (uint64_t*)num)) {
fprintf(stderr,
"Expected long suffixed integer argument for '%s-si' but got '%s'!\n",
opt, val);
+ return -errno;
+ }
- if (suffixed)
+ if (endptr[0] != '\0')
*num /= lbas;
- return errno;
+ return 0;
}
static int create_ns(int argc, char **argv, struct command *cmd, struct plugin *plugin)
@@ -4248,7 +4338,7 @@ static void abort_self_test(struct nvme_dev_self_test_args *args)
{
int err;
- args->stc = NVME_ST_CODE_ABORT,
+ args->stc = NVME_DST_STC_ABORT;
err = nvme_dev_self_test(args);
if (!err) {
@@ -4412,6 +4502,8 @@ ret:
static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg,
void **buf, __u32 *result)
{
+ size_t size;
+
if (!cfg->data_len)
nvme_get_feature_length(cfg->feature_id, cfg->cdw11,
&cfg->data_len);
@@ -4429,10 +4521,11 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg,
cfg->data_len = 0;
if (cfg->data_len) {
- if (posix_memalign(buf, getpagesize(), cfg->data_len)) {
+ /* rounding up size to page size */
+ size = ((cfg->data_len - 1) / getpagesize() + 1) * getpagesize();
+ if (posix_memalign(buf, getpagesize(), size))
return -1;
- }
- memset(*buf, 0, cfg->data_len);
+ memset(*buf, 0, size);
}
struct nvme_get_features_args args = {
@@ -4450,9 +4543,18 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg,
return nvme_cli_get_features(dev, &args);
}
+static int filter_out_flags(int status)
+{
+ return status & (NVME_GET(NVME_SCT_MASK, SCT) |
+ NVME_GET(NVME_SC_MASK, SC));
+}
+
static void get_feature_id_print(struct feat_cfg cfg, int err, __u32 result,
void *buf)
{
+ int status = filter_out_flags(err);
+ enum nvme_status_type type = NVME_STATUS_TYPE_NVME;
+
if (!err) {
if (!cfg.raw_binary || !buf) {
printf("get-feature:%#0*x (%s), %s value:%#0*x\n",
@@ -4471,8 +4573,8 @@ static void get_feature_id_print(struct feat_cfg cfg, int err, __u32 result,
d_raw(buf, cfg.data_len);
}
} else if (err > 0) {
- if (!nvme_status_equals(err, NVME_STATUS_TYPE_NVME,
- NVME_SC_INVALID_FIELD))
+ if (!nvme_status_equals(status, type, NVME_SC_INVALID_FIELD) &&
+ !nvme_status_equals(status, type, NVME_SC_INVALID_NS))
nvme_show_status(err);
} else {
fprintf(stderr, "get-feature: %s\n", nvme_strerror(errno));
@@ -4519,6 +4621,8 @@ static int get_feature_ids(struct nvme_dev *dev, struct feat_cfg cfg)
int feat_max = 0x100;
int feat_num = 0;
bool changed = false;
+ int status = 0;
+ enum nvme_status_type type = NVME_STATUS_TYPE_NVME;
if (cfg.sel == 8)
changed = true;
@@ -4529,13 +4633,21 @@ static int get_feature_ids(struct nvme_dev *dev, struct feat_cfg cfg)
for (i = cfg.feature_id; i < feat_max; i++, feat_num++) {
cfg.feature_id = i;
err = get_feature_id_changed(dev, cfg, changed);
- if (err && !nvme_status_equals(err, NVME_STATUS_TYPE_NVME,
- NVME_SC_INVALID_FIELD))
+ if (!err)
+ continue;
+ status = filter_out_flags(err);
+ if (nvme_status_equals(status, type, NVME_SC_INVALID_FIELD))
+ continue;
+ if (!nvme_status_equals(status, type, NVME_SC_INVALID_NS))
break;
+ fprintf(stderr, "get-feature:%#0*x (%s): ",
+ cfg.feature_id ? 4 : 2, cfg.feature_id,
+ nvme_feature_to_string(cfg.feature_id));
+ nvme_show_status(err);
}
- if (feat_num == 1 && nvme_status_equals(err, NVME_STATUS_TYPE_NVME,
- NVME_SC_INVALID_FIELD))
+ if (feat_num == 1 &&
+ nvme_status_equals(status, type, NVME_SC_INVALID_FIELD))
nvme_show_status(err);
return err;
@@ -4588,7 +4700,7 @@ static int get_feature(int argc, char **argv, struct command *cmd,
if (err)
goto ret;
- if (!cfg.namespace_id) {
+ if (!argconfig_parse_seen(opts, "namespace-id")) {
err = nvme_get_nsid(dev_fd(dev), &cfg.namespace_id);
if (err < 0) {
if (errno != ENOTTY) {
@@ -4599,13 +4711,13 @@ static int get_feature(int argc, char **argv, struct command *cmd,
}
}
- if (cfg.sel > 8) {
+ if (cfg.sel > 7) {
fprintf(stderr, "invalid 'select' param:%d\n", cfg.sel);
err = -EINVAL;
goto close_dev;
}
- if (cfg.uuid_index > 128) {
+ if (cfg.uuid_index > 127) {
fprintf(stderr, "invalid uuid index param: %u\n", cfg.uuid_index);
err = -1;
goto close_dev;
@@ -4730,6 +4842,7 @@ static int fw_download(int argc, char **argv, struct command *cmd, struct plugin
struct stat sb;
void *fw_buf;
bool huge;
+ struct nvme_id_ctrl ctrl;
struct config {
char *fw;
@@ -4782,7 +4895,18 @@ static int fw_download(int argc, char **argv, struct command *cmd, struct plugin
goto close_fw_fd;
}
- if (cfg.xfer == 0 || cfg.xfer % 4096)
+ if (cfg.xfer == 0) {
+ err = nvme_cli_identify_ctrl(dev, &ctrl);
+ if (err) {
+ fprintf(stderr, "identify-ctrl: %s\n", nvme_strerror(errno));
+ goto close_fw_fd;
+ }
+ if (ctrl.fwug == 0 || ctrl.fwug == 0xff)
+ cfg.xfer = 4096;
+ else
+ cfg.xfer = ctrl.fwug * 4096;
+ }
+ else if (cfg.xfer % 4096)
cfg.xfer = 4096;
if (cfg.xfer < HUGE_MIN)
@@ -4833,13 +4957,48 @@ ret:
static char *nvme_fw_status_reset_type(__u16 status)
{
switch (status & 0x7ff) {
- case NVME_SC_FW_NEEDS_CONV_RESET: return "conventional";
- case NVME_SC_FW_NEEDS_SUBSYS_RESET: return "subsystem";
- case NVME_SC_FW_NEEDS_RESET: return "any controller";
- default: return "unknown";
+ case NVME_SC_FW_NEEDS_CONV_RESET:
+ return "conventional";
+ case NVME_SC_FW_NEEDS_SUBSYS_RESET:
+ return "subsystem";
+ case NVME_SC_FW_NEEDS_RESET:
+ return "any controller";
+ default:
+ return "unknown";
}
}
+static bool fw_commit_support_mud(struct nvme_dev *dev)
+{
+ struct nvme_id_ctrl ctrl;
+ int err;
+
+ err = nvme_cli_identify_ctrl(dev, &ctrl);
+
+ if (err)
+ fprintf(stderr, "identify-ctrl: %s\n", nvme_strerror(errno));
+ else if (ctrl.frmw >> 5 & 0x1)
+ return true;
+
+ return false;
+}
+
+static void fw_commit_print_mud(struct nvme_dev *dev, __u32 result)
+{
+ if (!fw_commit_support_mud(dev))
+ return;
+
+ printf("Multiple Update Detected (MUD) Value: %u\n", result);
+
+ if (result & 0x1)
+ printf("Detected an overlapping firmware/boot partition image update command "\
+ "sequence due to processing a command from a Management Endpoint");
+
+ if (result >> 1 & 0x1)
+ printf("Detected an overlapping firmware/boot partition image update command "\
+ "sequence due to processing a command from an Admin SQ on a controller");
+}
+
static int fw_commit(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
const char *desc = "Verify downloaded firmware image and "\
@@ -4934,16 +5093,7 @@ static int fw_commit(int argc, char **argv, struct command *cmd, struct plugin *
if (cfg.action == 6 || cfg.action == 7)
printf(" bpid:%d", cfg.bpid);
printf("\n");
- }
-
- if (err >= 0) {
- printf("Multiple Update Detected (MUD) Value: %u\n", result);
- if (result & 0x1)
- printf("Detected an overlapping firmware/boot partition image update command "\
- "sequence due to processing a command from a Management Endpoint");
- if ((result >> 1) & 0x1)
- printf("Detected an overlapping firmware/boot partition image update command "\
- "sequence due to processing a command from an Admin SQ on a controller");
+ fw_commit_print_mud(dev, result);
}
close_dev:
@@ -5120,8 +5270,8 @@ static int sanitize(int argc, char **argv, struct command *cmd, struct plugin *p
}
if (sanact == NVME_SANITIZE_SANACT_START_OVERWRITE) {
- if (cfg.owpass > 16) {
- fprintf(stderr, "OWPASS out of range [0-16]\n");
+ if (cfg.owpass > 15) {
+ fprintf(stderr, "OWPASS out of range [0-15]\n");
err = -EINVAL;
goto close_dev;
}
@@ -5159,14 +5309,14 @@ static int nvme_get_properties(int fd, void **pbar)
{
int offset, err, size = getpagesize();
__u64 value;
+ void *bar = malloc(size);
- *pbar = malloc(size);
- if (!*pbar) {
+ if (!bar) {
fprintf(stderr, "malloc: %s\n", strerror(errno));
return -1;
}
- memset(*pbar, 0xff, size);
+ memset(bar, 0xff, size);
for (offset = NVME_REG_CAP; offset <= NVME_REG_CMBSZ;) {
struct nvme_get_property_args args = {
.args_size = sizeof(args),
@@ -5184,18 +5334,22 @@ static int nvme_get_properties(int fd, void **pbar)
} else if (err) {
fprintf(stderr, "get-property: %s\n",
nvme_strerror(errno));
- free(*pbar);
break;
}
if (nvme_is_64bit_reg(offset)) {
- *(uint64_t *)(*pbar + offset) = value;
+ *(uint64_t *)(bar + offset) = value;
offset += 8;
} else {
- *(uint32_t *)(*pbar + offset) = value;
+ *(uint32_t *)(bar + offset) = value;
offset += 4;
}
}
+ if (err)
+ free(bar);
+ else
+ *pbar = bar;
+
return err;
}
@@ -5289,7 +5443,7 @@ static int show_registers(int argc, char **argv, struct command *cmd, struct plu
bar = mmap_registers(r, dev);
if (!bar) {
err = nvme_get_properties(dev_fd(dev), &bar);
- if (!bar)
+ if (err)
goto close_dev;
fabrics = true;
}
@@ -5499,12 +5653,11 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
if (err) {
if (errno == EBUSY) {
fprintf(stderr, "Failed to open %s.\n",
- basename(argv[optind]));
- fprintf(stderr,
- "Namespace is currently busy.\n");
+ basename(argv[optind]));
+ fprintf(stderr, "Namespace is currently busy.\n");
if (!cfg.force)
fprintf(stderr,
- "Use the force [--force] option to ignore that.\n");
+ "Use the force [--force] option to ignore that.\n");
} else {
argconfig_print_help(desc, opts);
}
@@ -5521,7 +5674,7 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
if ((cfg.bs & (~cfg.bs + 1)) != cfg.bs) {
fprintf(stderr,
"Invalid value for block size (%"PRIu64"), must be a power of two\n",
- (uint64_t) cfg.bs);
+ (uint64_t) cfg.bs);
err = -EINVAL;
goto close_dev;
}
@@ -5560,9 +5713,9 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
if (cfg.namespace_id != NVME_NSID_ALL) {
err = nvme_cli_identify_ns(dev, cfg.namespace_id, &ns);
if (err) {
- if (err < 0)
+ if (err < 0) {
fprintf(stderr, "identify-namespace: %s\n", nvme_strerror(errno));
- else {
+ } else {
fprintf(stderr, "identify failed\n");
nvme_show_status(err);
}
@@ -5587,10 +5740,12 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
err = -EINVAL;
goto close_dev;
}
- } else if (cfg.lbaf == 0xff)
+ } else if (cfg.lbaf == 0xff) {
cfg.lbaf = prev_lbaf;
+ }
} else {
- if (cfg.lbaf == 0xff) cfg.lbaf = 0;
+ if (cfg.lbaf == 0xff)
+ cfg.lbaf = 0;
}
/* ses & pi checks set to 7 for forward-compatibility */
@@ -5625,7 +5780,8 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
dev->name, cfg.namespace_id,
cfg.namespace_id == NVME_NSID_ALL ? "(ALL namespaces)" : "");
nvme_show_relatives(dev->name);
- fprintf(stderr, "WARNING: Format may irrevocably delete this device's data.\n"
+ fprintf(stderr,
+ "WARNING: Format may irrevocably delete this device's data.\n"
"You have 10 seconds to press Ctrl-C to cancel this operation.\n\n"
"Use the force [--force] option to suppress this warning.\n");
sleep(10);
@@ -5645,13 +5801,13 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
.result = NULL,
};
err = nvme_cli_format_nvm(dev, &args);
- if (err < 0)
+ if (err < 0) {
fprintf(stderr, "format: %s\n", nvme_strerror(errno));
- else if (err != 0)
+ } else if (err != 0) {
nvme_show_status(err);
- else {
+ } else {
printf("Success formatting namespace:%x\n", cfg.namespace_id);
- if (dev->type == NVME_DEV_DIRECT && cfg.lbaf != prev_lbaf){
+ if (dev->type == NVME_DEV_DIRECT && cfg.lbaf != prev_lbaf) {
if (is_chardev(dev)) {
if (ioctl(dev_fd(dev), NVME_IOCTL_RESCAN) < 0) {
fprintf(stderr, "failed to rescan namespaces\n");
@@ -5670,7 +5826,7 @@ static int format(int argc, char **argv, struct command *cmd, struct plugin *plu
*/
if (ioctl(dev_fd(dev), BLKBSZSET, &block_size) < 0) {
fprintf(stderr, "failed to set block size to %d\n",
- block_size);
+ block_size);
err = -errno;
goto close_dev;
}
@@ -5754,14 +5910,13 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin
if (err)
goto ret;
- if (!cfg.namespace_id) {
+ if (!argconfig_parse_seen(opts, "namespace-id")) {
err = nvme_get_nsid(dev_fd(dev), &cfg.namespace_id);
if (err < 0) {
if (errno != ENOTTY) {
fprintf(stderr, "get-namespace-id: %s\n", nvme_strerror(errno));
goto close_dev;
}
-
cfg.namespace_id = NVME_NSID_ALL;
}
}
@@ -5772,7 +5927,7 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin
goto close_dev;
}
- if (cfg.uuid_index > 128) {
+ if (cfg.uuid_index > 127) {
fprintf(stderr, "invalid uuid index param: %u\n", cfg.uuid_index);
err = -1;
goto close_dev;
@@ -6235,7 +6390,7 @@ static int invalid_tags(__u64 storage_tag, __u64 ref_tag, __u8 sts, __u8 pif)
result = 1;
break;
case 2:
- if (sts > 0 && ref_tag >= (1LL << (64 - sts)))
+ if (sts > 0 && ref_tag >= (1LL << (48 - sts)))
result = 1;
break;
default:
@@ -7086,7 +7241,7 @@ static int submit_io(int opcode, char *command, const char *desc,
int dfd, mfd;
int flags = opcode & 1 ? O_RDONLY : O_WRONLY | O_CREAT;
int mode = S_IRUSR | S_IWUSR |S_IRGRP | S_IWGRP| S_IROTH;
- __u16 control = 0;
+ __u16 control = 0, nblocks = 0;
__u32 dsmgmt = 0;
int logical_block_size = 0;
unsigned long long buffer_size = 0, mbuffer_size = 0;
@@ -7276,9 +7431,14 @@ static int submit_io(int opcode, char *command, const char *desc,
if (cfg.data_size < buffer_size) {
fprintf(stderr, "Rounding data size to fit block count (%lld bytes)\n",
buffer_size);
- } else {
+ } else
buffer_size = cfg.data_size;
- }
+
+ /* Get the required block count. Note this is a zeroes based value. */
+ nblocks = ((buffer_size + (logical_block_size - 1)) / logical_block_size) - 1;
+
+ /* Update the data size based on the required block count */
+ buffer_size = (nblocks + 1) * logical_block_size;
buffer = nvme_alloc(buffer_size, &huge);
if (!buffer) {
@@ -7351,7 +7511,7 @@ static int submit_io(int opcode, char *command, const char *desc,
printf("nsid : %02x\n", cfg.namespace_id);
printf("flags : %02x\n", 0);
printf("control : %04x\n", control);
- printf("nblocks : %04x\n", cfg.block_count);
+ printf("nblocks : %04x\n", nblocks);
printf("metadata : %"PRIx64"\n", (uint64_t)(uintptr_t)mbuffer);
printf("addr : %"PRIx64"\n", (uint64_t)(uintptr_t)buffer);
printf("slba : %"PRIx64"\n", (uint64_t)cfg.start_block);
@@ -7372,7 +7532,7 @@ static int submit_io(int opcode, char *command, const char *desc,
.fd = dev_fd(dev),
.nsid = cfg.namespace_id,
.slba = cfg.start_block,
- .nlb = cfg.block_count,
+ .nlb = nblocks,
.control = control,
.dsm = cfg.dsmgmt,
.sts = sts,
@@ -8667,26 +8827,47 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
"to be used for the TLS key.";
const char *hmac = "HMAC function to use for the retained key "\
"(1 = SHA-256, 2 = SHA-384).";
+ const char *hostnqn = "Host NQN for the retained key.";
+ const char *subsysnqn = "Subsystem NQN for the retained key.";
+ const char *keyring = "Keyring for the retained key.";
+ const char *keytype = "Key type of the retained key.";
+ const char *insert = "Insert only, do not print the retained key.";
unsigned char *raw_secret;
char encoded_key[128];
int key_len = 32;
unsigned long crc = crc32(0L, NULL, 0);
- int err = 0;
+ int err;
+ long tls_key;
struct config {
+ char *keyring;
+ char *keytype;
+ char *hostnqn;
+ char *subsysnqn;
char *secret;
unsigned int hmac;
+ bool insert;
};
struct config cfg = {
+ .keyring = ".nvme",
+ .keytype = "psk",
+ .hostnqn = NULL,
+ .subsysnqn = NULL,
.secret = NULL,
.hmac = 1,
+ .insert = false,
};
OPT_ARGS(opts) = {
+ OPT_STR("keyring", 'k', &cfg.keyring, keyring),
+ OPT_STR("keytype", 't', &cfg.keytype, keytype),
+ OPT_STR("hostnqn", 'n', &cfg.hostnqn, hostnqn),
+ OPT_STR("subsysnqn", 'c', &cfg.subsysnqn, subsysnqn),
OPT_STR("secret", 's', &cfg.secret, secret),
OPT_UINT("hmac", 'm', &cfg.hmac, hmac),
+ OPT_FLAG("insert", 'i', &cfg.insert, insert),
OPT_END()
};
@@ -8697,7 +8878,10 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
fprintf(stderr, "Invalid HMAC identifier %u\n", cfg.hmac);
return -EINVAL;
}
-
+ if (cfg.insert && !cfg.subsysnqn) {
+ fprintf(stderr, "No subsystem NQN specified\n");
+ return -EINVAL;
+ }
if (cfg.hmac == 2)
key_len = 48;
@@ -8731,6 +8915,36 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
}
}
+ if (cfg.hostnqn && !cfg.subsysnqn) {
+ fprintf(stderr,
+ "Need to specify subsystem NQN to insert a TLS key\n");
+ return -EINVAL;
+ }
+ if (cfg.subsysnqn) {
+ if (!cfg.hostnqn) {
+ cfg.hostnqn = nvmf_hostnqn_from_file();
+ if (!cfg.hostnqn) {
+ fprintf(stderr,
+ "Failed to read host NQN\n");
+ return -EINVAL;
+ }
+ }
+
+ tls_key = nvme_insert_tls_key(cfg.keyring, cfg.keytype,
+ cfg.hostnqn, cfg.subsysnqn, cfg.hmac,
+ raw_secret, key_len);
+ if (tls_key < 0) {
+ fprintf(stderr,
+ "Failed to insert key, error %d\n", errno);
+ return -errno;
+ }
+
+ if (cfg.insert) {
+ printf("Inserted TLS key %08x\n",
+ (unsigned int)tls_key);
+ return 0;
+ }
+ }
crc = crc32(crc, raw_secret, key_len);
raw_secret[key_len++] = crc & 0xff;
raw_secret[key_len++] = (crc >> 8) & 0xff;
@@ -8747,24 +8961,41 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl
static int check_tls_key(int argc, char **argv, struct command *command, struct plugin *plugin)
{
const char *desc = "Check a TLS key for NVMe PSK Interchange format.\n";
- const char *key = "TLS key (in PSK Interchange format) "\
+ const char *keydata = "TLS key (in PSK Interchange format) "\
"to be validated.";
+ const char *hostnqn = "Host NQN for the retained key.";
+ const char *subsysnqn = "Subsystem NQN for the retained key.";
+ const char *keyring = "Keyring for the retained key.";
+ const char *keytype = "Key type of the retained key.";
unsigned char decoded_key[128];
unsigned int decoded_len;
u_int32_t crc = crc32(0L, NULL, 0);
u_int32_t key_crc;
int err = 0, hmac;
+ long tls_key;
struct config {
- char *key;
+ char *keyring;
+ char *keytype;
+ char *hostnqn;
+ char *subsysnqn;
+ char *keydata;
};
struct config cfg = {
- .key = NULL,
+ .keyring = ".nvme",
+ .keytype = "psk",
+ .hostnqn = NULL,
+ .subsysnqn = NULL,
+ .keydata = NULL,
};
OPT_ARGS(opts) = {
- OPT_STR("key", 'k', &cfg.key, key),
+ OPT_STR("keyring", 'k', &cfg.keyring, keyring),
+ OPT_STR("keytype", 't', &cfg.keytype, keytype),
+ OPT_STR("hostnqn", 'n', &cfg.hostnqn, hostnqn),
+ OPT_STR("subsysnqn", 'c', &cfg.subsysnqn, subsysnqn),
+ OPT_STR("keydata", 'd', &cfg.keydata, keydata),
OPT_END()
};
@@ -8772,27 +9003,27 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct
if (err)
return err;
- if (!cfg.key) {
- fprintf(stderr, "Key not specified\n");
+ if (!cfg.keydata) {
+ fprintf(stderr, "No key data\n");
return -EINVAL;
}
- if (sscanf(cfg.key, "NVMeTLSkey-1:%02x:*s", &hmac) != 1) {
- fprintf(stderr, "Invalid key header '%s'\n", cfg.key);
+ if (sscanf(cfg.keydata, "NVMeTLSkey-1:%02x:*s", &hmac) != 1) {
+ fprintf(stderr, "Invalid key '%s'\n", cfg.keydata);
return -EINVAL;
}
switch (hmac) {
case 1:
- if (strlen(cfg.key) != 65) {
+ if (strlen(cfg.keydata) != 65) {
fprintf(stderr, "Invalid key length %zu for SHA(256)\n",
- strlen(cfg.key));
+ strlen(cfg.keydata));
return -EINVAL;
}
break;
case 2:
- if (strlen(cfg.key) != 89) {
+ if (strlen(cfg.keydata) != 89) {
fprintf(stderr, "Invalid key length %zu for SHA(384)\n",
- strlen(cfg.key));
+ strlen(cfg.keydata));
return -EINVAL;
}
break;
@@ -8802,11 +9033,11 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct
break;
}
- err = base64_decode(cfg.key + 16, strlen(cfg.key) - 17,
+ err = base64_decode(cfg.keydata + 16, strlen(cfg.keydata) - 17,
decoded_key);
if (err < 0) {
fprintf(stderr, "Base64 decoding failed (%s, error %d)\n",
- cfg.key + 16, err);
+ cfg.keydata + 16, err);
return err;
}
decoded_len = err;
@@ -8825,8 +9056,27 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct
key_crc, crc);
return -EINVAL;
}
- printf("Key is valid (HMAC %d, length %d, CRC %08x)\n",
- hmac, decoded_len, crc);
+ if (cfg.subsysnqn) {
+ if (!cfg.hostnqn) {
+ cfg.hostnqn = nvmf_hostnqn_from_file();
+ if (!cfg.hostnqn) {
+ fprintf(stderr,
+ "Failed to read host NQN\n");
+ return -EINVAL;
+ }
+ }
+
+ tls_key = nvme_insert_tls_key(cfg.keyring, cfg.keytype,
+ cfg.hostnqn, cfg.subsysnqn, hmac,
+ decoded_key, decoded_len);
+ if (tls_key < 0) {
+ fprintf(stderr,
+ "Failed to insert key, error %d\n", errno);
+ return -errno;
+ }
+ } else
+ printf("Key is valid (HMAC %d, length %d, CRC %08x)\n",
+ hmac, decoded_len, crc);
return 0;
}
diff --git a/nvme.h b/nvme.h
index 1938afb..d859983 100644
--- a/nvme.h
+++ b/nvme.h
@@ -96,7 +96,7 @@ void register_extension(struct plugin *plugin);
* parse_and_open - parses arguments and opens the NVMe device, populating @dev
*/
int parse_and_open(struct nvme_dev **dev, int argc, char **argv, const char *desc,
- const struct argconfig_commandline_options *clo);
+ struct argconfig_commandline_options *clo);
void dev_close(struct nvme_dev *dev);
diff --git a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in
index 33ab8c1..7036625 100644
--- a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in
+++ b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in
@@ -1,6 +1,9 @@
[Unit]
Description=Auto-connect to subsystems on FC-NVME devices found during boot
ConditionPathExists=/sys/class/fc/fc_udev_device/nvme_discovery
+DefaultDependencies=no
+After=systemd-udevd.service
+Before=local-fs-pre.target
[Service]
Type=oneshot
diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service.in b/nvmf-autoconnect/systemd/nvmf-connect@.service.in
index 90f774c..dd245ee 100644
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service.in
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service.in
@@ -4,7 +4,9 @@
[Unit]
Description=NVMf auto-connect scan upon nvme discovery controller Events
-After=syslog.target
+DefaultDependencies=no
+After=systemd-udevd.service
+Before=local-fs-pre.target
PartOf=nvmf-connect.target
Requires=nvmf-connect.target
diff --git a/plugins/fdp/fdp.c b/plugins/fdp/fdp.c
index 9fef271..1e292e8 100644
--- a/plugins/fdp/fdp.c
+++ b/plugins/fdp/fdp.c
@@ -350,7 +350,8 @@ static int fdp_status(int argc, char **argv, struct command *cmd, struct plugin
goto out;
}
- len = le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc);
+ len = sizeof(struct nvme_fdp_ruh_status) +
+ le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc);
buf = malloc(len);
if (!buf) {
err = -ENOMEM;
diff --git a/plugins/innogrit/innogrit-nvme.c b/plugins/innogrit/innogrit-nvme.c
index b5d40dd..1771538 100644
--- a/plugins/innogrit/innogrit-nvme.c
+++ b/plugins/innogrit/innogrit-nvme.c
@@ -162,7 +162,7 @@ static int innogrit_vsc_geteventlog(int argc, char **argv,
{
time_t timep;
struct tm *logtime;
- int icount, ioffset16k, iblock;
+ int icount, ioffset16k, iblock, ivsctype;
char currentdir[128], filename[512];
unsigned char data[4096], data16k[SIZE_16K], zerob[32];
unsigned int *pcheckdata;
@@ -195,6 +195,15 @@ static int innogrit_vsc_geteventlog(int argc, char **argv,
if (getcwd(currentdir, 128) == NULL)
return -1;
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x82, 0x03, 0x00, 0x00, (char *)data, 4096);
+ if (ret == -1)
+ return ret;
+
+ if (data[0] == 0x5A)
+ ivsctype = 1;
+ else
+ ivsctype = 0;
+
time(&timep);
logtime = localtime(&timep);
sprintf(filename, "%s/eventlog_%02d%02d-%02d%02d%02d.elog", currentdir, logtime->tm_mon+1,
@@ -218,10 +227,13 @@ static int innogrit_vsc_geteventlog(int argc, char **argv,
icount++;
memset(data, 0, 4096);
- ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET_EVENT_LOG, 0, 0,
- (SRB_SIGNATURE >> 32),
- (SRB_SIGNATURE & 0xFFFFFFFF),
- (char *)data, 4096);
+ if (ivsctype == 1)
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x60, 0x00, 0x00, 0x00,(char *)data, 4096);
+ else
+ ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET_EVENT_LOG, 0, 0,
+ (SRB_SIGNATURE >> 32),
+ (SRB_SIGNATURE & 0xFFFFFFFF),
+ (char *)data, 4096);
if (ret == -1)
return ret;
@@ -302,7 +314,7 @@ static int innogrit_vsc_getcdump(int argc, char **argv, struct command *command,
time_t timep;
struct tm *logtime;
char currentdir[128], filename[512], fname[128];
- unsigned int itotal, icur;
+ unsigned int itotal, icur, ivsctype;
unsigned char data[4096];
struct cdumpinfo cdumpinfo;
unsigned char busevsc = false;
@@ -326,29 +338,44 @@ static int innogrit_vsc_getcdump(int argc, char **argv, struct command *command,
time(&timep);
logtime = localtime(&timep);
+ ivsctype = 0;
ipackindex = 0;
memset(data, 0, 4096);
- if (nvme_vucmd(dev_fd(dev), NVME_VSC_GET, VSC_FN_GET_CDUMP, 0x00,
- (SRB_SIGNATURE >> 32), (SRB_SIGNATURE & 0xFFFFFFFF),
- (char *)data, 4096) == 0) {
- memcpy(&cdumpinfo, &data[3072], sizeof(cdumpinfo));
- if (cdumpinfo.sig == 0x5a5b5c5d) {
- busevsc = true;
- ipackcount = cdumpinfo.ipackcount;
- if (ipackcount == 0) {
- itotal = 0;
- } else {
- itotal = cdumpinfo.cdumppack[ipackindex].ilenth;
- memset(fwvera, 0, sizeof(fwvera));
- memcpy(fwvera, cdumpinfo.cdumppack[ipackindex].fwver, 8);
- sprintf(fname, "cdump_%02d%02d-%02d%02d%02d_%d_%s.cdp", logtime->tm_mon+1,
- logtime->tm_mday, logtime->tm_hour, logtime->tm_min, logtime->tm_sec,
- ipackindex, fwvera);
- sprintf(filename, "%s/%s", currentdir, fname);
- }
+
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x82, 0x03, 0x00, 0x00, (char *)data, 4096);
+ if (ret == -1)
+ return ret;
+
+ if (data[0] == 0x5A) {
+ ivsctype = 1;
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x82, 0x08, 0x00, 0x00,(char *)data, 4096);
+ } else {
+ ivsctype = 0;
+ ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET, VSC_FN_GET_CDUMP, 0x00,
+ (SRB_SIGNATURE >> 32), (SRB_SIGNATURE & 0xFFFFFFFF),
+ (char *)data, 4096);
+ }
+ if (ret == -1)
+ return ret;
+
+ memcpy(&cdumpinfo, &data[3072], sizeof(cdumpinfo));
+ if (cdumpinfo.sig == 0x5a5b5c5d) {
+ busevsc = true;
+ ipackcount = cdumpinfo.ipackcount;
+ if (ipackcount == 0) {
+ itotal = 0;
+ } else {
+ itotal = cdumpinfo.cdumppack[ipackindex].ilenth;
+ memset(fwvera, 0, sizeof(fwvera));
+ memcpy(fwvera, cdumpinfo.cdumppack[ipackindex].fwver, 8);
+ sprintf(fname, "cdump_%02d%02d-%02d%02d%02d_%d_%s.cdp", logtime->tm_mon+1,
+ logtime->tm_mday, logtime->tm_hour, logtime->tm_min, logtime->tm_sec,
+ ipackindex, fwvera);
+ sprintf(filename, "%s/%s", currentdir, fname);
}
}
+
if (busevsc == false) {
memset(data, 0, 4096);
ret = nvme_get_nsid_log(dev_fd(dev), true, 0x07,
@@ -375,16 +402,18 @@ static int innogrit_vsc_getcdump(int argc, char **argv, struct command *command,
setfilecontent(filename, data, strlen((char *)data));
for (icur = 0; icur < itotal; icur += 4096) {
memset(data, 0, 4096);
- if (busevsc)
- ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET,
- VSC_FN_GET_CDUMP, 0x00,
- (SRB_SIGNATURE >> 32),
- (SRB_SIGNATURE & 0xFFFFFFFF),
- (char *)data, 4096);
- else
+ if (busevsc) {
+ if (ivsctype == 1)
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x82, 0x08, 0x00, 0x00,(char *)data, 4096);
+ else
+ ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET, VSC_FN_GET_CDUMP, 0x00,
+ (SRB_SIGNATURE >> 32), (SRB_SIGNATURE & 0xFFFFFFFF),
+ (char *)data, 4096);
+ } else {
ret = nvme_get_nsid_log(dev_fd(dev), true,
0x07,
NVME_NSID_ALL, 4096, data);
+ }
if (ret != 0)
return ret;
@@ -399,17 +428,19 @@ static int innogrit_vsc_getcdump(int argc, char **argv, struct command *command,
ipackindex++;
if (ipackindex != ipackcount) {
memset(data, 0, 4096);
- if (busevsc)
- ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET,
- VSC_FN_GET_CDUMP, 0x00,
- (SRB_SIGNATURE >> 32),
- (SRB_SIGNATURE & 0xFFFFFFFF),
- (char *)data, 4096);
- else
+ if (busevsc) {
+ if (ivsctype == 1)
+ ret = nvme_vucmd(dev_fd(dev), 0xFE, 0x82, 0x08, 0x00, 0x00,(char *)data, 4096);
+ else
+ ret = nvme_vucmd(dev_fd(dev), NVME_VSC_GET, VSC_FN_GET_CDUMP, 0x00,
+ (SRB_SIGNATURE >> 32), (SRB_SIGNATURE & 0xFFFFFFFF),
+ (char *)data, 4096);
+ } else {
ret = nvme_get_nsid_log(dev_fd(dev), true,
0x07,
NVME_NSID_ALL, 4096,
data);
+ }
if (ret != 0)
return ret;
diff --git a/plugins/inspur/inspur-nvme.c b/plugins/inspur/inspur-nvme.c
index 9d7bb4d..8c929aa 100644
--- a/plugins/inspur/inspur-nvme.c
+++ b/plugins/inspur/inspur-nvme.c
@@ -222,7 +222,9 @@ static int nvme_get_vendor_log(int argc, char **argv, struct command *cmd, struc
return err;
memset(local_mem, 0, BYTE_OF_4K);
- err = nvme_get_log_simple(dev_fd(dev), VENDOR_SMART_LOG_PAGE, sizeof(r1_cli_vendor_log_t), local_mem);
+ err = nvme_get_log_simple(dev_fd(dev),
+ (enum nvme_cmd_get_log_lid)VENDOR_SMART_LOG_PAGE,
+ sizeof(r1_cli_vendor_log_t), local_mem);
if (!err) {
show_r1_vendor_log((r1_cli_vendor_log_t *)local_mem);
show_r1_media_err_log((r1_cli_vendor_log_t *)local_mem);
diff --git a/plugins/intel/intel-nvme.c b/plugins/intel/intel-nvme.c
index f660b84..8a29cf9 100644
--- a/plugins/intel/intel-nvme.c
+++ b/plugins/intel/intel-nvme.c
@@ -1558,7 +1558,7 @@ static int enable_lat_stats_tracking(int argc, char **argv,
.disable = false,
};
- const struct argconfig_commandline_options command_line_options[] = {
+ struct argconfig_commandline_options command_line_options[] = {
{"enable", 'e', "", CFG_FLAG, &cfg.enable, no_argument, enable_desc},
{"disable", 'd', "", CFG_FLAG, &cfg.disable, no_argument, disable_desc},
{NULL}
diff --git a/plugins/memblaze/memblaze-nvme.c b/plugins/memblaze/memblaze-nvme.c
index fb46841..7a4633a 100644
--- a/plugins/memblaze/memblaze-nvme.c
+++ b/plugins/memblaze/memblaze-nvme.c
@@ -226,17 +226,17 @@ static void show_memblaze_smart_log_old(struct nvme_memblaze_smart_log *smart,
printf("Total thermal throttling minutes since power on : %u\n",
smart->items[THERMAL_THROTTLE].thermal_throttle.count);
- printf("Maximum temperature in Kelvin since last factory reset : %u\n",
+ printf("Maximum temperature in kelvins since last factory reset : %u\n",
le16_to_cpu(smart->items[TEMPT_SINCE_RESET].temperature.max));
- printf("Minimum temperature in Kelvin since last factory reset : %u\n",
+ printf("Minimum temperature in kelvins since last factory reset : %u\n",
le16_to_cpu(smart->items[TEMPT_SINCE_RESET].temperature.min));
if (compare_fw_version(fw_ver, "0.09.0300") != 0) {
- printf("Maximum temperature in Kelvin since power on : %u\n",
+ printf("Maximum temperature in kelvins since power on : %u\n",
le16_to_cpu(smart->items[TEMPT_SINCE_BOOTUP].temperature_p.max));
- printf("Minimum temperature in Kelvin since power on : %u\n",
+ printf("Minimum temperature in kelvins since power on : %u\n",
le16_to_cpu(smart->items[TEMPT_SINCE_BOOTUP].temperature_p.min));
}
- printf("Current temperature in Kelvin : %u\n",
+ printf("Current temperature in kelvins : %u\n",
le16_to_cpu(smart->items[TEMPT_SINCE_RESET].temperature.curr));
printf("Maximum power in watt since power on : %u\n",
@@ -707,7 +707,7 @@ static int glp_high_latency(FILE *fdi, char *buf, int buflen, int print)
}
else // sort
{
- timestamp = logEntry->timestampH - 1;
+ timestamp = logEntry->timestampH;
timestamp = timestamp << 32;
timestamp += logEntry->timestampL;
tt = timestamp / 1000;
@@ -1140,7 +1140,7 @@ static int mb_set_lat_stats(int argc, char **argv,
.disable = false,
};
- const struct argconfig_commandline_options command_line_options[] = {
+ struct argconfig_commandline_options command_line_options[] = {
{"enable", 'e', "", CFG_FLAG, &cfg.enable, no_argument, enable_desc},
{"disable", 'd', "", CFG_FLAG, &cfg.disable, no_argument, disable_desc},
{NULL}
diff --git a/plugins/meson.build b/plugins/meson.build
index c92b208..2cf2486 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,29 +1,31 @@
# SPDX-License-Identifier: GPL-2.0-or-later
-sources += [
- 'plugins/amzn/amzn-nvme.c',
- 'plugins/dell/dell-nvme.c',
- 'plugins/dera/dera-nvme.c',
- 'plugins/huawei/huawei-nvme.c',
- 'plugins/intel/intel-nvme.c',
- 'plugins/innogrit/innogrit-nvme.c',
- 'plugins/memblaze/memblaze-nvme.c',
- 'plugins/micron/micron-nvme.c',
- 'plugins/netapp/netapp-nvme.c',
- 'plugins/nvidia/nvidia-nvme.c',
- 'plugins/scaleflux/sfx-nvme.c',
- 'plugins/seagate/seagate-nvme.c',
- 'plugins/shannon/shannon-nvme.c',
- 'plugins/solidigm/solidigm-nvme.c',
- 'plugins/toshiba/toshiba-nvme.c',
- 'plugins/transcend/transcend-nvme.c',
- 'plugins/virtium/virtium-nvme.c',
- 'plugins/wdc/wdc-utils.c',
- 'plugins/wdc/wdc-nvme.c',
- 'plugins/ymtc/ymtc-nvme.c',
- 'plugins/zns/zns.c',
- 'plugins/inspur/inspur-nvme.c',
- 'plugins/fdp/fdp.c',
-]
-subdir('solidigm')
-subdir('ocp')
+if json_c_dep.found()
+ sources += [
+ 'plugins/amzn/amzn-nvme.c',
+ 'plugins/dell/dell-nvme.c',
+ 'plugins/dera/dera-nvme.c',
+ 'plugins/fdp/fdp.c',
+ 'plugins/huawei/huawei-nvme.c',
+ 'plugins/innogrit/innogrit-nvme.c',
+ 'plugins/inspur/inspur-nvme.c',
+ 'plugins/intel/intel-nvme.c',
+ 'plugins/memblaze/memblaze-nvme.c',
+ 'plugins/micron/micron-nvme.c',
+ 'plugins/netapp/netapp-nvme.c',
+ 'plugins/nvidia/nvidia-nvme.c',
+ 'plugins/scaleflux/sfx-nvme.c',
+ 'plugins/seagate/seagate-nvme.c',
+ 'plugins/shannon/shannon-nvme.c',
+ 'plugins/solidigm/solidigm-nvme.c',
+ 'plugins/toshiba/toshiba-nvme.c',
+ 'plugins/transcend/transcend-nvme.c',
+ 'plugins/virtium/virtium-nvme.c',
+ 'plugins/wdc/wdc-nvme.c',
+ 'plugins/wdc/wdc-utils.c',
+ 'plugins/ymtc/ymtc-nvme.c',
+ 'plugins/zns/zns.c',
+ ]
+ subdir('solidigm')
+ subdir('ocp')
+endif
diff --git a/plugins/micron/micron-nvme.c b/plugins/micron/micron-nvme.c
index 3c0904c..bd5f7d7 100644
--- a/plugins/micron/micron-nvme.c
+++ b/plugins/micron/micron-nvme.c
@@ -455,7 +455,7 @@ exit_status:
*/
static int micron_parse_options(struct nvme_dev **dev, int argc, char **argv,
const char *desc,
- const struct argconfig_commandline_options *opts,
+ struct argconfig_commandline_options *opts,
eDriveModel *modelp)
{
int idx = 0;
diff --git a/plugins/ocp/meson.build b/plugins/ocp/meson.build
index a4e5d20..641239a 100644
--- a/plugins/ocp/meson.build
+++ b/plugins/ocp/meson.build
@@ -2,5 +2,6 @@ sources += [
'plugins/ocp/ocp-utils.c',
'plugins/ocp/ocp-nvme.c',
'plugins/ocp/ocp-clear-fw-update-history.c',
+ 'plugins/ocp/ocp-smart-extended-log.c',
]
diff --git a/plugins/ocp/ocp-clear-fw-update-history.c b/plugins/ocp/ocp-clear-fw-update-history.c
index fef09cf..b9235b8 100644
--- a/plugins/ocp/ocp-clear-fw-update-history.c
+++ b/plugins/ocp/ocp-clear-fw-update-history.c
@@ -15,59 +15,7 @@ static const __u8 OCP_FID_CLEAR_FW_ACTIVATION_HISTORY = 0xC1;
int ocp_clear_fw_update_history(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
const char *desc = "OCP Clear Firmware Update History";
- __u32 result = 0;
- __u32 clear_fw_history = 1 << 31;
- struct nvme_dev *dev;
- int uuid_index = 0;
- bool no_uuid = false;
- int err;
- OPT_ARGS(opts) = {
- OPT_FLAG("no-uuid", 'n', &no_uuid,
- "Skip UUID index search (UUID index not required for OCP 1.0)"),
- OPT_END()
- };
-
- err = parse_and_open(&dev, argc, argv, desc, opts);
- if (err)
- return err;
- if (no_uuid == false) {
- // OCP 2.0 requires UUID index support
- err = ocp_get_uuid_index(dev, &uuid_index);
- if (err || uuid_index == 0) {
- fprintf(stderr, "ERROR: No OCP UUID index found\n");
- goto close_dev;
- }
- }
-
- struct nvme_set_features_args args = {
- .result = &result,
- .data = NULL,
- .args_size = sizeof(args),
- .fd = dev_fd(dev),
- .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
- .nsid = 0,
- .cdw11 = clear_fw_history,
- .cdw12 = 0,
- .cdw13 = 0,
- .cdw15 = 0,
- .data_len = 0,
- .save = 0,
- .uuidx = uuid_index,
- .fid = OCP_FID_CLEAR_FW_ACTIVATION_HISTORY,
- };
-
- err = nvme_set_features(&args);
-
- if (err == 0)
- printf("Success : %s\n", desc);
- else if (err > 0)
- nvme_show_status(err);
- else
- printf("Fail : %s\n", desc);
-close_dev:
- /* Redundant close() to make static code analysis happy */
- close(dev->direct.fd);
- dev_close(dev);
- return err;
+ return ocp_clear_feature(argc, argv, desc,
+ OCP_FID_CLEAR_FW_ACTIVATION_HISTORY);
}
diff --git a/plugins/ocp/ocp-clear-fw-update-history.h b/plugins/ocp/ocp-clear-fw-update-history.h
index 25fb6b1..cd0844c 100644
--- a/plugins/ocp/ocp-clear-fw-update-history.h
+++ b/plugins/ocp/ocp-clear-fw-update-history.h
@@ -6,4 +6,5 @@
* leonardo.da.cunha@solidigm.com
*/
-int ocp_clear_fw_update_history(int argc, char **argv, struct command *cmd, struct plugin *plugin);
+int ocp_clear_fw_update_history(int argc, char **argv,
+ struct command *cmd, struct plugin *plugin);
diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c
index 14a5f30..a864363 100644
--- a/plugins/ocp/ocp-nvme.c
+++ b/plugins/ocp/ocp-nvme.c
@@ -3,7 +3,7 @@
*
* Authors: Arthur Shau <arthurshau@fb.com>,
* Wei Zhang <wzhang@fb.com>,
- * Venkat Ramesh <venkatraghavan@fb.com>
+ * Venkat Ramesh <venkatraghavan@fb.com>
*/
#include <stdio.h>
#include <string.h>
@@ -22,753 +22,627 @@
#include "linux/types.h"
#include "util/types.h"
#include "nvme-print.h"
+
+#include "ocp-smart-extended-log.h"
#include "ocp-clear-fw-update-history.h"
#define CREATE_CMD
#include "ocp-nvme.h"
+#include "ocp-utils.h"
-/* C0 SCAO Log Page */
-#define C0_SMART_CLOUD_ATTR_LEN 0x200
-#define C0_SMART_CLOUD_ATTR_OPCODE 0xC0
-#define C0_GUID_LENGTH 16
-#define C0_ACTIVE_BUCKET_TIMER_INCREMENT 5
-#define C0_ACTIVE_THRESHOLD_INCREMENT 5
-#define C0_MINIMUM_WINDOW_INCREMENT 100
-
-static __u8 scao_guid[C0_GUID_LENGTH] = { 0xC5, 0xAF, 0x10, 0x28, 0xEA, 0xBF,
- 0xF2, 0xA4, 0x9C, 0x4F, 0x6F, 0x7C, 0xC9, 0x14, 0xD5, 0xAF };
+#define C0_ACTIVE_BUCKET_TIMER_INCREMENT 5
+#define C0_ACTIVE_THRESHOLD_INCREMENT 5
+#define C0_MINIMUM_WINDOW_INCREMENT 100
/* C3 Latency Monitor Log Page */
-#define C3_LATENCY_MON_LOG_BUF_LEN 0x200
-#define C3_LATENCY_MON_OPCODE 0xC3
-#define C3_LATENCY_MON_VERSION 0x0001
-#define C3_GUID_LENGTH 16
-static __u8 lat_mon_guid[C3_GUID_LENGTH] = { 0x92, 0x7a, 0xc0, 0x8c, 0xd0, 0x84,
- 0x6c, 0x9c, 0x70, 0x43, 0xe6, 0xd4, 0x58, 0x5e, 0xd4, 0x85 };
-
-#define READ 0
-#define WRITE 1
-#define TRIM 2
-#define RESERVED 3
-
-typedef enum {
- SCAO_PMUW = 0, /* Physical media units written */
- SCAO_PMUR = 16, /* Physical media units read */
- SCAO_BUNBR = 32, /* Bad user nand blocks raw */
- SCAO_BUNBN = 38, /* Bad user nand blocks normalized */
- SCAO_BSNBR = 40, /* Bad system nand blocks raw */
- SCAO_BSNBN = 46, /* Bad system nand blocks normalized */
- SCAO_XRC = 48, /* XOR recovery count */
- SCAO_UREC = 56, /* Uncorrectable read error count */
- SCAO_SEEC = 64, /* Soft ecc error count */
- SCAO_EECE = 72, /* End to end corrected errors */
- SCAO_EEDC = 76, /* End to end detected errors */
- SCAO_SDPU = 80, /* System data percent used */
- SCAO_RFSC = 81, /* Refresh counts */
- SCAO_MXUDEC = 88, /* Max User data erase counts */
- SCAO_MNUDEC = 92, /* Min User data erase counts */
- SCAO_NTTE = 96, /* Number of Thermal throttling events */
- SCAO_CTS = 97, /* Current throttling status */
- SCAO_EVF = 98, /* Errata Version Field */
- SCAO_PVF = 99, /* Point Version Field */
- SCAO_MIVF = 101, /* Minor Version Field */
- SCAO_MAVF = 103, /* Major Version Field */
- SCAO_PCEC = 104, /* PCIe correctable error count */
- SCAO_ICS = 112, /* Incomplete shutdowns */
- SCAO_PFB = 120, /* Percent free blocks */
- SCAO_CPH = 128, /* Capacitor health */
- SCAO_NEV = 130, /* NVMe Errata Version */
- SCAO_UIO = 136, /* Unaligned I/O */
- SCAO_SVN = 144, /* Security Version Number */
- SCAO_NUSE = 152, /* NUSE - Namespace utilization */
- SCAO_PSC = 160, /* PLP start count */
- SCAO_EEST = 176, /* Endurance estimate */
- SCAO_PLRC = 192, /* PCIe Link Retraining Count */
- SCAO_LPV = 494, /* Log page version */
- SCAO_LPG = 496, /* Log page GUID */
-} SMART_CLOUD_ATTRIBUTE_OFFSETS;
+#define C3_LATENCY_MON_LOG_BUF_LEN 0x200
+#define C3_LATENCY_MON_OPCODE 0xC3
+#define C3_LATENCY_MON_VERSION 0x0001
+#define C3_GUID_LENGTH 16
+static __u8 lat_mon_guid[C3_GUID_LENGTH] = {
+ 0x92, 0x7a, 0xc0, 0x8c,
+ 0xd0, 0x84, 0x6c, 0x9c,
+ 0x70, 0x43, 0xe6, 0xd4,
+ 0x58, 0x5e, 0xd4, 0x85
+};
+
+#define READ 0
+#define WRITE 1
+#define TRIM 2
+#define RESERVED 3
struct __attribute__((__packed__)) ssd_latency_monitor_log {
- __u8 feature_status; /* 0x00 */
- __u8 rsvd1; /* 0x01 */
- __le16 active_bucket_timer; /* 0x02 */
- __le16 active_bucket_timer_threshold; /* 0x04 */
- __u8 active_threshold_a; /* 0x06 */
- __u8 active_threshold_b; /* 0x07 */
- __u8 active_threshold_c; /* 0x08 */
- __u8 active_threshold_d; /* 0x09 */
- __le16 active_latency_config; /* 0x0A */
- __u8 active_latency_min_window; /* 0x0C */
- __u8 rsvd2[0x13]; /* 0x0D */
-
- __le32 active_bucket_counter[4][4] ; /* 0x20 - 0x5F */
- __le64 active_latency_timestamp[4][3]; /* 0x60 - 0xBF */
- __le16 active_measured_latency[4][3]; /* 0xC0 - 0xD7 */
- __le16 active_latency_stamp_units; /* 0xD8 */
- __u8 rsvd3[0x16]; /* 0xDA */
-
- __le32 static_bucket_counter[4][4] ; /* 0xF0 - 0x12F */
- __le64 static_latency_timestamp[4][3]; /* 0x130 - 0x18F */
- __le16 static_measured_latency[4][3]; /* 0x190 - 0x1A7 */
- __le16 static_latency_stamp_units; /* 0x1A8 */
- __u8 rsvd4[0x16]; /* 0x1AA */
-
- __le16 debug_log_trigger_enable; /* 0x1C0 */
- __le16 debug_log_measured_latency; /* 0x1C2 */
- __le64 debug_log_latency_stamp; /* 0x1C4 */
- __le16 debug_log_ptr; /* 0x1CC */
- __le16 debug_log_counter_trigger; /* 0x1CE */
- __u8 debug_log_stamp_units; /* 0x1D0 */
- __u8 rsvd5[0x1D]; /* 0x1D1 */
-
- __le16 log_page_version; /* 0x1EE */
- __u8 log_page_guid[0x10]; /* 0x1F0 */
+ __u8 feature_status; /* 0x00 */
+ __u8 rsvd1; /* 0x01 */
+ __le16 active_bucket_timer; /* 0x02 */
+ __le16 active_bucket_timer_threshold; /* 0x04 */
+ __u8 active_threshold_a; /* 0x06 */
+ __u8 active_threshold_b; /* 0x07 */
+ __u8 active_threshold_c; /* 0x08 */
+ __u8 active_threshold_d; /* 0x09 */
+ __le16 active_latency_config; /* 0x0A */
+ __u8 active_latency_min_window; /* 0x0C */
+ __u8 rsvd2[0x13]; /* 0x0D */
+
+ __le32 active_bucket_counter[4][4]; /* 0x20 - 0x5F */
+ __le64 active_latency_timestamp[4][3]; /* 0x60 - 0xBF */
+ __le16 active_measured_latency[4][3]; /* 0xC0 - 0xD7 */
+ __le16 active_latency_stamp_units; /* 0xD8 */
+ __u8 rsvd3[0x16]; /* 0xDA */
+
+ __le32 static_bucket_counter[4][4]; /* 0x0F0 - 0x12F */
+ __le64 static_latency_timestamp[4][3]; /* 0x130 - 0x18F */
+ __le16 static_measured_latency[4][3]; /* 0x190 - 0x1A7 */
+ __le16 static_latency_stamp_units; /* 0x1A8 */
+ __u8 rsvd4[0x16]; /* 0x1AA */
+
+ __le16 debug_log_trigger_enable; /* 0x1C0 */
+ __le16 debug_log_measured_latency; /* 0x1C2 */
+ __le64 debug_log_latency_stamp; /* 0x1C4 */
+ __le16 debug_log_ptr; /* 0x1CC */
+ __le16 debug_log_counter_trigger; /* 0x1CE */
+ __u8 debug_log_stamp_units; /* 0x1D0 */
+ __u8 rsvd5[0x1D]; /* 0x1D1 */
+
+ __le16 log_page_version; /* 0x1EE */
+ __u8 log_page_guid[0x10]; /* 0x1F0 */
};
+static const __u8 OCP_FID_CLEAR_PCIE_CORRECTABLE_ERROR_COUNTERS = 0xC3;
+
static int convert_ts(time_t time, char *ts_buf)
{
- struct tm gmTimeInfo;
- time_t time_Human, time_ms;
- char buf[80];
+ struct tm gmTimeInfo;
+ time_t time_Human, time_ms;
+ char buf[80];
- time_Human = time/1000;
- time_ms = time % 1000;
+ time_Human = time/1000;
+ time_ms = time % 1000;
- gmtime_r((const time_t *)&time_Human, &gmTimeInfo);
+ gmtime_r((const time_t *)&time_Human, &gmTimeInfo);
- strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &gmTimeInfo);
- sprintf(ts_buf, "%s.%03ld GMT", buf, time_ms);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &gmTimeInfo);
+ sprintf(ts_buf, "%s.%03ld GMT", buf, time_ms);
- return 0;
+ return 0;
}
-static void ocp_print_C0_log_normal(void *data)
+static int ocp_print_C3_log_normal(struct nvme_dev *dev,
+ struct ssd_latency_monitor_log *log_data)
{
- __u8 *log_data = (__u8*)data;
- uint16_t smart_log_ver = 0;
-
- printf("SMART Cloud Attributes :- \n");
-
- printf(" Physical media units written - %"PRIu64" %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW+8] & 0xFFFFFFFFFFFFFFFF),
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW] & 0xFFFFFFFFFFFFFFFF));
- printf(" Physical media units read - %"PRIu64" %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR+8] & 0xFFFFFFFFFFFFFFFF),
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR] & 0xFFFFFFFFFFFFFFFF));
- printf(" Bad user nand blocks - Raw %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BUNBR] & 0x0000FFFFFFFFFFFF));
- printf(" Bad user nand blocks - Normalized %d\n",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BUNBN]));
- printf(" Bad system nand blocks - Raw %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BSNBR] & 0x0000FFFFFFFFFFFF));
- printf(" Bad system nand blocks - Normalized %d\n",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BSNBN]));
- printf(" XOR recovery count %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_XRC]));
- printf(" Uncorrectable read error count %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UREC]));
- printf(" Soft ecc error count %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SEEC]));
- printf(" End to end corrected errors %"PRIu32"\n",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EECE]));
- printf(" End to end detected errors %"PRIu32"\n",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EEDC]));
- printf(" System data percent used %d\n",
- (__u8)log_data[SCAO_SDPU]);
- printf(" Refresh counts %"PRIu64"\n",
- (uint64_t)(le64_to_cpu(*(uint64_t *)&log_data[SCAO_RFSC])& 0x00FFFFFFFFFFFFFF));
- printf(" Max User data erase counts %"PRIu32"\n",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MXUDEC]));
- printf(" Min User data erase counts %"PRIu32"\n",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MNUDEC]));
- printf(" Number of Thermal throttling events %d\n",
- (__u8)log_data[SCAO_NTTE]);
- printf(" Current throttling status 0x%x\n",
- (__u8)log_data[SCAO_CTS]);
- printf(" PCIe correctable error count %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PCEC]));
- printf(" Incomplete shutdowns %"PRIu32"\n",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_ICS]));
- printf(" Percent free blocks %d\n",
- (__u8)log_data[SCAO_PFB]);
- printf(" Capacitor health %"PRIu16"\n",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_CPH]));
- printf(" Unaligned I/O %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UIO]));
- printf(" Security Version Number %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SVN]));
- printf(" NUSE - Namespace utilization %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_NUSE]));
- printf(" PLP start count %s\n",
- uint128_t_to_string(le128_to_cpu(&log_data[SCAO_PSC])));
- printf(" Endurance estimate %s\n",
- uint128_t_to_string(le128_to_cpu(&log_data[SCAO_EEST])));
- smart_log_ver = (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_LPV]);
- printf(" Log page version %"PRIu16"\n",smart_log_ver);
- printf(" Log page GUID 0x");
- printf("%"PRIx64"%"PRIx64"\n",(uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG + 8]),
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG]));
- if(smart_log_ver > 2) {
- printf(" Errata Version Field %d\n",
- (__u8)log_data[SCAO_EVF]);
- printf(" Point Version Field %"PRIu16"\n",
- (uint16_t)log_data[SCAO_PVF]);
- printf(" Minor Version Field %"PRIu16"\n",
- (uint16_t)log_data[SCAO_MIVF]);
- printf(" Major Version Field %d\n",
- (__u8)log_data[SCAO_MAVF]);
- printf(" NVMe Errata Version %d\n",
- (__u8)log_data[SCAO_NEV]);
- printf(" PCIe Link Retraining Count %"PRIu64"\n",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PLRC]));
- }
- printf("\n");
+ char ts_buf[128];
+ int i, j;
+ int pos = 0;
+
+ printf("-Latency Monitor/C3 Log Page Data-\n");
+ printf(" Controller : %s\n", dev->name);
+ printf(" Feature Status 0x%x\n",
+ log_data->feature_status);
+ printf(" Active Bucket Timer %d min\n",
+ C0_ACTIVE_BUCKET_TIMER_INCREMENT *
+ le16_to_cpu(log_data->active_bucket_timer));
+ printf(" Active Bucket Timer Threshold %d min\n",
+ C0_ACTIVE_BUCKET_TIMER_INCREMENT *
+ le16_to_cpu(log_data->active_bucket_timer_threshold));
+ printf(" Active Threshold A %d ms\n",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_a+1));
+ printf(" Active Threshold B %d ms\n",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_b+1));
+ printf(" Active Threshold C %d ms\n",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_c+1));
+ printf(" Active Threshold D %d ms\n",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_d+1));
+ printf(" Active Latency Minimum Window %d ms\n",
+ C0_MINIMUM_WINDOW_INCREMENT *
+ le16_to_cpu(log_data->active_latency_min_window));
+ printf(" Active Latency Stamp Units %d\n",
+ le16_to_cpu(log_data->active_latency_stamp_units));
+ printf(" Static Latency Stamp Units %d\n",
+ le16_to_cpu(log_data->static_latency_stamp_units));
+ printf(" Debug Log Trigger Enable %d\n",
+ le16_to_cpu(log_data->debug_log_trigger_enable));
+
+ printf(" Read Write Deallocate/Trim \n");
+ for (i = 0; i <= 3; i++) {
+ printf(" Active Latency Mode: Bucket %d %27d %27d %27d\n",
+ i,
+ log_data->active_latency_config & (1 << pos),
+ log_data->active_latency_config & (1 << pos),
+ log_data->active_latency_config & (1 << pos));
+ }
+ printf("\n");
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Active Bucket Counter: Bucket %d %27d %27d %27d \n",
+ i,
+ le32_to_cpu(log_data->active_bucket_counter[i][READ]),
+ le32_to_cpu(log_data->active_bucket_counter[i][WRITE]),
+ le32_to_cpu(log_data->active_bucket_counter[i][TRIM]));
+ }
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Active Measured Latency: Bucket %d %27d ms %27d ms %27d ms\n",
+ i,
+ le16_to_cpu(log_data->active_measured_latency[i][READ]),
+ le16_to_cpu(log_data->active_measured_latency[i][WRITE]),
+ le16_to_cpu(log_data->active_measured_latency[i][TRIM]));
+ }
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Active Latency Time Stamp: Bucket %d ", i);
+ for (j = 0; j <= 2; j++) {
+ if (le64_to_cpu(log_data->active_latency_timestamp[i][j]) == -1)
+ printf(" N/A ");
+ else {
+ convert_ts(le64_to_cpu(log_data->active_latency_timestamp[i][j]), ts_buf);
+ printf("%s ", ts_buf);
+ }
+ }
+ printf("\n");
+ }
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Static Bucket Counter: Bucket %d %27d %27d %27d\n",
+ i,
+ le32_to_cpu(log_data->static_bucket_counter[i][READ]),
+ le32_to_cpu(log_data->static_bucket_counter[i][WRITE]),
+ le32_to_cpu(log_data->static_bucket_counter[i][TRIM]));
+ }
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Static Measured Latency: Bucket %d %27d ms %27d ms %27d ms \n",
+ i,
+ le16_to_cpu(log_data->static_measured_latency[i][READ]),
+ le16_to_cpu(log_data->static_measured_latency[i][WRITE]),
+ le16_to_cpu(log_data->static_measured_latency[i][TRIM]));
+ }
+
+ for (i = 0; i <= 3; i++) {
+ printf(" Static Latency Time Stamp: Bucket %d ", i);
+ for (j = 0; j <= 2; j++) {
+ if (le64_to_cpu(log_data->static_latency_timestamp[i][j]) == -1)
+ printf(" N/A ");
+ else {
+ convert_ts(le64_to_cpu(log_data->static_latency_timestamp[i][j]), ts_buf);
+ printf("%s ", ts_buf);
+ }
+ }
+ printf("\n");
+ }
+
+ return 0;
}
-static void ocp_print_C0_log_json(void *data)
+static void ocp_print_C3_log_json(struct ssd_latency_monitor_log *log_data)
{
- __u8 *log_data = (__u8*)data;
- struct json_object *root;
- struct json_object *pmuw;
- struct json_object *pmur;
- uint16_t smart_log_ver = 0;
-
- root = json_create_object();
- pmuw = json_create_object();
- pmur = json_create_object();
-
- json_object_add_value_uint64(pmuw, "hi",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW+8] & 0xFFFFFFFFFFFFFFFF));
- json_object_add_value_uint64(pmuw, "lo",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW] & 0xFFFFFFFFFFFFFFFF));
- json_object_add_value_object(root, "Physical media units written", pmuw);
- json_object_add_value_uint64(pmur, "hi",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR+8] & 0xFFFFFFFFFFFFFFFF));
- json_object_add_value_uint64(pmur, "lo",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR] & 0xFFFFFFFFFFFFFFFF));
- json_object_add_value_object(root, "Physical media units read", pmur);
- json_object_add_value_uint64(root, "Bad user nand blocks - Raw",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BUNBR] & 0x0000FFFFFFFFFFFF));
- json_object_add_value_uint(root, "Bad user nand blocks - Normalized",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BUNBN]));
- json_object_add_value_uint64(root, "Bad system nand blocks - Raw",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BSNBR] & 0x0000FFFFFFFFFFFF));
- json_object_add_value_uint(root, "Bad system nand blocks - Normalized",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BSNBN]));
- json_object_add_value_uint64(root, "XOR recovery count",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_XRC]));
- json_object_add_value_uint64(root, "Uncorrectable read error count",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UREC]));
- json_object_add_value_uint64(root, "Soft ecc error count",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SEEC]));
- json_object_add_value_uint(root, "End to end corrected errors",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EECE]));
- json_object_add_value_uint(root, "End to end detected errors",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EEDC]));
- json_object_add_value_uint(root, "System data percent used",
- (__u8)log_data[SCAO_SDPU]);
- json_object_add_value_uint64(root, "Refresh counts",
- (uint64_t)(le64_to_cpu(*(uint64_t *)&log_data[SCAO_RFSC])& 0x00FFFFFFFFFFFFFF));
- json_object_add_value_uint(root, "Max User data erase counts",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MXUDEC]));
- json_object_add_value_uint(root, "Min User data erase counts",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MNUDEC]));
- json_object_add_value_uint(root, "Number of Thermal throttling events",
- (__u8)log_data[SCAO_NTTE]);
- json_object_add_value_uint(root, "Current throttling status",
- (__u8)log_data[SCAO_CTS]);
- json_object_add_value_uint64(root, "PCIe correctable error count",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PCEC]));
- json_object_add_value_uint(root, "Incomplete shutdowns",
- (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_ICS]));
- json_object_add_value_uint(root, "Percent free blocks",
- (__u8)log_data[SCAO_PFB]);
- json_object_add_value_uint(root, "Capacitor health",
- (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_CPH]));
- json_object_add_value_uint64(root, "Unaligned I/O",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UIO]));
- json_object_add_value_uint64(root, "Security Version Number",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SVN]));
- json_object_add_value_uint64(root, "NUSE - Namespace utilization",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_NUSE]));
- json_object_add_value_uint128(root, "PLP start count",
- le128_to_cpu(&log_data[SCAO_PSC]));
- json_object_add_value_uint128(root, "Endurance estimate",
- le128_to_cpu(&log_data[SCAO_EEST]));
- smart_log_ver = (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_LPV]);
- json_object_add_value_uint(root, "Log page version", smart_log_ver);
- char guid[40];
- memset((void*)guid, 0, 40);
- sprintf((char*)guid, "0x%"PRIx64"%"PRIx64"",(uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG + 8]),
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG]));
- json_object_add_value_string(root, "Log page GUID", guid);
- if(smart_log_ver > 2){
- json_object_add_value_uint(root, "Errata Version Field",
- (__u8)log_data[SCAO_EVF]);
- json_object_add_value_uint(root, "Point Version Field",
- (uint16_t)log_data[SCAO_PVF]);
- json_object_add_value_uint(root, "Minor Version Field",
- (uint16_t)log_data[SCAO_MIVF]);
- json_object_add_value_uint(root, "Major Version Field",
- (__u8)log_data[SCAO_MAVF]);
- json_object_add_value_uint(root, "NVMe Errata Version",
- (__u8)log_data[SCAO_NEV]);
- json_object_add_value_uint(root, "PCIe Link Retraining Count",
- (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PLRC]));
- }
- json_print_object(root, NULL);
- printf("\n");
- json_free_object(root);
+ struct json_object *root;
+ char ts_buf[128];
+ char buf[128];
+ int i, j;
+ int pos = 0;
+ char *operation[3] = {"Read", "Write", "Trim"};
+
+ root = json_create_object();
+
+ json_object_add_value_uint(root, "Feature Status",
+ log_data->feature_status);
+ json_object_add_value_uint(root, "Active Bucket Timer",
+ C0_ACTIVE_BUCKET_TIMER_INCREMENT *
+ le16_to_cpu(log_data->active_bucket_timer));
+ json_object_add_value_uint(root, "Active Bucket Timer Threshold",
+ C0_ACTIVE_BUCKET_TIMER_INCREMENT *
+ le16_to_cpu(log_data->active_bucket_timer_threshold));
+ json_object_add_value_uint(root, "Active Threshold A",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_a + 1));
+ json_object_add_value_uint(root, "Active Threshold B",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_b + 1));
+ json_object_add_value_uint(root, "Active Threshold C",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_c + 1));
+ json_object_add_value_uint(root, "Active Threshold D",
+ C0_ACTIVE_THRESHOLD_INCREMENT *
+ le16_to_cpu(log_data->active_threshold_d + 1));
+ json_object_add_value_uint(root, "Active Lantency Minimum Window",
+ C0_MINIMUM_WINDOW_INCREMENT *
+ le16_to_cpu(log_data->active_latency_min_window));
+ json_object_add_value_uint(root, "Active Latency Stamp Units",
+ le16_to_cpu(log_data->active_latency_stamp_units));
+ json_object_add_value_uint(root, "Static Latency Stamp Units",
+ le16_to_cpu(log_data->static_latency_stamp_units));
+ json_object_add_value_uint(root, "Debug Log Trigger Enable",
+ le16_to_cpu(log_data->debug_log_trigger_enable));
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Active Latency Mode: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ json_object_add_value_uint(bucket, operation[j],
+ log_data->active_latency_config & (1 << pos));
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Active Bucket Counter: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ json_object_add_value_uint(bucket, operation[j],
+ le32_to_cpu(log_data->active_bucket_counter[i][j]));
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Active Measured Latency: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ json_object_add_value_uint(bucket, operation[j],
+ le16_to_cpu(log_data->active_measured_latency[i][j]));
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Active Latency Time Stamp: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ if (le64_to_cpu(log_data->active_latency_timestamp[i][j]) == -1)
+ json_object_add_value_string(bucket, operation[j], "NA");
+ else {
+ convert_ts(le64_to_cpu(log_data->active_latency_timestamp[i][j]), ts_buf);
+ json_object_add_value_string(bucket, operation[j], ts_buf);
+ }
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Static Bucket Counter: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ json_object_add_value_uint(bucket, operation[j],
+ le32_to_cpu(log_data->static_bucket_counter[i][j]));
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Static Measured Latency: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ json_object_add_value_uint(bucket, operation[j],
+ le16_to_cpu(log_data->static_measured_latency[i][j]));
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ for (i = 0; i <= 3; i++) {
+ struct json_object *bucket;
+
+ bucket = json_create_object();
+ sprintf(buf, "Static Latency Time Stamp: Bucket %d", i);
+ for (j = 0; j <= 2; j++) {
+ if (le64_to_cpu(log_data->static_latency_timestamp[i][j]) == -1)
+ json_object_add_value_string(bucket, operation[j], "NA");
+ else {
+ convert_ts(le64_to_cpu(log_data->static_latency_timestamp[i][j]), ts_buf);
+ json_object_add_value_string(bucket, operation[j], ts_buf);
+ }
+ }
+ json_object_add_value_object(root, buf, bucket);
+ }
+
+ json_print_object(root, NULL);
+ printf("\n");
+
+ json_free_object(root);
}
-static int get_c0_log_page(int fd, char *format)
+static int get_c3_log_page(struct nvme_dev *dev, char *format)
{
- int ret = 0;
- int fmt = -1;
- __u8 *data;
- int i;
-
- fmt = validate_output_format(format);
- if (fmt < 0) {
- fprintf(stderr, "ERROR : OCP : invalid output format\n");
- return fmt;
- }
-
- if ((data = (__u8 *) malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN)) == NULL) {
- fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno));
- return -1;
- }
- memset(data, 0, sizeof (__u8) * C0_SMART_CLOUD_ATTR_LEN);
-
- ret = nvme_get_log_simple(fd, C0_SMART_CLOUD_ATTR_OPCODE,
- C0_SMART_CLOUD_ATTR_LEN, data);
-
- if (strcmp(format, "json"))
- fprintf(stderr, "NVMe Status:%s(%x)\n",
- nvme_status_to_string(ret, false), ret);
-
- if (ret == 0) {
-
- /* check log page guid */
- /* Verify GUID matches */
- for (i=0; i<16; i++) {
- if (scao_guid[i] != data[SCAO_LPG + i]) {
- fprintf(stderr, "ERROR : OCP : Unknown GUID in C0 Log Page data\n");
- int j;
- fprintf(stderr, "ERROR : OCP : Expected GUID: 0x");
- for (j = 0; j<16; j++) {
- fprintf(stderr, "%x", scao_guid[j]);
- }
- fprintf(stderr, "\nERROR : OCP : Actual GUID: 0x");
- for (j = 0; j<16; j++) {
- fprintf(stderr, "%x", data[SCAO_LPG + j]);
- }
- fprintf(stderr, "\n");
-
- ret = -1;
- goto out;
- }
- }
-
- /* print the data */
- switch (fmt) {
- case NORMAL:
- ocp_print_C0_log_normal(data);
- break;
- case JSON:
- ocp_print_C0_log_json(data);
- break;
- }
- } else {
- fprintf(stderr, "ERROR : OCP : Unable to read C0 data from buffer\n");
- }
+ struct ssd_latency_monitor_log *log_data;
+ int ret = 0;
+ int fmt = -1;
+ __u8 *data;
+ int i;
+
+ fmt = validate_output_format(format);
+ if (fmt < 0) {
+ fprintf(stderr, "ERROR : OCP : invalid output format\n");
+ return fmt;
+ }
+
+ data = malloc(sizeof(__u8) * C3_LATENCY_MON_LOG_BUF_LEN);
+ if (!data) {
+ fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno));
+ return -1;
+ }
+ memset(data, 0, sizeof(__u8) * C3_LATENCY_MON_LOG_BUF_LEN);
+
+ ret = nvme_get_log_simple(dev_fd(dev), C3_LATENCY_MON_OPCODE,
+ C3_LATENCY_MON_LOG_BUF_LEN, data);
+
+ if (strcmp(format, "json"))
+ fprintf(stderr,
+ "NVMe Status:%s(%x)\n",
+ nvme_status_to_string(ret, false),
+ ret);
+
+ if (ret == 0) {
+ log_data = (struct ssd_latency_monitor_log *)data;
+
+ /* check log page version */
+ if (log_data->log_page_version != C3_LATENCY_MON_VERSION) {
+ fprintf(stderr,
+ "ERROR : OCP : invalid latency monitor version\n");
+ ret = -1;
+ goto out;
+ }
+
+ /* check log page guid */
+ /* Verify GUID matches */
+ for (i = 0; i < 16; i++) {
+ if (lat_mon_guid[i] != log_data->log_page_guid[i]) {
+ int j;
+
+ fprintf(stderr, "ERROR : OCP : Unknown GUID in C3 Log Page data\n");
+ fprintf(stderr, "ERROR : OCP : Expected GUID: 0x");
+ for (j = 0; j < 16; j++) {
+ fprintf(stderr, "%x", lat_mon_guid[j]);
+ }
+
+ fprintf(stderr, "\nERROR : OCP : Actual GUID: 0x");
+ for (j = 0; j < 16; j++) {
+ fprintf(stderr, "%x", log_data->log_page_guid[j]);
+ }
+ fprintf(stderr, "\n");
+
+ ret = -1;
+ goto out;
+ }
+ }
+
+ switch (fmt) {
+ case NORMAL:
+ ocp_print_C3_log_normal(dev, log_data);
+ break;
+ case JSON:
+ ocp_print_C3_log_json(log_data);
+ break;
+ }
+ } else {
+ fprintf(stderr,
+ "ERROR : OCP : Unable to read C3 data from buffer\n");
+ }
out:
- free(data);
- return ret;
+ free(data);
+ return ret;
+}
+
+static int smart_add_log(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin)
+{
+ return ocp_smart_add_log(argc, argv, cmd, plugin);
}
-static int ocp_smart_add_log(int argc, char **argv, struct command *cmd,
- struct plugin *plugin)
+static int ocp_latency_monitor_log(int argc, char **argv,
+ struct command *command,
+ struct plugin *plugin)
{
- const char *desc = "Retrieve latency monitor log data.";
+ const char *desc = "Retrieve latency monitor log data.";
struct nvme_dev *dev;
- int ret = 0;
-
- struct config {
- char *output_format;
- };
-
- struct config cfg = {
- .output_format = "normal",
- };
-
- OPT_ARGS(opts) = {
- OPT_FMT("output-format", 'o', &cfg.output_format, "output Format: normal|json"),
- OPT_END()
- };
-
- ret = parse_and_open(&dev, argc, argv, desc, opts);
- if (ret)
- return ret;
-
- ret = get_c0_log_page(dev_fd(dev), cfg.output_format);
- if (ret)
- fprintf(stderr, "ERROR : OCP : Failure reading the C0 Log Page, ret = %d\n",
- ret);
- dev_close(dev);
- return ret;
+ int ret = 0;
+
+ struct config {
+ char *output_format;
+ };
+
+ struct config cfg = {
+ .output_format = "normal",
+ };
+
+ OPT_ARGS(opts) = {
+ OPT_FMT("output-format", 'o', &cfg.output_format,
+ "output Format: normal|json"),
+ OPT_END()
+ };
+
+ ret = parse_and_open(&dev, argc, argv, desc, opts);
+ if (ret)
+ return ret;
+
+ ret = get_c3_log_page(dev, cfg.output_format);
+ if (ret)
+ fprintf(stderr,
+ "ERROR : OCP : Failure reading the C3 Log Page, ret = %d\n",
+ ret);
+
+ dev_close(dev);
+ return ret;
}
-static int ocp_print_C3_log_normal(struct nvme_dev *dev,
- struct ssd_latency_monitor_log *log_data)
+static int clear_fw_update_history(int argc, char **argv,
+ struct command *cmd, struct plugin *plugin)
{
- printf("-Latency Monitor/C3 Log Page Data- \n");
- printf(" Controller : %s\n", dev->name);
- int i, j;
- int pos = 0;
- char ts_buf[128];
-
- printf(" Feature Status 0x%x \n",
- log_data->feature_status);
- printf(" Active Bucket Timer %d min \n",
- C0_ACTIVE_BUCKET_TIMER_INCREMENT *
- le16_to_cpu(log_data->active_bucket_timer));
- printf(" Active Bucket Timer Threshold %d min \n",
- C0_ACTIVE_BUCKET_TIMER_INCREMENT *
- le16_to_cpu(log_data->active_bucket_timer_threshold));
- printf(" Active Threshold A %d ms \n",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_a+1));
- printf(" Active Threshold B %d ms \n",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_b+1));
- printf(" Active Threshold C %d ms \n",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_c+1));
- printf(" Active Threshold D %d ms \n",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_d+1));
- printf(" Active Latency Minimum Window %d ms \n",
- C0_MINIMUM_WINDOW_INCREMENT *
- le16_to_cpu(log_data->active_latency_min_window));
- printf(" Active Latency Stamp Units %d \n",
- le16_to_cpu(log_data->active_latency_stamp_units));
- printf(" Static Latency Stamp Units %d \n",
- le16_to_cpu(log_data->static_latency_stamp_units));
- printf(" Debug Log Trigger Enable %d \n",
- le16_to_cpu(log_data->debug_log_trigger_enable));
-
- printf(" Read Write Deallocate/Trim \n");
- for (i = 0; i <= 3; i++) {
- printf(" Active Latency Mode: Bucket %d %27d %27d %27d \n",
- i,
- log_data->active_latency_config & (1 << pos),
- log_data->active_latency_config & (1 << pos),
- log_data->active_latency_config & (1 << pos));
- }
- printf("\n");
- for (i = 0; i <= 3; i++) {
- printf(" Active Bucket Counter: Bucket %d %27d %27d %27d \n",
- i,
- le32_to_cpu(log_data->active_bucket_counter[i][READ]),
- le32_to_cpu(log_data->active_bucket_counter[i][WRITE]),
- le32_to_cpu(log_data->active_bucket_counter[i][TRIM]));
- }
-
- for (i = 0; i <= 3; i++) {
- printf(" Active Measured Latency: Bucket %d %27d ms %27d ms %27d ms \n",
- i,
- le16_to_cpu(log_data->active_measured_latency[i][READ]),
- le16_to_cpu(log_data->active_measured_latency[i][WRITE]),
- le16_to_cpu(log_data->active_measured_latency[i][TRIM]));
- }
-
- for (i = 0; i <= 3; i++) {
- printf(" Active Latency Time Stamp: Bucket %d ", i);
- for (j = 0; j <= 2; j++) {
- if (le64_to_cpu(log_data->active_latency_timestamp[i][j]) == -1)
- printf(" N/A ");
- else {
- convert_ts(le64_to_cpu(log_data->active_latency_timestamp[i][j]), ts_buf);
- printf("%s ", ts_buf);
- }
- }
- printf("\n");
- }
-
- for (i = 0; i <= 3; i++) {
- printf(" Static Bucket Counter: Bucket %d %27d %27d %27d \n",
- i,
- le32_to_cpu(log_data->static_bucket_counter[i][READ]),
- le32_to_cpu(log_data->static_bucket_counter[i][WRITE]),
- le32_to_cpu(log_data->static_bucket_counter[i][TRIM]));
- }
-
- for (i = 0; i <= 3; i++) {
- printf(" Static Measured Latency: Bucket %d %27d ms %27d ms %27d ms \n",
- i,
- le16_to_cpu(log_data->static_measured_latency[i][READ]),
- le16_to_cpu(log_data->static_measured_latency[i][WRITE]),
- le16_to_cpu(log_data->static_measured_latency[i][TRIM]));
- }
-
- for (i = 0; i <= 3; i++) {
- printf(" Static Latency Time Stamp: Bucket %d ", i);
- for (j = 0; j <= 2; j++) {
- if (le64_to_cpu(log_data->static_latency_timestamp[i][j]) == -1)
- printf(" N/A ");
- else {
- convert_ts(le64_to_cpu(log_data->static_latency_timestamp[i][j]), ts_buf);
- printf("%s ", ts_buf);
- }
- }
- printf("\n");
- }
-
- return 0;
+ return ocp_clear_fw_update_history(argc, argv, cmd, plugin);
}
-static void ocp_print_C3_log_json(struct ssd_latency_monitor_log *log_data)
+static const char *eol_plp_failure_mode_to_string(__u8 mode)
{
- int i, j;
- int pos = 0;
- char buf[128];
- char ts_buf[128];
- char *operation[3] = {"Read", "Write", "Trim"};
- struct json_object *root;
- root = json_create_object();
-
- json_object_add_value_uint(root, "Feature Status",
- log_data->feature_status);
- json_object_add_value_uint(root, "Active Bucket Timer",
- C0_ACTIVE_BUCKET_TIMER_INCREMENT *
- le16_to_cpu(log_data->active_bucket_timer));
- json_object_add_value_uint(root, "Active Bucket Timer Threshold",
- C0_ACTIVE_BUCKET_TIMER_INCREMENT *
- le16_to_cpu(log_data->active_bucket_timer_threshold));
- json_object_add_value_uint(root, "Active Threshold A",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_a+1));
- json_object_add_value_uint(root, "Active Threshold B",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_b+1));
- json_object_add_value_uint(root, "Active Threshold C",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_c+1));
- json_object_add_value_uint(root, "Active Threshold D",
- C0_ACTIVE_THRESHOLD_INCREMENT *
- le16_to_cpu(log_data->active_threshold_d+1));
- json_object_add_value_uint(root, "Active Lantency Minimum Window",
- C0_MINIMUM_WINDOW_INCREMENT *
- le16_to_cpu(log_data->active_latency_min_window));
- json_object_add_value_uint(root, "Active Latency Stamp Units",
- le16_to_cpu(log_data->active_latency_stamp_units));
- json_object_add_value_uint(root, "Static Latency Stamp Units",
- le16_to_cpu(log_data->static_latency_stamp_units));
- json_object_add_value_uint(root, "Debug Log Trigger Enable",
- le16_to_cpu(log_data->debug_log_trigger_enable));
-
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Active Latency Mode: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- json_object_add_value_uint(bucket, operation[j],
- log_data->active_latency_config & (1 << pos));
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Active Bucket Counter: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- json_object_add_value_uint(bucket, operation[j],
- le32_to_cpu(log_data->active_bucket_counter[i][j]));
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Active Measured Latency: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- json_object_add_value_uint(bucket, operation[j],
- le16_to_cpu(log_data->active_measured_latency[i][j]));
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Active Latency Time Stamp: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- if (le64_to_cpu(log_data->active_latency_timestamp[i][j]) == -1)
- json_object_add_value_string(bucket, operation[j], "NA");
- else {
- convert_ts(le64_to_cpu(log_data->active_latency_timestamp[i][j]), ts_buf);
- json_object_add_value_string(bucket, operation[j], ts_buf);
- }
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Static Bucket Counter: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- json_object_add_value_uint(bucket, operation[j],
- le32_to_cpu(log_data->static_bucket_counter[i][j]));
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Static Measured Latency: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- json_object_add_value_uint(bucket, operation[j],
- le16_to_cpu(log_data->static_measured_latency[i][j]));
- }
- json_object_add_value_object(root, buf, bucket);
- }
- for (i = 0; i <= 3; i++) {
- struct json_object *bucket;
- bucket = json_create_object();
- sprintf(buf, "Static Latency Time Stamp: Bucket %d", i);
- for (j = 0; j <= 2; j++) {
- if (le64_to_cpu(log_data->static_latency_timestamp[i][j]) == -1)
- json_object_add_value_string(bucket, operation[j], "NA");
- else {
- convert_ts(le64_to_cpu(log_data->static_latency_timestamp[i][j]), ts_buf);
- json_object_add_value_string(bucket, operation[j], ts_buf);
- }
- }
- json_object_add_value_object(root, buf, bucket);
- }
-
- json_print_object(root, NULL);
- printf("\n");
-
- json_free_object(root);
+ switch (mode) {
+ case 1:
+ return "Read only mode (ROM)";
+ case 2:
+ return "Write through mode (WTM)";
+ case 3:
+ return "Normal mode";
+ default:
+ break;
+ }
+
+ return "Reserved";
}
-static int get_c3_log_page(struct nvme_dev *dev, char *format)
+static int eol_plp_failure_mode_get(struct nvme_dev *dev, const __u32 nsid,
+ const __u8 fid, __u8 sel)
{
- int ret = 0;
- int fmt = -1;
- __u8 *data;
- int i;
- struct ssd_latency_monitor_log *log_data;
-
- fmt = validate_output_format(format);
- if (fmt < 0) {
- fprintf(stderr, "ERROR : OCP : invalid output format\n");
- return fmt;
- }
-
- if ((data = (__u8 *) malloc(sizeof(__u8) * C3_LATENCY_MON_LOG_BUF_LEN)) == NULL) {
- fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno));
- return -1;
- }
- memset(data, 0, sizeof (__u8) * C3_LATENCY_MON_LOG_BUF_LEN);
-
- ret = nvme_get_log_simple(dev_fd(dev), C3_LATENCY_MON_OPCODE,
- C3_LATENCY_MON_LOG_BUF_LEN, data);
-
- if (strcmp(format, "json"))
- fprintf(stderr,
- "NVMe Status:%s(%x)\n",
- nvme_status_to_string(ret, false),
- ret);
-
- if (ret == 0) {
- log_data = (struct ssd_latency_monitor_log*)data;
-
- /* check log page version */
- if (log_data->log_page_version != C3_LATENCY_MON_VERSION) {
- fprintf(stderr,
- "ERROR : OCP : invalid latency monitor version\n");
- ret = -1;
- goto out;
- }
-
- /* check log page guid */
- /* Verify GUID matches */
- for (i=0; i<16; i++) {
- if (lat_mon_guid[i] != log_data->log_page_guid[i]) {
- fprintf(stderr,"ERROR : OCP : Unknown GUID in C3 Log Page data\n");
- int j;
- fprintf(stderr, "ERROR : OCP : Expected GUID: 0x");
- for (j = 0; j<16; j++) {
- fprintf(stderr, "%x", lat_mon_guid[j]);
- }
- fprintf(stderr, "\nERROR : OCP : Actual GUID: 0x");
- for (j = 0; j<16; j++) {
- fprintf(stderr, "%x", log_data->log_page_guid[j]);
- }
- fprintf(stderr, "\n");
-
- ret = -1;
- goto out;
- }
- }
-
- switch (fmt) {
- case NORMAL:
- ocp_print_C3_log_normal(dev, log_data);
- break;
- case JSON:
- ocp_print_C3_log_json(log_data);
- break;
- }
- } else {
- fprintf(stderr,
- "ERROR : OCP : Unable to read C3 data from buffer\n");
- }
+ __u32 result;
+ int err;
+
+ struct nvme_get_features_args args = {
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .fid = fid,
+ .nsid = nsid,
+ .sel = sel,
+ .cdw11 = 0,
+ .uuidx = 0,
+ .data_len = 0,
+ .data = NULL,
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ .result = &result,
+ };
+
+ err = nvme_get_features(&args);
+ if (!err) {
+ printf("End of Life Behavior (feature: %#0*x): %#0*x (%s: %s)\n",
+ fid ? 4 : 2, fid, result ? 10 : 8, result,
+ nvme_select_to_string(sel),
+ eol_plp_failure_mode_to_string(result));
+ if (sel == NVME_GET_FEATURES_SEL_SUPPORTED)
+ nvme_show_select_result(result);
+ } else {
+ printf("Could not get feature: %#0*x.\n", fid ? 4 : 2, fid);
+ }
+
+ return err;
+}
-out:
- free(data);
- return ret;
+static int eol_plp_failure_mode_set(struct nvme_dev *dev, const __u32 nsid,
+ const __u8 fid, __u8 mode, bool save,
+ bool uuid)
+{
+ __u32 result;
+ int err;
+ int uuid_index = 0;
+
+ if (uuid) {
+ /* OCP 2.0 requires UUID index support */
+ err = ocp_get_uuid_index(dev, &uuid_index);
+ if (err || !uuid_index) {
+ fprintf(stderr, "ERROR: No OCP UUID index found\n");
+ return err;
+ }
+ }
+
+
+ struct nvme_set_features_args args = {
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .fid = fid,
+ .nsid = nsid,
+ .cdw11 = mode << 30,
+ .cdw12 = 0,
+ .save = save,
+ .uuidx = uuid_index,
+ .cdw15 = 0,
+ .data_len = 0,
+ .data = NULL,
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ .result = &result,
+ };
+
+ err = nvme_set_features(&args);
+ if (err > 0) {
+ nvme_show_status(err);
+ } else if (err < 0) {
+ perror("Define EOL/PLP failure mode");
+ fprintf(stderr, "Command failed while parsing.\n");
+ } else {
+ printf("Successfully set mode (feature: %#0*x): %#0*x (%s: %s).\n",
+ fid ? 4 : 2, fid, mode ? 10 : 8, mode,
+ save ? "Save" : "Not save",
+ eol_plp_failure_mode_to_string(mode));
+ }
+
+ return err;
}
-static int ocp_latency_monitor_log(int argc, char **argv, struct command *command,
- struct plugin *plugin)
+static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin)
{
- const char *desc = "Retrieve latency monitor log data.";
+ const char *desc = "Define EOL or PLP circuitry failure mode.\n"\
+ "No argument prints current mode.";
+ const char *mode = "[0-3]: default/rom/wtm/normal";
+ const char *save = "Specifies that the controller shall save the attribute";
+ const char *sel = "[0-3,8]: current/default/saved/supported/changed";
+ const __u32 nsid = 0;
+ const __u8 fid = 0xc2;
struct nvme_dev *dev;
- int ret = 0;
-
- struct config {
- char *output_format;
- };
-
- struct config cfg = {
- .output_format = "normal",
- };
-
- OPT_ARGS(opts) = {
- OPT_FMT("output-format", 'o', &cfg.output_format,
- "output Format: normal|json"),
- OPT_END()
- };
-
- ret = parse_and_open(&dev, argc, argv, desc, opts);
- if (ret)
- return ret;
-
- ret = get_c3_log_page(dev, cfg.output_format);
- if (ret)
- fprintf(stderr,
- "ERROR : OCP : Failure reading the C3 Log Page, ret = %d\n",
- ret);
- dev_close(dev);
- return ret;
+ int err;
+
+ struct config {
+ __u8 mode;
+ bool save;
+ __u8 sel;
+ };
+
+ struct config cfg = {
+ .mode = 0,
+ .save = false,
+ .sel = 0,
+ };
+
+ OPT_ARGS(opts) = {
+ OPT_BYTE("mode", 'm', &cfg.mode, mode),
+ OPT_FLAG("save", 's', &cfg.save, save),
+ OPT_BYTE("sel", 'S', &cfg.sel, sel),
+ OPT_FLAG("no-uuid", 'n', NULL,
+ "Skip UUID index search (UUID index not required for OCP 1.0)"),
+ OPT_END()
+ };
+
+ err = parse_and_open(&dev, argc, argv, desc, opts);
+ if (err)
+ return err;
+
+ if (argconfig_parse_seen(opts, "mode"))
+ err = eol_plp_failure_mode_set(dev, nsid, fid, cfg.mode,
+ cfg.save,
+ !argconfig_parse_seen(opts, "no-uuid"));
+ else
+ err = eol_plp_failure_mode_get(dev, nsid, fid, cfg.sel);
+
+ dev_close(dev);
+
+ return err;
}
-static int clear_fw_update_history(int argc, char **argv, struct command *cmd,
- struct plugin *plugin)
+static int clear_pcie_corectable_error_counters(int argc, char **argv,
+ struct command *cmd,
+ struct plugin *plugin)
{
- return ocp_clear_fw_update_history(argc, argv, cmd, plugin);
+ const char *desc = "OCP Clear PCIe Correctable Error Counters";
+
+ return ocp_clear_feature(argc, argv, desc,
+ OCP_FID_CLEAR_PCIE_CORRECTABLE_ERROR_COUNTERS);
}
diff --git a/plugins/ocp/ocp-nvme.h b/plugins/ocp/ocp-nvme.h
index c20646a..dc9e154 100644
--- a/plugins/ocp/ocp-nvme.h
+++ b/plugins/ocp/ocp-nvme.h
@@ -3,7 +3,7 @@
*
* Authors: Arthur Shau <arthurshau@fb.com>,
* Wei Zhang <wzhang@fb.com>,
- * Venkat Ramesh <venkatraghavan@fb.com>
+ * Venkat Ramesh <venkatraghavan@fb.com>
*/
#undef CMD_INC_FILE
#define CMD_INC_FILE plugins/ocp/ocp-nvme
@@ -15,11 +15,11 @@
PLUGIN(NAME("ocp", "OCP cloud SSD extensions", NVME_VERSION),
COMMAND_LIST(
- ENTRY("smart-add-log", "Retrieve extended SMART Information", ocp_smart_add_log)
- ENTRY("latency-monitor-log", "Get Latency Monitor Log Page",
- ocp_latency_monitor_log)
- ENTRY("clear-fw-activate-history", "Clear firmware update history log",
- clear_fw_update_history)
+ ENTRY("smart-add-log", "Retrieve extended SMART Information", smart_add_log)
+ ENTRY("latency-monitor-log", "Get Latency Monitor Log Page", ocp_latency_monitor_log)
+ ENTRY("clear-fw-activate-history", "Clear firmware update history log", clear_fw_update_history)
+ ENTRY("eol-plp-failure-mode", "Define EOL or PLP circuitry failure mode.", eol_plp_failure_mode)
+ ENTRY("clear-pcie-correctable-error-counters", "Clear PCIe correctable error counters", clear_pcie_corectable_error_counters)
)
);
diff --git a/plugins/ocp/ocp-smart-extended-log.c b/plugins/ocp/ocp-smart-extended-log.c
new file mode 100644
index 0000000..37b62e9
--- /dev/null
+++ b/plugins/ocp/ocp-smart-extended-log.c
@@ -0,0 +1,352 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Copyright (c) 2022 Meta Platforms, Inc.
+ *
+ * Authors: Arthur Shau <arthurshau@fb.com>,
+ * Wei Zhang <wzhang@fb.com>,
+ * Venkat Ramesh <venkatraghavan@fb.com>
+ */
+
+#include "ocp-smart-extended-log.h"
+
+#include <errno.h>
+#include <stdio.h>
+
+#include "common.h"
+#include "nvme-print.h"
+
+/* C0 SCAO Log Page */
+#define C0_SMART_CLOUD_ATTR_LEN 0x200
+#define C0_SMART_CLOUD_ATTR_OPCODE 0xC0
+#define C0_GUID_LENGTH 16
+
+static __u8 scao_guid[C0_GUID_LENGTH] = {
+ 0xC5, 0xAF, 0x10, 0x28,
+ 0xEA, 0xBF, 0xF2, 0xA4,
+ 0x9C, 0x4F, 0x6F, 0x7C,
+ 0xC9, 0x14, 0xD5, 0xAF
+};
+
+typedef enum {
+ SCAO_PMUW = 0, /* Physical media units written */
+ SCAO_PMUR = 16, /* Physical media units read */
+ SCAO_BUNBR = 32, /* Bad user nand blocks raw */
+ SCAO_BUNBN = 38, /* Bad user nand blocks normalized */
+ SCAO_BSNBR = 40, /* Bad system nand blocks raw */
+ SCAO_BSNBN = 46, /* Bad system nand blocks normalized */
+ SCAO_XRC = 48, /* XOR recovery count */
+ SCAO_UREC = 56, /* Uncorrectable read error count */
+ SCAO_SEEC = 64, /* Soft ecc error count */
+ SCAO_EEDC = 72, /* End to end detected errors */
+ SCAO_EECE = 76, /* End to end corrected errors */
+ SCAO_SDPU = 80, /* System data percent used */
+ SCAO_RFSC = 81, /* Refresh counts */
+ SCAO_MXUDEC = 88, /* Max User data erase counts */
+ SCAO_MNUDEC = 92, /* Min User data erase counts */
+ SCAO_NTTE = 96, /* Number of Thermal throttling events */
+ SCAO_CTS = 97, /* Current throttling status */
+ SCAO_EVF = 98, /* Errata Version Field */
+ SCAO_PVF = 99, /* Point Version Field */
+ SCAO_MIVF = 101, /* Minor Version Field */
+ SCAO_MAVF = 103, /* Major Version Field */
+ SCAO_PCEC = 104, /* PCIe correctable error count */
+ SCAO_ICS = 112, /* Incomplete shutdowns */
+ SCAO_PFB = 120, /* Percent free blocks */
+ SCAO_CPH = 128, /* Capacitor health */
+ SCAO_NEV = 130, /* NVMe Errata Version */
+ SCAO_UIO = 136, /* Unaligned I/O */
+ SCAO_SVN = 144, /* Security Version Number */
+ SCAO_NUSE = 152, /* NUSE - Namespace utilization */
+ SCAO_PSC = 160, /* PLP start count */
+ SCAO_EEST = 176, /* Endurance estimate */
+ SCAO_PLRC = 192, /* PCIe Link Retraining Count */
+ SCAO_PSCC = 200, /* Power State Change Count */
+ SCAO_LPV = 494, /* Log page version */
+ SCAO_LPG = 496, /* Log page GUID */
+} SMART_CLOUD_ATTRIBUTE_OFFSETS;
+
+static void ocp_print_C0_log_normal(void *data)
+{
+ uint16_t smart_log_ver = 0;
+ __u8 *log_data = data;
+
+ printf("SMART Cloud Attributes :-\n");
+
+ printf(" Physical media units written - %"PRIu64" %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW + 8] & 0xFFFFFFFFFFFFFFFF),
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW] & 0xFFFFFFFFFFFFFFFF));
+ printf(" Physical media units read - %"PRIu64" %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR + 8] & 0xFFFFFFFFFFFFFFFF),
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR] & 0xFFFFFFFFFFFFFFFF));
+ printf(" Bad user nand blocks - Raw %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BUNBR] & 0x0000FFFFFFFFFFFF));
+ printf(" Bad user nand blocks - Normalized %d\n",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BUNBN]));
+ printf(" Bad system nand blocks - Raw %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BSNBR] & 0x0000FFFFFFFFFFFF));
+ printf(" Bad system nand blocks - Normalized %d\n",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BSNBN]));
+ printf(" XOR recovery count %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_XRC]));
+ printf(" Uncorrectable read error count %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UREC]));
+ printf(" Soft ecc error count %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SEEC]));
+ printf(" End to end detected errors %"PRIu32"\n",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EEDC]));
+ printf(" End to end corrected errors %"PRIu32"\n",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EECE]));
+ printf(" System data percent used %d\n",
+ (__u8)log_data[SCAO_SDPU]);
+ printf(" Refresh counts %"PRIu64"\n",
+ (uint64_t)(le64_to_cpu(*(uint64_t *)&log_data[SCAO_RFSC]) & 0x00FFFFFFFFFFFFFF));
+ printf(" Max User data erase counts %"PRIu32"\n",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MXUDEC]));
+ printf(" Min User data erase counts %"PRIu32"\n",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MNUDEC]));
+ printf(" Number of Thermal throttling events %d\n",
+ (__u8)log_data[SCAO_NTTE]);
+ printf(" Current throttling status 0x%x\n",
+ (__u8)log_data[SCAO_CTS]);
+ printf(" PCIe correctable error count %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PCEC]));
+ printf(" Incomplete shutdowns %"PRIu32"\n",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_ICS]));
+ printf(" Percent free blocks %d\n",
+ (__u8)log_data[SCAO_PFB]);
+ printf(" Capacitor health %"PRIu16"\n",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_CPH]));
+ printf(" Unaligned I/O %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UIO]));
+ printf(" Security Version Number %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SVN]));
+ printf(" NUSE - Namespace utilization %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_NUSE]));
+ printf(" PLP start count %s\n",
+ uint128_t_to_string(le128_to_cpu(&log_data[SCAO_PSC])));
+ printf(" Endurance estimate %s\n",
+ uint128_t_to_string(le128_to_cpu(&log_data[SCAO_EEST])));
+ smart_log_ver = (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_LPV]);
+ printf(" Log page version %"PRIu16"\n", smart_log_ver);
+ printf(" Log page GUID 0x");
+ printf("%"PRIx64"%"PRIx64"\n", (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG + 8]),
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG]));
+ if (smart_log_ver > 2) {
+ printf(" Errata Version Field %d\n",
+ (__u8)log_data[SCAO_EVF]);
+ printf(" Point Version Field %"PRIu16"\n",
+ le16_to_cpu(*(uint16_t *)&log_data[SCAO_PVF]));
+ printf(" Minor Version Field %"PRIu16"\n",
+ le16_to_cpu(*(uint16_t *)&log_data[SCAO_MIVF]));
+ printf(" Major Version Field %d\n",
+ (__u8)log_data[SCAO_MAVF]);
+ printf(" NVMe Errata Version %d\n",
+ (__u8)log_data[SCAO_NEV]);
+ printf(" PCIe Link Retraining Count %"PRIu64"\n",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PLRC]));
+ printf(" Power State Change Count %"PRIu64"\n",
+ le64_to_cpu(*(uint64_t *)&log_data[SCAO_PSCC]));
+ }
+ printf("\n");
+}
+
+static void ocp_print_C0_log_json(void *data)
+{
+ struct json_object *root;
+ struct json_object *pmuw;
+ struct json_object *pmur;
+ uint16_t smart_log_ver = 0;
+ __u8 *log_data = data;
+ char guid[40];
+
+ root = json_create_object();
+ pmuw = json_create_object();
+ pmur = json_create_object();
+
+ json_object_add_value_uint64(pmuw, "hi",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW + 8] & 0xFFFFFFFFFFFFFFFF));
+ json_object_add_value_uint64(pmuw, "lo",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUW] & 0xFFFFFFFFFFFFFFFF));
+ json_object_add_value_object(root, "Physical media units written", pmuw);
+ json_object_add_value_uint64(pmur, "hi",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR + 8] & 0xFFFFFFFFFFFFFFFF));
+ json_object_add_value_uint64(pmur, "lo",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PMUR] & 0xFFFFFFFFFFFFFFFF));
+ json_object_add_value_object(root, "Physical media units read", pmur);
+ json_object_add_value_uint64(root, "Bad user nand blocks - Raw",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BUNBR] & 0x0000FFFFFFFFFFFF));
+ json_object_add_value_uint(root, "Bad user nand blocks - Normalized",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BUNBN]));
+ json_object_add_value_uint64(root, "Bad system nand blocks - Raw",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_BSNBR] & 0x0000FFFFFFFFFFFF));
+ json_object_add_value_uint(root, "Bad system nand blocks - Normalized",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_BSNBN]));
+ json_object_add_value_uint64(root, "XOR recovery count",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_XRC]));
+ json_object_add_value_uint64(root, "Uncorrectable read error count",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UREC]));
+ json_object_add_value_uint64(root, "Soft ecc error count",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SEEC]));
+ json_object_add_value_uint(root, "End to end detected errors",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EEDC]));
+ json_object_add_value_uint(root, "End to end corrected errors",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_EECE]));
+ json_object_add_value_uint(root, "System data percent used",
+ (__u8)log_data[SCAO_SDPU]);
+ json_object_add_value_uint64(root, "Refresh counts",
+ (uint64_t)(le64_to_cpu(*(uint64_t *)&log_data[SCAO_RFSC]) & 0x00FFFFFFFFFFFFFF));
+ json_object_add_value_uint(root, "Max User data erase counts",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MXUDEC]));
+ json_object_add_value_uint(root, "Min User data erase counts",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_MNUDEC]));
+ json_object_add_value_uint(root, "Number of Thermal throttling events",
+ (__u8)log_data[SCAO_NTTE]);
+ json_object_add_value_uint(root, "Current throttling status",
+ (__u8)log_data[SCAO_CTS]);
+ json_object_add_value_uint64(root, "PCIe correctable error count",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PCEC]));
+ json_object_add_value_uint(root, "Incomplete shutdowns",
+ (uint32_t)le32_to_cpu(*(uint32_t *)&log_data[SCAO_ICS]));
+ json_object_add_value_uint(root, "Percent free blocks",
+ (__u8)log_data[SCAO_PFB]);
+ json_object_add_value_uint(root, "Capacitor health",
+ (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_CPH]));
+ json_object_add_value_uint64(root, "Unaligned I/O",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_UIO]));
+ json_object_add_value_uint64(root, "Security Version Number",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_SVN]));
+ json_object_add_value_uint64(root, "NUSE - Namespace utilization",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_NUSE]));
+ json_object_add_value_uint128(root, "PLP start count",
+ le128_to_cpu(&log_data[SCAO_PSC]));
+ json_object_add_value_uint128(root, "Endurance estimate",
+ le128_to_cpu(&log_data[SCAO_EEST]));
+ smart_log_ver = (uint16_t)le16_to_cpu(*(uint16_t *)&log_data[SCAO_LPV]);
+
+ json_object_add_value_uint(root, "Log page version", smart_log_ver);
+
+ memset((void *)guid, 0, 40);
+ sprintf((char *)guid, "0x%"PRIx64"%"PRIx64"", (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG + 8]),
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_LPG]));
+ json_object_add_value_string(root, "Log page GUID", guid);
+
+ if (smart_log_ver > 2) {
+ json_object_add_value_uint(root, "Errata Version Field",
+ (__u8)log_data[SCAO_EVF]);
+ json_object_add_value_uint(root, "Point Version Field",
+ le16_to_cpu(*(uint16_t *)&log_data[SCAO_PVF]));
+ json_object_add_value_uint(root, "Minor Version Field",
+ le16_to_cpu(*(uint16_t *)&log_data[SCAO_MIVF]));
+ json_object_add_value_uint(root, "Major Version Field",
+ (__u8)log_data[SCAO_MAVF]);
+ json_object_add_value_uint(root, "NVMe Errata Version",
+ (__u8)log_data[SCAO_NEV]);
+ json_object_add_value_uint(root, "PCIe Link Retraining Count",
+ (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PLRC]));
+ json_object_add_value_uint(root, "Power State Change Count",
+ le64_to_cpu(*(uint64_t *)&log_data[SCAO_PSCC]));
+ }
+ json_print_object(root, NULL);
+ printf("\n");
+ json_free_object(root);
+}
+
+static int get_c0_log_page(int fd, char *format)
+{
+ __u8 *data;
+ int i;
+ int ret = 0;
+ int fmt = -1;
+
+ fmt = validate_output_format(format);
+ if (fmt < 0) {
+ fprintf(stderr, "ERROR : OCP : invalid output format\n");
+ return fmt;
+ }
+
+ data = malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);
+ if (!data) {
+ fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno));
+ return -1;
+ }
+ memset(data, 0, sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);
+
+ ret = nvme_get_log_simple(fd, C0_SMART_CLOUD_ATTR_OPCODE,
+ C0_SMART_CLOUD_ATTR_LEN, data);
+
+ if (strcmp(format, "json"))
+ fprintf(stderr, "NVMe Status:%s(%x)\n",
+ nvme_status_to_string(ret, false), ret);
+
+ if (ret == 0) {
+ /* check log page guid */
+ /* Verify GUID matches */
+ for (i = 0; i < 16; i++) {
+ if (scao_guid[i] != data[SCAO_LPG + i]) {
+ int j;
+
+ fprintf(stderr, "ERROR : OCP : Unknown GUID in C0 Log Page data\n");
+ fprintf(stderr, "ERROR : OCP : Expected GUID: 0x");
+ for (j = 0; j < 16; j++) {
+ fprintf(stderr, "%x", scao_guid[j]);
+ }
+
+ fprintf(stderr, "\nERROR : OCP : Actual GUID: 0x");
+ for (j = 0; j < 16; j++) {
+ fprintf(stderr, "%x", data[SCAO_LPG + j]);
+ }
+ fprintf(stderr, "\n");
+
+ ret = -1;
+ goto out;
+ }
+ }
+
+ /* print the data */
+ switch (fmt) {
+ case NORMAL:
+ ocp_print_C0_log_normal(data);
+ break;
+ case JSON:
+ ocp_print_C0_log_json(data);
+ break;
+ }
+ } else {
+ fprintf(stderr, "ERROR : OCP : Unable to read C0 data from buffer\n");
+ }
+
+out:
+ free(data);
+ return ret;
+}
+
+int ocp_smart_add_log(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin)
+{
+ const char *desc = "Retrieve the extended SMART health data.";
+ struct nvme_dev *dev;
+ int ret = 0;
+
+ struct config {
+ char *output_format;
+ };
+
+ struct config cfg = {
+ .output_format = "normal",
+ };
+
+ OPT_ARGS(opts) = {
+ OPT_FMT("output-format", 'o', &cfg.output_format, "output Format: normal|json"),
+ OPT_END()
+ };
+
+ ret = parse_and_open(&dev, argc, argv, desc, opts);
+ if (ret)
+ return ret;
+
+ ret = get_c0_log_page(dev_fd(dev), cfg.output_format);
+ if (ret)
+ fprintf(stderr, "ERROR : OCP : Failure reading the C0 Log Page, ret = %d\n",
+ ret);
+ dev_close(dev);
+ return ret;
+}
diff --git a/plugins/ocp/ocp-smart-extended-log.h b/plugins/ocp/ocp-smart-extended-log.h
new file mode 100644
index 0000000..42c1f98
--- /dev/null
+++ b/plugins/ocp/ocp-smart-extended-log.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright (c) 2022 Meta Platforms, Inc.
+ *
+ * Authors: Arthur Shau <arthurshau@fb.com>,
+ * Wei Zhang <wzhang@fb.com>,
+ * Venkat Ramesh <venkatraghavan@fb.com>
+ */
+
+#ifndef OCP_SMART_EXTENDED_LOG_H
+#define OCP_SMART_EXTENDED_LOG_H
+
+struct command;
+struct plugin;
+
+int ocp_smart_add_log(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin);
+
+#endif
diff --git a/plugins/ocp/ocp-utils.c b/plugins/ocp/ocp-utils.c
index 9294c05..a37a58c 100644
--- a/plugins/ocp/ocp-utils.c
+++ b/plugins/ocp/ocp-utils.c
@@ -5,11 +5,13 @@
* Author: leonardo.da.cunha@solidigm.com
*/
+#include <unistd.h>
#include "ocp-utils.h"
+#include "nvme-print.h"
const unsigned char ocp_uuid[NVME_UUID_LEN] = {
- 0x6f, 0xbe, 0x56, 0x8f, 0x99, 0x29, 0x1d, 0xa2, 0x94, 0x47,
- 0x94, 0xe0, 0x5b, 0xd5, 0x94, 0xc1 };
+ 0xc1, 0x94, 0xd5, 0x5b, 0xe0, 0x94, 0x47, 0x94, 0xa2, 0x1d,
+ 0x29, 0x99, 0x8f, 0x56, 0xbe, 0x6f };
int ocp_get_uuid_index(struct nvme_dev *dev, int *index)
{
@@ -28,3 +30,66 @@ int ocp_get_uuid_index(struct nvme_dev *dev, int *index)
}
return err;
}
+
+int ocp_clear_feature(int argc, char **argv, const char *desc, const __u8 fid)
+{
+ __u32 result = 0;
+ __u32 clear = 1 << 31;
+ struct nvme_dev *dev;
+ int uuid_index = 0;
+ bool uuid = true;
+ int err;
+
+ OPT_ARGS(opts) = {
+ OPT_FLAG("no-uuid", 'n', NULL,
+ "Skip UUID index search (UUID index not required for OCP 1.0)"),
+ OPT_END()
+ };
+
+ err = parse_and_open(&dev, argc, argv, desc, opts);
+ if (err)
+ return err;
+
+ if (opts[0].seen)
+ uuid = false;
+
+ if (uuid) {
+ /* OCP 2.0 requires UUID index support */
+ err = ocp_get_uuid_index(dev, &uuid_index);
+ if (err || !uuid_index) {
+ fprintf(stderr, "ERROR: No OCP UUID index found\n");
+ goto close_dev;
+ }
+ }
+
+ struct nvme_set_features_args args = {
+ .result = &result,
+ .data = NULL,
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ .nsid = 0,
+ .cdw11 = clear,
+ .cdw12 = 0,
+ .cdw13 = 0,
+ .cdw15 = 0,
+ .data_len = 0,
+ .save = 0,
+ .uuidx = uuid_index,
+ .fid = fid,
+ };
+
+ err = nvme_set_features(&args);
+
+ if (err == 0)
+ printf("Success : %s\n", desc);
+ else if (err > 0)
+ nvme_show_status(err);
+ else
+ printf("Fail : %s\n", desc);
+close_dev:
+ /* Redundant close() to make static code analysis happy */
+ close(dev->direct.fd);
+ dev_close(dev);
+ return err;
+}
diff --git a/plugins/ocp/ocp-utils.h b/plugins/ocp/ocp-utils.h
index 44d0af4..a962169 100644
--- a/plugins/ocp/ocp-utils.h
+++ b/plugins/ocp/ocp-utils.h
@@ -16,3 +16,5 @@
* Return: Zero if nvme device has UUID list log page, or result of get uuid list otherwise.
*/
int ocp_get_uuid_index(struct nvme_dev *dev, int *index);
+
+int ocp_clear_feature(int argc, char **argv, const char *desc, const __u8 fid);
diff --git a/plugins/solidigm/meson.build b/plugins/solidigm/meson.build
index bca13bb..526fb02 100644
--- a/plugins/solidigm/meson.build
+++ b/plugins/solidigm/meson.build
@@ -1,4 +1,5 @@
sources += [
+ 'plugins/solidigm/solidigm-util.c',
'plugins/solidigm/solidigm-smart.c',
'plugins/solidigm/solidigm-garbage-collection.c',
'plugins/solidigm/solidigm-latency-tracking.c',
diff --git a/plugins/solidigm/solidigm-garbage-collection.c b/plugins/solidigm/solidigm-garbage-collection.c
index 8e2eccc..3828b9e 100644
--- a/plugins/solidigm/solidigm-garbage-collection.c
+++ b/plugins/solidigm/solidigm-garbage-collection.c
@@ -19,6 +19,7 @@
#include "linux/types.h"
#include "nvme-print.h"
#include "solidigm-garbage-collection.h"
+#include "solidigm-util.h"
typedef struct __attribute__((packed)) gc_item {
__le32 timer_type;
@@ -49,9 +50,11 @@ static void vu_gc_log_show_json(garbage_control_collection_log_t *payload, const
json_free_object(gc_entries);
}
-static void vu_gc_log_show(garbage_control_collection_log_t *payload, const char *devname)
+static void vu_gc_log_show(garbage_control_collection_log_t *payload, const char *devname,
+ __u8 uuid_index)
{
- printf("Solidigm Garbage Collection Log for NVME device: %s\n", devname);
+ printf("Solidigm Garbage Collection Log for NVME device:%s UUID-idx:%d\n", devname,
+ uuid_index);
printf("Timestamp Timer Type\n");
for (int i = 0; i < VU_GC_MAX_ITEMS; i++) {
@@ -65,6 +68,7 @@ int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *c
const char *desc = "Get and parse Solidigm vendor specific garbage collection event log.";
struct nvme_dev *dev;
int err;
+ __u8 uuid_index;
struct config {
char *output_format;
@@ -90,18 +94,36 @@ int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *c
return EINVAL;
}
+ uuid_index = solidigm_get_vu_uuid_index(dev);
+
garbage_control_collection_log_t gc_log;
const int solidigm_vu_gc_log_id = 0xfd;
+ struct nvme_get_log_args args = {
+ .lpo = 0,
+ .result = NULL,
+ .log = &gc_log,
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ .lid = solidigm_vu_gc_log_id,
+ .len = sizeof(gc_log),
+ .nsid = NVME_NSID_ALL,
+ .csi = NVME_CSI_NVM,
+ .lsi = NVME_LOG_LSI_NONE,
+ .lsp = NVME_LOG_LSP_NONE,
+ .uuidx = uuid_index,
+ .rae = false,
+ .ot = false,
+ };
- err = nvme_get_log_simple(dev_fd(dev), solidigm_vu_gc_log_id,
- sizeof(gc_log), &gc_log);
+ err = nvme_get_log(&args);
if (!err) {
if (flags & BINARY) {
d_raw((unsigned char *)&gc_log, sizeof(gc_log));
} else if (flags & JSON) {
vu_gc_log_show_json(&gc_log, dev->name);
} else {
- vu_gc_log_show(&gc_log, dev->name);
+ vu_gc_log_show(&gc_log, dev->name, uuid_index);
}
}
else if (err > 0) {
diff --git a/plugins/solidigm/solidigm-latency-tracking.c b/plugins/solidigm/solidigm-latency-tracking.c
index 1013ae8..40edcfa 100644
--- a/plugins/solidigm/solidigm-latency-tracking.c
+++ b/plugins/solidigm/solidigm-latency-tracking.c
@@ -17,6 +17,7 @@
#include "plugin.h"
#include "linux/types.h"
#include "nvme-print.h"
+#include "solidigm-util.h"
#define BUCKET_LIST_SIZE_4_0 152
#define BUCKET_LIST_SIZE_4_1 1216
@@ -42,6 +43,7 @@ struct config {
struct latency_tracker {
int fd;
+ __u8 uuid_index;
struct config cfg;
enum nvme_print_flags print_flags;
struct latency_statistics stats;
@@ -213,6 +215,7 @@ static void latency_tracker_pre_parse(struct latency_tracker *lt)
if (lt->print_flags == NORMAL) {
printf("Solidigm IO %s Command Latency Tracking Statistics type %d\n",
lt->cfg.write ? "Write" : "Read", lt->cfg.type);
+ printf("UUID-idx: %d\n", lt->uuid_index);
printf("Major Revision: %u\nMinor Revision: %u\n",
le16_to_cpu(lt->stats.version_major), le16_to_cpu(lt->stats.version_minor));
if (lt->has_average_latency_field) {
@@ -276,12 +279,12 @@ static int latency_tracking_is_enable(struct latency_tracker *lt, __u32 * enable
{
struct nvme_get_features_args args_get = {
.args_size = sizeof(args_get),
- .fd = lt->fd,
+ .fd = lt->fd,
+ .uuidx = lt->uuid_index,
.fid = LATENCY_TRACKING_FID,
.nsid = 0,
.sel = 0,
.cdw11 = 0,
- .uuidx = 0,
.data_len = LATENCY_TRACKING_FID_DATA_LEN,
.data = NULL,
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
@@ -307,12 +310,12 @@ static int latency_tracking_enable(struct latency_tracker *lt)
struct nvme_set_features_args args_set = {
.args_size = sizeof(args_set),
.fd = lt->fd,
+ .uuidx = lt->uuid_index,
.fid = LATENCY_TRACKING_FID,
.nsid = 0,
.cdw11 = lt->cfg.enable,
.cdw12 = 0,
.save = 0,
- .uuidx = 0,
.cdw15 = 0,
.data_len = LATENCY_TRACKING_FID_DATA_LEN,
.data = NULL,
@@ -328,8 +331,8 @@ static int latency_tracking_enable(struct latency_tracker *lt)
fprintf(stderr, "Command failed while parsing.\n");
} else {
if (lt->print_flags == NORMAL) {
- printf("Successfully set enable bit for FID (0x%X) to %i.\n",
- LATENCY_TRACKING_FID, lt->cfg.enable);
+ printf("Successfully set enable bit for UUID-idx:%d FID:0x%X, to %i.\n",
+ lt->uuid_index, LATENCY_TRACKING_FID, lt->cfg.enable);
}
}
return err;
@@ -356,6 +359,7 @@ static int latency_tracker_get_log(struct latency_tracker *lt)
.log = &lt->stats,
.args_size = sizeof(args),
.fd = lt->fd,
+ .uuidx = lt->uuid_index,
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
.lid = lt->cfg.write ? WRITE_LOG_ID : READ_LOG_ID,
.len = sizeof(lt->stats),
@@ -363,7 +367,6 @@ static int latency_tracker_get_log(struct latency_tracker *lt)
.csi = NVME_CSI_NVM,
.lsi = NVME_LOG_LSI_NONE,
.lsp = lt->cfg.type,
- .uuidx = NVME_UUID_NONE,
.rae = false,
.ot = false,
};
@@ -390,6 +393,7 @@ int solidigm_get_latency_tracking_log(int argc, char **argv, struct command *cmd
int err;
struct latency_tracker lt = {
+ .uuid_index = 0,
.cfg = {
.output_format = "normal",
},
@@ -433,6 +437,8 @@ int solidigm_get_latency_tracking_log(int argc, char **argv, struct command *cmd
return EINVAL;
}
+ lt.uuid_index = solidigm_get_vu_uuid_index(dev);
+
err = latency_tracking_enable(&lt);
if (err){
dev_close(dev);
@@ -462,8 +468,8 @@ int solidigm_get_latency_tracking_log(int argc, char **argv, struct command *cmd
putchar(enabled);
} else {
printf(
- "Latency Statistics Tracking (FID 0x%X) is currently (%i).\n",
- LATENCY_TRACKING_FID, enabled);
+ "Latency Statistics Tracking (UUID-idx:%d, FID:0x%X) is currently %i.\n",
+ lt.uuid_index, LATENCY_TRACKING_FID, enabled);
}
} else {
fprintf(stderr, "Could not read feature id 0xE2.\n");
diff --git a/plugins/solidigm/solidigm-nvme.c b/plugins/solidigm/solidigm-nvme.c
index b547035..0e42bd6 100644
--- a/plugins/solidigm/solidigm-nvme.c
+++ b/plugins/solidigm/solidigm-nvme.c
@@ -14,7 +14,9 @@
#include "solidigm-garbage-collection.h"
#include "solidigm-latency-tracking.h"
#include "solidigm-telemetry.h"
+
#include "plugins/ocp/ocp-clear-fw-update-history.h"
+#include "plugins/ocp/ocp-smart-extended-log.h"
static int get_additional_smart_log(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
@@ -37,7 +39,13 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd, struct
}
static int clear_fw_update_history(int argc, char **argv, struct command *cmd,
- struct plugin *plugin)
+ struct plugin *plugin)
{
return ocp_clear_fw_update_history(argc, argv, cmd, plugin);
}
+
+static int smart_cloud(int argc, char **argv, struct command *cmd,
+ struct plugin *plugin)
+{
+ return ocp_smart_add_log(argc, argv, cmd, plugin);
+}
diff --git a/plugins/solidigm/solidigm-nvme.h b/plugins/solidigm/solidigm-nvme.h
index 778dbf9..1fdc6a6 100644
--- a/plugins/solidigm/solidigm-nvme.h
+++ b/plugins/solidigm/solidigm-nvme.h
@@ -13,11 +13,12 @@
#include "cmd.h"
-#define SOLIDIGM_PLUGIN_VERSION "0.7"
+#define SOLIDIGM_PLUGIN_VERSION "0.8"
PLUGIN(NAME("solidigm", "Solidigm vendor specific extensions", SOLIDIGM_PLUGIN_VERSION),
COMMAND_LIST(
ENTRY("smart-log-add", "Retrieve Solidigm SMART Log", get_additional_smart_log)
+ ENTRY("vs-smart-add-log", "Get SMART / health extended log (redirects to ocp plug-in)", smart_cloud)
ENTRY("garbage-collect-log", "Retrieve Garbage Collection Log", get_garbage_collection_log)
ENTRY("latency-tracking-log", "Enable/Retrieve Latency tracking Log", get_latency_tracking_log)
ENTRY("parse-telemetry-log", "Parse Telemetry Log binary", get_telemetry_log)
diff --git a/plugins/solidigm/solidigm-smart.c b/plugins/solidigm/solidigm-smart.c
index 77c26ac..568d3ab 100644
--- a/plugins/solidigm/solidigm-smart.c
+++ b/plugins/solidigm/solidigm-smart.c
@@ -19,6 +19,7 @@
#include "nvme-print.h"
#include "solidigm-smart.h"
+#include "solidigm-util.h"
struct __attribute__((packed)) nvme_additional_smart_log_item {
__u8 id;
@@ -179,12 +180,13 @@ static void vu_smart_log_show_json(vu_smart_log_t *payload, unsigned int nsid, c
json_free_object(root);
}
-static void vu_smart_log_show(vu_smart_log_t *payload, unsigned int nsid, const char *devname)
+static void vu_smart_log_show(vu_smart_log_t *payload, unsigned int nsid, const char *devname,
+ __u8 uuid_index)
{
smart_log_item_t *item = payload->item;
- printf("Additional Smart Log for NVME device:%s namespace-id:%x\n",
- devname, nsid);
+ printf("Additional Smart Log for NVMe device:%s namespace-id:%x UUID-idx:%d\n",
+ devname, nsid, uuid_index);
printf("ID KEY Normalized Raw\n");
for (int i = 0; i < VU_SMART_MAX_ITEMS; i++) {
@@ -201,6 +203,7 @@ int solidigm_get_additional_smart_log(int argc, char **argv, struct command *cmd
enum nvme_print_flags flags;
struct nvme_dev *dev;
int err;
+ __u8 uuid_index;
struct config {
__u32 namespace_id;
@@ -229,8 +232,27 @@ int solidigm_get_additional_smart_log(int argc, char **argv, struct command *cmd
return flags;
}
- err = nvme_get_log_simple(dev_fd(dev), solidigm_vu_smart_log_id,
- sizeof(smart_log_payload), &smart_log_payload);
+ uuid_index = solidigm_get_vu_uuid_index(dev);
+
+ struct nvme_get_log_args args = {
+ .lpo = 0,
+ .result = NULL,
+ .log = &smart_log_payload,
+ .args_size = sizeof(args),
+ .fd = dev_fd(dev),
+ .timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
+ .lid = solidigm_vu_smart_log_id,
+ .len = sizeof(smart_log_payload),
+ .nsid = NVME_NSID_ALL,
+ .csi = NVME_CSI_NVM,
+ .lsi = NVME_LOG_LSI_NONE,
+ .lsp = NVME_LOG_LSP_NONE,
+ .uuidx = uuid_index,
+ .rae = false,
+ .ot = false,
+ };
+
+ err = nvme_get_log(&args);
if (!err) {
if (flags & JSON) {
vu_smart_log_show_json(&smart_log_payload,
@@ -239,7 +261,7 @@ int solidigm_get_additional_smart_log(int argc, char **argv, struct command *cmd
d_raw((unsigned char *)&smart_log_payload, sizeof(smart_log_payload));
} else {
vu_smart_log_show(&smart_log_payload, cfg.namespace_id,
- dev->name);
+ dev->name, uuid_index);
}
} else if (err > 0) {
nvme_show_status(err);
diff --git a/plugins/solidigm/solidigm-telemetry.c b/plugins/solidigm/solidigm-telemetry.c
index 84a4e2a..9946991 100644
--- a/plugins/solidigm/solidigm-telemetry.c
+++ b/plugins/solidigm/solidigm-telemetry.c
@@ -121,7 +121,7 @@ int solidigm_get_telemetry_log(int argc, char **argv, struct command *cmd, struc
cfg.cfg_file, strerror(err));
goto close_fd;
}
- json_tokener * jstok = json_tokener_new();
+ struct json_tokener * jstok = json_tokener_new();
tl.configuration = json_tokener_parse_ex(jstok, conf_str, length);
if (jstok->err != json_tokener_success) {
diff --git a/plugins/solidigm/solidigm-telemetry/cod.c b/plugins/solidigm/solidigm-telemetry/cod.c
index be5685b..7accc53 100644
--- a/plugins/solidigm/solidigm-telemetry/cod.c
+++ b/plugins/solidigm/solidigm-telemetry/cod.c
@@ -110,9 +110,9 @@ void solidigm_telemetry_log_cod_parse(struct telemetry_log *tl)
UNKNOWN = 0xFF,
};
- json_object *telemetry_header = NULL;
- json_object *COD_offset = NULL;
- json_object *reason_id = NULL;
+ struct json_object *telemetry_header = NULL;
+ struct json_object *COD_offset = NULL;
+ struct json_object *reason_id = NULL;
if (!json_object_object_get_ex(tl->root, "telemetryHeader", &telemetry_header))
return;
@@ -144,7 +144,7 @@ void solidigm_telemetry_log_cod_parse(struct telemetry_log *tl)
return;
}
- json_object *cod = json_create_object();
+ struct json_object *cod = json_create_object();
json_object_object_add(tl->root, "cod", cod);
for (int i =0 ; i < data->header.EntryCount; i++) {
diff --git a/plugins/solidigm/solidigm-telemetry/config.c b/plugins/solidigm/solidigm-telemetry/config.c
index 781d786..5111703 100644
--- a/plugins/solidigm/solidigm-telemetry/config.c
+++ b/plugins/solidigm/solidigm-telemetry/config.c
@@ -11,15 +11,15 @@
// max 16 bit unsigned integer nummber 65535
#define MAX_16BIT_NUM_AS_STRING_SIZE 6
-static bool config_get_by_version(const json_object *obj, int version_major,
- int version_minor, json_object **value)
+static bool config_get_by_version(const struct json_object *obj, int version_major,
+ int version_minor, struct json_object **value)
{
char str_key[MAX_16BIT_NUM_AS_STRING_SIZE];
char str_subkey[MAX_16BIT_NUM_AS_STRING_SIZE];
snprintf(str_key, sizeof(str_key), "%d", version_major);
snprintf(str_subkey, sizeof(str_subkey), "%d", version_minor);
- json_object *major_obj = NULL;
+ struct json_object *major_obj = NULL;
if (!json_object_object_get_ex(obj, str_key, &major_obj))
return false;
@@ -28,11 +28,11 @@ static bool config_get_by_version(const json_object *obj, int version_major,
return value != NULL;
}
-bool solidigm_config_get_by_token_version(const json_object *obj, int token_id,
+bool solidigm_config_get_by_token_version(const struct json_object *obj, int token_id,
int version_major, int version_minor,
- json_object **value)
+ struct json_object **value)
{
- json_object *token_obj = NULL;
+ struct json_object *token_obj = NULL;
char str_key[MAX_16BIT_NUM_AS_STRING_SIZE];
snprintf(str_key, sizeof(str_key), "%d", token_id);
diff --git a/plugins/solidigm/solidigm-telemetry/config.h b/plugins/solidigm/solidigm-telemetry/config.h
index bea84fb..30e61ff 100644
--- a/plugins/solidigm/solidigm-telemetry/config.h
+++ b/plugins/solidigm/solidigm-telemetry/config.h
@@ -7,4 +7,7 @@
#include <stdbool.h>
#include "util/json.h"
-bool solidigm_config_get_by_token_version(const json_object *obj, int key, int subkey, int subsubkey, json_object **value);
+bool solidigm_config_get_by_token_version(const struct json_object *obj,
+ int key, int subkey,
+ int subsubkey,
+ struct json_object **value);
diff --git a/plugins/solidigm/solidigm-telemetry/data-area.c b/plugins/solidigm/solidigm-telemetry/data-area.c
index 7233e8f..2f18ea2 100644
--- a/plugins/solidigm/solidigm-telemetry/data-area.c
+++ b/plugins/solidigm/solidigm-telemetry/data-area.c
@@ -17,7 +17,7 @@
static bool telemetry_log_get_value(const struct telemetry_log *tl,
uint32_t offset_bit, uint32_t size_bit,
- bool is_signed, json_object **val_obj)
+ bool is_signed, struct json_object **val_obj)
{
uint32_t offset_bit_from_byte;
uint32_t additional_size_byte;
@@ -77,16 +77,16 @@ static bool telemetry_log_get_value(const struct telemetry_log *tl,
}
static int telemetry_log_structure_parse(const struct telemetry_log *tl,
- json_object *struct_def,
+ struct json_object *struct_def,
size_t parent_offset_bit,
- json_object *output,
- json_object *metadata)
+ struct json_object *output,
+ struct json_object *metadata)
{
- json_object *obj_arraySizeArray = NULL;
- json_object *obj = NULL;
- json_object *obj_memberList;
- json_object *major_dimension;
- json_object *sub_output;
+ struct json_object *obj_arraySizeArray = NULL;
+ struct json_object *obj = NULL;
+ struct json_object *obj_memberList;
+ struct json_object *major_dimension;
+ struct json_object *sub_output;
bool is_enumeration = false;
bool has_member_list;
const char *type = "";
@@ -155,7 +155,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
uint32_t array_size_dimension[array_rank];
for (size_t i = 0; i < array_rank; i++) {
- json_object *dimension = json_object_array_get_idx(obj_arraySizeArray, i);
+ struct json_object *dimension = json_object_array_get_idx(obj_arraySizeArray, i);
array_size_dimension[i] = json_object_get_uint64(dimension);
major_dimension = dimension;
@@ -163,7 +163,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
if (array_rank > 1) {
uint32_t linear_pos_per_index = array_size_dimension[0];
uint32_t prev_index_offset_bit = 0;
- json_object *dimension_output;
+ struct json_object *dimension_output;
for (int i = 1; i < (array_rank - 1); i++)
linear_pos_per_index *= array_size_dimension[i];
@@ -182,7 +182,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
json_object_array_del_idx(obj_arraySizeArray, array_rank - 1, 1);
for (int i = 0 ; i < array_size_dimension[0]; i++) {
- json_object *sub_array = json_create_array();
+ struct json_object *sub_array = json_create_array();
size_t offset;
offset = parent_offset_bit + prev_index_offset_bit;
@@ -213,7 +213,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
for (uint32_t j = 0; j < array_size_dimension[0]; j++) {
if (is_enumeration || !has_member_list) {
bool is_signed = !strncmp(type, SIGNED_INT_PREFIX, sizeof(SIGNED_INT_PREFIX)-1);
- json_object *val_obj;
+ struct json_object *val_obj;
size_t offset;
offset = parent_offset_bit + offset_bit + linear_array_pos_bit;
@@ -230,7 +230,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
json_free_object(val_obj);
}
} else {
- json_object *sub_sub_output = json_object_new_object();
+ struct json_object *sub_sub_output = json_create_object();
int num_members;
if (array_size_dimension[0] > 1)
@@ -240,7 +240,7 @@ static int telemetry_log_structure_parse(const struct telemetry_log *tl,
num_members = json_object_array_length(obj_memberList);
for (int k = 0; k < num_members; k++) {
- json_object *member = json_object_array_get_idx(obj_memberList, k);
+ struct json_object *member = json_object_array_get_idx(obj_memberList, k);
size_t offset;
offset = parent_offset_bit + offset_bit + linear_array_pos_bit;
@@ -322,8 +322,8 @@ struct telemetry_object_header {
static void telemetry_log_data_area_toc_parse(const struct telemetry_log *tl,
enum nvme_telemetry_da da,
- json_object *toc_array,
- json_object *tele_obj_array)
+ struct json_object *toc_array,
+ struct json_object *tele_obj_array)
{
const struct telemetry_object_header *header;
@@ -339,8 +339,8 @@ static void telemetry_log_data_area_toc_parse(const struct telemetry_log *tl,
payload = (char *) tl->log;
for (int i = 0; i < toc->header.TableOfContentsCount; i++) {
- json_object *structure_definition = NULL;
- json_object *toc_item;
+ struct json_object *structure_definition = NULL;
+ struct json_object *toc_item;
uint32_t obj_offset;
bool has_struct;
@@ -379,15 +379,15 @@ static void telemetry_log_data_area_toc_parse(const struct telemetry_log *tl,
&structure_definition);
if (has_struct) {
- json_object *tele_obj_item = json_create_object();
+ struct json_object *tele_obj_item = json_create_object();
json_object_array_add(tele_obj_array, tele_obj_item);
json_object_get(toc_item);
json_object_add_value_object(tele_obj_item, "metadata", toc_item);
- json_object *parsed_struct = json_object_new_object();
+ struct json_object *parsed_struct = json_create_object();
json_object_add_value_object(tele_obj_item, "objectData", parsed_struct);
- json_object *obj_hasTelemObjHdr = NULL;
+ struct json_object *obj_hasTelemObjHdr = NULL;
uint32_t header_offset = sizeof(const struct telemetry_object_header);
uint32_t file_offset;
@@ -411,8 +411,8 @@ static void telemetry_log_data_area_toc_parse(const struct telemetry_log *tl,
int solidigm_telemetry_log_data_areas_parse(const struct telemetry_log *tl,
enum nvme_telemetry_da last_da)
{
- json_object *tele_obj_array = json_create_array();
- json_object *toc_array = json_create_array();
+ struct json_object *tele_obj_array = json_create_array();
+ struct json_object *toc_array = json_create_array();
json_object_add_value_array(tl->root, "tableOfContents", toc_array);
json_object_add_value_array(tl->root, "telemetryObjects", tele_obj_array);
diff --git a/plugins/solidigm/solidigm-telemetry/header.c b/plugins/solidigm/solidigm-telemetry/header.c
index 72b2d97..d085c24 100644
--- a/plugins/solidigm/solidigm-telemetry/header.c
+++ b/plugins/solidigm/solidigm-telemetry/header.c
@@ -63,10 +63,10 @@ static_assert(sizeof(const struct reason_indentifier_1_2) ==
#pragma pack(pop, reason_indentifier)
static void telemetry_log_reason_id_parse1_0_ext(const struct telemetry_log *tl,
- json_object *reason_id)
+ struct json_object *reason_id)
{
const struct reason_indentifier_1_0 *ri;
- json_object *reserved;
+ struct json_object *reserved;
ri = (struct reason_indentifier_1_0 *) tl->log->rsnident;
json_object_object_add(reason_id, "FirmwareVersion", json_object_new_string_len(ri->FirmwareVersion, sizeof(ri->FirmwareVersion)));
@@ -76,16 +76,16 @@ static void telemetry_log_reason_id_parse1_0_ext(const struct telemetry_log *tl,
reserved = json_create_array();
json_object_add_value_array(reason_id, "Reserved", reserved);
for ( int i=0; i < sizeof(ri->Reserved); i++) {
- json_object *val = json_object_new_int(ri->Reserved[i]);
+ struct json_object *val = json_object_new_int(ri->Reserved[i]);
json_object_array_add(reserved, val);
}
}
static void telemetry_log_reason_id_parse1_1_ext(const struct telemetry_log *tl,
- json_object *reason_id)
+ struct json_object *reason_id)
{
const struct reason_indentifier_1_1 *ri;
- json_object *reserved;
+ struct json_object *reserved;
ri = (struct reason_indentifier_1_1 *) tl->log->rsnident;
json_object_object_add(reason_id, "FirmwareVersion", json_object_new_string_len(ri->FirmwareVersion, sizeof(ri->FirmwareVersion)));
@@ -98,17 +98,17 @@ static void telemetry_log_reason_id_parse1_1_ext(const struct telemetry_log *tl,
reserved = json_create_array();
json_object_add_value_array(reason_id, "Reserved", reserved);
for (int i = 0; i < sizeof(ri->Reserved); i++) {
- json_object *val = json_object_new_int(ri->Reserved[i]);
+ struct json_object *val = json_object_new_int(ri->Reserved[i]);
json_object_array_add(reserved, val);
}
}
static void telemetry_log_reason_id_parse1_2_ext(const struct telemetry_log *tl,
- json_object *reason_id)
+ struct json_object *reason_id)
{
const struct reason_indentifier_1_2 *ri;
- json_object *dp_reserved;
- json_object *reserved;
+ struct json_object *dp_reserved;
+ struct json_object *reserved;
ri = (struct reason_indentifier_1_2 *) tl->log->rsnident;
@@ -121,19 +121,19 @@ static void telemetry_log_reason_id_parse1_2_ext(const struct telemetry_log *tl,
reserved = json_create_array();
json_object_add_value_array(reason_id, "Reserved2", reserved);
for (int i = 0; i < sizeof(ri->Reserved2); i++) {
- json_object *val = json_object_new_int(ri->Reserved2[i]);
+ struct json_object *val = json_object_new_int(ri->Reserved2[i]);
json_object_array_add(reserved, val);
}
dp_reserved = json_create_array();
json_object_add_value_array(reason_id, "DualPortReserved", dp_reserved);
for (int i = 0; i < sizeof(ri->DualPortReserved); i++) {
- json_object *val = json_object_new_int(ri->DualPortReserved[i]);
+ struct json_object *val = json_object_new_int(ri->DualPortReserved[i]);
json_object_array_add(dp_reserved, val);
}
}
-static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *tl, json_object *reason_id)
+static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *tl, struct json_object *reason_id)
{
const struct reason_indentifier_1_0 *ri1_0 =
(struct reason_indentifier_1_0 *) tl->log->rsnident;
@@ -161,9 +161,9 @@ static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *t
bool solidigm_telemetry_log_header_parse(const struct telemetry_log *tl)
{
const struct nvme_telemetry_log *log;
- json_object *ieee_oui_id;
- json_object *reason_id;
- json_object *header;
+ struct json_object *ieee_oui_id;
+ struct json_object *reason_id;
+ struct json_object *header;
if (tl->log_size < sizeof(const struct nvme_telemetry_log)) {
SOLIDIGM_LOG_WARNING("Telemetry log too short.");
@@ -180,7 +180,7 @@ bool solidigm_telemetry_log_header_parse(const struct telemetry_log *tl)
json_object_object_add(header, "ieeeOuiIdentifier", ieee_oui_id);
for (int i = 0; i < sizeof(log->ieee); i++) {
- json_object *val = json_object_new_int(log->ieee[i]);
+ struct json_object *val = json_object_new_int(log->ieee[i]);
json_object_array_add(ieee_oui_id, val);
}
diff --git a/plugins/solidigm/solidigm-telemetry/telemetry-log.h b/plugins/solidigm/solidigm-telemetry/telemetry-log.h
index ef4ec5d..e9eff73 100644
--- a/plugins/solidigm/solidigm-telemetry/telemetry-log.h
+++ b/plugins/solidigm/solidigm-telemetry/telemetry-log.h
@@ -24,8 +24,8 @@
struct telemetry_log {
struct nvme_telemetry_log *log;
size_t log_size;
- json_object *root;
- json_object *configuration;
+ struct json_object *root;
+ struct json_object *configuration;
};
-#endif /* _SOLIDIGM_TELEMETRY_LOG_H */ \ No newline at end of file
+#endif /* _SOLIDIGM_TELEMETRY_LOG_H */
diff --git a/plugins/solidigm/solidigm-util.c b/plugins/solidigm/solidigm-util.c
new file mode 100644
index 0000000..0171a49
--- /dev/null
+++ b/plugins/solidigm/solidigm-util.c
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2023 Solidigm.
+ *
+ * Author: leonardo.da.cunha@solidigm.com
+ */
+
+#include "plugins/ocp/ocp-utils.h"
+#include "solidigm-util.h"
+
+__u8 solidigm_get_vu_uuid_index(struct nvme_dev *dev)
+{
+ int ocp_uuid_index = 0;
+
+ if (ocp_get_uuid_index(dev, &ocp_uuid_index) == 0)
+ if (ocp_uuid_index == 2)
+ return 1;
+
+ return 0;
+}
diff --git a/plugins/solidigm/solidigm-util.h b/plugins/solidigm/solidigm-util.h
new file mode 100644
index 0000000..3a18501
--- /dev/null
+++ b/plugins/solidigm/solidigm-util.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2023 Solidigm.
+ *
+ * Author: leonardo.da.cunha@solidigm.com
+ */
+
+#include "nvme.h"
+
+__u8 solidigm_get_vu_uuid_index(struct nvme_dev *dev);
diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c
index cf185be..2d5d173 100644
--- a/plugins/wdc/wdc-nvme.c
+++ b/plugins/wdc/wdc-nvme.c
@@ -996,10 +996,14 @@ struct __attribute__((__packed__)) wdc_bd_ca_log_format {
__u8 raw_value[8];
};
-#define READ 0
-#define WRITE 1
-#define TRIM 2
-#define RESERVED 3
+#define LATENCY_LOG_BUCKET_READ 3
+#define LATENCY_LOG_BUCKET_WRITE 2
+#define LATENCY_LOG_BUCKET_TRIM 1
+#define LATENCY_LOG_BUCKET_RESERVED 0
+
+#define LATENCY_LOG_MEASURED_LAT_READ 2
+#define LATENCY_LOG_MEASURED_LAT_WRITE 1
+#define LATENCY_LOG_MEASURED_LAT_TRIM 0
struct __attribute__((__packed__)) wdc_ssd_latency_monitor_log {
__u8 feature_status; /* 0x00 */
@@ -1014,7 +1018,7 @@ struct __attribute__((__packed__)) wdc_ssd_latency_monitor_log {
__u8 active_latency_min_window; /* 0x0C */
__u8 rsvd2[0x13]; /* 0x0D */
- __le32 active_bucket_counter[4][4] ; /* 0x20 - 0x5F */
+ __le32 active_bucket_counter[4][4]; /* 0x20 - 0x5F */
__le64 active_latency_timestamp[4][3]; /* 0x60 - 0xBF */
__le16 active_measured_latency[4][3]; /* 0xC0 - 0xD7 */
__le16 active_latency_stamp_units; /* 0xD8 */
@@ -4106,19 +4110,21 @@ static int wdc_print_latency_monitor_log_normal(struct nvme_dev *dev,
printf(" Read Write Deallocate/Trim \n");
for (i = 0; i <= 3; i++) {
printf(" Active Bucket Counter: Bucket %d %27d %27d %27d \n",
- i, le32_to_cpu(log_data->active_bucket_counter[i][READ]), le32_to_cpu(log_data->active_bucket_counter[i][WRITE]),
- le32_to_cpu(log_data->active_bucket_counter[i][TRIM]));
+ i, le32_to_cpu(log_data->active_bucket_counter[i][LATENCY_LOG_BUCKET_READ]),
+ le32_to_cpu(log_data->active_bucket_counter[i][LATENCY_LOG_BUCKET_WRITE]),
+ le32_to_cpu(log_data->active_bucket_counter[i][LATENCY_LOG_BUCKET_TRIM]));
}
- for (i = 0; i <= 3; i++) {
+ for (i = 3; i >= 0; i--) {
printf(" Active Measured Latency: Bucket %d %27d ms %27d ms %27d ms \n",
- i, le16_to_cpu(log_data->active_measured_latency[i][READ]), le16_to_cpu(log_data->active_measured_latency[i][WRITE]),
- le16_to_cpu(log_data->active_measured_latency[i][TRIM]));
+ 3-i, le16_to_cpu(log_data->active_measured_latency[i][LATENCY_LOG_MEASURED_LAT_READ]),
+ le16_to_cpu(log_data->active_measured_latency[i][LATENCY_LOG_MEASURED_LAT_WRITE]),
+ le16_to_cpu(log_data->active_measured_latency[i][LATENCY_LOG_MEASURED_LAT_TRIM]));
}
- for (i = 0; i <= 3; i++) {
- printf(" Active Latency Time Stamp: Bucket %d ", i);
- for (j = 0; j <= 2; j++) {
+ for (i = 3; i >= 0; i--) {
+ printf(" Active Latency Time Stamp: Bucket %d ", 3-i);
+ for (j = 2; j >= 0; j--) {
if (le64_to_cpu(log_data->active_latency_timestamp[i][j]) == -1)
printf(" N/A ");
else {
@@ -4131,19 +4137,21 @@ static int wdc_print_latency_monitor_log_normal(struct nvme_dev *dev,
for (i = 0; i <= 3; i++) {
printf(" Static Bucket Counter: Bucket %d %27d %27d %27d \n",
- i, le32_to_cpu(log_data->static_bucket_counter[i][READ]), le32_to_cpu(log_data->static_bucket_counter[i][WRITE]),
- le32_to_cpu(log_data->static_bucket_counter[i][TRIM]));
+ i, le32_to_cpu(log_data->static_bucket_counter[i][LATENCY_LOG_BUCKET_READ]),
+ le32_to_cpu(log_data->static_bucket_counter[i][LATENCY_LOG_BUCKET_WRITE]),
+ le32_to_cpu(log_data->static_bucket_counter[i][LATENCY_LOG_BUCKET_TRIM]));
}
- for (i = 0; i <= 3; i++) {
+ for (i = 3; i >= 0; i--) {
printf(" Static Measured Latency: Bucket %d %27d ms %27d ms %27d ms \n",
- i, le16_to_cpu(log_data->static_measured_latency[i][READ]), le16_to_cpu(log_data->static_measured_latency[i][WRITE]),
- le16_to_cpu(log_data->static_measured_latency[i][TRIM]));
+ 3-i, le16_to_cpu(log_data->static_measured_latency[i][LATENCY_LOG_MEASURED_LAT_READ]),
+ le16_to_cpu(log_data->static_measured_latency[i][LATENCY_LOG_MEASURED_LAT_WRITE]),
+ le16_to_cpu(log_data->static_measured_latency[i][LATENCY_LOG_MEASURED_LAT_TRIM]));
}
- for (i = 0; i <= 3; i++) {
- printf(" Static Latency Time Stamp: Bucket %d ", i);
- for (j = 0; j <= 2; j++) {
+ for (i = 3; i >= 0; i--) {
+ printf(" Static Latency Time Stamp: Bucket %d ", 3-i);
+ for (j = 2; j >= 0; j--) {
if (le64_to_cpu(log_data->static_latency_timestamp[i][j]) == -1)
printf(" N/A ");
else {
@@ -4179,38 +4187,38 @@ static void wdc_print_latency_monitor_log_json(struct wdc_ssd_latency_monitor_lo
json_object_add_value_int(root, "Debug Log Trigger Enable", le16_to_cpu(log_data->debug_log_trigger_enable));
for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Active Bucket Counter: Bucket %d %s", i, operation[j]);
- json_object_add_value_int(root, buf, le32_to_cpu(log_data->active_bucket_counter[i][j]));
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Active Bucket Counter: Bucket %d %s", i, operation[2-j]);
+ json_object_add_value_int(root, buf, le32_to_cpu(log_data->active_bucket_counter[i][j+1]));
}
}
- for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Active Measured Latency: Bucket %d %s", i, operation[j]);
+ for (i = 3; i >= 0; i--) {
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Active Measured Latency: Bucket %d %s", 3-i, operation[2-j]);
json_object_add_value_int(root, buf, le16_to_cpu(log_data->active_measured_latency[i][j]));
}
}
- for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Active Latency Time Stamp: Bucket %d %s", i, operation[j]);
+ for (i = 3; i >= 0; i--) {
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Active Latency Time Stamp: Bucket %d %s", 3-i, operation[2-j]);
json_object_add_value_int(root, buf, le64_to_cpu(log_data->active_latency_timestamp[i][j]));
}
}
for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Static Bucket Counter: Bucket %d %s", i, operation[j]);
- json_object_add_value_int(root, buf, le32_to_cpu(log_data->static_bucket_counter[i][j]));
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Static Bucket Counter: Bucket %d %s", i, operation[2-j]);
+ json_object_add_value_int(root, buf, le32_to_cpu(log_data->static_bucket_counter[i][j+1]));
}
}
- for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Static Measured Latency: Bucket %d %s", i, operation[j]);
+ for (i = 3; i >= 0; i--) {
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Static Measured Latency: Bucket %d %s", 3-i, operation[2-j]);
json_object_add_value_int(root, buf, le16_to_cpu(log_data->static_measured_latency[i][j]));
}
}
- for (i = 0; i <= 3; i++) {
- for (j = 0; j <= 2; j++) {
- sprintf(buf, "Static Latency Time Stamp: Bucket %d %s", i, operation[j]);
+ for (i = 3; i >= 0; i--) {
+ for (j = 2; j >= 0; j--) {
+ sprintf(buf, "Static Latency Time Stamp: Bucket %d %s", 3-i, operation[2-j]);
json_object_add_value_int(root, buf, le64_to_cpu(log_data->static_latency_timestamp[i][j]));
}
}
@@ -10568,7 +10576,7 @@ static int wdc_vs_temperature_stats(int argc, char **argv,
if (ret != 0)
goto out;
- /* convert from Kelvin to degrees Celsius */
+ /* convert from kelvins to degrees Celsius */
temperature = ((smart_log.temperature[1] << 8) | smart_log.temperature[0]) - 273;
/* retrieve HCTM Thermal Management Temperatures */
diff --git a/plugins/wdc/wdc-nvme.h b/plugins/wdc/wdc-nvme.h
index 242cf9a..cdd9615 100644
--- a/plugins/wdc/wdc-nvme.h
+++ b/plugins/wdc/wdc-nvme.h
@@ -5,7 +5,7 @@
#if !defined(WDC_NVME) || defined(CMD_HEADER_MULTI_READ)
#define WDC_NVME
-#define WDC_PLUGIN_VERSION "2.1.2"
+#define WDC_PLUGIN_VERSION "2.3.1"
#include "cmd.h"
PLUGIN(NAME("wdc", "Western Digital vendor specific extensions", WDC_PLUGIN_VERSION),
diff --git a/subprojects/libnvme.wrap b/subprojects/libnvme.wrap
index 368774a..b398eda 100644
--- a/subprojects/libnvme.wrap
+++ b/subprojects/libnvme.wrap
@@ -1,6 +1,6 @@
[wrap-git]
url = https://github.com/linux-nvme/libnvme.git
-revision = 94dd6d027e482749d8a915aae5fd52ef7323c054
+revision = a8a5d300c70fc30ffd793bb5726a4ec3d0719163
[provide]
libnvme = libnvme_dep
diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap
deleted file mode 100644
index 0482386..0000000
--- a/subprojects/zlib.wrap
+++ /dev/null
@@ -1,12 +0,0 @@
-[wrap-file]
-directory = zlib-1.2.13
-source_url = http://zlib.net/fossils/zlib-1.2.13.tar.gz
-source_filename = zlib-1.2.13.tar.gz
-source_hash = b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30
-patch_filename = zlib_1.2.13-1_patch.zip
-patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-1/get_patch
-patch_hash = 73a0103df54133b10f8774f92e23da048bd22554523e2b833cdb72b2702c0628
-wrapdb_version = 1.2.13-1
-
-[provide]
-zlib = zlib_dep
diff --git a/unit/meson.build b/unit/meson.build
index d4ff925..7e0e878 100644
--- a/unit/meson.build
+++ b/unit/meson.build
@@ -18,6 +18,15 @@ test_suffix_si_parse = executable(
test('suffix_si_parse', test_suffix_si_parse)
+test_suffix_binary_parse = executable(
+ 'test-suffix-binary-parse',
+ ['test-suffix-binary-parse.c', '../util/suffix.c'],
+ include_directories: [incdir, '..'],
+ dependencies: [libnvme_dep],
+)
+
+test('suffix_binary_parse', test_suffix_binary_parse)
+
test_uint128_si = executable(
'test-uint128-si',
['test-uint128-si.c', '../util/types.c', '../util/suffix.c'],
@@ -26,3 +35,12 @@ test_uint128_si = executable(
)
test('uint128-si', test_uint128_si)
+
+test_argconfig_parse = executable(
+ 'test-argconfig-parse',
+ ['test-argconfig-parse.c', '../util/argconfig.c', '../util/suffix.c'],
+ include_directories: [incdir, '..'],
+ dependencies: [libnvme_dep],
+)
+
+test('argconfig_parse', test_argconfig_parse)
diff --git a/unit/test-argconfig-parse.c b/unit/test-argconfig-parse.c
new file mode 100644
index 0000000..23c8d4f
--- /dev/null
+++ b/unit/test-argconfig-parse.c
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <locale.h>
+
+#include "../util/argconfig.h"
+#include "nvme/types.h"
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
+static int test_rc;
+
+union val {
+ bool flag;
+ __u64 suffix;
+ __u32 uint;
+ int int_val;
+ __u64 long_val;
+ double double_val;
+ __u8 byte;
+ __u16 shrt;
+ int incr;
+ char *string;
+ char *fmt;
+ char *file;
+ char *list;
+ char *str;
+};
+
+struct toval_test {
+ char *arg;
+ void *val;
+ union val exp;
+ int size;
+ int ret;
+};
+
+static void check_val(const char *arg, void *exp, void *val, int size)
+{
+ if ((size && !memcmp(exp, val, size)) ||
+ (!size && !strcmp(*(char **)exp, *(char **)val)))
+ return;
+
+ switch (size) {
+ case 0:
+ printf("ERROR: printing {%s}, got '%s', expected '%s'\n",
+ arg, *(char **)val, *(char **)exp);
+ break;
+ default:
+ printf("ERROR: printing {%s}, got '%llu', expected '%llu'\n",
+ arg, *(unsigned long long *)val, *(unsigned long long *)exp);
+ break;
+ }
+
+ test_rc = 1;
+}
+
+struct cfg {
+ bool flag;
+ __u64 suffix;
+ __u32 uint;
+ int int_val;
+ __u64 long_val;
+ double double_val;
+ __u8 byte;
+ __u16 shrt;
+ int incr;
+ char *string;
+ char *fmt;
+ char *file;
+ char *list;
+ char *str;
+};
+
+static struct cfg cfg;
+
+#define VAL_TEST(a, c, v, l, r) \
+ { a, &cfg.c, { .c = v }, l ? sizeof(cfg.c) : 0, r }
+
+static struct toval_test toval_tests[] = {
+ VAL_TEST("--flag", flag, true, true, 0),
+ VAL_TEST("--flag=1", flag, false, true, -EINVAL),
+ VAL_TEST("--suffix=0", suffix, 0, true, 0),
+ VAL_TEST("--suffix=1", suffix, 1, true, 0),
+ VAL_TEST("--suffix=1234", suffix, 1234, true, 0),
+ VAL_TEST("--suffix=4096", suffix, 4096, true, 0),
+ VAL_TEST("--suffix=1Ki", suffix, 1024, true, 0),
+ VAL_TEST("--suffix=34Gi", suffix, 36507222016, true, 0),
+ VAL_TEST("--suffix=34.9Ki", suffix, 0, true, -EINVAL),
+ VAL_TEST("--suffix=32Gii", suffix, 0, true, -EINVAL),
+ VAL_TEST("--uint=1", uint, 1, true, 0),
+ VAL_TEST("--int=1", int_val, 1, true, 0),
+ VAL_TEST("--long=1", long_val, 1, true, 0),
+ VAL_TEST("--double=1", double_val, 1, true, 0),
+ VAL_TEST("--byte=1", byte, 1, true, 0),
+ VAL_TEST("--byte=256", byte, 0, true, -EINVAL),
+ VAL_TEST("--shrt=1", shrt, 1, true, 0),
+ VAL_TEST("--incr", incr, 1, true, 0),
+ VAL_TEST("--incr=1", incr, 0, true, -EINVAL),
+ VAL_TEST("--string=string", string, "string", false, 0),
+ VAL_TEST("--fmt=fmt", fmt, "fmt", false, 0),
+ VAL_TEST("--file=file", file, "file", false, 0),
+ VAL_TEST("--list=list", list, "list", false, 0),
+ VAL_TEST("--str=str", str, "str", false, 0),
+};
+
+void toval_test(struct toval_test *test)
+{
+ const char *desc = "Test argconfig parse";
+ int ret;
+ char *argv[] = { "test-argconfig", test->arg };
+
+ OPT_ARGS(opts) = {
+ OPT_FLAG("flag",'f', &cfg.flag, "flag"),
+ OPT_SUFFIX("suffix", 's', &cfg.suffix, "suffix"),
+ OPT_UINT("uint", 'u', &cfg.uint, "uint"),
+ OPT_INT("int", 'i', &cfg.int_val, "int"),
+ OPT_LONG("long", 'l', &cfg.long_val, "long"),
+ OPT_DOUBLE("double", 'd', &cfg.double_val, "double"),
+ OPT_BYTE("byte", 'b', &cfg.byte, "byte"),
+ OPT_SHRT("shrt", 'S', &cfg.shrt, "shrt"),
+ OPT_INCR("incr", 'I', &cfg.incr, "incr"),
+ OPT_STRING("string", 't', "STRING", &cfg.string, "string"),
+ OPT_FMT("fmt", 'F', &cfg.fmt, "fmt"),
+ OPT_FILE("file", 'L', &cfg.file, "file"),
+ OPT_LIST("list", 'T', &cfg.list, "list"),
+ OPT_STR("str", 'r', &cfg.str, "str"),
+ OPT_END()
+ };
+
+ ret = argconfig_parse(2, argv, desc, opts);
+ if (ret != test->ret) {
+ printf("ERROR: converting {%s} failed\n", test->arg);
+ test_rc = 1;
+ return;
+ }
+ if (ret)
+ return;
+
+ check_val(test->arg, &test->exp, test->val, test->size);
+}
+
+int main(void)
+{
+ unsigned int i;
+ FILE *f;
+
+ test_rc = 0;
+ setlocale(LC_NUMERIC, "C");
+ f = freopen("/dev/null", "w", stderr);
+ if (!f)
+ printf("ERROR: reopening stderr failed: %s\n", strerror(errno));
+
+ for (i = 0; i < ARRAY_SIZE(toval_tests); i++)
+ toval_test(&toval_tests[i]);
+
+ if (f)
+ fclose(f);
+
+ return test_rc ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/unit/test-suffix-binary-parse.c b/unit/test-suffix-binary-parse.c
new file mode 100644
index 0000000..5f6ac4a
--- /dev/null
+++ b/unit/test-suffix-binary-parse.c
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#include "../util/suffix.h"
+#include "../util/types.h"
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
+static int test_rc;
+
+static void check_num(const char *val, __u64 exp, __u64 num)
+{
+ if (exp == num)
+ return;
+
+ printf("ERROR: printing {%s}, got '%llu', expected '%llu'\n",
+ val, (unsigned long long)num, (unsigned long long)exp);
+
+ test_rc = 1;
+}
+
+struct tonum_test {
+ const char *val;
+ const uint64_t exp;
+ int ret;
+};
+
+static struct tonum_test tonum_tests[] = {
+ { "1234", 1234, 0 },
+ { "1Ki", 1024, 0},
+ { "34Gi", 36507222016, 0 },
+ { "34.9Ki", 0, -EINVAL},
+ { "32Gii", 0, -EINVAL },
+};
+
+void tonum_test(struct tonum_test *test)
+{
+ char *endptr;
+ uint64_t num;
+ int ret;
+
+ ret = suffix_binary_parse(test->val, &endptr, &num);
+ if (ret != test->ret) {
+ printf("ERROR: converting {%s} failed\n", test->val);
+ test_rc = 1;
+ return;
+ }
+ if (ret)
+ return;
+
+ check_num(test->val, test->exp, num);
+}
+
+int main(void)
+{
+ unsigned int i;
+
+ test_rc = 0;
+
+ for (i = 0; i < ARRAY_SIZE(tonum_tests); i++)
+ tonum_test(&tonum_tests[i]);
+
+ return test_rc ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/unit/test-suffix-si-parse.c b/unit/test-suffix-si-parse.c
index 879518b..bc92455 100644
--- a/unit/test-suffix-si-parse.c
+++ b/unit/test-suffix-si-parse.c
@@ -3,6 +3,8 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
+#include <locale.h>
#include "../util/suffix.h"
#include "../util/types.h"
@@ -11,44 +13,54 @@
static int test_rc;
-static void check_num(const char *val, int lbas, __u64 exp, __u64 num)
+static void check_num(const char *val, __u64 exp, __u64 num)
{
if (exp == num)
return;
- printf("ERROR: printing {%s} (lbas %d), got '%llu', expected '%llu'\n",
- val, lbas, (unsigned long long)num, (unsigned long long)exp);
+ printf("ERROR: printing {%s}, got '%llu', expected '%llu'\n",
+ val, (unsigned long long)num, (unsigned long long)exp);
test_rc = 1;
}
struct tonum_test {
const char *val;
- int lbas;
- const __u64 exp;
+ const uint64_t exp;
+ int ret;
};
static struct tonum_test tonum_tests[] = {
- { "11995709440", 512, 11995709440 },
- { "1199570940", 512, 1199570940 },
- { "6.14T", 512, 11992187500 },
- { "6.14T", 520, 11807692307 },
- { "6.14T", 4096, 1499023437 },
- { "6.14", 512, 0 },
- { "6.14#", 512, 0 },
+ { "11995709440", 11995709440, 0 },
+ { "1199570940", 1199570940, 0},
+ { "234.567M", 234567000, 0 },
+ { "1.2k", 1200, 0 },
+ { "6.14T", 6140000000000, 0 },
+ { "123.4567k", 123456, 0 },
+ { "12345.6789101112M", 12345678910, 0},
+ { "6.14", 6, 0 },
+ { "6.14#", 0, -EINVAL },
+ { "2,33", 0, -EINVAL },
+ { "3..3", 0, -EINVAL },
+ { "123.12MM", 0, -EINVAL },
};
void tonum_test(struct tonum_test *test)
{
- __u64 num;
- bool suffixed;
-
- num = suffix_si_parse(test->val, &suffixed);
-
- if (suffixed)
- num /= test->lbas;
+ char *endptr;
+ uint64_t num;
+ int ret;
+
+ ret = suffix_si_parse(test->val, &endptr, &num);
+ if (ret != test->ret) {
+ printf("ERROR: converting {%s} failed\n", test->val);
+ test_rc = 1;
+ return;
+ }
+ if (ret)
+ return;
- check_num(test->val, test->lbas, test->exp, num);
+ check_num(test->val, test->exp, num);
}
int main(void)
@@ -56,6 +68,7 @@ int main(void)
unsigned int i;
test_rc = 0;
+ setlocale(LC_NUMERIC, "C");
for (i = 0; i < ARRAY_SIZE(tonum_tests); i++)
tonum_test(&tonum_tests[i]);
diff --git a/util/argconfig.c b/util/argconfig.c
index 231a704..3eb885f 100644
--- a/util/argconfig.c
+++ b/util/argconfig.c
@@ -42,6 +42,12 @@
#include <string.h>
#include <stdbool.h>
+#if __has_attribute(__fallthrough__)
+#define fallthrough __attribute__((__fallthrough__))
+#else
+#define fallthrough do {} while (0)
+#endif
+
static argconfig_help_func *help_funcs[MAX_HELP_FUNC] = { NULL };
static char END_DEFAULT[] = "__end_default__";
@@ -122,69 +128,197 @@ static void show_option(const struct argconfig_commandline_options *option)
}
void argconfig_print_help(const char *program_desc,
- const struct argconfig_commandline_options *options)
+ struct argconfig_commandline_options *s)
{
- const struct argconfig_commandline_options *s;
-
fprintf(stderr, "\033[1mUsage: %s\033[0m\n\n",
append_usage_str);
print_word_wrapped(program_desc, 0, 0, stderr);
fprintf(stderr, "\n");
- if (!options || !options->option)
+ if (!s || !s->option)
return;
fprintf(stderr, "\n\033[1mOptions:\033[0m\n");
- for (s = options; (s != NULL) && (s->option != NULL); s++)
+ for (; s && s->option; s++)
show_option(s);
}
+static int argconfig_error(char *type, const char *opt, const char *arg)
+{
+ fprintf(stderr, "Expected %s argument for '%s' but got '%s'!\n", type, opt, arg);
+ return -EINVAL;
+}
+
int argconfig_parse_byte(const char *opt, const char *str, unsigned char *val)
{
char *endptr;
unsigned long tmp = strtoul(str, &endptr, 0);
- if (errno || tmp >= 1 << 8 || str == endptr) {
- fprintf(stderr,
- "Expected byte argument for '%s' but got '%s'!\n", opt,
- str);
- return -EINVAL;
- }
+ if (errno || tmp >= 1 << 8 || str == endptr)
+ return argconfig_error("byte", opt, str);
*val = tmp;
return 0;
}
+static int argconfig_parse_type(struct argconfig_commandline_options *s, struct option *option,
+ int index)
+{
+ void *value = (void *)(char *)s->default_value;
+ char *endptr;
+ const char *fopts = NULL;
+ FILE *f;
+ int ret = 0;
+ char **opts = ((char **)value);
+ int remaining_space = CFG_MAX_SUBOPTS - 2;
+
+ switch (s->config_type) {
+ case CFG_STRING:
+ *((char **)value) = optarg;
+ break;
+ case CFG_SIZE:
+ *((size_t *)value) = strtol(optarg, &endptr, 0);
+ if (errno || optarg == endptr)
+ ret = argconfig_error("integer", option[index].name, optarg);
+ break;
+ case CFG_INT:
+ *((int *)value) = strtol(optarg, &endptr, 0);
+ if (errno || optarg == endptr)
+ ret = argconfig_error("integer", option[index].name, optarg);
+ break;
+ case CFG_BOOL: {
+ int tmp = strtol(optarg, &endptr, 0);
+ if (errno || tmp < 0 || tmp > 1 || optarg == endptr)
+ ret = argconfig_error("0 or 1", option[index].name, optarg);
+ else
+ *((int *)value) = tmp;
+ break;
+ }
+ case CFG_BYTE:
+ ret = argconfig_parse_byte(option[index].name, optarg, (uint8_t *)value);
+ break;
+ case CFG_SHORT: {
+ unsigned long tmp = strtoul(optarg, &endptr, 0);
+ if (errno || tmp >= 1 << 16 || optarg == endptr)
+ ret = argconfig_error("short", option[index].name, optarg);
+ else
+ *((uint16_t *)value) = tmp;
+ break;
+ }
+ case CFG_POSITIVE: {
+ uint32_t tmp = strtoul(optarg, &endptr, 0);
+ if (errno || optarg == endptr)
+ ret = argconfig_error("word", option[index].name, optarg);
+ else
+ *((uint32_t *)value) = tmp;
+ break;
+ }
+ case CFG_INCREMENT:
+ *((int *)value) += 1;
+ break;
+ case CFG_LONG:
+ *((unsigned long *)value) = strtoul(optarg, &endptr, 0);
+ if (errno || optarg == endptr)
+ ret = argconfig_error("long integer", option[index].name, optarg);
+ break;
+ case CFG_LONG_SUFFIX:
+ ret = suffix_binary_parse(optarg, &endptr, (uint64_t*)value);
+ if (ret)
+ argconfig_error("long suffixed integer", option[index].name, optarg);
+ break;
+ case CFG_DOUBLE:
+ *((double *)value) = strtod(optarg, &endptr);
+ if (errno || optarg == endptr)
+ ret = argconfig_error("float", option[index].name, optarg);
+ break;
+ case CFG_SUBOPTS:
+ *opts = END_DEFAULT;
+ opts += 2;
+ ret = argconfig_parse_subopt_string(optarg, opts, remaining_space);
+ if (ret) {
+ if (ret == 2)
+ fprintf(stderr, "Error Parsing Sub-Options: Too many options!\n");
+ else
+ fprintf(stderr, "Error Parsing Sub-Options\n");
+ ret = -EINVAL;
+ }
+ break;
+ case CFG_FILE_A:
+ fopts = "a";
+ fallthrough;
+ case CFG_FILE_R:
+ if (!fopts)
+ fopts = "r";
+ fallthrough;
+ case CFG_FILE_W:
+ if (!fopts)
+ fopts = "w";
+ fallthrough;
+ case CFG_FILE_AP:
+ if (!fopts)
+ fopts = "a+";
+ fallthrough;
+ case CFG_FILE_RP:
+ if (!fopts)
+ fopts = "r+";
+ fallthrough;
+ case CFG_FILE_WP:
+ if (!fopts)
+ fopts = "w+";
+ f = fopen(optarg, fopts);
+ if (!f) {
+ fprintf(stderr, "Unable to open %s file: %s\n", s->option, optarg);
+ ret = -EINVAL;
+ } else {
+ *((FILE **)value) = f;
+ }
+ break;
+ case CFG_FLAG:
+ *((bool *)value) = true;
+ break;
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+bool argconfig_output_format_json(bool set)
+{
+ static bool output_format_json = false;
+
+ if (set)
+ output_format_json = true;
+
+ return output_format_json;
+}
+
int argconfig_parse(int argc, char *argv[], const char *program_desc,
- const struct argconfig_commandline_options *options)
+ struct argconfig_commandline_options *options)
{
char *short_opts;
- char *endptr;
struct option *long_opts;
- const struct argconfig_commandline_options *s;
+ struct argconfig_commandline_options *s;
int c, option_index = 0, short_index = 0, options_count = 0;
- void *value_addr;
- int ret = -EINVAL;
+ int ret = 0;
errno = 0;
- for (s = options; s->option != NULL; s++)
+ for (s = options; s->option; s++)
options_count++;
- long_opts = malloc(sizeof(struct option) * (options_count + 2));
- short_opts = malloc(sizeof(*short_opts) * (options_count * 3 + 4));
+ long_opts = calloc(1, sizeof(struct option) * (options_count + 3));
+ short_opts = calloc(1, sizeof(*short_opts) * (options_count * 3 + 5));
if (!long_opts || !short_opts) {
- fprintf(stderr, "failed to allocate memory for opts: %s\n",
- strerror(errno));
+ fprintf(stderr, "failed to allocate memory for opts: %s\n", strerror(errno));
ret = -errno;
goto out;
}
- for (s = options; (s->option != NULL) && (option_index < options_count);
- s++) {
- if (s->short_option != 0) {
+ for (s = options; s->option && option_index < options_count; s++) {
+ if (s->short_option) {
short_opts[short_index++] = s->short_option;
if (s->argument_type == required_argument ||
s->argument_type == optional_argument)
@@ -195,35 +329,32 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc,
if (s->option && strlen(s->option)) {
long_opts[option_index].name = s->option;
long_opts[option_index].has_arg = s->argument_type;
- long_opts[option_index].flag = NULL;
- long_opts[option_index].val = 0;
}
+ s->seen = false;
option_index++;
}
long_opts[option_index].name = "help";
- long_opts[option_index].flag = NULL;
- long_opts[option_index].val = 'h';
- option_index++;
+ long_opts[option_index++].val = 'h';
- long_opts[option_index].name = NULL;
- long_opts[option_index].flag = NULL;
- long_opts[option_index].val = 0;
+ long_opts[option_index].name = "json";
+ long_opts[option_index].val = 'j';
short_opts[short_index++] = '?';
short_opts[short_index++] = 'h';
- short_opts[short_index] = 0;
+ short_opts[short_index] = 'j';
optind = 0;
- while ((c = getopt_long_only(argc, argv, short_opts, long_opts,
- &option_index)) != -1) {
- if (c != 0) {
+ while ((c = getopt_long_only(argc, argv, short_opts, long_opts, &option_index)) != -1) {
+ if (c) {
if (c == '?' || c == 'h') {
argconfig_print_help(program_desc, options);
- goto out;
+ ret = -EINVAL;
+ break;
}
- for (option_index = 0; option_index < options_count;
- option_index++) {
+ if (c == 'j')
+ argconfig_output_format_json(true);
+ for (option_index = 0; option_index < options_count; option_index++) {
if (c == options[option_index].short_option)
break;
}
@@ -232,147 +363,16 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc,
}
s = &options[option_index];
- value_addr = (void *)(char *)s->default_value;
- if (s->config_type == CFG_STRING) {
- *((char **)value_addr) = optarg;
- } else if (s->config_type == CFG_SIZE) {
- *((size_t *) value_addr) = strtol(optarg, &endptr, 0);
- if (errno || optarg == endptr) {
- fprintf(stderr,
- "Expected integer argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- } else if (s->config_type == CFG_INT) {
- *((int *)value_addr) = strtol(optarg, &endptr, 0);
- if (errno || optarg == endptr) {
- fprintf(stderr,
- "Expected integer argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- } else if (s->config_type == CFG_BOOL) {
- int tmp = strtol(optarg, &endptr, 0);
- if (errno || tmp < 0 || tmp > 1 || optarg == endptr) {
- fprintf(stderr,
- "Expected 0 or 1 argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- *((int *)value_addr) = tmp;
- } else if (s->config_type == CFG_BYTE) {
- if (argconfig_parse_byte(long_opts[option_index].name,
- optarg, (uint8_t *)value_addr))
- goto out;
- } else if (s->config_type == CFG_SHORT) {
- unsigned long tmp = strtoul(optarg, &endptr, 0);
- if (errno || tmp >= (1 << 16) || optarg == endptr) {
- fprintf(stderr,
- "Expected short argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- *((uint16_t *) value_addr) = tmp;
- } else if (s->config_type == CFG_POSITIVE) {
- uint32_t tmp = strtoul(optarg, &endptr, 0);
- if (errno || optarg == endptr) {
- fprintf(stderr,
- "Expected word argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- *((uint32_t *) value_addr) = tmp;
- } else if (s->config_type == CFG_INCREMENT) {
- *((int *)value_addr) += 1;
- } else if (s->config_type == CFG_LONG) {
- *((unsigned long *)value_addr) = strtoul(optarg, &endptr, 0);
- if (errno || optarg == endptr) {
- fprintf(stderr,
- "Expected long integer argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- } else if (s->config_type == CFG_LONG_SUFFIX) {
- *((uint64_t *)value_addr) = suffix_binary_parse(optarg);
- if (errno) {
- fprintf(stderr,
- "Expected long suffixed integer argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- } else if (s->config_type == CFG_DOUBLE) {
- *((double *)value_addr) = strtod(optarg, &endptr);
- if (errno || optarg == endptr) {
- fprintf(stderr,
- "Expected float argument for '%s' but got '%s'!\n",
- long_opts[option_index].name, optarg);
- goto out;
- }
- } else if (s->config_type == CFG_SUBOPTS) {
- char **opts = ((char **)value_addr);
- int remaining_space = CFG_MAX_SUBOPTS;
- int enddefault = 0;
- int r;
- while (0 && *opts != NULL) {
- if (*opts == END_DEFAULT)
- enddefault = 1;
- remaining_space--;
- opts++;
- }
+ s->seen = true;
- if (!enddefault) {
- *opts = END_DEFAULT;
- remaining_space -= 2;
- opts += 2;
- }
+ if (!s->default_value)
+ continue;
- r = argconfig_parse_subopt_string(optarg, opts,
- remaining_space);
- if (r == 2) {
- fprintf(stderr,
- "Error Parsing Sub-Options: Too many options!\n");
- goto out;
- } else if (r) {
- fprintf(stderr, "Error Parsing Sub-Options\n");
- goto out;
- }
- } else if (s->config_type == CFG_FILE_A ||
- s->config_type == CFG_FILE_R ||
- s->config_type == CFG_FILE_W ||
- s->config_type == CFG_FILE_AP ||
- s->config_type == CFG_FILE_RP ||
- s->config_type == CFG_FILE_WP) {
- const char *fopts = "";
- FILE *f;
- if (s->config_type == CFG_FILE_A)
- fopts = "a";
- else if (s->config_type == CFG_FILE_R)
- fopts = "r";
- else if (s->config_type == CFG_FILE_W)
- fopts = "w";
- else if (s->config_type == CFG_FILE_AP)
- fopts = "a+";
- else if (s->config_type == CFG_FILE_RP)
- fopts = "r+";
- else if (s->config_type == CFG_FILE_WP)
- fopts = "w+";
-
- f = fopen(optarg, fopts);
- if (f == NULL) {
- fprintf(stderr, "Unable to open %s file: %s\n",
- s->option, optarg);
- goto out;
- }
- *((FILE **) value_addr) = f;
- } else if (s->config_type == CFG_FLAG) {
- *((bool *)value_addr) = true;
- }
+ ret = argconfig_parse_type(s, long_opts,option_index);
+ if (ret)
+ break;
}
- free(short_opts);
- free(long_opts);
-
- return 0;
- out:
+out:
free(short_opts);
free(long_opts);
return ret;
@@ -592,3 +592,14 @@ void argconfig_register_help_func(argconfig_help_func * f)
}
}
}
+
+bool argconfig_parse_seen(struct argconfig_commandline_options *s,
+ const char *option)
+{
+ for (; s && s->option; s++) {
+ if (!strcmp(s->option, option))
+ return s->seen;
+ }
+
+ return false;
+}
diff --git a/util/argconfig.h b/util/argconfig.h
index 6ef3b6a..81eaaf4 100644
--- a/util/argconfig.h
+++ b/util/argconfig.h
@@ -38,6 +38,7 @@
#include <getopt.h>
#include <stdarg.h>
#include <stdio.h>
+#include <stdbool.h>
enum argconfig_types {
CFG_FLAG,
@@ -62,7 +63,7 @@ enum argconfig_types {
};
#define OPT_ARGS(n) \
- const struct argconfig_commandline_options n[]
+ struct argconfig_commandline_options n[]
#define OPT_END() { NULL }
@@ -109,6 +110,7 @@ struct argconfig_commandline_options {
void *default_value;
int argument_type;
const char *help;
+ bool seen;
};
#define CFG_MAX_SUBOPTS 500
@@ -117,9 +119,9 @@ struct argconfig_commandline_options {
typedef void argconfig_help_func();
void argconfig_append_usage(const char *str);
void argconfig_print_help(const char *program_desc,
- const struct argconfig_commandline_options *options);
+ struct argconfig_commandline_options *options);
int argconfig_parse(int argc, char *argv[], const char *program_desc,
- const struct argconfig_commandline_options *options);
+ struct argconfig_commandline_options *options);
int argconfig_parse_subopt_string(char *string, char **options,
size_t max_options);
int argconfig_parse_comma_sep_array(char *string, int *ret,
@@ -133,4 +135,7 @@ int argconfig_parse_byte(const char *opt, const char *str, unsigned char *val);
void argconfig_register_help_func(argconfig_help_func * f);
void print_word_wrapped(const char *s, int indent, int start, FILE *stream);
+bool argconfig_parse_seen(struct argconfig_commandline_options *options,
+ const char *option);
+bool argconfig_output_format_json(bool set);
#endif
diff --git a/util/crc32.c b/util/crc32.c
new file mode 100644
index 0000000..cc2d8f2
--- /dev/null
+++ b/util/crc32.c
@@ -0,0 +1,99 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/* Copyright (C) 2002 Red Hat, Inc.
+ This file is part of elfutils.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of either
+
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at
+ your option) any later version
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at
+ your option) any later version
+
+ or both in parallel, as here.
+
+ elfutils is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received copies of the GNU General Public License and
+ the GNU Lesser General Public License along with this program. If
+ not, see <http://www.gnu.org/licenses/>. */
+
+/* https://sourceware.org/git/?p=elfutils.git;a=blob;f=lib/crc32.c;hb=575198c29a427392823cc8f2400579a23d06a875 */
+
+#include "crc32.h"
+
+/* Table computed with Mark Adler's makecrc.c utility. */
+static const uint32_t crc32_table[256] =
+{
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+};
+
+uint32_t crc32 (uint32_t crc, unsigned char *buf, size_t len)
+{
+ unsigned char *end;
+
+ crc = ~crc;
+ for (end = buf + len; buf < end; ++buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc;
+}
diff --git a/util/crc32.h b/util/crc32.h
new file mode 100644
index 0000000..e48c97d
--- /dev/null
+++ b/util/crc32.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef crc32_H
+#define crc32_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+uint32_t crc32(uint32_t crc, unsigned char *buf, size_t len);
+
+#endif
diff --git a/util/json.c b/util/json.c
index 84d43e5..2de5848 100644
--- a/util/json.c
+++ b/util/json.c
@@ -35,10 +35,24 @@ struct json_object *util_json_object_new_uint64(uint64_t i)
}
+static int util_json_object_string_to_number(struct json_object *jso,
+ struct printbuf *pb, int level,
+ int flags)
+{
+ ssize_t len = json_object_get_string_len(jso);
+
+ printbuf_memappend(pb, json_object_get_string(jso), len);
+
+ return 0;
+}
+
struct json_object *util_json_object_new_uint128(nvme_uint128_t val)
{
struct json_object *obj;
+
obj = json_object_new_string(uint128_t_to_string(val));
+ json_object_set_serializer(obj, util_json_object_string_to_number, NULL, NULL);
+
return obj;
}
diff --git a/util/json.h b/util/json.h
index 1312cb8..c362408 100644
--- a/util/json.h
+++ b/util/json.h
@@ -2,6 +2,7 @@
#ifndef __JSON__H
#define __JSON__H
+#ifdef CONFIG_JSONC
#include <json.h>
#include "util/types.h"
@@ -12,7 +13,7 @@
#define json_free_object(o) json_object_put(o)
#define json_free_array(a) json_object_put(a)
#define json_object_add_value_uint(o, k, v) \
- json_object_object_add(o, k, json_object_new_int(v))
+ json_object_object_add(o, k, json_object_new_uint64(v))
#define json_object_add_value_int(o, k, v) \
json_object_object_add(o, k, json_object_new_int(v))
#ifndef CONFIG_JSONC_14
@@ -48,4 +49,11 @@ struct json_object *util_json_object_new_uint128(nvme_uint128_t val);
struct json_object *util_json_object_new_uint128(nvme_uint128_t val);
uint64_t util_json_object_get_uint64(struct json_object *obj);
+
+#else /* !CONFIG_JSONC */
+
+struct json_object;
+
+#endif
+
#endif
diff --git a/util/meson.build b/util/meson.build
index 349c70c..f149d03 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -2,9 +2,15 @@
sources += [
'util/argconfig.c',
+ 'util/base64.c',
'util/cleanup.c',
- 'util/json.c',
+ 'util/crc32.c',
'util/suffix.c',
- 'util/base64.c',
'util/types.c',
]
+
+if json_c_dep.found()
+ sources += [
+ 'util/json.c',
+ ]
+endif
diff --git a/util/suffix.c b/util/suffix.c
index 4106958..8ed080d 100644
--- a/util/suffix.c
+++ b/util/suffix.c
@@ -31,28 +31,31 @@
*/
#include "suffix.h"
+#include "common.h"
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <math.h>
+#include <float.h>
+#include <limits.h>
+#include <locale.h>
static struct si_suffix {
long double magnitude;
+ unsigned int exponent;
const char *suffix;
} si_suffixes[] = {
- {1e30, "Q"},
- {1e27, "R"},
- {1e24, "Y"},
- {1e21, "Z"},
- {1e18, "E"},
- {1e15, "P"},
- {1e12, "T"},
- {1e9, "G"},
- {1e6, "M"},
- {1e3, "k"},
- {1e0, ""},
- {0}
+ {1e30, 30, "Q"},
+ {1e27, 27, "R"},
+ {1e24, 24, "Y"},
+ {1e21, 21, "Z"},
+ {1e18, 18, "E"},
+ {1e15, 15, "P"},
+ {1e12, 12, "T"},
+ {1e9, 9, "G"},
+ {1e6, 6, "M"},
+ {1e3, 3, "k"},
};
const char *suffix_si_get(double *value)
@@ -65,36 +68,87 @@ const char *suffix_si_get(double *value)
return suffix;
}
-uint64_t suffix_si_parse(const char *value, bool *suffixed)
+int suffix_si_parse(const char *str, char **endptr, uint64_t *val)
{
- char *suffix;
- double ret;
- struct si_suffix *s;
-
- errno = 0;
- ret = strtod(value, &suffix);
- if (errno)
+ unsigned long long num, frac;
+ char *sep, *tmp;
+ int frac_len, len, i;
+
+ num = strtoull(str, endptr, 0);
+ if (str == *endptr ||
+ ((num == ULLONG_MAX) && errno == ERANGE))
+ return -EINVAL;
+
+ /* simple number, no decimal point not suffix */
+ if ((*endptr)[0] == '\0') {
+ *val = num;
return 0;
+ }
+
+ /* get rid of the decimal point */
+ sep = localeconv()->decimal_point;
+ if (sep)
+ len = strlen(sep);
+ else
+ len = 0;
- for (s = si_suffixes; s->magnitude != 0; s++) {
- if (suffix[0] == s->suffix[0]) {
- if (suffixed && suffix[0] != '\0')
- *suffixed = true;
- return ret *= s->magnitude;
+ for (i = 0; i < len; i++) {
+ if (((*endptr)[i] == '\0') || (*endptr)[i] != sep[i])
+ return -EINVAL;
+ }
+ *endptr += len;
+ tmp = *endptr;
+
+ /* extract the digits after decimal point */
+ frac = strtoull(tmp, endptr, 0);
+ if (tmp == *endptr ||
+ ((frac == ULLONG_MAX) && errno == ERANGE))
+ return -EINVAL;
+
+ /* test that we have max one character as suffix */
+ if ((*endptr)[0] != '\0' && (*endptr)[1] != '\0')
+ return -EINVAL;
+
+ frac_len = *endptr - tmp;
+
+ for (i = 0; i < ARRAY_SIZE(si_suffixes); i++) {
+ struct si_suffix *s = &si_suffixes[i];
+
+ if ((*endptr)[0] != s->suffix[0])
+ continue;
+
+ /* we should check for overflow */
+ for (int j = 0; j < s->exponent; j++)
+ num *= 10;
+
+ if (s->exponent > frac_len) {
+ for (int j = 0; j < s->exponent - frac_len; j++)
+ frac *= 10;
+ } else if (s->exponent < frac_len) {
+ for (int j = 0; j < frac_len - s->exponent; j++)
+ frac /= 10;
+ } else {
+ frac = 0;
}
+
+ *val = num + frac;
+ return 0;
}
- if (suffix[0] != '\0')
- errno = EINVAL;
+ if ((*endptr)[0] != '\0')
+ return -EINVAL;
- return (uint64_t)ret;
+ *val = num;
+ return 0;
}
const char *suffix_si_get_ld(long double *value)
{
- struct si_suffix *s;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(si_suffixes); i++) {
+ struct si_suffix *s = &si_suffixes[i];
- for (s = si_suffixes; s->magnitude != 0; s++) {
if (*value >= s->magnitude) {
*value /= s->magnitude;
return s->suffix;
@@ -113,14 +167,15 @@ static struct binary_suffix {
{30, "Gi"},
{20, "Mi"},
{10, "Ki"},
- {0, ""}
};
const char *suffix_binary_get(long long *value)
{
- struct binary_suffix *s;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(binary_suffixes); i++) {
+ struct binary_suffix *s = &binary_suffixes[i];
- for (s = binary_suffixes; s->shift != 0; s++) {
if (llabs(*value) >= (1LL << s->shift)) {
*value =
(*value + (1LL << (s->shift - 1))) / (1LL << s->shift);
@@ -133,9 +188,11 @@ const char *suffix_binary_get(long long *value)
const char *suffix_dbinary_get(double *value)
{
- struct binary_suffix *s;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(binary_suffixes); i++) {
+ struct binary_suffix *s = &binary_suffixes[i];
- for (s = binary_suffixes; s->shift != 0; s++) {
if (fabs(*value) >= (1LL << s->shift)) {
*value = *value / (1LL << s->shift);
return s->suffix;
@@ -145,24 +202,41 @@ const char *suffix_dbinary_get(double *value)
return "";
}
-uint64_t suffix_binary_parse(const char *value)
+int suffix_binary_parse(const char *str, char **endptr, uint64_t *val)
{
- char *suffix;
- errno = 0;
- uint64_t ret = strtoull(value, &suffix, 0);
- if (errno)
+ uint64_t ret;
+ int i;
+
+ ret = strtoull(str, endptr, 0);
+ if (str == *endptr ||
+ ((ret == ULLONG_MAX) && errno == ERANGE))
+ return -EINVAL;
+
+ if (str == *endptr) {
+ *val = ret;
+ return 0;
+ }
+
+ /* simple number, no decimal point, no suffix */
+ if ((*endptr)[0] == '\0') {
+ *val = ret;
return 0;
+ }
- struct binary_suffix *s;
- for (s = binary_suffixes; s->shift != 0; s++) {
- if (tolower(suffix[0]) == tolower(s->suffix[0])) {
+ for (i = 0; i < ARRAY_SIZE(binary_suffixes); i++) {
+ struct binary_suffix *s = &binary_suffixes[i];
+
+ if (tolower((*endptr)[0]) == tolower(s->suffix[0]) &&
+ (s->suffix[0] != '\0' &&
+ (((*endptr)[0] != '\0' &&
+ (*endptr)[1] != '\0' &&
+ (*endptr)[2] == '\0') &&
+ (tolower((*endptr)[1]) == tolower(s->suffix[1]))))) {
ret <<= s->shift;
- return ret;
+ *val = ret;
+ return 0;
}
}
- if (suffix[0] != '\0')
- errno = EINVAL;
-
- return ret;
+ return -EINVAL;
}
diff --git a/util/suffix.h b/util/suffix.h
index b367ce4..5ea58f4 100644
--- a/util/suffix.h
+++ b/util/suffix.h
@@ -36,10 +36,10 @@
#include <stdbool.h>
const char *suffix_si_get(double *value);
-uint64_t suffix_si_parse(const char *value, bool *suffixed);
+int suffix_si_parse(const char *str, char **endptr, uint64_t *val);
const char *suffix_si_get_ld(long double *value);
const char *suffix_binary_get(long long *value);
const char *suffix_dbinary_get(double *value);
-uint64_t suffix_binary_parse(const char *value);
+int suffix_binary_parse(const char *str, char **endptr, uint64_t *val);
#endif
diff --git a/util/types.c b/util/types.c
index 18ced77..daef298 100644
--- a/util/types.c
+++ b/util/types.c
@@ -46,14 +46,31 @@ uint64_t int48_to_long(__u8 *data)
return result;
}
-char *uint128_t_to_string(nvme_uint128_t val)
+static long double uint128_t_to_double(nvme_uint128_t data)
+{
+ int i;
+ long double result = 0;
+
+ for (i = 0; i < sizeof(data.words) / sizeof(*data.words); i++) {
+ result *= 4294967296;
+ result += data.words[i];
+ }
+
+ return result;
+}
+
+static char *__uint128_t_to_string(nvme_uint128_t val, bool l10n)
{
static char str[60];
int idx = 60;
__u64 div, rem;
- char *sep = localeconv()->thousands_sep;
- int len = sep ? strlen(sep) : 0;
- int i;
+ char *sep = NULL;
+ int i, len = 0;
+
+ if (l10n) {
+ sep = localeconv()->thousands_sep;
+ len = strlen(sep);
+ }
/* terminate at the end, and build up from the ones */
str[--idx] = '\0';
@@ -88,17 +105,14 @@ char *uint128_t_to_string(nvme_uint128_t val)
return str + idx;
}
-static long double uint128_t_to_double(nvme_uint128_t data)
+char *uint128_t_to_string(nvme_uint128_t val)
{
- int i;
- long double result = 0;
-
- for (i = 0; i < sizeof(data.words) / sizeof(*data.words); i++) {
- result *= 4294967296;
- result += data.words[i];
- }
+ return __uint128_t_to_string(val, false);
+}
- return result;
+char *uint128_t_to_l10n_string(nvme_uint128_t val)
+{
+ return __uint128_t_to_string(val, true);
}
char *uint128_t_to_si_string(nvme_uint128_t val, __u32 bytes_per_unit)
diff --git a/util/types.h b/util/types.h
index 2e88717..f7fe9fc 100644
--- a/util/types.h
+++ b/util/types.h
@@ -29,6 +29,7 @@ long double int128_to_double(__u8 *data);
uint64_t int48_to_long(__u8 *data);
char *uint128_t_to_string(nvme_uint128_t val);
+char *uint128_t_to_l10n_string(nvme_uint128_t val);
char *uint128_t_to_si_string(nvme_uint128_t val, __u32 bytes_per_unit);
const char *util_uuid_to_string(unsigned char uuid[NVME_UUID_LEN]);
const char *util_fw_to_string(char *c);