diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 08:38:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 08:38:36 +0000 |
commit | 3c0f1ed2ea093dd0d3e8ba70f3c9963e66321f87 (patch) | |
tree | 2020852fabf5e530c687d41e36ddc5c453b0c9ed | |
parent | Adding upstream version 2.9.1. (diff) | |
download | nvme-cli-3c0f1ed2ea093dd0d3e8ba70f3c9963e66321f87.tar.xz nvme-cli-3c0f1ed2ea093dd0d3e8ba70f3c9963e66321f87.zip |
Adding upstream version 2.10.upstream/2.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
530 files changed, 23757 insertions, 3495 deletions
diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 53fed3a..c7b92f7 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -17,6 +17,13 @@ jobs: image: ghcr.io/igaw/linux-nvme/debian:latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: fixup permissions + env: + GITHUB_WORKSPACE: ${{ github.workspace }} + run: | + git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: build run: | scripts/build.sh appimage @@ -36,11 +43,10 @@ jobs: needs: build-appimage if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'linux-nvme/nvme-cli' }} steps: - - name: Download artifact - uses: dawidd6/action-download-artifact@v3 + - uses: actions/download-artifact@v4 with: - workflow: ${{ github.event.workflow_run.workflow_id }} - workflow_conclusion: success + name: AppImage + path: AppImage - name: FTP Deployer uses: sand4rt/ftp-deployer@v1.8 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b12517..66b3811 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: enable foreign arch uses: dbhi/qus/action@main - name: compile and run unit tests - uses: mosteo-actions/docker-run@v1 + uses: mosteo-actions/docker-run@v2 with: image: ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest guest-dir: /build @@ -89,6 +89,7 @@ jobs: - name: build run: | scripts/build.sh -m muon + build-make-static: name: make static runs-on: ubuntu-latest @@ -99,3 +100,14 @@ jobs: - name: build run: | make static + + build-distro: + name: build libnvme and nvme-cli separately + runs-on: ubuntu-latest + container: + image: ghcr.io/igaw/linux-nvme/debian:latest + steps: + - uses: actions/checkout@v4 + - name: build + run: | + scripts/build.sh distro diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..89fbd67 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,26 @@ +--- +name: docs + +on: + push: + branches: [master] + paths: + - Documentation/** + pull_request: + branches: [master] + paths: + - Documentation/** + + workflow_dispatch: + +jobs: + build-docs: + name: build documentation + runs-on: ubuntu-latest + container: + image: ghcr.io/igaw/linux-nvme/debian:latest + steps: + - uses: actions/checkout@v4 + - name: build + run: | + scripts/build.sh docs diff --git a/Documentation/cmd-plugins.txt b/Documentation/cmd-plugins.txt index f767603..338425e 100644 --- a/Documentation/cmd-plugins.txt +++ b/Documentation/cmd-plugins.txt @@ -46,6 +46,9 @@ linknvme:nvme-micron-smart-add-log[1]:: linknvme:nvme-micron-temperature-stats[1]:: Retrieves temperature information of given micron device +linknvme:nvme-ocp-internal-log[1]:: + Retrieves and parses OCP Telemetry DA1 and DA2 logs. + linknvme:nvme-netapp-ontapdevices[1]:: Display information about ONTAP devices diff --git a/Documentation/meson.build b/Documentation/meson.build index 0dc0300..30c0efc 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -29,15 +29,14 @@ adoc_sources = [ 'nvme-endurance-event-agg-log', 'nvme-endurance-log', 'nvme-error-log', - 'nvme-fid-support-effects-log', - 'nvme-mi-cmd-support-effects-log', 'nvme-fdp-configs', - 'nvme-fdp-usage', - 'nvme-fdp-stats', 'nvme-fdp-events', + 'nvme-fdp-set-events', + 'nvme-fdp-stats', 'nvme-fdp-status', 'nvme-fdp-update', - 'nvme-fdp-set-events', + 'nvme-fdp-usage', + 'nvme-fid-support-effects-log', 'nvme-flush', 'nvme-format', 'nvme-fw-commit', @@ -57,6 +56,7 @@ adoc_sources = [ 'nvme-id-iocs', 'nvme-id-ns', 'nvme-id-nvmset', + 'nvme-inspur-nvme-vendor-log', 'nvme-intel-id-ctrl', 'nvme-intel-internal-log', 'nvme-intel-lat-stats', @@ -73,6 +73,7 @@ adoc_sources = [ 'nvme-list-ns', 'nvme-list-subsys', 'nvme-lockdown', + 'nvme-mi-cmd-support-effects-log', 'nvme-micron-clear-pcie-errors', 'nvme-micron-internal-log', 'nvme-micron-nand-stats', @@ -84,14 +85,26 @@ adoc_sources = [ 'nvme-netapp-smdevices', 'nvme-ns-descs', 'nvme-ns-rescan', + 'nvme-nvm-id-ctrl', 'nvme-nvme-mi-recv', 'nvme-nvme-mi-send', - 'nvme-nvm-id-ctrl', - 'nvme-ocp-latency-monitor-log', - 'nvme-ocp-smart-add-log', 'nvme-ocp-clear-fw-activate-history', 'nvme-ocp-clear-pcie-correctable-error-counters', + 'nvme-ocp-device-capability-log', 'nvme-ocp-eol-plp-failure-mode', + 'nvme-ocp-error-recovery-log', + 'nvme-ocp-get-dssd-async-event-config', + 'nvme-ocp-get-dssd-power-state-feature', + 'nvme-ocp-get-plp-health-check-interval', + 'nvme-ocp-latency-monitor-log', + 'nvme-ocp-set-dssd-async-event-config', + 'nvme-ocp-set-dssd-power-state-feature', + 'nvme-ocp-set-plp-health-check-interval', + 'nvme-ocp-set-telemetry-profile', + 'nvme-ocp-smart-add-log', + 'nvme-ocp-telemetry-string-log-page', + 'nvme-ocp-unsupported-reqs-log-pages', + 'nvme-ocp-internal-log', 'nvme-persistent-event-log', 'nvme-pred-lat-event-agg-log', 'nvme-predictable-lat-log', @@ -106,20 +119,20 @@ adoc_sources = [ 'nvme-rpmb', 'nvme-sanitize', 'nvme-sanitize-log', + 'nvme-seagate-clear-fw-activate-history', 'nvme-seagate-clear-pcie-correctable-errors', + 'nvme-seagate-cloud-SSD-plugin-version', 'nvme-seagate-get-ctrl-tele', 'nvme-seagate-get-host-tele', 'nvme-seagate-help', 'nvme-seagate-plugin-version', 'nvme-seagate-version', + 'nvme-seagate-vs-fw-activate-history', 'nvme-seagate-vs-internal-log', 'nvme-seagate-vs-log-page-sup', 'nvme-seagate-vs-pcie-stats', 'nvme-seagate-vs-smart-add-log', 'nvme-seagate-vs-temperature-stats', - 'nvme-seagate-cloud-SSD-plugin-version', - 'nvme-seagate-vs-fw-activate-history', - 'nvme-seagate-clear-fw-activate-history', 'nvme-security-recv', 'nvme-security-send', 'nvme-self-test-log', @@ -132,6 +145,7 @@ adoc_sources = [ 'nvme-subsystem-reset', 'nvme-supported-log-pages', 'nvme-telemetry-log', + 'nvme-tls-key', 'nvme-toshiba-clear-pcie-correctable-errors', 'nvme-toshiba-vs-internal-log', 'nvme-toshiba-vs-smart-add-log', @@ -145,8 +159,8 @@ adoc_sources = [ 'nvme-wdc-clear-assert-dump', 'nvme-wdc-clear-fw-activate-history', 'nvme-wdc-clear-pcie-correctable-errors', - 'nvme-wdc-cloud-boot-SSD-version', 'nvme-wdc-cloud-SSD-plugin-version', + 'nvme-wdc-cloud-boot-SSD-version', 'nvme-wdc-drive-essentials', 'nvme-wdc-drive-log', 'nvme-wdc-drive-resize', @@ -190,7 +204,6 @@ adoc_sources = [ 'nvme-zns-zone-append', 'nvme-zns-zone-mgmt-recv', 'nvme-zns-zone-mgmt-send', - 'nvme-inspur-nvme-vendor-log', ] adoc_includes = [ diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index dfdc6d5..ca80f9f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,7 +43,7 @@ nvme-admin-passthru \- Submit an arbitrary admin command, return results [\-\-metadata\-len=<len> | \-m <len>] [\-\-input\-file=<file> | \-i <file>] [\-\-read | \-r] [\-\-write | \-w] - [\-\-timeout=<to> | \-t <to>] + [\-\-timeout=<timeout> | \-t <timeout>] [\-\-show\-command | \-s] [\-\-dry\-run | \-d] [\-\-raw\-binary | \-b] @@ -146,6 +146,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html index 9b0e6fe..d3a69d6 100644 --- a/Documentation/nvme-admin-passthru.html +++ b/Documentation/nvme-admin-passthru.html @@ -760,7 +760,7 @@ nvme-admin-passthru(1) Manual Page [--metadata-len=<len> | -m <len>]
[--input-file=<file> | -i <file>]
[--read | -r] [--write | -w]
- [--timeout=<to> | -t <to>]
+ [--timeout=<timeout> | -t <timeout>]
[--show-command | -s]
[--dry-run | -d]
[--raw-binary | -b]
@@ -985,6 +985,17 @@ printed to stdout for another program to parse.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1027,7 +1038,7 @@ Or if you want to save that structure to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-admin-passthru.txt b/Documentation/nvme-admin-passthru.txt index 51e9e07..c930e8c 100644 --- a/Documentation/nvme-admin-passthru.txt +++ b/Documentation/nvme-admin-passthru.txt @@ -19,7 +19,7 @@ SYNOPSIS [--metadata-len=<len> | -m <len>] [--input-file=<file> | -i <file>] [--read | -r] [--write | -w] - [--timeout=<to> | -t <to>] + [--timeout=<timeout> | -t <timeout>] [--show-command | -s] [--dry-run | -d] [--raw-binary | -b] @@ -123,6 +123,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * The following will run the admin command with opcode=6 and cdw10=1, which diff --git a/Documentation/nvme-ana-log.1 b/Documentation/nvme-ana-log.1 index a3be9dc..db1c41d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ANA\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ANA\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-ana-log.html b/Documentation/nvme-ana-log.html index 758400d..9e58b7c 100644 --- a/Documentation/nvme-ana-log.html +++ b/Documentation/nvme-ana-log.html @@ -835,7 +835,7 @@ Print the ANA log page in a human readable format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-attach-ns.1 b/Documentation/nvme-attach-ns.1 index 89ce4e6..3312fb5 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ATTACH\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ATTACH\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-attach-ns.html b/Documentation/nvme-attach-ns.html index 04eba16..b8eaf29 100644 --- a/Documentation/nvme-attach-ns.html +++ b/Documentation/nvme-attach-ns.html @@ -841,7 +841,7 @@ controller identifiers.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-boot-part-log.1 b/Documentation/nvme-boot-part-log.1 index 59a8aa4..c4e8303 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-BOOT\-PART\-LO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-BOOT\-PART\-LO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-boot-part-log.html b/Documentation/nvme-boot-part-log.html index 66eba37..77c3a1c 100644 --- a/Documentation/nvme-boot-part-log.html +++ b/Documentation/nvme-boot-part-log.html @@ -846,7 +846,7 @@ Retrieve Boot Partition data to boot_part_log.bin <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-capacity-mgmt.1 b/Documentation/nvme-capacity-mgmt.1 index d5827a4..702c6ba 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CAPACITY\-MGMT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CAPACITY\-MGMT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,6 +37,7 @@ nvme-capacity-mgmt \- Send capacity management command to configure/create/delet [\-\-cap\-lower=<cap\-lower> | \-l <cap\-lower>] [\-\-cap\-upper=<cap\-upper> | \-u <cap\-upper>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -78,6 +79,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples provided yet\&. diff --git a/Documentation/nvme-capacity-mgmt.html b/Documentation/nvme-capacity-mgmt.html index 6c61b6c..9bcf48b 100644 --- a/Documentation/nvme-capacity-mgmt.html +++ b/Documentation/nvme-capacity-mgmt.html @@ -753,7 +753,8 @@ nvme-capacity-mgmt(1) Manual Page [--element-id=<element-id> | -i <element-id>]
[--cap-lower=<cap-lower> | -l <cap-lower>]
[--cap-upper=<cap-upper> | -u <cap-upper>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -843,6 +844,17 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -863,7 +875,7 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-capacity-mgmt.txt b/Documentation/nvme-capacity-mgmt.txt index a20561f..37a5b4a 100644 --- a/Documentation/nvme-capacity-mgmt.txt +++ b/Documentation/nvme-capacity-mgmt.txt @@ -14,6 +14,7 @@ SYNOPSIS [--cap-lower=<cap-lower> | -l <cap-lower>] [--cap-upper=<cap-upper> | -u <cap-upper>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -55,6 +56,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples provided yet. diff --git a/Documentation/nvme-changed-ns-list-log.1 b/Documentation/nvme-changed-ns-list-log.1 index 2856bd2..6fd24f4 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CHANGED\-NS\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CHANGED\-NS\-L" "1" "08/02/2024" "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 c63e40a..59b916f 100644 --- a/Documentation/nvme-changed-ns-list-log.html +++ b/Documentation/nvme-changed-ns-list-log.html @@ -846,7 +846,7 @@ Print the raw Changed Namespace List log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-cmdset-ind-id-ns.1 b/Documentation/nvme-cmdset-ind-id-ns.1 index eff07d1..6310d5f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CMDSET\-IND\-I" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CMDSET\-IND\-I" "1" "08/02/2024" "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 86766cc..d1f0fc5 100644 --- a/Documentation/nvme-cmdset-ind-id-ns.html +++ b/Documentation/nvme-cmdset-ind-id-ns.html @@ -889,7 +889,7 @@ Have the program return the raw structure in binary: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-compare.1 b/Documentation/nvme-compare.1 index 0448c13..fed76b6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-COMPARE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-COMPARE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -54,6 +54,7 @@ nvme-compare \- Send an NVMe Compare command, provide results [\-\-storage\-tag\-check | \-C] [\-\-force] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -221,6 +222,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-compare.html b/Documentation/nvme-compare.html index 76a5ac6..9c8604c 100644 --- a/Documentation/nvme-compare.html +++ b/Documentation/nvme-compare.html @@ -770,7 +770,8 @@ nvme-compare(1) Manual Page [--storage-tag<storage-tag> | -g <storage-tag>]
[--storage-tag-check | -C]
[--force]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -1096,6 +1097,14 @@ metadata is passes.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1116,7 +1125,7 @@ metadata is passes.</p></td> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-compare.txt b/Documentation/nvme-compare.txt index 59d1ea9..0f28e58 100644 --- a/Documentation/nvme-compare.txt +++ b/Documentation/nvme-compare.txt @@ -30,6 +30,7 @@ SYNOPSIS [--storage-tag-check | -C] [--force] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -163,6 +164,9 @@ metadata is passes. --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-config.txt b/Documentation/nvme-config.txt index 8a66644..98009e4 100644 --- a/Documentation/nvme-config.txt +++ b/Documentation/nvme-config.txt @@ -27,7 +27,7 @@ SYNOPSIS [--keep-alive-tmo=<#> | -k <#>] [--reconnect-delay=<#> | -c <#>] [--ctrl-loss-tmo=<#> | -l <#>] - [--duplicate-connect | -D] [--disable-sqflow | -d] + [--duplicate-connect | -D] [--disable-sqflow ] [--hdr-digest | -g] [--data-digest | -G] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] @@ -168,7 +168,6 @@ OPTIONS Allows duplicated connections between same transport host and subsystem port. --d:: --disable-sqflow:: Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions. diff --git a/Documentation/nvme-connect-all.1 b/Documentation/nvme-connect-all.1 index 996276f..012af88 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CONNECT\-ALL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CONNECT\-ALL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ nvme-connect-all \- Discover and Connect to Fabrics controllers\&. [\-\-nr\-poll\-queues=<#> | \-P <#>] [\-\-queue\-size=<#> | \-Q <#>] [\-\-keyring=<#>] [\-\-tls_key=<#>] [\-\-hdr\-digest | \-g] [\-\-data\-digest | \-G] - [\-\-persistent | \-p] [\-\-tls] [\-\-concat] [\-\-quiet | \-S] + [\-\-persistent | \-p] [\-\-tls] [\-\-concat] [\-\-quiet] [\-\-dump\-config | \-O] [\-\-nbft] [\-\-no\-nbft] [\-\-nbft\-path=<STR>] [\-\-context=<STR>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] @@ -234,7 +234,7 @@ Enable TLS encryption (TCP)\&. Enable secure concatenation (TCP)\&. .RE .PP -\-S, \-\-quiet +\-\-quiet .RS 4 Suppress error messages\&. .RE diff --git a/Documentation/nvme-connect-all.html b/Documentation/nvme-connect-all.html index 8e544ec..31aca99 100644 --- a/Documentation/nvme-connect-all.html +++ b/Documentation/nvme-connect-all.html @@ -768,7 +768,7 @@ nvme-connect-all(1) Manual Page [--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>] [--keyring=<#>]
[--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G]
- [--persistent | -p] [--tls] [--concat] [--quiet | -S]
+ [--persistent | -p] [--tls] [--concat] [--quiet]
[--dump-config | -O] [--nbft] [--no-nbft]
[--nbft-path=<STR>] [--context=<STR>]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
@@ -1124,9 +1124,6 @@ cellspacing="0" cellpadding="4"> </p>
</dd>
<dt class="hdlist1">
--S
-</dt>
-<dt class="hdlist1">
--quiet
</dt>
<dd>
@@ -1276,7 +1273,7 @@ nvme-connect(1)</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-connect-all.txt b/Documentation/nvme-connect-all.txt index 4cd1873..68708e5 100644 --- a/Documentation/nvme-connect-all.txt +++ b/Documentation/nvme-connect-all.txt @@ -27,7 +27,7 @@ SYNOPSIS [--nr-poll-queues=<#> | -P <#>] [--queue-size=<#> | -Q <#>] [--keyring=<#>] [--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G] - [--persistent | -p] [--tls] [--concat] [--quiet | -S] + [--persistent | -p] [--tls] [--concat] [--quiet] [--dump-config | -O] [--nbft] [--no-nbft] [--nbft-path=<STR>] [--context=<STR>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] @@ -189,7 +189,6 @@ OPTIONS --concat:: Enable secure concatenation (TCP). --S:: --quiet:: Suppress error messages. diff --git a/Documentation/nvme-connect.1 b/Documentation/nvme-connect.1 index d52f721..76ce9f2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CONNECT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CONNECT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ nvme-connect \- Connect to a Fabrics controller\&. [\-\-reconnect\-delay=<#> | \-c <#>] [\-\-ctrl\-loss\-tmo=<#> | \-l <#>] [\-\-tos=<#> | \-T <#>] [\-\-keyring=<#>] [\-\-tls_key=<#>] - [\-\-duplicate\-connect | \-D] [\-\-disable\-sqflow | \-d] + [\-\-duplicate\-connect | \-D] [\-\-disable\-sqflow ] [\-\-hdr\-digest | \-g] [\-\-data\-digest | \-G] [\-\-tls] [\-\-concat] [\-\-dump\-config | \-O] [\-\-application=<id>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] @@ -188,7 +188,9 @@ Overrides the default delay (in seconds) before reconnect is attempted after a c .PP \-l <#>, \-\-ctrl\-loss\-tmo=<#> .RS 4 -Overrides the default controller loss timeout period (in seconds)\&. +Overrides the default controller loss timeout period (in seconds)\&. This is the maximum time the kernel will retry a connection, where each retry will be issued after +\fIreconnect\-delay\fR +seconds\&. .RE .PP \-T <#>, \-\-tos=<#> @@ -211,7 +213,7 @@ TLS key for the connection (TCP)\&. Allows duplicated connections between same transport host and subsystem port\&. .RE .PP -\-d, \-\-disable\-sqflow +\-\-disable\-sqflow .RS 4 Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions\&. .RE diff --git a/Documentation/nvme-connect.html b/Documentation/nvme-connect.html index 0b13a38..36511d7 100644 --- a/Documentation/nvme-connect.html +++ b/Documentation/nvme-connect.html @@ -768,7 +768,7 @@ nvme-connect(1) Manual Page [--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>] [--tos=<#> | -T <#>]
[--keyring=<#>] [--tls_key=<#>]
- [--duplicate-connect | -D] [--disable-sqflow | -d]
+ [--duplicate-connect | -D] [--disable-sqflow ]
[--hdr-digest | -g] [--data-digest | -G] [--tls]
[--concat] [--dump-config | -O] [--application=<id>]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
@@ -1039,6 +1039,8 @@ cellspacing="0" cellpadding="4"> <dd>
<p>
Overrides the default controller loss timeout period (in seconds).
+ This is the maximum time the kernel will retry a connection, where each
+ retry will be issued after <em>reconnect-delay</em> seconds.
</p>
</dd>
<dt class="hdlist1">
@@ -1081,9 +1083,6 @@ cellspacing="0" cellpadding="4"> </p>
</dd>
<dt class="hdlist1">
--d
-</dt>
-<dt class="hdlist1">
--disable-sqflow
</dt>
<dd>
@@ -1219,7 +1218,7 @@ and <a href="mailto:hch@lst.de">Christoph Hellwig</a></p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-connect.txt b/Documentation/nvme-connect.txt index 583aaf9..0112e11 100644 --- a/Documentation/nvme-connect.txt +++ b/Documentation/nvme-connect.txt @@ -27,7 +27,7 @@ SYNOPSIS [--reconnect-delay=<#> | -c <#>] [--ctrl-loss-tmo=<#> | -l <#>] [--tos=<#> | -T <#>] [--keyring=<#>] [--tls_key=<#>] - [--duplicate-connect | -D] [--disable-sqflow | -d] + [--duplicate-connect | -D] [--disable-sqflow ] [--hdr-digest | -g] [--data-digest | -G] [--tls] [--concat] [--dump-config | -O] [--application=<id>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] @@ -144,6 +144,8 @@ OPTIONS -l <#>:: --ctrl-loss-tmo=<#>:: Overrides the default controller loss timeout period (in seconds). + This is the maximum time the kernel will retry a connection, where each + retry will be issued after 'reconnect-delay' seconds. -T <#>:: --tos=<#>:: @@ -160,7 +162,6 @@ OPTIONS Allows duplicated connections between same transport host and subsystem port. --d:: --disable-sqflow:: Disables SQ flow control to omit head doorbell update for submission queues when sending nvme completions. diff --git a/Documentation/nvme-copy.1 b/Documentation/nvme-copy.1 index 75e9068..c024452 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-COPY" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-COPY" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,6 +51,7 @@ nvme-copy \- Send an NVMe Simple Copy command, provide results [\-\-dir\-spec=<spec> | \-S <spec>] [\-\-format=<entry\-format> | \-F <entry\-format>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -160,6 +161,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-copy.html b/Documentation/nvme-copy.html index bcd1f4e..255a3a9 100644 --- a/Documentation/nvme-copy.html +++ b/Documentation/nvme-copy.html @@ -767,7 +767,8 @@ nvme-copy(1) Manual Page [--dir-type=<type> | -T <type>]
[--dir-spec=<spec> | -S <spec>]
[--format=<entry-format> | -F <entry-format>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -1010,6 +1011,17 @@ logical block ranges to a single consecutive destination logical block range.</p Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1030,7 +1042,7 @@ logical block ranges to a single consecutive destination logical block range.</p <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-copy.txt b/Documentation/nvme-copy.txt index 7c5fb0e..91e337b 100644 --- a/Documentation/nvme-copy.txt +++ b/Documentation/nvme-copy.txt @@ -27,6 +27,7 @@ SYNOPSIS [--dir-spec=<spec> | -S <spec>] [--format=<entry-format> | -F <entry-format>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -122,6 +123,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-create-ns.1 b/Documentation/nvme-create-ns.1 index 85fd6c4..c4d12ab 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CREATE\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-CREATE\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -169,6 +169,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value 120,000\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-create-ns.html b/Documentation/nvme-create-ns.html index dcdeb3b..8a8b8b3 100644 --- a/Documentation/nvme-create-ns.html +++ b/Documentation/nvme-create-ns.html @@ -1040,6 +1040,17 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value 120,000. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1071,7 +1082,7 @@ Create a namespace: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-create-ns.txt b/Documentation/nvme-create-ns.txt index 352a945..95a514d 100644 --- a/Documentation/nvme-create-ns.txt +++ b/Documentation/nvme-create-ns.txt @@ -146,6 +146,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value 120,000. In milliseconds. + EXAMPLES -------- * Create a namespace: diff --git a/Documentation/nvme-delete-ns.1 b/Documentation/nvme-delete-ns.1 index 15451d1..b55169c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,6 +34,7 @@ nvme-delete-ns \- Send NVMe Namespace Management delete namespace command, retur .nf \fInvme delete\-ns\fR <device> [\-\-namespace\-id=<nsid> | \-n <nsid>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -60,6 +61,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value 120,000\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-delete-ns.html b/Documentation/nvme-delete-ns.html index abc5c6f..0b608a3 100644 --- a/Documentation/nvme-delete-ns.html +++ b/Documentation/nvme-delete-ns.html @@ -750,7 +750,8 @@ nvme-id-ns(1) Manual Page <div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>nvme delete-ns</em> <device> [--namespace-id=<nsid> | -n <nsid>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -803,6 +804,17 @@ The <code>'--namespace-id'</code> option is mandatory.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value 120,000. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -823,7 +835,7 @@ The <code>'--namespace-id'</code> option is mandatory.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-delete-ns.txt b/Documentation/nvme-delete-ns.txt index 1b306b2..04de3a3 100644 --- a/Documentation/nvme-delete-ns.txt +++ b/Documentation/nvme-delete-ns.txt @@ -10,6 +10,7 @@ SYNOPSIS [verse] 'nvme delete-ns' <device> [--namespace-id=<nsid> | -n <nsid>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -35,6 +36,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value 120,000. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-dera-stat.1 b/Documentation/nvme-dera-stat.1 index 4c769ef..1f2f90d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DERA\-STAT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DERA\-STAT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-dera-stat.html b/Documentation/nvme-dera-stat.html index ed01f01..7cb3244 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-detach-ns.1 b/Documentation/nvme-detach-ns.1 index 35a40d5..545c619 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DETACH\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DETACH\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-detach-ns.html b/Documentation/nvme-detach-ns.html index 79e524b..66d16a1 100644 --- a/Documentation/nvme-detach-ns.html +++ b/Documentation/nvme-detach-ns.html @@ -834,7 +834,7 @@ controller identifiers.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-device-self-test.1 b/Documentation/nvme-device-self-test.1 index a97f4fb..43c0aa1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DEVICE\-SELF\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DEVICE\-SELF\-" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,6 +35,7 @@ nvme-device-self-test \- Perform the necessary tests to observe the performance \fInvme device\-self\-test\fR <device> [\-\-namespace\-id=<NUM> | \-n <NUM>] [\-\-self\-test\-code=<NUM> | \-s <NUM>] [\-\-wait | \-w] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -73,6 +74,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-device-self-test.html b/Documentation/nvme-device-self-test.html index 468765c..9466527 100644 --- a/Documentation/nvme-device-self-test.html +++ b/Documentation/nvme-device-self-test.html @@ -751,7 +751,8 @@ nvme-device-self-test(1) Manual Page <div class="verseblock">
<pre class="content"><em>nvme device-self-test</em> <device> [--namespace-id=<NUM> | -n <NUM>]
[--self-test-code=<NUM> | -s <NUM>] [--wait | -w]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -833,6 +834,17 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -872,7 +884,7 @@ Abort the device self-test operation in the namespace-id 1: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-device-self-test.txt b/Documentation/nvme-device-self-test.txt index 17fe875..149dbf1 100644 --- a/Documentation/nvme-device-self-test.txt +++ b/Documentation/nvme-device-self-test.txt @@ -11,6 +11,7 @@ SYNOPSIS 'nvme device-self-test' <device> [--namespace-id=<NUM> | -n <NUM>] [--self-test-code=<NUM> | -s <NUM>] [--wait | -w] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -52,6 +53,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Start a short device self-test in the namespace-id 1: diff --git a/Documentation/nvme-dim.1 b/Documentation/nvme-dim.1 index 5ae4d80..f763cce 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DIM" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DIM" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-dim.html b/Documentation/nvme-dim.html index 1561b78..e3de906 100644 --- a/Documentation/nvme-dim.html +++ b/Documentation/nvme-dim.html @@ -885,7 +885,7 @@ Deregister from Central Discovery Controller (CDC) associated with nvme4 <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dir-receive.1 b/Documentation/nvme-dir-receive.1 index 0eaeb41..b61db03 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DIR\-RECEIVE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DIR\-RECEIVE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,6 +40,7 @@ nvme-dir-receive \- Send a directive receive command, returns applicable results [\-\-req\-resource=<nsr> | \-r <nsr>] [\-\-human\-readable | \-H] [\-\-raw\-binary | \-b] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -143,6 +144,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-dir-receive.html b/Documentation/nvme-dir-receive.html index 07c49d2..7ede777 100644 --- a/Documentation/nvme-dir-receive.html +++ b/Documentation/nvme-dir-receive.html @@ -756,7 +756,8 @@ nvme-dir-receive(1) Manual Page [--dir-oper=<doper> | -O <doper>]
[--req-resource=<nsr> | -r <nsr>]
[--human-readable | -H] [--raw-binary | -b]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -931,6 +932,17 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -989,7 +1001,7 @@ Get streams directive status : <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dir-receive.txt b/Documentation/nvme-dir-receive.txt index f3f31ba..473ecc0 100644 --- a/Documentation/nvme-dir-receive.txt +++ b/Documentation/nvme-dir-receive.txt @@ -16,6 +16,7 @@ SYNOPSIS [--req-resource=<nsr> | -r <nsr>] [--human-readable | -H] [--raw-binary | -b] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -90,6 +91,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Identify directive type supported : diff --git a/Documentation/nvme-dir-send.1 b/Documentation/nvme-dir-send.1 index 2655e9f..e274189 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DIR\-SEND" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DIR\-SEND" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,6 +41,7 @@ nvme-dir-send \- Issue a directive send command, returns applicable results [\-\-target\-dir=<tdir> | \-T <tdir>] [\-\-human\-readable | \-H] [\-\-raw\-binary | \-b] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -149,6 +150,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-dir-send.html b/Documentation/nvme-dir-send.html index 63c7e69..444cf0e 100644 --- a/Documentation/nvme-dir-send.html +++ b/Documentation/nvme-dir-send.html @@ -757,7 +757,8 @@ nvme-dir-send(1) Manual Page [--endir=<endir> | -e <endir>]
[--target-dir=<tdir> | -T <tdir>]
[--human-readable | -H] [--raw-binary | -b]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -944,6 +945,17 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1002,7 +1014,7 @@ Release stream ID 3 : <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dir-send.txt b/Documentation/nvme-dir-send.txt index 1e3743d..e5a3db7 100644 --- a/Documentation/nvme-dir-send.txt +++ b/Documentation/nvme-dir-send.txt @@ -17,6 +17,7 @@ SYNOPSIS [--target-dir=<tdir> | -T <tdir>] [--human-readable | -H] [--raw-binary | -b] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -96,6 +97,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Enable streams directive : diff --git a/Documentation/nvme-disconnect-all.1 b/Documentation/nvme-disconnect-all.1 index 4af7e9d..39843bb 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DISCONNECT\-AL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DISCONNECT\-AL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-disconnect-all.html b/Documentation/nvme-disconnect-all.html index 9b286ad..1160acb 100644 --- a/Documentation/nvme-disconnect-all.html +++ b/Documentation/nvme-disconnect-all.html @@ -825,7 +825,7 @@ Disconnect all existing nvme controllers: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-disconnect.1 b/Documentation/nvme-disconnect.1 index 85f31aa..a86ada4 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DISCONNECT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DISCONNECT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-disconnect.html b/Documentation/nvme-disconnect.html index 019dfa1..ad634f7 100644 --- a/Documentation/nvme-disconnect.html +++ b/Documentation/nvme-disconnect.html @@ -862,7 +862,7 @@ Disconnect the controller nvme4 <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-discover.1 b/Documentation/nvme-discover.1 index cdb694e..879673c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DISCOVER" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DISCOVER" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ nvme-discover \- Send Get Log Page request to Discovery Controller\&. [\-\-nr\-poll\-queues=<#> | \-P <#>] [\-\-queue\-size=<#> | \-Q <#>] [\-\-keyring=<#>] [\-\-tls_key=<#>] [\-\-hdr\-digest | \-g] [\-\-data\-digest | \-G] - [\-\-persistent | \-p] [\-\-quiet | \-S] [\-\-tls] [\-\-concat] + [\-\-persistent | \-p] [\-\-quiet] [\-\-tls] [\-\-concat] [\-\-dump\-config | \-O] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-force] [\-\-nbft] [\-\-no\-nbft] [\-\-nbft\-path=<STR>] [\-\-context=<STR>] @@ -240,7 +240,7 @@ Enable TLS encryption (TCP)\&. Enable secure concatenation (TCP)\&. .RE .PP -\-S, \-\-quiet +\-\-quiet .RS 4 Suppress already connected errors\&. .RE diff --git a/Documentation/nvme-discover.html b/Documentation/nvme-discover.html index 53fe875..0c80665 100644 --- a/Documentation/nvme-discover.html +++ b/Documentation/nvme-discover.html @@ -768,7 +768,7 @@ nvme-discover(1) Manual Page [--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>] [--keyring=<#>]
[--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G]
- [--persistent | -p] [--quiet | -S] [--tls] [--concat]
+ [--persistent | -p] [--quiet] [--tls] [--concat]
[--dump-config | -O] [--output-format=<fmt> | -o <fmt>]
[--force] [--nbft] [--no-nbft] [--nbft-path=<STR>]
[--context=<STR>]
@@ -1145,9 +1145,6 @@ cellspacing="0" cellpadding="4"> </p>
</dd>
<dt class="hdlist1">
--S
-</dt>
-<dt class="hdlist1">
--quiet
</dt>
<dd>
@@ -1325,7 +1322,7 @@ nvme-connect-all(1)</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-discover.txt b/Documentation/nvme-discover.txt index 1069d3c..e3017eb 100644 --- a/Documentation/nvme-discover.txt +++ b/Documentation/nvme-discover.txt @@ -27,7 +27,7 @@ SYNOPSIS [--nr-poll-queues=<#> | -P <#>] [--queue-size=<#> | -Q <#>] [--keyring=<#>] [--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G] - [--persistent | -p] [--quiet | -S] [--tls] [--concat] + [--persistent | -p] [--quiet] [--tls] [--concat] [--dump-config | -O] [--output-format=<fmt> | -o <fmt>] [--force] [--nbft] [--no-nbft] [--nbft-path=<STR>] [--context=<STR>] @@ -209,7 +209,6 @@ OPTIONS --concat:: Enable secure concatenation (TCP). --S:: --quiet:: Suppress already connected errors. diff --git a/Documentation/nvme-dsm.1 b/Documentation/nvme-dsm.1 index 6681d5f..02f83bf 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DSM" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-DSM" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,6 +40,7 @@ nvme-dsm \- Send NVMe Data Set Management, return results [\-\-idw=<write> | \-w <write>] [\-\-idr=<read> | \-r <read>] [\-\-cdw11=<cdw11> | \-c <cdw11>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -105,6 +106,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet diff --git a/Documentation/nvme-dsm.html b/Documentation/nvme-dsm.html index b4af212..5b56c1e 100644 --- a/Documentation/nvme-dsm.html +++ b/Documentation/nvme-dsm.html @@ -756,7 +756,8 @@ nvme-dsm(1) Manual Page [--ad=<deallocate> | -d <deallocate>]
[--idw=<write> | -w <write>] [--idr=<read> | -r <read>]
[--cdw11=<cdw11> | -c <cdw11>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -898,6 +899,17 @@ any settings from the flags may have provided.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -918,7 +930,7 @@ any settings from the flags may have provided.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-dsm.txt b/Documentation/nvme-dsm.txt index 6a2e61a..0658b94 100644 --- a/Documentation/nvme-dsm.txt +++ b/Documentation/nvme-dsm.txt @@ -16,6 +16,7 @@ SYNOPSIS [--idw=<write> | -w <write>] [--idr=<read> | -r <read>] [--cdw11=<cdw11> | -c <cdw11>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -83,6 +84,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet diff --git a/Documentation/nvme-effects-log.1 b/Documentation/nvme-effects-log.1 index 4adf0bd..8b28776 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-EFFECTS\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-EFFECTS\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,6 +34,7 @@ nvme-effects-log \- Send NVMe Command Effects log page request, returns result a .nf \fInvme effects\-log\fR <device> [\-\-human\-readable | \-H] [\-\-raw\-binary | \-b] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -67,6 +68,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-effects-log.html b/Documentation/nvme-effects-log.html index effc5d8..7ac963c 100644 --- a/Documentation/nvme-effects-log.html +++ b/Documentation/nvme-effects-log.html @@ -750,7 +750,8 @@ nvme-effects-log(1) Manual Page <div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>nvme effects-log</em> <device> [--human-readable | -H] [--raw-binary | -b]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -817,6 +818,17 @@ for each command that is supported.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -857,7 +869,7 @@ Have the program return the raw structure in binary: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-effects-log.txt b/Documentation/nvme-effects-log.txt index 57a1369..5243757 100644 --- a/Documentation/nvme-effects-log.txt +++ b/Documentation/nvme-effects-log.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'nvme effects-log' <device> [--human-readable | -H] [--raw-binary | -b] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -45,6 +46,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Print the effects log page in a human readable format: diff --git a/Documentation/nvme-endurance-event-agg-log.1 b/Documentation/nvme-endurance-event-agg-log.1 index ec21f43..9dd8672 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ENDURANCE\-EVE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ENDURANCE\-EVE" "1" "08/02/2024" "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 b990748..ce0050b 100644 --- a/Documentation/nvme-endurance-event-agg-log.html +++ b/Documentation/nvme-endurance-event-agg-log.html @@ -862,7 +862,7 @@ Print the raw Endurance log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-endurance-log.1 b/Documentation/nvme-endurance-log.1 index 5ec9a68..7d67c27 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ENDURANCE\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ENDURANCE\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-endurance-log.html b/Documentation/nvme-endurance-log.html index b59945b..5d10797 100644 --- a/Documentation/nvme-endurance-log.html +++ b/Documentation/nvme-endurance-log.html @@ -845,7 +845,7 @@ Print the raw Endurance log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-error-log.1 b/Documentation/nvme-error-log.1 index 7758f3e..edb7003 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ERROR\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ERROR\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-error-log.html b/Documentation/nvme-error-log.html index 54267eb..d1658cb 100644 --- a/Documentation/nvme-error-log.html +++ b/Documentation/nvme-error-log.html @@ -860,7 +860,7 @@ Print the raw output to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-configs.1 b/Documentation/nvme-fdp-configs.1 index 61d1250..30b36a1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-CONFIGS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-CONFIGS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-configs.html b/Documentation/nvme-fdp-configs.html index 50c71c4..d96e0bd 100644 --- a/Documentation/nvme-fdp-configs.html +++ b/Documentation/nvme-fdp-configs.html @@ -826,7 +826,7 @@ the possible configurations for Flexible Data Placement.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-events.1 b/Documentation/nvme-fdp-events.1 index 91a7824..acc1d9c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-EVENTS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-EVENTS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-events.html b/Documentation/nvme-fdp-events.html index 36de06a..adc8164 100644 --- a/Documentation/nvme-fdp-events.html +++ b/Documentation/nvme-fdp-events.html @@ -825,7 +825,7 @@ Units and media usage in an Endurance Group.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-set-events.1 b/Documentation/nvme-fdp-set-events.1 index d6fb3c5..68f86ff 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-SET\-EVEN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-SET\-EVEN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-set-events.html b/Documentation/nvme-fdp-set-events.html index c3ee010..5005c04 100644 --- a/Documentation/nvme-fdp-set-events.html +++ b/Documentation/nvme-fdp-set-events.html @@ -816,7 +816,7 @@ Handle.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-stats.1 b/Documentation/nvme-fdp-stats.1 index 2ac48b5..4a5e44d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-STATS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-STATS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-stats.html b/Documentation/nvme-fdp-stats.html index 3f671d8..24781c9 100644 --- a/Documentation/nvme-fdp-stats.html +++ b/Documentation/nvme-fdp-stats.html @@ -814,7 +814,7 @@ the life of the FDP configuration in an Endurance Group.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-status.1 b/Documentation/nvme-fdp-status.1 index abe49af..58d6c4e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-STATUS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-STATUS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-status.html b/Documentation/nvme-fdp-status.html index bbc4d87..93151eb 100644 --- a/Documentation/nvme-fdp-status.html +++ b/Documentation/nvme-fdp-status.html @@ -814,7 +814,7 @@ are accessible by the specified namespace.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-update.1 b/Documentation/nvme-fdp-update.1 index 371c4f4..0f50f29 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-UPDATE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-UPDATE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-update.html b/Documentation/nvme-fdp-update.html index 8fd528c..5113584 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fdp-usage.1 b/Documentation/nvme-fdp-usage.1 index 6ac434b..fd10638 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-USAGE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-USAGE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-usage.html b/Documentation/nvme-fdp-usage.html index 3b3d858..11a34e3 100644 --- a/Documentation/nvme-fdp-usage.html +++ b/Documentation/nvme-fdp-usage.html @@ -815,7 +815,7 @@ Endurance Group.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fid-support-effects-log.1 b/Documentation/nvme-fid-support-effects-log.1 index c7147e6..8fdc3ec 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FID\-SUPPORT\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FID\-SUPPORT\-" "1" "08/02/2024" "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 9041531..85110a1 100644 --- a/Documentation/nvme-fid-support-effects-log.html +++ b/Documentation/nvme-fid-support-effects-log.html @@ -825,7 +825,7 @@ raw buffer may be printed to stdout.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-flush.1 b/Documentation/nvme-flush.1 index 1528b6d..5cb1204 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FLUSH" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FLUSH" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-flush.html b/Documentation/nvme-flush.html index a7aa1a8..e598f52 100644 --- a/Documentation/nvme-flush.html +++ b/Documentation/nvme-flush.html @@ -824,7 +824,7 @@ any namespace.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-format.1 b/Documentation/nvme-format.1 index 5e3ab4f..9abc119 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FORMAT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FORMAT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -108,7 +108,7 @@ T} .PP \-p <pil>, \-\-pil=<pil> .RS 4 -Protection Information Location: If set to \(oq1\(cq and protection information is enabled, then protection information is transferred as the first eight bytes of metadata\&. If cleared to \(oq0\(cq and protection information is enabled, then protection information is transferred as the last eight bytes of metadata\&. Defaults to 0\&. +Protection Information Location: If set to \(oq1\(cq and protection information is enabled, then protection information is transferred as the first bytes of metadata\&. If cleared to \(oq0\(cq and protection information is enabled, then protection information is transferred as the last bytes of metadata\&. Defaults to 0\&. .RE .PP \-i <pi>, \-\-pi=<pi> @@ -173,7 +173,7 @@ Just send the command immediately without warning of the implications\&. .PP \-t <timeout>, \-\-timeout=<timeout> .RS 4 -Override default timeout value\&. In milliseconds\&. +Override default timeout value 600,000\&. In milliseconds\&. .RE .PP \-o <fmt>, \-\-output\-format=<fmt> diff --git a/Documentation/nvme-format.html b/Documentation/nvme-format.html index eb73f4e..ac616ac 100644 --- a/Documentation/nvme-format.html +++ b/Documentation/nvme-format.html @@ -894,9 +894,9 @@ cryptographically. This is accomplished by deleting the encryption key.</p></td> <p>
Protection Information Location: If set to ‘1’ and protection
information is enabled, then protection information is transferred
- as the first eight bytes of metadata. If cleared to ‘0’ and
+ as the first bytes of metadata. If cleared to ‘0’ and
protection information is enabled, then protection information
- is transferred as the last eight bytes of metadata. Defaults to 0.
+ is transferred as the last bytes of metadata. Defaults to 0.
</p>
</dd>
<dt class="hdlist1">
@@ -990,7 +990,7 @@ cellspacing="0" cellpadding="4"> </dt>
<dd>
<p>
- Override default timeout value. In milliseconds.
+ Override default timeout value 600,000. In milliseconds.
</p>
</dd>
<dt class="hdlist1">
@@ -1056,7 +1056,7 @@ information: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-format.txt b/Documentation/nvme-format.txt index e4623f1..eb28245 100644 --- a/Documentation/nvme-format.txt +++ b/Documentation/nvme-format.txt @@ -93,9 +93,9 @@ cryptographically. This is accomplished by deleting the encryption key. --pil=<pil>:: Protection Information Location: If set to ‘1’ and protection information is enabled, then protection information is transferred - as the first eight bytes of metadata. If cleared to ‘0’ and + as the first bytes of metadata. If cleared to ‘0’ and protection information is enabled, then protection information - is transferred as the last eight bytes of metadata. Defaults to 0. + is transferred as the last bytes of metadata. Defaults to 0. -i <pi>:: --pi=<pi>:: @@ -131,7 +131,7 @@ cryptographically. This is accomplished by deleting the encryption key. -t <timeout>:: --timeout=<timeout>:: - Override default timeout value. In milliseconds. + Override default timeout value 600,000. In milliseconds. -o <fmt>:: --output-format=<fmt>:: diff --git a/Documentation/nvme-fw-commit.1 b/Documentation/nvme-fw-commit.1 index f97ecdc..3c04f1b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FW\-COMMIT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FW\-COMMIT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,6 +36,7 @@ nvme-fw-commit \- Used to verify and commit a firmware image\&. [\-\-action=<action> | \-a <action>] [\-\-bpid=<boot\-partid> | \-b <boot\-partid>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -132,6 +133,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-fw-commit.html b/Documentation/nvme-fw-commit.html index 772d658..39ac136 100644 --- a/Documentation/nvme-fw-commit.html +++ b/Documentation/nvme-fw-commit.html @@ -752,7 +752,8 @@ nvme-fw-commit(1) Manual Page <pre class="content"><em>nvme fw-commit</em> <device> [--slot=<slot> | -s <slot>]
[--action=<action> | -a <action>]
[--bpid=<boot-partid> | -b <boot-partid>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -893,6 +894,17 @@ BPINFO.ABPID.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -929,7 +941,7 @@ commit the last downloaded fw to slot 1. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fw-commit.txt b/Documentation/nvme-fw-commit.txt index 8e08bd4..89f551d 100644 --- a/Documentation/nvme-fw-commit.txt +++ b/Documentation/nvme-fw-commit.txt @@ -12,6 +12,7 @@ SYNOPSIS [--action=<action> | -a <action>] [--bpid=<boot-partid> | -b <boot-partid>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -85,6 +86,10 @@ BPINFO.ABPID. --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * commit the last downloaded fw to slot 1. diff --git a/Documentation/nvme-fw-download.1 b/Documentation/nvme-fw-download.1 index b13b4c8..e40647a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FW\-DOWNLOAD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FW\-DOWNLOAD" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,6 +36,7 @@ nvme-fw-download \- Download all or a portion of an nvme firmware image\&. [\-\-xfer=<transfer\-size> | \-x <transfer\-size>] [\-\-offset=<offset> | \-O <offset>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -76,6 +77,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-fw-download.html b/Documentation/nvme-fw-download.html index cc49e87..68cc9a3 100644 --- a/Documentation/nvme-fw-download.html +++ b/Documentation/nvme-fw-download.html @@ -752,7 +752,8 @@ nvme-fw-download(1) Manual Page <pre class="content"><em>nvme fw-download</em> <device> [--fw=<firmware-file> | -f <firmware-file>]
[--xfer=<transfer-size> | -x <transfer-size>]
[--offset=<offset> | -O <offset>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -846,6 +847,17 @@ the Firmware Commit command (nvme fw-commit <args>).</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -876,7 +888,7 @@ Transfer a firmware size 128KiB at a time: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-fw-download.txt b/Documentation/nvme-fw-download.txt index 1ec466f..a45589c 100644 --- a/Documentation/nvme-fw-download.txt +++ b/Documentation/nvme-fw-download.txt @@ -12,6 +12,7 @@ SYNOPSIS [--xfer=<transfer-size> | -x <transfer-size>] [--offset=<offset> | -O <offset>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -65,6 +66,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Transfer a firmware size 128KiB at a time: diff --git a/Documentation/nvme-fw-log.1 b/Documentation/nvme-fw-log.1 index 23eef95..5b947bc 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FW\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FW\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fw-log.html b/Documentation/nvme-fw-log.html index e3b8a9a..b5235d7 100644 --- a/Documentation/nvme-fw-log.html +++ b/Documentation/nvme-fw-log.html @@ -846,7 +846,7 @@ Print the log firmware to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-gen-hostnqn.1 b/Documentation/nvme-gen-hostnqn.1 index 6297604..7b04592 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GEN\-HOSTNQN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GEN\-HOSTNQN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-gen-hostnqn.html b/Documentation/nvme-gen-hostnqn.html index d322bda..3e98cd8 100644 --- a/Documentation/nvme-gen-hostnqn.html +++ b/Documentation/nvme-gen-hostnqn.html @@ -809,7 +809,7 @@ and prints it to stdout.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-feature.1 b/Documentation/nvme-get-feature.1 index 1968c81..15bd7d5 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GET\-FEATURE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GET\-FEATURE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,6 +40,7 @@ nvme-get-feature \- Gets an NVMe feature, returns applicable results [\-\-raw\-binary | \-b] [\-\-cdw11=<cdw11> | \-c <cdw11>] [\-\-human\-readable | \-H] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -143,6 +144,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-get-feature.html b/Documentation/nvme-get-feature.html index 387c51b..8860682 100644 --- a/Documentation/nvme-get-feature.html +++ b/Documentation/nvme-get-feature.html @@ -756,7 +756,8 @@ nvme-get-feature(1) Manual Page [--sel=<select> | -s <select>]
[--raw-binary | -b] [--cdw11=<cdw11> | -c <cdw11>]
[--human-readable | -H]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -933,6 +934,17 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1004,7 +1016,7 @@ format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-feature.txt b/Documentation/nvme-get-feature.txt index 5abbb47..a055b93 100644 --- a/Documentation/nvme-get-feature.txt +++ b/Documentation/nvme-get-feature.txt @@ -16,6 +16,7 @@ SYNOPSIS [--raw-binary | -b] [--cdw11=<cdw11> | -c <cdw11>] [--human-readable | -H] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -92,6 +93,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Retrieves the feature for Number of Queues, or feature id 7: diff --git a/Documentation/nvme-get-lba-status.1 b/Documentation/nvme-get-lba-status.1 index 244400d..6f494b1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GET\-LBA\-STAT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GET\-LBA\-STAT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-get-lba-status.html b/Documentation/nvme-get-lba-status.html index 39a42df..0c083cd 100644 --- a/Documentation/nvme-get-lba-status.html +++ b/Documentation/nvme-get-lba-status.html @@ -907,7 +907,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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-log.1 b/Documentation/nvme-get-log.1 index a6d7e16..7c01640 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GET\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GET\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-get-log.html b/Documentation/nvme-get-log.html index 11a5bdb..97f7bb2 100644 --- a/Documentation/nvme-get-log.html +++ b/Documentation/nvme-get-log.html @@ -997,7 +997,7 @@ Have the program return the raw log page in binary: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-ns-id.1 b/Documentation/nvme-get-ns-id.1 index a25d52a..2894842 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GET\-NS\-ID" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GET\-NS\-ID" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-get-ns-id.html b/Documentation/nvme-get-ns-id.html index 7975554..36ca5c9 100644 --- a/Documentation/nvme-get-ns-id.html +++ b/Documentation/nvme-get-ns-id.html @@ -818,7 +818,7 @@ Shows the namespace id for the given block device: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-property.1 b/Documentation/nvme-get-property.1 index 18db4ad..c49d92f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-GET\-PROPERTY" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-GET\-PROPERTY" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,6 +35,7 @@ nvme-get-property \- Reads and shows the defined NVMe controller property for NV \fInvme get\-property\fR <device> [\-\-offset=<offset> | \-O <offset>] [\-\-human\-readable | \-H] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -64,6 +65,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-get-property.html b/Documentation/nvme-get-property.html index 165273c..9c808d1 100644 --- a/Documentation/nvme-get-property.html +++ b/Documentation/nvme-get-property.html @@ -751,7 +751,8 @@ nvme-get-property(1) Manual Page <div class="verseblock">
<pre class="content"><em>nvme get-property</em> <device> [--offset=<offset> | -O <offset>]
[--human-readable | -H]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -809,6 +810,17 @@ nvme-get-property(1) Manual Page Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -867,7 +879,7 @@ Then look for NVMe Fabrics command (0x7f) at trace <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-get-property.txt b/Documentation/nvme-get-property.txt index bee65d1..f52326e 100644 --- a/Documentation/nvme-get-property.txt +++ b/Documentation/nvme-get-property.txt @@ -12,6 +12,7 @@ SYNOPSIS 'nvme get-property' <device> [--offset=<offset> | -O <offset>] [--human-readable | -H] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -36,6 +37,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * The following will run the get-property command with offset 0 diff --git a/Documentation/nvme-get-reg.txt b/Documentation/nvme-get-reg.txt index b0d133e..5e9cd95 100644 --- a/Documentation/nvme-get-reg.txt +++ b/Documentation/nvme-get-reg.txt @@ -16,6 +16,7 @@ SYNOPSIS [--bprsel] [--bpmbl] [--cmbmsc] [--nssd] [--pmrctl] [--pmrmscl] [--pmrmscu] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -124,6 +125,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * The following will run the get-reg command with CC=0x14 register offset diff --git a/Documentation/nvme-help.1 b/Documentation/nvme-help.1 index 8071ddc..d4b3f46 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-HELP" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-HELP" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-help.html b/Documentation/nvme-help.html index d34afd8..ef2d50f 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-huawei-id-ctrl.1 b/Documentation/nvme-huawei-id-ctrl.1 index b32f3eb..7e544ff 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-HUAWEI\-ID\-CT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-HUAWEI\-ID\-CT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-huawei-id-ctrl.html b/Documentation/nvme-huawei-id-ctrl.html index fdb6652..8e31df9 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-huawei-list.1 b/Documentation/nvme-huawei-list.1 index e66aef2..514184e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LIST" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-huawei-list.html b/Documentation/nvme-huawei-list.html index a3c7b83..367cdaf 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-ctrl.1 b/Documentation/nvme-id-ctrl.1 index bdd522f..a2e03dc 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-CTRL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-CTRL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-id-ctrl.html b/Documentation/nvme-id-ctrl.html index 01c107a..6ee61b4 100644 --- a/Documentation/nvme-id-ctrl.html +++ b/Documentation/nvme-id-ctrl.html @@ -921,7 +921,7 @@ int main(int argc, char **argv) <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-domain.1 b/Documentation/nvme-id-domain.1 index e51f4a0..3c5eaa1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-DOMAIN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-DOMAIN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-id-domain.html b/Documentation/nvme-id-domain.html index 3d6b411..8652a36 100644 --- a/Documentation/nvme-id-domain.html +++ b/Documentation/nvme-id-domain.html @@ -823,7 +823,7 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-iocs.1 b/Documentation/nvme-id-iocs.1 index 58ffade..890db48 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-IOCS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-IOCS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-id-iocs.html b/Documentation/nvme-id-iocs.html index 5e7caae..e6f6a1f 100644 --- a/Documentation/nvme-id-iocs.html +++ b/Documentation/nvme-id-iocs.html @@ -855,7 +855,7 @@ show the fields in human readable format <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-ns.1 b/Documentation/nvme-id-ns.1 index 0d1d4b8..55f8975 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-id-ns.html b/Documentation/nvme-id-ns.html index 57657f8..663b683 100644 --- a/Documentation/nvme-id-ns.html +++ b/Documentation/nvme-id-ns.html @@ -966,7 +966,7 @@ int main(int argc, char **argv) <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-id-nvmset.1 b/Documentation/nvme-id-nvmset.1 index 0cf58ce..920376f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-NVMSET" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-NVMSET" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-id-nvmset.html b/Documentation/nvme-id-nvmset.html index 29238d4..3bb1667 100644 --- a/Documentation/nvme-id-nvmset.html +++ b/Documentation/nvme-id-nvmset.html @@ -862,7 +862,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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-inspur-nvme-vendor-log.1 b/Documentation/nvme-inspur-nvme-vendor-log.1 index 9b17f19..5f3b1af 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INSPUR\-NVME\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INSPUR\-NVME\-" "1" "08/02/2024" "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 cb9f85f..b7879ca 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-id-ctrl.1 b/Documentation/nvme-intel-id-ctrl.1 index 0ad6f17..6295548 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-ID\-CTR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-ID\-CTR" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-intel-id-ctrl.html b/Documentation/nvme-intel-id-ctrl.html index d22113e..b416638 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-internal-log.1 b/Documentation/nvme-intel-internal-log.1 index b477eb5..f8a9e7c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-INTERNA" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-INTERNA" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-intel-internal-log.html b/Documentation/nvme-intel-internal-log.html index adec8f4..361b65e 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-lat-stats.1 b/Documentation/nvme-intel-lat-stats.1 index 2a90ec1..30db467 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-LAT\-ST" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-LAT\-ST" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-intel-lat-stats.html b/Documentation/nvme-intel-lat-stats.html index db8470b..ff3c150 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-market-name.1 b/Documentation/nvme-intel-market-name.1 index 76752f1..6a5d104 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-MARKET\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-MARKET\" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-intel-market-name.html b/Documentation/nvme-intel-market-name.html index 1a2cb40..b8ca9e0 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-smart-log-add.1 b/Documentation/nvme-intel-smart-log-add.1 index ace0e71..65e9c61 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-SMART\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-SMART\-" "1" "08/02/2024" "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 9b0b8bb..ebfe48f 100644 --- a/Documentation/nvme-intel-smart-log-add.html +++ b/Documentation/nvme-intel-smart-log-add.html @@ -849,7 +849,7 @@ Print the raw Intel Additional SMART log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-intel-temp-stats.1 b/Documentation/nvme-intel-temp-stats.1 index c359d87..a52e88e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-INTEL\-TEMP\-S" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-INTEL\-TEMP\-S" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-intel-temp-stats.html b/Documentation/nvme-intel-temp-stats.html index 6093d9d..f4c526a 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-mgmt-recv.1 b/Documentation/nvme-io-mgmt-recv.1 index aa0b587..cf194aa 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-IO\-MGMT\-RECV" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-IO\-MGMT\-RECV" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,6 +37,7 @@ nvme-io-mgmt-recv \- I/O Management Receive command [\-\-data=<FILE> | \-d <FILE>] [\-\-data\-len=<NUM> | \-l <NUM>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -81,6 +82,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "NVME" .sp Part of nvme\-cli diff --git a/Documentation/nvme-io-mgmt-recv.html b/Documentation/nvme-io-mgmt-recv.html index a1df10e..aedf30c 100644 --- a/Documentation/nvme-io-mgmt-recv.html +++ b/Documentation/nvme-io-mgmt-recv.html @@ -753,7 +753,8 @@ nvme-io-mgmt-recv(1) Manual Page [--mos=<NUM> | -s <NUM>] [--mo=<NUM> | -m <NUM>]
[--data=<FILE> | -d <FILE>]
[--data-len=<NUM> | -l <NUM>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -855,6 +856,17 @@ a hex dump, or binary.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -869,7 +881,7 @@ a hex dump, or binary.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-mgmt-recv.txt b/Documentation/nvme-io-mgmt-recv.txt index 332d0bb..64137e3 100644 --- a/Documentation/nvme-io-mgmt-recv.txt +++ b/Documentation/nvme-io-mgmt-recv.txt @@ -13,6 +13,7 @@ SYNOPSIS [--data=<FILE> | -d <FILE>] [--data-len=<NUM> | -l <NUM>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -58,6 +59,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + NVME ---- Part of nvme-cli diff --git a/Documentation/nvme-io-mgmt-send.1 b/Documentation/nvme-io-mgmt-send.1 index 6cb17a1..80593ed 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-IO\-MGMT\-SEND" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-IO\-MGMT\-SEND" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,6 +37,7 @@ nvme-io-mgmt-send \- I/O Management Send command [\-\-data=<FILE> | \-d <FILE>] [\-\-data\-len=<NUM> | \-l <NUM>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -81,6 +82,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "NVME" .sp Part of nvme\-cli diff --git a/Documentation/nvme-io-mgmt-send.html b/Documentation/nvme-io-mgmt-send.html index 2614bf0..d77257f 100644 --- a/Documentation/nvme-io-mgmt-send.html +++ b/Documentation/nvme-io-mgmt-send.html @@ -753,7 +753,8 @@ nvme-io-mgmt-send(1) Manual Page [--mos=<NUM> | -s <NUM>] [--mo=<NUM> | -m <NUM>]
[--data=<FILE> | -d <FILE>]
[--data-len=<NUM> | -l <NUM>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -854,6 +855,17 @@ convenience parameters to produce the binary payload.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -868,7 +880,7 @@ convenience parameters to produce the binary payload.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-mgmt-send.txt b/Documentation/nvme-io-mgmt-send.txt index f7e8f6d..a275458 100644 --- a/Documentation/nvme-io-mgmt-send.txt +++ b/Documentation/nvme-io-mgmt-send.txt @@ -13,6 +13,7 @@ SYNOPSIS [--data=<FILE> | -d <FILE>] [--data-len=<NUM> | -l <NUM>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -57,6 +58,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + NVME ---- Part of nvme-cli diff --git a/Documentation/nvme-io-passthru.1 b/Documentation/nvme-io-passthru.1 index 909b74c..dc7c573 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-IO\-PASSTHRU" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-IO\-PASSTHRU" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,7 +44,7 @@ nvme-io-passthru \- Submit an arbitrary io command, return results [\-\-read | \-r] [\-\-write | \-w] [\-\-input\-file=<file> | \-i <file>] [\-\-metadata=<file> | \-M <file>] - [\-\-timeout=<to> | \-t <to>] [\-\-show\-command | \-s] + [\-\-timeout=<timeout> | \-t <timeout>] [\-\-show\-command | \-s] [\-\-dry\-run | \-d] [\-\-raw\-binary | \-b] [\-\-prefill=<prefill> | \-p <prefill>] [\-\-latency | \-T] @@ -151,6 +151,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp nvme io\-passthru /dev/nvme0n1 \-\-opcode=2 \-\-namespace\-id=1 \-\-data\-len=4096 \-\-read \-\-cdw10=0 \-\-cdw11=0 \-\-cdw12=0x70000 \-\-raw\-binary diff --git a/Documentation/nvme-io-passthru.html b/Documentation/nvme-io-passthru.html index ff08fdd..18b8de7 100644 --- a/Documentation/nvme-io-passthru.html +++ b/Documentation/nvme-io-passthru.html @@ -761,7 +761,7 @@ nvme-io-passthru(1) Manual Page [--read | -r] [--write | -w]
[--input-file=<file> | -i <file>]
[--metadata=<file> | -M <file>]
- [--timeout=<to> | -t <to>] [--show-command | -s]
+ [--timeout=<timeout> | -t <timeout>] [--show-command | -s]
[--dry-run | -d] [--raw-binary | -b]
[--prefill=<prefill> | -p <prefill>]
[--latency | -T]
@@ -999,6 +999,17 @@ printed to stdout for another program to parse.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1019,7 +1030,7 @@ printed to stdout for another program to parse.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-io-passthru.txt b/Documentation/nvme-io-passthru.txt index bbc34eb..fd76bd5 100644 --- a/Documentation/nvme-io-passthru.txt +++ b/Documentation/nvme-io-passthru.txt @@ -20,7 +20,7 @@ SYNOPSIS [--read | -r] [--write | -w] [--input-file=<file> | -i <file>] [--metadata=<file> | -M <file>] - [--timeout=<to> | -t <to>] [--show-command | -s] + [--timeout=<timeout> | -t <timeout>] [--show-command | -s] [--dry-run | -d] [--raw-binary | -b] [--prefill=<prefill> | -p <prefill>] [--latency | -T] @@ -130,6 +130,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- diff --git a/Documentation/nvme-lba-status-log.1 b/Documentation/nvme-lba-status-log.1 index 54d410b..69fdc47 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LBA\-STATUS\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LBA\-STATUS\-L" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-lba-status-log.html b/Documentation/nvme-lba-status-log.html index d63139f..35e97a4 100644 --- a/Documentation/nvme-lba-status-log.html +++ b/Documentation/nvme-lba-status-log.html @@ -843,7 +843,7 @@ NVME</code></pre> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-ctrl.1 b/Documentation/nvme-list-ctrl.1 index 0695802..fe2cd7e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST\-CTRL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LIST\-CTRL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-list-ctrl.html b/Documentation/nvme-list-ctrl.html index cb77b1f..cdc8296 100644 --- a/Documentation/nvme-list-ctrl.html +++ b/Documentation/nvme-list-ctrl.html @@ -842,7 +842,7 @@ identifier.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-endgrp.1 b/Documentation/nvme-list-endgrp.1 index 883f75c..83bec73 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST\-ENDGRP" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LIST\-ENDGRP" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-list-endgrp.html b/Documentation/nvme-list-endgrp.html index 0e0079a..3318314 100644 --- a/Documentation/nvme-list-endgrp.html +++ b/Documentation/nvme-list-endgrp.html @@ -826,7 +826,7 @@ than or equal to the value specified in the CDW11.ENDGID field.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-ns.1 b/Documentation/nvme-list-ns.1 index 1146a98..429b2bb 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,6 +36,7 @@ nvme-list-ns \- Send NVMe Identify List Namespaces, return result and structure [\-\-csi=<command_set_identifier> | \-y <command_set_identifier>] [\-\-all | \-a] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -74,6 +75,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-list-ns.html b/Documentation/nvme-list-ns.html index 1fa0e56..e5612ae 100644 --- a/Documentation/nvme-list-ns.html +++ b/Documentation/nvme-list-ns.html @@ -752,7 +752,8 @@ nvme-id-ns(1) Manual Page <pre class="content"><em>nvme list-ns</em> <device> [--namespace-id=<nsid> | -n <nsid>]
[--csi=<command_set_identifier> | -y <command_set_identifier>]
[--all | -a]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -832,6 +833,17 @@ a valid nsid.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -871,7 +883,7 @@ Print the namespaces present for NVM Command Set in normal format <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list-ns.txt b/Documentation/nvme-list-ns.txt index d241287..3a137c5 100644 --- a/Documentation/nvme-list-ns.txt +++ b/Documentation/nvme-list-ns.txt @@ -12,6 +12,7 @@ SYNOPSIS [--csi=<command_set_identifier> | -y <command_set_identifier>] [--all | -a] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -51,6 +52,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Print the namespaces present for zoned command set in JSON format diff --git a/Documentation/nvme-list-subsys.1 b/Documentation/nvme-list-subsys.1 index 1bf21ea..281ef34 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST\-SUBSYS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LIST\-SUBSYS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-list-subsys.html b/Documentation/nvme-list-subsys.html index 525c079..22b40ea 100644 --- a/Documentation/nvme-list-subsys.html +++ b/Documentation/nvme-list-subsys.html @@ -865,7 +865,7 @@ nvme-subsys1 - NQN=nvmf-test2 <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-list.1 b/Documentation/nvme-list.1 index 60623b4..7b72a8f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LIST" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-list.html b/Documentation/nvme-list.html index 1d87621..290ad77 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-lockdown.1 b/Documentation/nvme-lockdown.1 index 0e47f9a..073f644 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LOCKDOWN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-LOCKDOWN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,6 +38,7 @@ nvme-lockdown \- Send an NVMe Lockdown command to prohibit or allow the executio [\-\-scp=<scp> | \-s <scp>] [\-\-uuid=<UUID_Index> | \-U <UUID_Index>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -82,6 +83,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-lockdown.html b/Documentation/nvme-lockdown.html index 089c65f..fc27352 100644 --- a/Documentation/nvme-lockdown.html +++ b/Documentation/nvme-lockdown.html @@ -754,7 +754,8 @@ nvme-lockdown(1) Manual Page [--prhbt=<prhbt> | -p <prhbt>]
[--scp=<scp> | -s <scp>]
[--uuid=<UUID_Index> | -U <UUID_Index>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -854,6 +855,17 @@ Identifier.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -874,7 +886,7 @@ Identifier.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-lockdown.txt b/Documentation/nvme-lockdown.txt index e17ac70..40a3554 100644 --- a/Documentation/nvme-lockdown.txt +++ b/Documentation/nvme-lockdown.txt @@ -14,6 +14,7 @@ SYNOPSIS [--scp=<scp> | -s <scp>] [--uuid=<UUID_Index> | -U <UUID_Index>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -56,6 +57,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-mi-cmd-support-effects-log.1 b/Documentation/nvme-mi-cmd-support-effects-log.1 index 2d22dc2..3d331d3 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MI\-CMD\-SUPPO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MI\-CMD\-SUPPO" "1" "08/02/2024" "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 e85baf2..1bead85 100644 --- a/Documentation/nvme-mi-cmd-support-effects-log.html +++ b/Documentation/nvme-mi-cmd-support-effects-log.html @@ -826,7 +826,7 @@ raw buffer may be printed to stdout.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-clear-pcie-errors.1 b/Documentation/nvme-micron-clear-pcie-errors.1 index f3ca7b7..495b63a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-CLEAR\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-CLEAR\" "1" "08/02/2024" "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 868586d..6d9defb 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-internal-log.1 b/Documentation/nvme-micron-internal-log.1 index 76f6415..32fa2b0 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-INTERN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-INTERN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-micron-internal-log.html b/Documentation/nvme-micron-internal-log.html index 74fc15e..891b7aa 100644 --- a/Documentation/nvme-micron-internal-log.html +++ b/Documentation/nvme-micron-internal-log.html @@ -814,7 +814,7 @@ Gets the logs from the device and saves to micron_logs.zip file <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-nand-stats.1 b/Documentation/nvme-micron-nand-stats.1 index c79c942..b286941 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-NAND\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-NAND\-" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-micron-nand-stats.html b/Documentation/nvme-micron-nand-stats.html index 5ea78c0..f0fbc1d 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-pcie-stats.1 b/Documentation/nvme-micron-pcie-stats.1 index 4ba3b15..20ffe04 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-PCIE\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-PCIE\-" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-micron-pcie-stats.html b/Documentation/nvme-micron-pcie-stats.html index 0dfc554..a6dacd5 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-selective-download.1 b/Documentation/nvme-micron-selective-download.1 index 03d66ff..a0f72f1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-SELECT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-SELECT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-micron-selective-download.html b/Documentation/nvme-micron-selective-download.html index 1f492f9..d904c31 100644 --- a/Documentation/nvme-micron-selective-download.html +++ b/Documentation/nvme-micron-selective-download.html @@ -869,7 +869,7 @@ Update eeprom, OOB and main firmware <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-smart-add-log.1 b/Documentation/nvme-micron-smart-add-log.1 index 33a23df..aa8c5fb 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-SMART\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-SMART\" "1" "08/02/2024" "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 611657e..92d4246 100644 --- a/Documentation/nvme-micron-smart-add-log.html +++ b/Documentation/nvme-micron-smart-add-log.html @@ -817,7 +817,7 @@ Retrieve NAND/extended SMART data and display in json format <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-micron-temperature-stats.1 b/Documentation/nvme-micron-temperature-stats.1 index 8a9dda1..159c7d1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-MICRON\-TEMPER" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-MICRON\-TEMPER" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-micron-temperature-stats.html b/Documentation/nvme-micron-temperature-stats.html index fabb51b..67de4f8 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-netapp-ontapdevices.1 b/Documentation/nvme-netapp-ontapdevices.1 index 8fc6864..bbb602b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NETAPP\-ONTAPD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NETAPP\-ONTAPD" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-netapp-ontapdevices.html b/Documentation/nvme-netapp-ontapdevices.html index 4697207..2d843be 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-netapp-smdevices.1 b/Documentation/nvme-netapp-smdevices.1 index 12b8039..a7da4f0 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NETAPP\-SMDEVI" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NETAPP\-SMDEVI" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-netapp-smdevices.html b/Documentation/nvme-netapp-smdevices.html index ac6d3a2..754f0aa 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
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ns-descs.1 b/Documentation/nvme-ns-descs.1 index f28e33a..8899d53 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NS\-DESCS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NS\-DESCS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-ns-descs.html b/Documentation/nvme-ns-descs.html index f6e1421..a962386 100644 --- a/Documentation/nvme-ns-descs.html +++ b/Documentation/nvme-ns-descs.html @@ -867,7 +867,7 @@ Have the program return the raw structure in binary: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ns-rescan.1 b/Documentation/nvme-ns-rescan.1 index 19ce268..f9feaaa 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NS\-RESCAN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NS\-RESCAN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-ns-rescan.html b/Documentation/nvme-ns-rescan.html index c3732d5..5a45a52 100644 --- a/Documentation/nvme-ns-rescan.html +++ b/Documentation/nvme-ns-rescan.html @@ -818,7 +818,7 @@ Rescans the nvme namespaces. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-nvm-id-ctrl.1 b/Documentation/nvme-nvm-id-ctrl.1 index ef198d9..db81501 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NVM\-ID\-CTRL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NVM\-ID\-CTRL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-nvm-id-ctrl.html b/Documentation/nvme-nvm-id-ctrl.html index e4bdd73..9c9f4fc 100644 --- a/Documentation/nvme-nvm-id-ctrl.html +++ b/Documentation/nvme-nvm-id-ctrl.html @@ -832,7 +832,7 @@ Show the output in json format <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-nvme-mi-recv.1 b/Documentation/nvme-nvme-mi-recv.1 index 2c40649..189a8a2 100644 --- a/Documentation/nvme-nvme-mi-recv.1 +++ b/Documentation/nvme-nvme-mi-recv.1 @@ -2,12 +2,12 @@ .\" Title: nvme-nvme-mi-recv .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NVME\-MI\-RECV" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NVME\-MI\-RECV" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-nvme-mi-recv.html b/Documentation/nvme-nvme-mi-recv.html index e9ca302..5be0b28 100644 --- a/Documentation/nvme-nvme-mi-recv.html +++ b/Documentation/nvme-nvme-mi-recv.html @@ -905,7 +905,7 @@ Has the program issue a nvme-mi-recv to execute the VPD read. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-nvme-mi-send.1 b/Documentation/nvme-nvme-mi-send.1 index c62416b..a6c5f9a 100644 --- a/Documentation/nvme-nvme-mi-send.1 +++ b/Documentation/nvme-nvme-mi-send.1 @@ -2,12 +2,12 @@ .\" Title: nvme-nvme-mi-send .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-NVME\-MI\-SEND" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-NVME\-MI\-SEND" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-nvme-mi-send.html b/Documentation/nvme-nvme-mi-send.html index 4f05adc..069011e 100644 --- a/Documentation/nvme-nvme-mi-send.html +++ b/Documentation/nvme-nvme-mi-send.html @@ -905,7 +905,7 @@ Has the program issue a nvme-mi-send to execute the VPD write. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 7c56258..70738fe 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-OCP\-CLEAR\-FW" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-OCP\-CLEAR\-FW" "1" "08/02/2024" "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 5448629..41f71a8 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.1 b/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.1 index a833306..60ca92e 100644 --- a/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.1 +++ b/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.1 @@ -2,12 +2,12 @@ .\" Title: nvme-ocp-clear-pcie-correctable-error-counters .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-OCP\-CLEAR\-PC" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-OCP\-CLEAR\-PC" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.html b/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.html index dc7788e..50a9648 100644 --- a/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.html +++ b/Documentation/nvme-ocp-clear-pcie-correctable-error-counters.html @@ -817,7 +817,7 @@ Clears PCIe correctable error counters Log for the device: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-device-capability-log.1 b/Documentation/nvme-ocp-device-capability-log.1 new file mode 100644 index 0000000..36a2b82 --- /dev/null +++ b/Documentation/nvme-ocp-device-capability-log.1 @@ -0,0 +1,81 @@ +'\" t +.\" Title: nvme-ocp-device-capability-log +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-DEVICE\-C" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-device-capability-log \- Retrieves OCP Device Capability Log Page +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp device\-capability\-log\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, retrieves OCP Device Capability Log Page +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-o <fmt>, \-\-output\-format=<fmt> +.RS 4 +Set the reporting format to +\fInormal\fR +or +\fIjson\fR +or +\fIbinary\fR\&. Only one output format can be used at a time\&. The default is normal\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a device\-capability\-log command to retrieve the 0xC4 log page\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp device\-capability\-log /dev/nvme0 \-o normal +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-device-capability-log.html b/Documentation/nvme-ocp-device-capability-log.html new file mode 100644 index 0000000..06bf894 --- /dev/null +++ b/Documentation/nvme-ocp-device-capability-log.html @@ -0,0 +1,818 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-device-capability-log(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-device-capability-log(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-device-capability-log -
+ Retrieves OCP Device Capability Log Page
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp device-capability-log</em> <device> [--output-format=<fmt> | -o <fmt>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, retrieves OCP Device Capability Log Page</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-o <fmt>
+</dt>
+<dt class="hdlist1">
+--output-format=<fmt>
+</dt>
+<dd>
+<p>
+ Set the reporting format to <em>normal</em> or <em>json</em> or <em>binary</em>.
+ Only one output format can be used at a time. The default is normal.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a device-capability-log command to retrieve the 0xC4 log page.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp device-capability-log /dev/nvme0 -o normal</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-eol-plp-failure-mode.1 b/Documentation/nvme-ocp-eol-plp-failure-mode.1 index 6ff639e..823efce 100644 --- a/Documentation/nvme-ocp-eol-plp-failure-mode.1 +++ b/Documentation/nvme-ocp-eol-plp-failure-mode.1 @@ -2,12 +2,12 @@ .\" Title: nvme-ocp-eol-plp-failure-mode .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-OCP\-EOL\-PLP\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-OCP\-EOL\-PLP\" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ nvme-ocp-eol-plp-failure-mode \- Define and print EOL or PLP circuitry failure m .nf \fInvme ocp eol\-plp\-failure\-mode\fR <device> [\-\-mode=<mode> | \-m <mode>] [\-\-no\-uuid | \-n] [\-\-save | \-s] - [\-\-sel=<select> | \-s <select>] + [\-\-sel=<select> | \-S <select>] .fi .SH "DESCRIPTION" .sp diff --git a/Documentation/nvme-ocp-eol-plp-failure-mode.html b/Documentation/nvme-ocp-eol-plp-failure-mode.html index f99cfd1..6b40433 100644 --- a/Documentation/nvme-ocp-eol-plp-failure-mode.html +++ b/Documentation/nvme-ocp-eol-plp-failure-mode.html @@ -751,7 +751,7 @@ nvme-ocp-eol-plp-failure-mode(1) Manual Page <div class="verseblock">
<pre class="content"><em>nvme ocp eol-plp-failure-mode</em> <device> [--mode=<mode> | -m <mode>]
[--no-uuid | -n] [--save | -s]
- [--sel=<select> | -s <select>]</pre>
+ [--sel=<select> | -S <select>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -886,7 +886,7 @@ Has the program issue a eol-plp-failure-mode to retrieve the 0xC2 get features. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-eol-plp-failure-mode.txt b/Documentation/nvme-ocp-eol-plp-failure-mode.txt index 0ebc4ab..1693925 100644 --- a/Documentation/nvme-ocp-eol-plp-failure-mode.txt +++ b/Documentation/nvme-ocp-eol-plp-failure-mode.txt @@ -11,7 +11,7 @@ SYNOPSIS [verse] 'nvme ocp eol-plp-failure-mode' <device> [--mode=<mode> | -m <mode>] [--no-uuid | -n] [--save | -s] - [--sel=<select> | -s <select>] + [--sel=<select> | -S <select>] DESCRIPTION ----------- diff --git a/Documentation/nvme-ocp-error-recovery-log.1 b/Documentation/nvme-ocp-error-recovery-log.1 new file mode 100644 index 0000000..512bf9e --- /dev/null +++ b/Documentation/nvme-ocp-error-recovery-log.1 @@ -0,0 +1,81 @@ +'\" t +.\" Title: nvme-ocp-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: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-ERROR\-RE" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-error-recovery-log \- Retrieves OCP Error Recovery Log Page +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp error\-recovery\-log\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, retrieves OCP Error Recovery Log Page +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-o <fmt>, \-\-output\-format=<fmt> +.RS 4 +Set the reporting format to +\fInormal\fR +or +\fIjson\fR +or +\fIbinary\fR\&. Only one output format can be used at a time\&. The default is normal\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a error\-recovery\-log command to retrieve the 0xC1 log page\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp error\-recovery\-log /dev/nvme0 \-o normal +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-error-recovery-log.html b/Documentation/nvme-ocp-error-recovery-log.html new file mode 100644 index 0000000..690a179 --- /dev/null +++ b/Documentation/nvme-ocp-error-recovery-log.html @@ -0,0 +1,818 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-error-recovery-log(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-error-recovery-log(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-error-recovery-log -
+ Retrieves OCP Error Recovery Log Page
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp error-recovery-log</em> <device> [--output-format=<fmt> | -o <fmt>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, retrieves OCP Error Recovery Log Page</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-o <fmt>
+</dt>
+<dt class="hdlist1">
+--output-format=<fmt>
+</dt>
+<dd>
+<p>
+ Set the reporting format to <em>normal</em> or <em>json</em> or <em>binary</em>.
+ Only one output format can be used at a time. The default is normal.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a error-recovery-log command to retrieve the 0xC1 log page.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp error-recovery-log /dev/nvme0 -o normal</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-get-dssd-async-event-config.1 b/Documentation/nvme-ocp-get-dssd-async-event-config.1 new file mode 100644 index 0000000..a8424db --- /dev/null +++ b/Documentation/nvme-ocp-get-dssd-async-event-config.1 @@ -0,0 +1,116 @@ +'\" t +.\" Title: nvme-ocp-get-dssd-async-event-config +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-GET\-DSSD" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-get-dssd-async-event-config \- Get dssd\-async\-event\-config value +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp get\-dssd\-async\-event\-config\fR <device> [\-\-sel=<select> | \-s <select>] +.fi +.SH "DESCRIPTION" +.sp +Get dssd\-async\-event\-config\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-s <select>, \-\-sel=<select> +.RS 4 +Select (SEL): This field specifies which value of the attributes to return in the provided data: +.TS +allbox tab(:); +lt lt +lt lt +lt lt +lt lt +lt lt +lt lt. +T{ +Select +T}:T{ +Description +T} +T{ +0 +T}:T{ +Current +T} +T{ +1 +T}:T{ +Default +T} +T{ +2 +T}:T{ +Saved +T} +T{ +3 +T}:T{ +Supported capabilities +T} +T{ +4\-7 +T}:T{ +Reserved +T} +.TE +.sp 1 +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a get\-dssd\-async\-event\-config to retrieve the saved 0xC9 get features\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp get\-dssd\-async\-event\-config /dev/nvme0 \-s 2 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-get-dssd-async-event-config.html b/Documentation/nvme-ocp-get-dssd-async-event-config.html new file mode 100644 index 0000000..c3d7a96 --- /dev/null +++ b/Documentation/nvme-ocp-get-dssd-async-event-config.html @@ -0,0 +1,853 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-get-dssd-async-event-config(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-get-dssd-async-event-config(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-get-dssd-async-event-config -
+ Get dssd-async-event-config value
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp get-dssd-async-event-config</em> <device> [--sel=<select> | -s <select>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Get dssd-async-event-config.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-s <select>
+</dt>
+<dt class="hdlist1">
+--sel=<select>
+</dt>
+<dd>
+<p>
+ Select (SEL): This field specifies which value of the attributes
+ to return in the provided data:
+</p>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">Select</p></td>
+<td align="left" valign="top"><p class="table">Description</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">Current</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">Default</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">Saved</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">3</p></td>
+<td align="left" valign="top"><p class="table">Supported capabilities</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">4-7</p></td>
+<td align="left" valign="top"><p class="table">Reserved</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a get-dssd-async-event-config to retrieve the saved 0xC9 get features.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp get-dssd-async-event-config /dev/nvme0 -s 2</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-get-dssd-power-state-feature.1 b/Documentation/nvme-ocp-get-dssd-power-state-feature.1 new file mode 100644 index 0000000..b46e431 --- /dev/null +++ b/Documentation/nvme-ocp-get-dssd-power-state-feature.1 @@ -0,0 +1,149 @@ +'\" t +.\" Title: get-dssd-power-state-feature +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "GET\-DSSD\-POWER\-ST" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-get-dssd-power-state-feature \- Get DSSD Power State +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp get\-dssd\-power\-state\-feature\fR <device> + [\-\-sel=<select> | \-S <select>] [\-\-all | \-a] + [\-\-no\-uuid | \-n] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, retrieves OCP DSSD Power State\&. Passing \-\-all calls NVMe Get Feature three times, returning all three of the Current, Default, and Saved values\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-S <select>, \-\-sel=<select> +.RS 4 +Select (SEL): This field specifies which value of the attributes to return in the provided data: +.TS +allbox tab(:); +lt lt +lt lt +lt lt +lt lt +lt lt +lt lt. +T{ +Select +T}:T{ +Description +T} +T{ +0 +T}:T{ +Current +T} +T{ +1 +T}:T{ +Default +T} +T{ +2 +T}:T{ +Saved +T} +T{ +3 +T}:T{ +Supported capabilities +T} +T{ +4\-7 +T}:T{ +Reserved +T} +.TE +.sp 1 +.RE +.PP +\-a, \-\-all +.RS 4 +Print out all 3 values at once \- Current DSSD Power State, Default DSSD Power State, and Saved DSSD Power State +.RE +.PP +\-n, \-\-no\-uuid +.RS 4 +Do not try to automatically detect UUID index for this command (required for old OCP 1\&.0 support) +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a get\-dssd\-power\-state\-feature command to get the Curent DSSD Power State in watts\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp get\-dssd\-power\-state\-feature /dev/nvme0 \-S 0 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a get\-dssd\-power\-state\-feature command to get all three DSSD Power States in watts\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp get\-dssd\-power\-state\-feature /dev/nvme0 \-a +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-get-dssd-power-state-feature.html b/Documentation/nvme-ocp-get-dssd-power-state-feature.html new file mode 100644 index 0000000..4c09df2 --- /dev/null +++ b/Documentation/nvme-ocp-get-dssd-power-state-feature.html @@ -0,0 +1,890 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>get-dssd-power-state-feature(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+get-dssd-power-state-feature(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-get-dssd-power-state-feature -
+ Get DSSD Power State
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp get-dssd-power-state-feature</em> <device>
+ [--sel=<select> | -S <select>] [--all | -a]
+ [--no-uuid | -n]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, retrieves OCP DSSD Power State.
+Passing --all calls NVMe Get Feature three times, returning all three of
+the Current, Default, and Saved values.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-S <select>
+</dt>
+<dt class="hdlist1">
+--sel=<select>
+</dt>
+<dd>
+<p>
+ Select (SEL): This field specifies which value of the attributes
+ to return in the provided data:
+</p>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">Select</p></td>
+<td align="left" valign="top"><p class="table">Description</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">Current</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">Default</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">Saved</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">3</p></td>
+<td align="left" valign="top"><p class="table">Supported capabilities</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">4-7</p></td>
+<td align="left" valign="top"><p class="table">Reserved</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</dd>
+<dt class="hdlist1">
+-a
+</dt>
+<dt class="hdlist1">
+--all
+</dt>
+<dd>
+<p>
+ Print out all 3 values at once - Current DSSD Power State,
+ Default DSSD Power State, and Saved DSSD Power State
+</p>
+</dd>
+<dt class="hdlist1">
+-n
+</dt>
+<dt class="hdlist1">
+--no-uuid
+</dt>
+<dd>
+<p>
+ Do not try to automatically detect UUID index for this command (required
+ for old OCP 1.0 support)
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a get-dssd-power-state-feature command to get the Curent DSSD Power State in watts.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp get-dssd-power-state-feature /dev/nvme0 -S 0</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Has the program issue a get-dssd-power-state-feature command to get all three DSSD Power States in watts.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp get-dssd-power-state-feature /dev/nvme0 -a</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-get-dssd-power-state-feature.txt b/Documentation/nvme-ocp-get-dssd-power-state-feature.txt new file mode 100644 index 0000000..716de05 --- /dev/null +++ b/Documentation/nvme-ocp-get-dssd-power-state-feature.txt @@ -0,0 +1,74 @@ +get-dssd-power-state-feature(1) +=============================== + +NAME +---- +nvme-ocp-get-dssd-power-state-feature - Get DSSD Power State + +SYNOPSIS +-------- +[verse] +'nvme ocp get-dssd-power-state-feature' <device> + [--sel=<select> | -S <select>] [--all | -a] + [--no-uuid | -n] + +DESCRIPTION +----------- +For the NVMe device given, retrieves OCP DSSD Power State. +Passing --all calls NVMe Get Feature three times, returning all three of +the Current, Default, and Saved values. + +The <device> parameter is mandatory and may be either the NVMe character +device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1). + +This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-S <select>:: +--sel=<select>:: + Select (SEL): This field specifies which value of the attributes + to return in the provided data: ++ +[] +|================== +|Select|Description +|0|Current +|1|Default +|2|Saved +|3|Supported capabilities +|4-7|Reserved +|================== + +-a:: +--all:: + Print out all 3 values at once - Current DSSD Power State, + Default DSSD Power State, and Saved DSSD Power State + +-n:: +--no-uuid:: + Do not try to automatically detect UUID index for this command (required + for old OCP 1.0 support) + +EXAMPLES +-------- +* Has the program issue a get-dssd-power-state-feature command to get the Curent DSSD Power State in watts. ++ +------------ +# nvme ocp get-dssd-power-state-feature /dev/nvme0 -S 0 +------------ ++ + +* Has the program issue a get-dssd-power-state-feature command to get all three DSSD Power States in watts. ++ +------------ +# nvme ocp get-dssd-power-state-feature /dev/nvme0 -a +------------ + + +NVME +---- +Part of the nvme-user suite. diff --git a/Documentation/nvme-ocp-get-error-injection.txt b/Documentation/nvme-ocp-get-error-injection.txt new file mode 100644 index 0000000..8061e49 --- /dev/null +++ b/Documentation/nvme-ocp-get-error-injection.txt @@ -0,0 +1,57 @@ +nvme-ocp-get-error-injection(1) +=============================== + +NAME +---- +nvme-ocp-get-error-injection - Return set of error injection + +SYNOPSIS +-------- +[verse] +'nvme ocp get-error-injection' <device> [--no-uuid | -n] + [--sel=<select> | -s <select>] + +DESCRIPTION +----------- +Return set of error injection. + +The <device> parameter is mandatory NVMe character device (ex: /dev/nvme0). + +This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-n:: +--no-uuid:: + Do not try to automatically detect UUID index for this command (required + for old OCP 1.0 support) + +-s <select>:: +--sel=<select>:: + Select (SEL): This field specifies which value of the attributes + to return in the provided data: ++ +[] +|================== +|Select|Description +|0|Current +|1|Default +|2|Saved +|3|Supported capabilities +|4-7|Reserved +|================== + +EXAMPLES +-------- +* Has the program issue a get-error-injection to retrieve the 0xC0 get features. ++ +------------ +# nvme ocp get-error-injection /dev/nvme0 +------------ + +NVME +---- +Part of the nvme-user suite. diff --git a/Documentation/nvme-ocp-get-plp-health-check-interval.1 b/Documentation/nvme-ocp-get-plp-health-check-interval.1 new file mode 100644 index 0000000..8fc1021 --- /dev/null +++ b/Documentation/nvme-ocp-get-plp-health-check-interval.1 @@ -0,0 +1,116 @@ +'\" t +.\" Title: nvme-ocp-get-plp-health-check-interval +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-GET\-PLP\" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-get-plp-health-check-interval \- Define and print plp\-health\-check\-interval value +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp get\-plp\-health\-check\-interval\fR <device> [\-\-sel=<select> | \-s <select>] +.fi +.SH "DESCRIPTION" +.sp +Define plp\-health\-check\-interval\&. No argument prints current mode\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-s <select>, \-\-sel=<select> +.RS 4 +Select (SEL): This field specifies which value of the attributes to return in the provided data: +.TS +allbox tab(:); +lt lt +lt lt +lt lt +lt lt +lt lt +lt lt. +T{ +Select +T}:T{ +Description +T} +T{ +0 +T}:T{ +Current +T} +T{ +1 +T}:T{ +Default +T} +T{ +2 +T}:T{ +Saved +T} +T{ +3 +T}:T{ +Supported capabilities +T} +T{ +4\-7 +T}:T{ +Reserved +T} +.TE +.sp 1 +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a get\-plp\-health\-check\-interval to retrieve the 0xC6 get features\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp get\-plp\-health\-check\-interval /dev/nvme0 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-get-plp-health-check-interval.html b/Documentation/nvme-ocp-get-plp-health-check-interval.html new file mode 100644 index 0000000..f3d70b6 --- /dev/null +++ b/Documentation/nvme-ocp-get-plp-health-check-interval.html @@ -0,0 +1,854 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-get-plp-health-check-interval(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-get-plp-health-check-interval(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-get-plp-health-check-interval -
+ Define and print plp-health-check-interval value
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp get-plp-health-check-interval</em> <device> [--sel=<select> | -s <select>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Define plp-health-check-interval.
+No argument prints current mode.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-s <select>
+</dt>
+<dt class="hdlist1">
+--sel=<select>
+</dt>
+<dd>
+<p>
+ Select (SEL): This field specifies which value of the attributes
+ to return in the provided data:
+</p>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">Select</p></td>
+<td align="left" valign="top"><p class="table">Description</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">Current</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">Default</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">Saved</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">3</p></td>
+<td align="left" valign="top"><p class="table">Supported capabilities</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">4-7</p></td>
+<td align="left" valign="top"><p class="table">Reserved</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a get-plp-health-check-interval to retrieve the 0xC6 get features.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp get-plp-health-check-interval /dev/nvme0</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-get-plp-health-check-interval.txt b/Documentation/nvme-ocp-get-plp-health-check-interval.txt index 7ecd5d5..e72411d 100644 --- a/Documentation/nvme-ocp-get-plp-health-check-interval.txt +++ b/Documentation/nvme-ocp-get-plp-health-check-interval.txt @@ -1,5 +1,5 @@ nvme-ocp-get-plp-health-check-interval(1) -================================ +========================================= NAME ---- diff --git a/Documentation/nvme-ocp-internal-log.1 b/Documentation/nvme-ocp-internal-log.1 new file mode 100644 index 0000000..2badb51 --- /dev/null +++ b/Documentation/nvme-ocp-internal-log.1 @@ -0,0 +1,177 @@ +'\" t +.\" Title: nvme-ocp-internal-log +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-INTERNAL\" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-internal-log \- Conditionally retrieves 07h Telemetry Host\-Initiated log, C9h OCP Strings Log from an NVMe device or from user\-specified file path\&. Takes retrieved logs and decodes into human\-readable output format specified by user\&. +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp internal\-log\fR <device> + [\-\-telemetry\-log=<file> | \-l <file>] + [\-\-string\-log=<file> | \-s <file>] + [\-\-output\-file=<file> | \-o <file>] + [\-\-output\-format=<fmt> | \-f <fmt>] + [\-\-data\-area=<da> | \-a <da>] + [\-\-telemetry\-type=<type> | \-t <type>] +.fi +.SH "DESCRIPTION" +.sp +Conditionally retrieves 07h Telemetry Host\-Initiated log, C9h OCP Strings Log from an NVMe device or from user\-specified file path\&. Takes retrieved logs and decodes (or) parses into human\-readable output format specified by user\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-l <file>, \-\-telemetry\-log=<file> +.RS 4 +File name to existing Telemetry Host\-Initiated raw binary data to be used\&. If no path is specified, a live retrieval of payload on <device> will be performed\&. +.RE +.PP +\-s <file>, \-\-string\-log=<file> +.RS 4 +File name to existing OCP String Log raw binary data to be used\&. If no path is specified, a live retrieval of payload on <device> will be performed\&. +.RE +.PP +\-o <file>, \-\-output\-file=<file> +.RS 4 +Filepath name to where human\-readable output data will be saved to\&. +.RE +.PP +\-f <fmt>, \-\-output\-format=<fmt> +.RS 4 +Set the reporting format to +\fInormal\fR, +\fIjson\fR\&. Only one output format can be used at a time, the default value is +\fIjson\fR\&. +.RE +.PP +\-a <da>, \-\-data\-area=<da> +.RS 4 +Retrieves the specific data area requested\&. Valid inputs are 1,2\&. If this option is not specified, the default value is 1\&. +.RE +.PP +\-t <type>, \-\-telemetry\-type=<type> +.RS 4 +If set to 1, controller shall capture the Telemetry Host\-Initiated data representing the internal state of the controller at the time the associated Get Log Page command is processed\&. If cleared to 0, controller shall not update this data\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Retrieve in both OCP String Log and Telemetry Host\-Initiated Log from device\&. Decode default data\-area(s) in default format and output to console\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp internal\-log /dev/nvme0 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Retrieve Telemetry Host\-Initiated data, reads in the OCP String Log locally\&. Decode default data\-area(s) in default format\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp internal\-log /dev/nvme0 \-\-string\-log=ocp_string_log\&.bin + \-\-output\-file=output_file\&.json +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Retrieve OCP String Log, reads in the Telemetry Host\-Initiated Log locally\&. Decode data\-areas 1 and 2, and output in json format\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp internal\-log /dev/nvme0 \-\-telemetry\-log=host_telemetry\&.bin + \-\-output\-format=json \-\-output\-file=output_file\&.json \-\-data\-area=2 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Reads in both OCP String Log and Telemetry Host\-Initiated Log locally\&. Decode data\-areas 1 and 2, and output in normal text format\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp internal\-log /dev/nvme0 \-\-string\-log=ocp_string_log\&.bin + \-\-telemetry\-log=host_telemetry\&.bin \-\-output\-format=normal + \-\-output\-file=output_file\&.txt \-\-data\-area=2 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite diff --git a/Documentation/nvme-ocp-internal-log.html b/Documentation/nvme-ocp-internal-log.html new file mode 100644 index 0000000..03c1473 --- /dev/null +++ b/Documentation/nvme-ocp-internal-log.html @@ -0,0 +1,925 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-internal-log(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-internal-log(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-internal-log -
+ Conditionally retrieves 07h Telemetry Host-Initiated log, C9h OCP Strings Log from an NVMe device or from user-specified file path. Takes retrieved logs and decodes into human-readable output format specified by user.
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp internal-log</em> <device>
+ [--telemetry-log=<file> | -l <file>]
+ [--string-log=<file> | -s <file>]
+ [--output-file=<file> | -o <file>]
+ [--output-format=<fmt> | -f <fmt>]
+ [--data-area=<da> | -a <da>]
+ [--telemetry-type=<type> | -t <type>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Conditionally retrieves 07h Telemetry Host-Initiated log, C9h OCP Strings Log
+from an NVMe device or from user-specified file path. Takes retrieved logs and
+decodes (or) parses into human-readable output format specified by user.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe
+character device (ex: /dev/nvme0), or a namespace block device (ex:
+/dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-l <file>
+</dt>
+<dt class="hdlist1">
+--telemetry-log=<file>
+</dt>
+<dd>
+<p>
+ File name to existing Telemetry Host-Initiated raw binary data to be used.
+ If no path is specified, a live retrieval of payload on <device> will be
+ performed.
+</p>
+</dd>
+<dt class="hdlist1">
+-s <file>
+</dt>
+<dt class="hdlist1">
+--string-log=<file>
+</dt>
+<dd>
+<p>
+ File name to existing OCP String Log raw binary data to be used. If no path
+ is specified, a live retrieval of payload on <device> will be
+ performed.
+</p>
+</dd>
+<dt class="hdlist1">
+-o <file>
+</dt>
+<dt class="hdlist1">
+--output-file=<file>
+</dt>
+<dd>
+<p>
+ Filepath name to where human-readable output data will be saved to.
+</p>
+</dd>
+<dt class="hdlist1">
+-f <fmt>
+</dt>
+<dt class="hdlist1">
+--output-format=<fmt>
+</dt>
+<dd>
+<p>
+ Set the reporting format to <em>normal</em>, <em>json</em>. Only one output format can be
+ used at a time, the default value is <em>json</em>.
+</p>
+</dd>
+<dt class="hdlist1">
+-a <da>
+</dt>
+<dt class="hdlist1">
+--data-area=<da>
+</dt>
+<dd>
+<p>
+ Retrieves the specific data area requested. Valid inputs are 1,2. If this
+ option is not specified, the default value is 1.
+</p>
+</dd>
+<dt class="hdlist1">
+-t <type>
+</dt>
+<dt class="hdlist1">
+--telemetry-type=<type>
+</dt>
+<dd>
+<p>
+ If set to 1, controller shall capture the Telemetry Host-Initiated data
+ representing the internal state of the controller at the time the associated
+ Get Log Page command is processed. If cleared to 0, controller shall not
+ update this data.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Retrieve in both OCP String Log and Telemetry Host-Initiated Log from
+device. Decode default data-area(s) in default format and output to console.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp internal-log /dev/nvme0</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Retrieve Telemetry Host-Initiated data, reads in the OCP String Log locally.
+Decode default data-area(s) in default format.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin
+ --output-file=output_file.json</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Retrieve OCP String Log, reads in the Telemetry Host-Initiated Log locally.
+Decode data-areas 1 and 2, and output in json format.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp internal-log /dev/nvme0 --telemetry-log=host_telemetry.bin
+ --output-format=json --output-file=output_file.json --data-area=2</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Reads in both OCP String Log and Telemetry Host-Initiated Log locally.
+Decode data-areas 1 and 2, and output in normal text format.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin
+ --telemetry-log=host_telemetry.bin --output-format=normal
+ --output-file=output_file.txt --data-area=2</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-internal-log.txt b/Documentation/nvme-ocp-internal-log.txt new file mode 100644 index 0000000..7393349 --- /dev/null +++ b/Documentation/nvme-ocp-internal-log.txt @@ -0,0 +1,109 @@ +nvme-ocp-internal-log(1) +======================== + +NAME +---- +nvme-ocp-internal-log - Conditionally retrieves 07h Telemetry Host-Initiated +log, C9h OCP Strings Log from an NVMe device or from user-specified file path. +Takes retrieved logs and decodes into human-readable output format specified by +user. + +SYNOPSIS +-------- +[verse] +'nvme ocp internal-log' <device> + [--telemetry-log=<file> | -l <file>] + [--string-log=<file> | -s <file>] + [--output-file=<file> | -o <file>] + [--output-format=<fmt> | -f <fmt>] + [--data-area=<da> | -a <da>] + [--telemetry-type=<type> | -t <type>] + +DESCRIPTION +----------- +Conditionally retrieves 07h Telemetry Host-Initiated log, C9h OCP Strings Log +from an NVMe device or from user-specified file path. Takes retrieved logs and +decodes (or) parses into human-readable output format specified by user. + +The <device> parameter is mandatory and may be either the NVMe +character device (ex: /dev/nvme0), or a namespace block device (ex: +/dev/nvme0n1). + +This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-l <file>:: +--telemetry-log=<file>:: + File name to existing Telemetry Host-Initiated raw binary data to be used. + If no path is specified, a live retrieval of payload on <device> will be + performed. + +-s <file>:: +--string-log=<file>:: + File name to existing OCP String Log raw binary data to be used. If no path + is specified, a live retrieval of payload on <device> will be + performed. + +-o <file>:: +--output-file=<file>:: + Filepath name to where human-readable output data will be saved to. + +-f <fmt>:: +--output-format=<fmt>:: + Set the reporting format to 'normal', 'json'. Only one output format can be + used at a time, the default value is 'json'. + +-a <da>:: +--data-area=<da>:: + Retrieves the specific data area requested. Valid inputs are 1,2. If this + option is not specified, the default value is 1. + +-t <type>:: +--telemetry-type=<type>:: + If set to 1, controller shall capture the Telemetry Host-Initiated data + representing the internal state of the controller at the time the associated + Get Log Page command is processed. If cleared to 0, controller shall not + update this data. + +EXAMPLES +-------- + +* Retrieve in both OCP String Log and Telemetry Host-Initiated Log from +device. Decode default data-area(s) in default format and output to console. ++ +---------------------------------- +# nvme ocp internal-log /dev/nvme0 +---------------------------------- + +* Retrieve Telemetry Host-Initiated data, reads in the OCP String Log locally. +Decode default data-area(s) in default format. ++ +-------------------------------------------------------------------- +# nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin + --output-file=output_file.json +-------------------------------------------------------------------- + +* Retrieve OCP String Log, reads in the Telemetry Host-Initiated Log locally. +Decode data-areas 1 and 2, and output in json format. ++ +--------------------------------------------------------------------- +# nvme ocp internal-log /dev/nvme0 --telemetry-log=host_telemetry.bin + --output-format=json --output-file=output_file.json --data-area=2 +--------------------------------------------------------------------- + +* Reads in both OCP String Log and Telemetry Host-Initiated Log locally. +Decode data-areas 1 and 2, and output in normal text format. ++ +------------------------------------------------------------------ +# nvme ocp internal-log /dev/nvme0 --string-log=ocp_string_log.bin + --telemetry-log=host_telemetry.bin --output-format=normal + --output-file=output_file.txt --data-area=2 +------------------------------------------------------------------ + +NVME +---- +Part of the nvme-user suite diff --git a/Documentation/nvme-ocp-latency-monitor-log.1 b/Documentation/nvme-ocp-latency-monitor-log.1 index 1433343..383a0c6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-OCP\-LATENCY\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-OCP\-LATENCY\-" "1" "08/02/2024" "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 94dd5c1..6155a0f 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-set-dssd-async-event-config.1 b/Documentation/nvme-ocp-set-dssd-async-event-config.1 new file mode 100644 index 0000000..7030837 --- /dev/null +++ b/Documentation/nvme-ocp-set-dssd-async-event-config.1 @@ -0,0 +1,81 @@ +'\" t +.\" Title: nvme-ocp-set-dssd-async-event-config +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-SET\-DSSD" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-set-dssd-async-event-config \- Set DSSD asynchronous event configuration +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp set\-dssd\-async\-event\-config\fR <device> [\-\-enable\-panic\-notices | \-e] [\-\-save | \-s] +.fi +.SH "DESCRIPTION" +.sp +Set DSSD asynchronous event configuration +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-e, \-\-enable\-panic\-notices +.RS 4 +Set enable panic notices [0] +.RE +.PP +\-s, \-\-save +.RS 4 +Save the attribute so that it persists through all power states and resets\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a set\-dssd\-async\-event\-config to enable panic notices, persisting through power states\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp set\-dssd\-async\-event\-config /dev/nvme0 \-e \-s +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-set-dssd-async-event-config.html b/Documentation/nvme-ocp-set-dssd-async-event-config.html new file mode 100644 index 0000000..b726d78 --- /dev/null +++ b/Documentation/nvme-ocp-set-dssd-async-event-config.html @@ -0,0 +1,829 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-set-dssd-async-event-config(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-set-dssd-async-event-config(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-set-dssd-async-event-config -
+ Set DSSD asynchronous event configuration
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp set-dssd-async-event-config</em> <device> [--enable-panic-notices | -e] [--save | -s]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Set DSSD asynchronous event configuration</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-e
+</dt>
+<dt class="hdlist1">
+--enable-panic-notices
+</dt>
+<dd>
+<p>
+ Set enable panic notices [0]
+</p>
+</dd>
+<dt class="hdlist1">
+-s
+</dt>
+<dt class="hdlist1">
+--save
+</dt>
+<dd>
+<p>
+ Save the attribute so that it persists through all power states and resets.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a set-dssd-async-event-config to enable panic notices,
+persisting through power states.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp set-dssd-async-event-config /dev/nvme0 -e -s</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-set-dssd-power-state-feature.1 b/Documentation/nvme-ocp-set-dssd-power-state-feature.1 new file mode 100644 index 0000000..991d4b1 --- /dev/null +++ b/Documentation/nvme-ocp-set-dssd-power-state-feature.1 @@ -0,0 +1,78 @@ +'\" t +.\" Title: set-dssd-power-state-feature +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "SET\-DSSD\-POWER\-ST" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-set-dssd-power-state-feature \- Set DSSD Power State +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp set\-dssd\-power\-state\-feature\fR <device> + [\-\-power\-state=<fmt> | \-p <fmt>] [\-\-no\-uuid | \-n] + [\-\-save | \-s] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, retrieves OCP DSSD Power state Feature +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-p <fmt>, \-\-power\-state=<fmt> +.RS 4 +DSSD Power State to set in watts\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a set\-dssd\-power\-state\-feature command to set DSSD Power State to set in watts\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp set\-dssd\-power\-state\-feature /dev/nvme0 \-p <value> \-s <value> \-n <value> +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-set-dssd-power-state-feature.html b/Documentation/nvme-ocp-set-dssd-power-state-feature.html new file mode 100644 index 0000000..e574361 --- /dev/null +++ b/Documentation/nvme-ocp-set-dssd-power-state-feature.html @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>set-dssd-power-state-feature(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+set-dssd-power-state-feature(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-set-dssd-power-state-feature -
+ Set DSSD Power State
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp set-dssd-power-state-feature</em> <device>
+ [--power-state=<fmt> | -p <fmt>] [--no-uuid | -n]
+ [--save | -s]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, retrieves OCP DSSD Power state Feature</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-p <fmt>
+</dt>
+<dt class="hdlist1">
+--power-state=<fmt>
+</dt>
+<dd>
+<p>
+ DSSD Power State to set in watts.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a set-dssd-power-state-feature command to set DSSD Power State to set in watts.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp set-dssd-power-state-feature /dev/nvme0 -p <value> -s <value> -n <value></code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-set-error-injection.txt b/Documentation/nvme-ocp-set-error-injection.txt new file mode 100644 index 0000000..ee8fcf5 --- /dev/null +++ b/Documentation/nvme-ocp-set-error-injection.txt @@ -0,0 +1,79 @@ +nvme-ocp-set-error-injection(1) +=============================== + +NAME +---- +nvme-ocp-set-error-injection - Inject error conditions + +SYNOPSIS +-------- +[verse] +'nvme ocp set-error-injection' <device> [--data=<file> | -d <file>] + [--number=<num> | -n <num>] [--no-uuid | -N] + [--type=<type> | -t <type>] [--nrtdp=<num> | -r <num>] + [--verbose | -v] [--output-format=<fmt> | -o <fmt>] + [--timeout=<timeout>] + +DESCRIPTION +----------- +Inject error conditions. + +The <device> parameter is mandatory NVMe character device (ex: /dev/nvme0). + +This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-d <file>:: +--data=<file>:: + Error injection data structure entries + +-n <num>:: +--number=<num>:: + Number of valid error injection data entries + +-N:: +--no-uuid:: + Do not try to automatically detect UUID index for this command (required + for old OCP 1.0 support) + +-t <type>:: +--type=<type>:: + Error injection type + +-r <num>:: +--nrtdp=<num>:: + Number of reads to trigger device panic + +-v:: +--verbose:: + Increase the information detail in the output. + +-o <fmt>:: +--output-format=<fmt>:: + Set the reporting format to 'normal', 'json' or 'binary'. Only one + output format can be used at a time. + +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + +EXAMPLES +-------- +* Has the program issue a set-error-injection with the 2 entries data file. ++ +------------ +# nvme ocp set-error-injection /dev/nvme0 -d data.bin -n 2 +------------ + +* Has the program issue a set-error-injection with the 5 reads trigger NAND hang. ++ +------------ +# nvme ocp set-error-injection /dev/nvme0 -t 2 -r 5 +------------ + +NVME +---- +Part of the nvme-user suite. diff --git a/Documentation/nvme-ocp-set-plp-health-check-interval.1 b/Documentation/nvme-ocp-set-plp-health-check-interval.1 new file mode 100644 index 0000000..4f65e56 --- /dev/null +++ b/Documentation/nvme-ocp-set-plp-health-check-interval.1 @@ -0,0 +1,86 @@ +'\" t +.\" Title: nvme-ocp-set-plp-health-check-interval +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-SET\-PLP\" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-set-plp-health-check-interval \- Define and set PLP health check interval +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp set\-plp\-health\-check\-interval\fR <device> [\-\-plp_health_interval=<plp_health_interval> | \-p <plp_health_interval>] [\-\-save | \-s] [\-\-no\-uuid | \-n] +.fi +.SH "DESCRIPTION" +.sp +Define Set PLP health check interval\&. No argument prints current mode\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-p <plp_health_interval>, \-\-plp_health_interval=<plp_health_interval> +.RS 4 +Set the plp health check interval [31:16] +.RE +.PP +\-n, \-\-no\-uuid +.RS 4 +Do not try to automatically detect UUID index for this command (required for old OCP 1\&.0 support) +.RE +.PP +\-s, \-\-save +.RS 4 +Save the attribute so that it persists through all power states and resets\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a set\-plp\-health\-check\-interval to retrieve the 0xC6 set features\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp eol\-plp\-failure\-mode /dev/nvme0 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-set-plp-health-check-interval.html b/Documentation/nvme-ocp-set-plp-health-check-interval.html new file mode 100644 index 0000000..fb9fe70 --- /dev/null +++ b/Documentation/nvme-ocp-set-plp-health-check-interval.html @@ -0,0 +1,841 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-set-plp-health-check-interval(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-set-plp-health-check-interval(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-set-plp-health-check-interval -
+ Define and set PLP health check interval
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp set-plp-health-check-interval</em> <device> [--plp_health_interval=<plp_health_interval> | -p <plp_health_interval>] [--save | -s] [--no-uuid | -n]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Define Set PLP health check interval.
+No argument prints current mode.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-p <plp_health_interval>
+</dt>
+<dt class="hdlist1">
+--plp_health_interval=<plp_health_interval>
+</dt>
+<dd>
+<p>
+ Set the plp health check interval [31:16]
+</p>
+</dd>
+<dt class="hdlist1">
+-n
+</dt>
+<dt class="hdlist1">
+--no-uuid
+</dt>
+<dd>
+<p>
+ Do not try to automatically detect UUID index for this command (required
+ for old OCP 1.0 support)
+</p>
+</dd>
+<dt class="hdlist1">
+-s
+</dt>
+<dt class="hdlist1">
+--save
+</dt>
+<dd>
+<p>
+ Save the attribute so that it persists through all power states and resets.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a set-plp-health-check-interval to retrieve the 0xC6 set features.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp eol-plp-failure-mode /dev/nvme0</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-set-plp-health-check-interval.txt b/Documentation/nvme-ocp-set-plp-health-check-interval.txt index ac3acb3..c53c219 100644 --- a/Documentation/nvme-ocp-set-plp-health-check-interval.txt +++ b/Documentation/nvme-ocp-set-plp-health-check-interval.txt @@ -1,5 +1,5 @@ nvme-ocp-set-plp-health-check-interval(1) -================================ +========================================= NAME ---- diff --git a/Documentation/nvme-ocp-set-telemetry-profile.1 b/Documentation/nvme-ocp-set-telemetry-profile.1 new file mode 100644 index 0000000..020d38a --- /dev/null +++ b/Documentation/nvme-ocp-set-telemetry-profile.1 @@ -0,0 +1,77 @@ +'\" t +.\" Title: nvme-ocp-set-telemetry-profile +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-SET\-TELE" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-set-telemetry-profile \- Set Telemetry Profile +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp set\-telemetry\-profile\fR <device> + [\-\-telemetry\-profile\-select=<tps> | \-t <tps>] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, sets the OCP Set Telemetry Profile Feature +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-t <tps>, \-\-tps=<tps> +.RS 4 +Telemetry Profile Select\&. The device shall collect debug data per the specified profile number\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a set\-telemetry\-profile command to use profile five\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp set\-telemetry\-profile /dev/nvme0 \-t 5 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-set-telemetry-profile.html b/Documentation/nvme-ocp-set-telemetry-profile.html new file mode 100644 index 0000000..9fff1ac --- /dev/null +++ b/Documentation/nvme-ocp-set-telemetry-profile.html @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-set-telemetry-profile(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-set-telemetry-profile(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-set-telemetry-profile -
+ Set Telemetry Profile
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp set-telemetry-profile</em> <device>
+ [--telemetry-profile-select=<tps> | -t <tps>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, sets the OCP Set Telemetry Profile Feature</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-t <tps>
+</dt>
+<dt class="hdlist1">
+--tps=<tps>
+</dt>
+<dd>
+<p>
+ Telemetry Profile Select. The device shall collect debug data per the
+ specified profile number.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a set-telemetry-profile command to use profile five.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp set-telemetry-profile /dev/nvme0 -t 5</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-smart-add-log.1 b/Documentation/nvme-ocp-smart-add-log.1 index 354718c..ce480cf 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-OCP\-SMART\-AD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-OCP\-SMART\-AD" "1" "08/02/2024" "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 73c7a14..e9d39af 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-ocp-tcg-configuration-log.html b/Documentation/nvme-ocp-tcg-configuration-log.html new file mode 100644 index 0000000..56331de --- /dev/null +++ b/Documentation/nvme-ocp-tcg-configuration-log.html @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> +<meta name="generator" content="AsciiDoc 10.2.0" /> +<title>nvme-ocp-tcg-configuration-log(1)</title> +<style type="text/css"> +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +.monospaced, code, pre { + font-family: "Courier New", Courier, monospace; + font-size: inherit; + color: navy; + padding: 0; + margin: 0; +} +pre { + white-space: pre-wrap; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #888; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; vertical-align: text-bottom; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + +div.unbreakable { page-break-inside: avoid; } + + +/* + * xhtml11 specific + * + * */ + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overridden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} + + +</style> +<script type="text/javascript"> +/*<![CDATA[*/ +var asciidoc = { // Namespace. + +///////////////////////////////////////////////////////////////////// +// Table Of Contents generator +///////////////////////////////////////////////////////////////////// + +/* Author: Mihai Bazon, September 2002 + * http://students.infoiasi.ro/~mishoo + * + * Table Of Content generator + * Version: 0.4 + * + * Feel free to use this script under the terms of the GNU General Public + * License, as long as you do not remove or alter this notice. + */ + + /* modified by Troy D. Hanson, September 2006. License: GPL */ + /* modified by Stuart Rackham, 2006, 2009. License: GPL */ + +// toclevels = 1..4. +toc: function (toclevels) { + + function getText(el) { + var text = ""; + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. + text += i.data; + else if (i.firstChild != null) + text += getText(i); + } + return text; + } + + function TocEntry(el, text, toclevel) { + this.element = el; + this.text = text; + this.toclevel = toclevel; + } + + function tocEntries(el, toclevels) { + var result = new Array; + var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); + // Function that scans the DOM tree for header elements (the DOM2 + // nodeIterator API would be a better technique but not supported by all + // browsers). + var iterate = function (el) { + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { + var mo = re.exec(i.tagName); + if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { + result[result.length] = new TocEntry(i, getText(i), mo[1]-1); + } + iterate(i); + } + } + } + iterate(el); + return result; + } + + var toc = document.getElementById("toc"); + if (!toc) { + return; + } + + // Delete existing TOC entries in case we're reloading the TOC. + var tocEntriesToRemove = []; + var i; + for (i = 0; i < toc.childNodes.length; i++) { + var entry = toc.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' + && entry.getAttribute("class") + && entry.getAttribute("class").match(/^toclevel/)) + tocEntriesToRemove.push(entry); + } + for (i = 0; i < tocEntriesToRemove.length; i++) { + toc.removeChild(tocEntriesToRemove[i]); + } + + // Rebuild TOC entries. + var entries = tocEntries(document.getElementById("content"), toclevels); + for (var i = 0; i < entries.length; ++i) { + var entry = entries[i]; + if (entry.element.id == "") + entry.element.id = "_toc_" + i; + var a = document.createElement("a"); + a.href = "#" + entry.element.id; + a.appendChild(document.createTextNode(entry.text)); + var div = document.createElement("div"); + div.appendChild(a); + div.className = "toclevel" + entry.toclevel; + toc.appendChild(div); + } + if (entries.length == 0) + toc.parentNode.removeChild(toc); +}, + + +///////////////////////////////////////////////////////////////////// +// Footnotes generator +///////////////////////////////////////////////////////////////////// + +/* Based on footnote generation code from: + * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html + */ + +footnotes: function () { + // Delete existing footnote entries in case we're reloading the footnodes. + var i; + var noteholder = document.getElementById("footnotes"); + if (!noteholder) { + return; + } + var entriesToRemove = []; + for (i = 0; i < noteholder.childNodes.length; i++) { + var entry = noteholder.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") + entriesToRemove.push(entry); + } + for (i = 0; i < entriesToRemove.length; i++) { + noteholder.removeChild(entriesToRemove[i]); + } + + // Rebuild footnote entries. + var cont = document.getElementById("content"); + var spans = cont.getElementsByTagName("span"); + var refs = {}; + var n = 0; + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnote") { + n++; + var note = spans[i].getAttribute("data-note"); + if (!note) { + // Use [\s\S] in place of . so multi-line matches work. + // Because JavaScript has no s (dotall) regex flag. + note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; + spans[i].innerHTML = + "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + spans[i].setAttribute("data-note", note); + } + noteholder.innerHTML += + "<div class='footnote' id='_footnote_" + n + "'>" + + "<a href='#_footnoteref_" + n + "' title='Return to text'>" + + n + "</a>. " + note + "</div>"; + var id =spans[i].getAttribute("id"); + if (id != null) refs["#"+id] = n; + } + } + if (n == 0) + noteholder.parentNode.removeChild(noteholder); + else { + // Process footnoterefs. + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnoteref") { + var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); + href = href.match(/#.*/)[0]; // Because IE return full URL. + n = refs[href]; + spans[i].innerHTML = + "[<a href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + } + } + } +}, + +install: function(toclevels) { + var timerId; + + function reinstall() { + asciidoc.footnotes(); + if (toclevels) { + asciidoc.toc(toclevels); + } + } + + function reinstallAndRemoveTimer() { + clearInterval(timerId); + reinstall(); + } + + timerId = setInterval(reinstall, 500); + if (document.addEventListener) + document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); + else + window.onload = reinstallAndRemoveTimer; +} + +} +asciidoc.install(); +/*]]>*/ +</script> +</head> +<body class="manpage"> +<div id="header"> +<h1> +nvme-ocp-tcg-configuration-log(1) Manual Page +</h1> +<h2>NAME</h2> +<div class="sectionbody"> +<p>nvme-ocp-tcg-configuration-log - + Retrieves tcg configuration of given OCP compliant device +</p> +</div> +</div> +<div id="content"> +<div class="sect1"> +<h2 id="_synopsis">SYNOPSIS</h2> +<div class="sectionbody"> +<div class="verseblock"> +<pre class="content"><em>nvme ocp tcg-configuration-log</em> <device> [--output-format=<fmt> | -o <fmt>]</pre> +<div class="attribution"> +</div></div> +</div> +</div> +<div class="sect1"> +<h2 id="_description">DESCRIPTION</h2> +<div class="sectionbody"> +<div class="paragraph"><p>For the NVMe device given, send a tcg-configuration-log command and +provide the tcg configuration log.</p></div> +<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character +device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div> +<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined.</p></div> +<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_options">OPTIONS</h2> +<div class="sectionbody"> +<div class="dlist"><dl> +<dt class="hdlist1"> +-o <fmt> +</dt> +<dt class="hdlist1"> +--output-format=<fmt> +</dt> +<dd> +<p> + Set the reporting format to <em>normal</em> or <em>json</em>. Only one output format + can be used at a time. The default is normal. +</p> +</dd> +</dl></div> +</div> +</div> +<div class="sect1"> +<h2 id="_examples">EXAMPLES</h2> +<div class="sectionbody"> +<div class="ulist"><ul> +<li> +<p> +Has the program issue a tcg-configuration-log command to retrieve the 0xC7 log page. +</p> +<div class="listingblock"> +<div class="content"> +<pre><code># nvme ocp tcg-configuration-log /dev/nvme0</code></pre> +</div></div> +</li> +</ul></div> +</div> +</div> +<div class="sect1"> +<h2 id="_nvme">NVME</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Part of the nvme-user suite.</p></div> +</div> +</div> +</div> +<div id="footnotes"><hr /></div> +<div id="footer"> +<div id="footer-text"> +Last updated + 2023-12-21 15:49:29 CET +</div> +</div> +</body> +</html> diff --git a/Documentation/nvme-ocp-tcg-configuration-log.txt b/Documentation/nvme-ocp-tcg-configuration-log.txt new file mode 100644 index 0000000..41312ea --- /dev/null +++ b/Documentation/nvme-ocp-tcg-configuration-log.txt @@ -0,0 +1,44 @@ +nvme-ocp-tcg-configuration-log(1) +========================= + +NAME +---- +nvme-ocp-tcg-configuration-log - Retrieves tcg configuration of given OCP +compliant device + +SYNOPSIS +-------- +[verse] +'nvme ocp tcg-configuration-log' <device> [--output-format=<fmt> | -o <fmt>] + +DESCRIPTION +----------- +For the NVMe device given, send a tcg-configuration-log command and +provide the tcg configuration log. + +The <device> parameter is mandatory and may be either the NVMe character +device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1). + +This will only work on OCP compliant devices supporting this feature. +Results for any other device are undefined. + +On success it returns 0, error code otherwise. + +OPTIONS +------- +-o <fmt>:: +--output-format=<fmt>:: + Set the reporting format to 'normal' or 'json'. Only one output format + can be used at a time. The default is normal. + +EXAMPLES +-------- +* Has the program issue a tcg-configuration-log command to retrieve the 0xC7 log page. ++ +------------ +# nvme ocp tcg-configuration-log /dev/nvme0 +------------ + +NVME +---- +Part of the nvme-user suite. diff --git a/Documentation/nvme-ocp-telemetry-string-log-page.1 b/Documentation/nvme-ocp-telemetry-string-log-page.1 new file mode 100644 index 0000000..cb2c14b --- /dev/null +++ b/Documentation/nvme-ocp-telemetry-string-log-page.1 @@ -0,0 +1,76 @@ +'\" t +.\" Title: nvme-ocp-telemetry-string-log-page +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-TELEMETRY" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-telemetry-string-log-page \- Retrieve OCP Telemetry String Log page +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp telemetry\-str\-log\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, Retrieve OCP Telemetry String Log page +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-o <fmt>, \-\-output\-format=<fmt> +.RS 4 +This option will set the reporting format to normal, json, or binary\&. Only one output format can be used at a time\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a telemetry\-string\-log command to get the log page data from bin file\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp telemetry\-string\-log /dev/nvme0n1 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite\&. diff --git a/Documentation/nvme-ocp-telemetry-string-log-page.html b/Documentation/nvme-ocp-telemetry-string-log-page.html new file mode 100644 index 0000000..c67135e --- /dev/null +++ b/Documentation/nvme-ocp-telemetry-string-log-page.html @@ -0,0 +1,818 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-telemetry-string-log-page(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-telemetry-string-log-page(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-telemetry-string-log-page -
+ Retrieve OCP Telemetry String Log page
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp telemetry-str-log</em> <device> [--output-format=<fmt> | -o <fmt>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, Retrieve OCP Telemetry String Log page</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-o <fmt>
+</dt>
+<dt class="hdlist1">
+--output-format=<fmt>
+</dt>
+<dd>
+<p>
+ This option will set the reporting format to normal, json, or binary.
+ Only one output format can be used at a time.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a telemetry-string-log command to get the log page data from bin file.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp telemetry-string-log /dev/nvme0n1</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-unsupported-reqs-log-pages.html b/Documentation/nvme-ocp-unsupported-reqs-log-pages.html new file mode 100644 index 0000000..ccf7dd8 --- /dev/null +++ b/Documentation/nvme-ocp-unsupported-reqs-log-pages.html @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-ocp-unsupported-reqs-log(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-ocp-unsupported-reqs-log(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-ocp-unsupported-reqs-log -
+ Retrieves unsupported requirements log page of given OCP compliant device
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme ocp unsupported-reqs-log</em> <device> [--output-format=<fmt> | -o <fmt>]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>For the NVMe device given, send a unsupported-reqs-log command and
+provide the unsupported requirements log page.</p></div>
+<div class="paragraph"><p>The <device> parameter is mandatory and may be either the NVMe character
+device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1).</p></div>
+<div class="paragraph"><p>This will only work on OCP compliant devices supporting this feature.
+Results for any other device are undefined.</p></div>
+<div class="paragraph"><p>On success it returns 0, error code otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-o <fmt>
+</dt>
+<dt class="hdlist1">
+--output-format=<fmt>
+</dt>
+<dd>
+<p>
+ This option will set the reporting format to normal, json, or binary.
+ Only one output format can be used at a time.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Has the program issue a unsupported-reqs-log command to retrieve the 0xC5 log page.
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme ocp unsupported-reqs-log /dev/nvme0</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-ocp-unsupported-reqs-log-pages.txt b/Documentation/nvme-ocp-unsupported-reqs-log-pages.txt index 1657f6a..3eecf60 100644 --- a/Documentation/nvme-ocp-unsupported-reqs-log-pages.txt +++ b/Documentation/nvme-ocp-unsupported-reqs-log-pages.txt @@ -1,10 +1,9 @@ -unsupported-reqs-log -==================== +nvme-ocp-unsupported-reqs-log(1) +================================ NAME ---- -unsupported-reqs-log - Retrieves unsupported requirements log page of given OCP -compliant device +nvme-ocp-unsupported-reqs-log - Retrieves unsupported requirements log page of given OCP compliant device SYNOPSIS -------- @@ -42,4 +41,4 @@ EXAMPLES NVME ---- -Part of the nvme-user suite
\ No newline at end of file +Part of the nvme-user suite diff --git a/Documentation/nvme-ocp-unsupported-reqs-log.1 b/Documentation/nvme-ocp-unsupported-reqs-log.1 new file mode 100644 index 0000000..e3d633c --- /dev/null +++ b/Documentation/nvme-ocp-unsupported-reqs-log.1 @@ -0,0 +1,76 @@ +'\" t +.\" Title: nvme-ocp-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: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-OCP\-UNSUPPORT" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-ocp-unsupported-reqs-log \- Retrieves unsupported requirements log page of given OCP compliant device +.SH "SYNOPSIS" +.sp +.nf +\fInvme ocp unsupported\-reqs\-log\fR <device> [\-\-output\-format=<fmt> | \-o <fmt>] +.fi +.SH "DESCRIPTION" +.sp +For the NVMe device given, send a unsupported\-reqs\-log command and provide the unsupported requirements log page\&. +.sp +The <device> parameter is mandatory and may be either the NVMe character device (ex: /dev/nvme0) or block device (ex: /dev/nvme0n1)\&. +.sp +This will only work on OCP compliant devices supporting this feature\&. Results for any other device are undefined\&. +.sp +On success it returns 0, error code otherwise\&. +.SH "OPTIONS" +.PP +\-o <fmt>, \-\-output\-format=<fmt> +.RS 4 +This option will set the reporting format to normal, json, or binary\&. Only one output format can be used at a time\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Has the program issue a unsupported\-reqs\-log command to retrieve the 0xC5 log page\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme ocp unsupported\-reqs\-log /dev/nvme0 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite diff --git a/Documentation/nvme-persistent-event-log.1 b/Documentation/nvme-persistent-event-log.1 index 035efcf..15db44b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "PERSISTENT\-EVENT\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "PERSISTENT\-EVENT\-L" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-persistent-event-log.html b/Documentation/nvme-persistent-event-log.html index 5059770..8b2b765 100644 --- a/Documentation/nvme-persistent-event-log.html +++ b/Documentation/nvme-persistent-event-log.html @@ -877,7 +877,7 @@ Print the raw persistent event log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 3119771..a534b44 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-PRED\-LAT\-EVE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-PRED\-LAT\-EVE" "1" "08/02/2024" "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 bfdba6e..bf098fe 100644 --- a/Documentation/nvme-pred-lat-event-agg-log.html +++ b/Documentation/nvme-pred-lat-event-agg-log.html @@ -864,7 +864,7 @@ Print the raw Predictable Latency Event Aggregate log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-predictable-lat-log.1 b/Documentation/nvme-predictable-lat-log.1 index 9dce5f8..d58b42a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-PREDICTABLE\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-PREDICTABLE\-L" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-predictable-lat-log.html b/Documentation/nvme-predictable-lat-log.html index cacd2b2..eb6e97f 100644 --- a/Documentation/nvme-predictable-lat-log.html +++ b/Documentation/nvme-predictable-lat-log.html @@ -861,7 +861,7 @@ Print the raw Predictable latency per NVM set log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-primary-ctrl-caps.1 b/Documentation/nvme-primary-ctrl-caps.1 index 6746009..f30f05b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-PRIMARY\-CTRL\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-PRIMARY\-CTRL\" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-primary-ctrl-caps.html b/Documentation/nvme-primary-ctrl-caps.html index 7ad2609..a532e5a 100644 --- a/Documentation/nvme-primary-ctrl-caps.html +++ b/Documentation/nvme-primary-ctrl-caps.html @@ -846,7 +846,7 @@ fields in a human readable format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-read.1 b/Documentation/nvme-read.1 index 1d4a002..7f81950 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-READ" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-READ" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,6 +49,7 @@ nvme-read \- Send an NVMe Read command, provide results [\-\-storage\-tag<storage\-tag> | \-g <storage\-tag>] [\-\-storage\-tag\-check | \-C] [\-\-force] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -206,6 +207,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-read.html b/Documentation/nvme-read.html index 1a2ef57..4b1dec7 100644 --- a/Documentation/nvme-read.html +++ b/Documentation/nvme-read.html @@ -765,7 +765,8 @@ nvme-read(1) Manual Page [--show-command | -V] [--dry-run | -w] [--latency | -t]
[--storage-tag<storage-tag> | -g <storage-tag>]
[--storage-tag-check | -C] [--force]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -1067,6 +1068,14 @@ metadata is passes.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1087,7 +1096,7 @@ metadata is passes.</p></td> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-read.txt b/Documentation/nvme-read.txt index cecaa71..4054113 100644 --- a/Documentation/nvme-read.txt +++ b/Documentation/nvme-read.txt @@ -25,6 +25,7 @@ SYNOPSIS [--storage-tag<storage-tag> | -g <storage-tag>] [--storage-tag-check | -C] [--force] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -149,6 +150,9 @@ metadata is passes. --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-reset.1 b/Documentation/nvme-reset.1 index 0e871df..da43547 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESET" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESET" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-reset.html b/Documentation/nvme-reset.html index 7a0a9d1..e72e6ae 100644 --- a/Documentation/nvme-reset.html +++ b/Documentation/nvme-reset.html @@ -818,7 +818,7 @@ Resets the controller. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-acquire.1 b/Documentation/nvme-resv-acquire.1 index 8967d2a..807c7c2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESV\-ACQUIRE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESV\-ACQUIRE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,6 +38,7 @@ nvme-resv-acquire \- Acquire an nvme reservation [\-\-rtype=<rtype> | \-t <rtype>] [\-\-racqa=<racqa> | \-a <racqa>] [\-\-iekey | \-i] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -183,6 +184,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet diff --git a/Documentation/nvme-resv-acquire.html b/Documentation/nvme-resv-acquire.html index 5571095..f340d14 100644 --- a/Documentation/nvme-resv-acquire.html +++ b/Documentation/nvme-resv-acquire.html @@ -754,7 +754,8 @@ nvme-resv-acquire(1) Manual Page [--prkey=<prkey> | -p <prkey>]
[--rtype=<rtype> | -t <rtype>]
[--racqa=<racqa> | -a <racqa>] [--iekey | -i]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -951,6 +952,14 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -971,7 +980,7 @@ cellspacing="0" cellpadding="4"> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-acquire.txt b/Documentation/nvme-resv-acquire.txt index 19282c6..63af195 100644 --- a/Documentation/nvme-resv-acquire.txt +++ b/Documentation/nvme-resv-acquire.txt @@ -14,6 +14,7 @@ SYNOPSIS [--rtype=<rtype> | -t <rtype>] [--racqa=<racqa> | -a <racqa>] [--iekey | -i] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -92,6 +93,9 @@ Indicator option, defaults to '0'. --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet diff --git a/Documentation/nvme-resv-notif-log.1 b/Documentation/nvme-resv-notif-log.1 index 4e7a5e5..4462df0 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESV\-NOTIF\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESV\-NOTIF\-L" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-resv-notif-log.html b/Documentation/nvme-resv-notif-log.html index 25cc838..b39e9ea 100644 --- a/Documentation/nvme-resv-notif-log.html +++ b/Documentation/nvme-resv-notif-log.html @@ -833,7 +833,7 @@ Print the output in json format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-register.1 b/Documentation/nvme-resv-register.1 index 4bd8b8f..c637055 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESV\-REGISTER" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESV\-REGISTER" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,6 +38,7 @@ nvme-resv-register \- Register an nvme reservation [\-\-rrega=<rrega> | \-r <rrega>] [\-\-cptpl=<cptpl> | \-p <cptpl>] [\-\-iekey | \-i] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -159,6 +160,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet diff --git a/Documentation/nvme-resv-register.html b/Documentation/nvme-resv-register.html index 8ebc682..2390da5 100644 --- a/Documentation/nvme-resv-register.html +++ b/Documentation/nvme-resv-register.html @@ -754,7 +754,8 @@ nvme-resv-register(1) Manual Page [--nrkey=<nrkey> | -k <nrkey>]
[--rrega=<rrega> | -r <rrega>]
[--cptpl=<cptpl> | -p <cptpl>] [--iekey | -i]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -940,6 +941,17 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -960,7 +972,7 @@ cellspacing="0" cellpadding="4"> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-register.txt b/Documentation/nvme-resv-register.txt index 4a83050..2368504 100644 --- a/Documentation/nvme-resv-register.txt +++ b/Documentation/nvme-resv-register.txt @@ -14,6 +14,7 @@ SYNOPSIS [--rrega=<rrega> | -r <rrega>] [--cptpl=<cptpl> | -p <cptpl>] [--iekey | -i] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -93,6 +94,10 @@ Indicator option, defaults to '0'. --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet diff --git a/Documentation/nvme-resv-release.1 b/Documentation/nvme-resv-release.1 index efa7da3..aa96945 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESV\-RELEASE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESV\-RELEASE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,6 +37,7 @@ nvme-resv-release \- Release an nvme reservation [\-\-rtype=<rtype> | \-t <rtype>] [\-\-rrela=<rrela> | \-a <rrela>] [\-\-iekey | \-i] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -171,6 +172,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet diff --git a/Documentation/nvme-resv-release.html b/Documentation/nvme-resv-release.html index 9b44606..b3b10e3 100644 --- a/Documentation/nvme-resv-release.html +++ b/Documentation/nvme-resv-release.html @@ -753,7 +753,8 @@ nvme-resv-release(1) Manual Page [--crkey=<crkey> | -c <crkey>]
[--rtype=<rtype> | -t <rtype>]
[--rrela=<rrela> | -a <rrela>] [--iekey | -i]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -933,6 +934,14 @@ cellspacing="0" cellpadding="4"> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -953,7 +962,7 @@ cellspacing="0" cellpadding="4"> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-release.txt b/Documentation/nvme-resv-release.txt index c3dc90d..2d859a3 100644 --- a/Documentation/nvme-resv-release.txt +++ b/Documentation/nvme-resv-release.txt @@ -13,6 +13,7 @@ SYNOPSIS [--rtype=<rtype> | -t <rtype>] [--rrela=<rrela> | -a <rrela>] [--iekey | -i] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -84,6 +85,9 @@ Indicator option, defaults to '0'. --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet diff --git a/Documentation/nvme-resv-report.1 b/Documentation/nvme-resv-report.1 index ae74f7c..bc94471 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RESV\-REPORT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RESV\-REPORT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,6 +36,7 @@ nvme-resv-report \- Send NVMe Reservation Report, parse the result [\-\-numd=<num\-dwords> | \-d <num\-dwords>] [\-\-eds | \-e] [\-\-raw\-binary | \-b] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -78,6 +79,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-resv-report.html b/Documentation/nvme-resv-report.html index 7f85198..d4bfabc 100644 --- a/Documentation/nvme-resv-report.html +++ b/Documentation/nvme-resv-report.html @@ -752,7 +752,8 @@ nvme-resv-report(1) Manual Page <pre class="content"><em>nvme resv-report</em> <device> [--namespace-id=<nsid> | -n <nsid>]
[--numd=<num-dwords> | -d <num-dwords>] [--eds | -e]
[--raw-binary | -b]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -845,6 +846,17 @@ Controller data structure for each such controller).</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -865,7 +877,7 @@ Controller data structure for each such controller).</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-resv-report.txt b/Documentation/nvme-resv-report.txt index 2e12826..bfc5f5f 100644 --- a/Documentation/nvme-resv-report.txt +++ b/Documentation/nvme-resv-report.txt @@ -12,6 +12,7 @@ SYNOPSIS [--numd=<num-dwords> | -d <num-dwords>] [--eds | -e] [--raw-binary | -b] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -56,6 +57,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-rpmb.1 b/Documentation/nvme-rpmb.1 index bac244e..ef6fd99 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-RPMB" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-RPMB" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-rpmb.html b/Documentation/nvme-rpmb.html index d11772c..46f6b5b 100644 --- a/Documentation/nvme-rpmb.html +++ b/Documentation/nvme-rpmb.html @@ -1024,7 +1024,7 @@ data onto output.bin <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-sanitize-log.1 b/Documentation/nvme-sanitize-log.1 index bd45bed..afbe322 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SANITIZE\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SANITIZE\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-sanitize-log.html b/Documentation/nvme-sanitize-log.html index d5074e7..41d2e12 100644 --- a/Documentation/nvme-sanitize-log.html +++ b/Documentation/nvme-sanitize-log.html @@ -903,7 +903,7 @@ Has the program issue Sanitize-log Command : <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-sanitize.1 b/Documentation/nvme-sanitize.1 index 945a98c..18dc142 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SANITIZE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SANITIZE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-sanitize.html b/Documentation/nvme-sanitize.html index c4f19d4..d67d6c4 100644 --- a/Documentation/nvme-sanitize.html +++ b/Documentation/nvme-sanitize.html @@ -960,7 +960,7 @@ Has the program issue Sanitize Command : <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 c800caf..d5c4c7d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-CLEAR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-CLEAR" "1" "08/02/2024" "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 ec6f0ae..df962d3 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 d316f98..88c2aa7 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-CLEAR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-CLEAR" "1" "08/02/2024" "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 bbfa6ea..3803032 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 3a25d20..9f3d024 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-CLOUD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-CLOUD" "1" "08/02/2024" "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 0ce76a1..604cd6b 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-get-ctrl-tele.1 b/Documentation/nvme-seagate-get-ctrl-tele.1 index 16aa347..531fd92 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-GET\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-GET\-" "1" "08/02/2024" "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 c29bcd4..db21dc8 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-get-host-tele.1 b/Documentation/nvme-seagate-get-host-tele.1 index f97752c..4115162 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-GET\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-GET\-" "1" "08/02/2024" "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 0aa20a4..f6142e3 100644 --- a/Documentation/nvme-seagate-get-host-tele.html +++ b/Documentation/nvme-seagate-get-host-tele.html @@ -826,7 +826,7 @@ commands work across all product families.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-help.1 b/Documentation/nvme-seagate-help.1 index 5dc4755..ace1390 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-HELP" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-HELP" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-seagate-help.html b/Documentation/nvme-seagate-help.html index 997cdd8..6a2e1e3 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-plugin-version.1 b/Documentation/nvme-seagate-plugin-version.1 index f0f5ab8..826995e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-PLUGI" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-PLUGI" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-seagate-plugin-version.html b/Documentation/nvme-seagate-plugin-version.html index b0adb8c..8c0aad4 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-version.1 b/Documentation/nvme-seagate-version.1 index 9792495..4667dcb 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VERSI" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VERSI" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-seagate-version.html b/Documentation/nvme-seagate-version.html index 7ad801a..1f5ef6d 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 938b2a4..ecf1c02 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-F" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-F" "1" "08/02/2024" "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 e8fbb7f..0fd29fe 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-internal-log.1 b/Documentation/nvme-seagate-vs-internal-log.1 index af85939..eee0dce 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-I" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-I" "1" "08/02/2024" "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 d7d3e9c..5cec2a7 100644 --- a/Documentation/nvme-seagate-vs-internal-log.html +++ b/Documentation/nvme-seagate-vs-internal-log.html @@ -814,7 +814,7 @@ specified device.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 811a82f..1aff60a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-L" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-L" "1" "08/02/2024" "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 d6aba9d..133b179 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-pcie-stats.1 b/Documentation/nvme-seagate-vs-pcie-stats.1 index d971dfc..097e057 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-P" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-P" "1" "08/02/2024" "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 91e8ea2..7b249bd 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 537c3a3..a2c9cb2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-S" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-S" "1" "08/02/2024" "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 5ba2e6d..f4864af 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-seagate-vs-temperature-stats.1 b/Documentation/nvme-seagate-vs-temperature-stats.1 index bd935b0..86c67df 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SEAGATE\-VS\-T" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SEAGATE\-VS\-T" "1" "08/02/2024" "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 3aa1056..7eef882 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-security-recv.1 b/Documentation/nvme-security-recv.1 index 027fa4c..80fdca6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SECURITY\-RECV" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SECURITY\-RECV" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,6 +39,7 @@ nvme-security-recv \- Security Recv command [\-\-al=<allocation\-length> | \-t <allocation\-length>] [\-\-namespace\-id=<nsid> | \-n <nsid>] [\-\-raw\-binary | \-b] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -97,6 +98,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No Examples diff --git a/Documentation/nvme-security-recv.html b/Documentation/nvme-security-recv.html index d701690..e282a19 100644 --- a/Documentation/nvme-security-recv.html +++ b/Documentation/nvme-security-recv.html @@ -755,7 +755,8 @@ nvme-security-recv(1) Manual Page [--nssf=<nvme-specific> | -N <nvme-specific>]
[--al=<allocation-length> | -t <allocation-length>]
[--namespace-id=<nsid> | -n <nsid>] [--raw-binary | -b]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -889,6 +890,14 @@ controller reset occurs.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -909,7 +918,7 @@ controller reset occurs.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-security-recv.txt b/Documentation/nvme-security-recv.txt index ef77531..3977a14 100644 --- a/Documentation/nvme-security-recv.txt +++ b/Documentation/nvme-security-recv.txt @@ -15,6 +15,7 @@ SYNOPSIS [--al=<allocation-length> | -t <allocation-length>] [--namespace-id=<nsid> | -n <nsid>] [--raw-binary | -b] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -80,6 +81,9 @@ OPTIONS --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No Examples diff --git a/Documentation/nvme-security-send.1 b/Documentation/nvme-security-send.1 index ec0cc20..c2ab5a2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SECURITY\-SEND" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SECURITY\-SEND" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,6 +39,7 @@ nvme-security-send \- Security Send command [\-\-nssf=<nvme\-specific> | \-N <nvme\-specific>] [\-\-namespace\-id=<nsid> | \-n <nsid>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -90,6 +91,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No Examples diff --git a/Documentation/nvme-security-send.html b/Documentation/nvme-security-send.html index 3b560fc..c9890a7 100644 --- a/Documentation/nvme-security-send.html +++ b/Documentation/nvme-security-send.html @@ -755,7 +755,8 @@ nvme-security-send(1) Manual Page [--tl=<transfer-length> | -t <transfer-length>]
[--nssf=<nvme-specific> | -N <nvme-specific>]
[--namespace-id=<nsid> | -n <nsid>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -876,6 +877,14 @@ Receive command is Security Protocol field dependent as defined in SPC-4.</p></d Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -896,7 +905,7 @@ Receive command is Security Protocol field dependent as defined in SPC-4.</p></d <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-security-send.txt b/Documentation/nvme-security-send.txt index 347b970..5893e15 100644 --- a/Documentation/nvme-security-send.txt +++ b/Documentation/nvme-security-send.txt @@ -15,6 +15,7 @@ SYNOPSIS [--nssf=<nvme-specific> | -N <nvme-specific>] [--namespace-id=<nsid> | -n <nsid>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -73,6 +74,9 @@ OPTIONS --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No Examples diff --git a/Documentation/nvme-self-test-log.1 b/Documentation/nvme-self-test-log.1 index b7db93f..aca88a6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SELF\-TEST\-LO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SELF\-TEST\-LO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-self-test-log.html b/Documentation/nvme-self-test-log.html index f27533f..623b392 100644 --- a/Documentation/nvme-self-test-log.html +++ b/Documentation/nvme-self-test-log.html @@ -858,7 +858,7 @@ Get the self-test-log and print it in a json format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-set-feature.1 b/Documentation/nvme-set-feature.1 index 3a149de..fffb543 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SET\-FEATURE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SET\-FEATURE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,6 +39,7 @@ nvme-set-feature \- Sets an NVMe feature, returns applicable results [\-\-data=<data\-file> | \-d <data\-file>] [\-\-save | \-s] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] [\-\-cdw12=<cdw12> | \-c <cdw12>] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -102,6 +103,11 @@ Increase the information detail in the output\&. .RS 4 The value for command dword 12, if applicable\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-set-feature.html b/Documentation/nvme-set-feature.html index d7b044b..be57ed6 100644 --- a/Documentation/nvme-set-feature.html +++ b/Documentation/nvme-set-feature.html @@ -755,7 +755,8 @@ nvme-set-feature(1) Manual Page [--data-len=<data-len> | -l <data-len>]
[--data=<data-file> | -d <data-file>] [--save | -s]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]
- [--cdw12=<cdw12> | -c <cdw12>]</pre>
+ [--cdw12=<cdw12> | -c <cdw12>]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -894,6 +895,17 @@ device (ex: /dev/nvme0), or a namespace block device (ex: /dev/nvme0n1).</p></di The value for command dword 12, if applicable.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -934,7 +946,7 @@ Sets the host id to the ascii string. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-set-feature.txt b/Documentation/nvme-set-feature.txt index a36385e..73deb96 100644 --- a/Documentation/nvme-set-feature.txt +++ b/Documentation/nvme-set-feature.txt @@ -15,6 +15,7 @@ SYNOPSIS [--data=<data-file> | -d <data-file>] [--save | -s] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] [--cdw12=<cdw12> | -c <cdw12>] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -78,6 +79,10 @@ OPTIONS --cdw12=<cdw12>:: The value for command dword 12, if applicable. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Sets the Power State (PS) to 1 in feature id 2: diff --git a/Documentation/nvme-set-property.1 b/Documentation/nvme-set-property.1 index 8821376..377df24 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SET\-PROPERTY" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SET\-PROPERTY" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,6 +35,7 @@ nvme-set-property \- Writes and shows the defined NVMe controller property for N \fInvme set\-property\fR <device> [\-\-offset=<offset> | \-O <offset>] [\-\-value=<val> | \-V <val>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -64,6 +65,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples (yet)\&. diff --git a/Documentation/nvme-set-property.html b/Documentation/nvme-set-property.html index 3686ef5..0be4250 100644 --- a/Documentation/nvme-set-property.html +++ b/Documentation/nvme-set-property.html @@ -751,7 +751,8 @@ nvme-set-property(1) Manual Page <div class="verseblock">
<pre class="content"><em>nvme set-property</em> <device> [--offset=<offset> | -O <offset>]
[--value=<val> | -V <val>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -811,6 +812,17 @@ nvme-set-property(1) Manual Page Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -831,7 +843,7 @@ nvme-set-property(1) Manual Page <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-set-property.txt b/Documentation/nvme-set-property.txt index 5785037..3042ae8 100644 --- a/Documentation/nvme-set-property.txt +++ b/Documentation/nvme-set-property.txt @@ -12,6 +12,7 @@ SYNOPSIS 'nvme set-property' <device> [--offset=<offset> | -O <offset>] [--value=<val> | -V <val>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -36,6 +37,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples (yet). diff --git a/Documentation/nvme-set-reg.txt b/Documentation/nvme-set-reg.txt index 6fd6a49..2978c82 100644 --- a/Documentation/nvme-set-reg.txt +++ b/Documentation/nvme-set-reg.txt @@ -16,6 +16,7 @@ SYNOPSIS [--bpmbl=<val>] [--cmbmsc=<val>] [--nssd=<val>] [--pmrctl=<val>] [--pmrmscl=<val>] [--pmrmscu=<val>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -89,6 +90,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * The following will run the set-reg command with offset 0x14 and value 0x460000 diff --git a/Documentation/nvme-show-hostnqn.1 b/Documentation/nvme-show-hostnqn.1 index ed83aed..04bacc7 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SHOW\-HOSTNQN" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SHOW\-HOSTNQN" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-show-hostnqn.html b/Documentation/nvme-show-hostnqn.html index a7e7277..52467a9 100644 --- a/Documentation/nvme-show-hostnqn.html +++ b/Documentation/nvme-show-hostnqn.html @@ -809,7 +809,7 @@ this will show the systemd-generated host NQN for the system.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-show-regs.1 b/Documentation/nvme-show-regs.1 index c60e88d..2453b27 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ID\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ID\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,6 +34,7 @@ nvme-show-regs \- Reads and shows the defined NVMe controller registers for NVMe .nf \fInvme show\-regs\fR <device> [\-\-human\-readable | \-H] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -60,6 +61,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp .RS 4 diff --git a/Documentation/nvme-show-regs.html b/Documentation/nvme-show-regs.html index bf1c3b7..a629bd5 100644 --- a/Documentation/nvme-show-regs.html +++ b/Documentation/nvme-show-regs.html @@ -750,7 +750,8 @@ nvme-id-ns(1) Manual Page <div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>nvme show-regs</em> <device> [--human-readable | -H]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -808,6 +809,17 @@ Only the supported properties are displayed.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -859,7 +871,7 @@ in a json format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-show-regs.txt b/Documentation/nvme-show-regs.txt index 0460365..6e4902c 100644 --- a/Documentation/nvme-show-regs.txt +++ b/Documentation/nvme-show-regs.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'nvme show-regs' <device> [--human-readable | -H] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -41,6 +42,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Show the NVMe over PCIe controller registers or the NVMe over Fabric controller diff --git a/Documentation/nvme-show-topology.1 b/Documentation/nvme-show-topology.1 index f50418f..002d055 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SHOW\-TOPOLOGY" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SHOW\-TOPOLOGY" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-show-topology.html b/Documentation/nvme-show-topology.html index 9807124..805cc4d 100644 --- a/Documentation/nvme-show-topology.html +++ b/Documentation/nvme-show-topology.html @@ -845,7 +845,7 @@ nvme-show-topology(1) Manual Page <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-smart-log.1 b/Documentation/nvme-smart-log.1 index 7a6cbf0..9c03b2e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SMART\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SMART\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-smart-log.html b/Documentation/nvme-smart-log.html index 228dee6..9fec87e 100644 --- a/Documentation/nvme-smart-log.html +++ b/Documentation/nvme-smart-log.html @@ -861,7 +861,7 @@ Print the raw SMART log to a file: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-subsystem-reset.1 b/Documentation/nvme-subsystem-reset.1 index 80404e6..0213d31 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SUBSYSTEM\-RES" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SUBSYSTEM\-RES" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-subsystem-reset.html b/Documentation/nvme-subsystem-reset.html index 17ce8ea..d88683f 100644 --- a/Documentation/nvme-subsystem-reset.html +++ b/Documentation/nvme-subsystem-reset.html @@ -819,7 +819,7 @@ Resets the subsystem. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-supported-log-pages.1 b/Documentation/nvme-supported-log-pages.1 index 11f08f8..790fd67 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-SUPPORTED\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-SUPPORTED\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-supported-log-pages.html b/Documentation/nvme-supported-log-pages.html index 3c5075d..6fb8490 100644 --- a/Documentation/nvme-supported-log-pages.html +++ b/Documentation/nvme-supported-log-pages.html @@ -813,7 +813,7 @@ for each command that is supported.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-telemetry-log.1 b/Documentation/nvme-telemetry-log.1 index b125757..4e3f00b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TELEMETRY\-LOG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TELEMETRY\-LOG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-telemetry-log.html b/Documentation/nvme-telemetry-log.html index 263a22a..cbb7707 100644 --- a/Documentation/nvme-telemetry-log.html +++ b/Documentation/nvme-telemetry-log.html @@ -862,7 +862,7 @@ Retrieve Telemetry Host-Initiated data to telemetry_log.bin <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-tls-key.1 b/Documentation/nvme-tls-key.1 new file mode 100644 index 0000000..9430e21 --- /dev/null +++ b/Documentation/nvme-tls-key.1 @@ -0,0 +1,225 @@ +'\" t +.\" Title: nvme-tls-key +.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] +.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> +.\" Date: 08/02/2024 +.\" Manual: NVMe Manual +.\" Source: NVMe +.\" Language: English +.\" +.TH "NVME\-TLS\-KEY" "1" "08/02/2024" "NVMe" "NVMe Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nvme-tls-key \- Manage NVMe TLS PSKs +.SH "SYNOPSIS" +.sp +.nf +\fInvme tls\-key\fR [\-\-keyring=<name> | \-k <name>] + [\-\-keytype=<type> | \-t <type>] + [\-\-keyfile=<file> | \-f <file>] + [\-\-import | \-i] [\-\-export | \-e] + [\-\-revoke=<description>| \-r <description>] + [\-\-verbose | \-v] +.fi +.SH "DESCRIPTION" +.sp +Import, export or remove NVMe TLS pre\-shared keys (PSKs) from the system keystore\&. When the \fI\-\-export\fR option is given, all NVMe TLS PSKs are exported in the form +.sp +<descriptions> <psk> +.sp +where \fI<description>\fR is the key description from the exported key and \fI<psk>\fR is the key data in PSK interchange format \fINVMeTLSkey\-1:01:<base64 encoded data>:\fR\&. Each key is exported in a single line\&. When the \fI\-\-import\fR option is given key data is read in the same format and imported into the kernel keystore\&. +.SH "OPTIONS" +.PP +\-k <name>, \-\-keyring=<name> +.RS 4 +Name of the keyring into which the +\fIretained\fR +TLS key should be stored\&. Default is +\fI\&.nvme\fR\&. +.RE +.PP +\-t <type>, \-\-keytype=<type> +.RS 4 +Type of the key for resulting TLS key\&. Default is +\fIpsk\fR\&. +.RE +.PP +\-f <file>, \-\-keyfile=<file> +.RS 4 +File to read the keys from or write the keys to instead of stdin / stdout\&. +.RE +.PP +\-i, \-\-import +.RS 4 +Read the key data from the file specified by +\fI\-\-keyfile\fR +or stdin if not present\&. +.RE +.PP +\-e, \-\-export +.RS 4 +Write the key data to the file specified by +\fI\-\-keyfile\fR +or stdout if not present\&. +.RE +.PP +\-r <description>, \-\-revoke=<description> +.RS 4 +Revoke a key from a keyring\&. +.RE +.PP +\-v, \-\-verbose +.RS 4 +Increase the information detail in the output\&. +.RE +.SH "EXAMPLES" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Create a new TLS key and insert it directly into the \&.nvme keyring: +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme gen\-tls\-key \-i \-n hostnqn0 \-c subsys0 +NVMeTLSkey\-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv: +Inserted TLS key 26b3260e +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Export previously created key from the kernel keyring and store it into a file +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme tls\-key \-e \-f nvme\-tls\-keys\&.txt +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Export/list all keys from the \&.nvme keyring using nvme and keyctl +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme tls\-key \-\-export +NVMe0R01 hostnqn0 subsys0 NVMeTLSkey\-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv: + +# keyctl show +Session Keyring + 573249525 \-\-alswrv 0 0 keyring: _ses + 353599402 \-\-alswrv 0 65534 \e_ keyring: _uid\&.0 + 475911922 \-\-\-lswrv 0 0 \e_ keyring: \&.nvme + 649274894 \-\-als\-rv 0 0 \e_ psk: NVMe0R01 hostnqn0 subsys0 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Revoke a key using the description and verifying with keyctl the operation +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme tls\-key \-\-revoke="NVMe0R01 hostnqn0 subsys0" + +# keyctl show +Session Keyring + 573249525 \-\-alswrv 0 0 keyring: _ses + 353599402 \-\-alswrv 0 65534 \e_ keyring: _uid\&.0 + 475911922 \-\-\-lswrv 0 0 \e_ keyring: \&.nvme +649274894: key inaccessible (Key has been revoked) +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Import back previously generated key from file and verify with keyctl +.sp +.if n \{\ +.RS 4 +.\} +.nf +# nvme tls\-key \-\-import \-f nvme\-tls\-keys\&.txt + +# keyctl show +Session Keyring + 573249525 \-\-alswrv 0 0 keyring: _ses + 353599402 \-\-alswrv 0 65534 \e_ keyring: _uid\&.0 + 475911922 \-\-\-lswrv 0 0 \e_ keyring: \&.nvme + 734343968 \-\-als\-rv 0 0 \e_ psk: NVMe0R01 hostnqn0 subsys0 +.fi +.if n \{\ +.RE +.\} +.RE +.SH "NVME" +.sp +Part of the nvme\-user suite diff --git a/Documentation/nvme-tls-key.html b/Documentation/nvme-tls-key.html new file mode 100644 index 0000000..6803edf --- /dev/null +++ b/Documentation/nvme-tls-key.html @@ -0,0 +1,958 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 10.2.0" />
+<title>nvme-tls-key(1)</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+h5 {
+ font-size: 1.0em;
+}
+
+div.sectionbody {
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
+
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
+ padding: 0;
+ margin: 0;
+}
+pre {
+ white-space: pre-wrap;
+}
+
+#author {
+ color: #527bbd;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.0em;
+ margin-bottom: 2.0em;
+ margin-right: 10%;
+ color: #606060;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
+ padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ margin-right: 10%;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
+}
+
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+ border-left: 3px solid #dddddd;
+ padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; vertical-align: text-bottom; }
+a.image:visited { color: white; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+.footnote, .footnoteref {
+ font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+ vertical-align: super;
+}
+
+#footnotes {
+ margin: 20px 0 20px 0;
+ padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+ margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+ border: none;
+ border-top: 1px solid silver;
+ height: 1px;
+ text-align: left;
+ margin-left: 0;
+ width: 20%;
+ min-width: 100px;
+}
+
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
+
+@media print {
+ #footer-badges { display: none; }
+}
+
+#toc {
+ margin-bottom: 2.5em;
+}
+
+#toctitle {
+ color: #527bbd;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overridden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+ text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+var asciidoc = { // Namespace.
+
+/////////////////////////////////////////////////////////////////////
+// Table Of Contents generator
+/////////////////////////////////////////////////////////////////////
+
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */
+
+// toclevels = 1..4.
+toc: function (toclevels) {
+
+ function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+ }
+
+ function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+ }
+
+ function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName);
+ if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ }
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+ }
+
+ var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
+ var entries = tocEntries(document.getElementById("content"), toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "_toc_" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ toc.parentNode.removeChild(toc);
+},
+
+
+/////////////////////////////////////////////////////////////////////
+// Footnotes generator
+/////////////////////////////////////////////////////////////////////
+
+/* Based on footnote generation code from:
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
+ */
+
+footnotes: function () {
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
+ var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
+ var spans = cont.getElementsByTagName("span");
+ var refs = {};
+ var n = 0;
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnote") {
+ n++;
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
+ noteholder.innerHTML +=
+ "<div class='footnote' id='_footnote_" + n + "'>" +
+ "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
+ n + "</a>. " + note + "</div>";
+ var id =spans[i].getAttribute("id");
+ if (id != null) refs["#"+id] = n;
+ }
+ }
+ if (n == 0)
+ noteholder.parentNode.removeChild(noteholder);
+ else {
+ // Process footnoterefs.
+ for (i=0; i<spans.length; i++) {
+ if (spans[i].className == "footnoteref") {
+ var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
+ href = href.match(/#.*/)[0]; // Because IE return full URL.
+ n = refs[href];
+ spans[i].innerHTML =
+ "[<a href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ }
+ }
+ }
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
+}
+
+}
+asciidoc.install();
+/*]]>*/
+</script>
+</head>
+<body class="manpage">
+<div id="header">
+<h1>
+nvme-tls-key(1) Manual Page
+</h1>
+<h2>NAME</h2>
+<div class="sectionbody">
+<p>nvme-tls-key -
+ Manage NVMe TLS PSKs
+</p>
+</div>
+</div>
+<div id="content">
+<div class="sect1">
+<h2 id="_synopsis">SYNOPSIS</h2>
+<div class="sectionbody">
+<div class="verseblock">
+<pre class="content"><em>nvme tls-key</em> [--keyring=<name> | -k <name>]
+ [--keytype=<type> | -t <type>]
+ [--keyfile=<file> | -f <file>]
+ [--import | -i] [--export | -e]
+ [--revoke=<description>| -r <description>]
+ [--verbose | -v]</pre>
+<div class="attribution">
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">DESCRIPTION</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Import, export or remove NVMe TLS pre-shared keys (PSKs) from the system
+keystore. When the <em>--export</em> option is given, all NVMe TLS PSKs are
+exported in the form</p></div>
+<div class="paragraph"><p><descriptions> <psk></p></div>
+<div class="paragraph"><p>where <em><description></em> is the key description from the
+exported key and <em><psk></em> is the key data in PSK interchange
+format <em>NVMeTLSkey-1:01:<base64 encoded data>:</em>.
+Each key is exported in a single line.
+When the <em>--import</em> option is given key data is read in the
+same format and imported into the kernel keystore.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options">OPTIONS</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+-k <name>
+</dt>
+<dt class="hdlist1">
+--keyring=<name>
+</dt>
+<dd>
+<p>
+ Name of the keyring into which the <em>retained</em> TLS key should be
+ stored. Default is <em>.nvme</em>.
+</p>
+</dd>
+<dt class="hdlist1">
+-t <type>
+</dt>
+<dt class="hdlist1">
+--keytype=<type>
+</dt>
+<dd>
+<p>
+ Type of the key for resulting TLS key.
+ Default is <em>psk</em>.
+</p>
+</dd>
+<dt class="hdlist1">
+-f <file>
+</dt>
+<dt class="hdlist1">
+--keyfile=<file>
+</dt>
+<dd>
+<p>
+ File to read the keys from or write the keys to instead of
+ stdin / stdout.
+</p>
+</dd>
+<dt class="hdlist1">
+-i
+</dt>
+<dt class="hdlist1">
+--import
+</dt>
+<dd>
+<p>
+ Read the key data from the file specified by <em>--keyfile</em>
+ or stdin if not present.
+</p>
+</dd>
+<dt class="hdlist1">
+-e
+</dt>
+<dt class="hdlist1">
+--export
+</dt>
+<dd>
+<p>
+ Write the key data to the file specified by <em>--keyfile</em>
+ or stdout if not present.
+</p>
+</dd>
+<dt class="hdlist1">
+-r <description>
+</dt>
+<dt class="hdlist1">
+--revoke=<description>
+</dt>
+<dd>
+<p>
+ Revoke a key from a keyring.
+</p>
+</dd>
+<dt class="hdlist1">
+-v
+</dt>
+<dt class="hdlist1">
+--verbose
+</dt>
+<dd>
+<p>
+ Increase the information detail in the output.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">EXAMPLES</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Create a new TLS key and insert it directly into the .nvme keyring:
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme gen-tls-key -i -n hostnqn0 -c subsys0
+NVMeTLSkey-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv:
+Inserted TLS key 26b3260e</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Export previously created key from the kernel keyring and store it into a file
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme tls-key -e -f nvme-tls-keys.txt</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Export/list all keys from the .nvme keyring using nvme and keyctl
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme tls-key --export
+NVMe0R01 hostnqn0 subsys0 NVMeTLSkey-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv:
+
+# keyctl show
+Session Keyring
+ 573249525 --alswrv 0 0 keyring: _ses
+ 353599402 --alswrv 0 65534 \_ keyring: _uid.0
+ 475911922 ---lswrv 0 0 \_ keyring: .nvme
+ 649274894 --als-rv 0 0 \_ psk: NVMe0R01 hostnqn0 subsys0</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Revoke a key using the description and verifying with
+keyctl the operation
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme tls-key --revoke="NVMe0R01 hostnqn0 subsys0"
+
+# keyctl show
+Session Keyring
+ 573249525 --alswrv 0 0 keyring: _ses
+ 353599402 --alswrv 0 65534 \_ keyring: _uid.0
+ 475911922 ---lswrv 0 0 \_ keyring: .nvme
+649274894: key inaccessible (Key has been revoked)</code></pre>
+</div></div>
+</li>
+<li>
+<p>
+Import back previously generated key from file and verify with keyctl
+</p>
+<div class="listingblock">
+<div class="content">
+<pre><code># nvme tls-key --import -f nvme-tls-keys.txt
+
+# keyctl show
+Session Keyring
+ 573249525 --alswrv 0 0 keyring: _ses
+ 353599402 --alswrv 0 65534 \_ keyring: _uid.0
+ 475911922 ---lswrv 0 0 \_ keyring: .nvme
+ 734343968 --als-rv 0 0 \_ psk: NVMe0R01 hostnqn0 subsys0</code></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_nvme">NVME</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Part of the nvme-user suite</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated
+ 2024-08-02 09:57:44 CEST
+</div>
+</div>
+</body>
+</html>
diff --git a/Documentation/nvme-tls-key.txt b/Documentation/nvme-tls-key.txt index 15942a4..e1819c7 100644 --- a/Documentation/nvme-tls-key.txt +++ b/Documentation/nvme-tls-key.txt @@ -1,5 +1,5 @@ nvme-tls-key(1) -====================== +=============== NAME ---- @@ -12,13 +12,14 @@ SYNOPSIS [--keytype=<type> | -t <type>] [--keyfile=<file> | -f <file>] [--import | -i] [--export | -e] + [--revoke=<description>| -r <description>] [--verbose | -v] DESCRIPTION ----------- -Import or export NVMe TLS pre-shared keys (PSKs) from the -system keystore. When the '--export' option is given, all -NVMe TLS PSKs are exported in the form +Import, export or remove NVMe TLS pre-shared keys (PSKs) from the system +keystore. When the '--export' option is given, all NVMe TLS PSKs are +exported in the form <descriptions> <psk> @@ -41,7 +42,7 @@ OPTIONS Type of the key for resulting TLS key. Default is 'psk'. --k <file>:: +-f <file>:: --keyfile=<file>:: File to read the keys from or write the keys to instead of stdin / stdout. @@ -54,7 +55,11 @@ OPTIONS -e:: --export:: Write the key data to the file specified by '--keyfile' - or stdou if not present. + or stdout if not present. + +-r <description>:: +--revoke=<description>:: + Revoke a key from a keyring. -v:: --verbose:: @@ -62,7 +67,61 @@ OPTIONS EXAMPLES -------- -No Examples + +* Create a new TLS key and insert it directly into the .nvme keyring: ++ +------------ +# nvme gen-tls-key -i -n hostnqn0 -c subsys0 +NVMeTLSkey-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv: +Inserted TLS key 26b3260e +------------ + +* Export previously created key from the kernel keyring and store it into a file ++ +------------ +# nvme tls-key -e -f nvme-tls-keys.txt +------------ + +* Export/list all keys from the .nvme keyring using nvme and keyctl ++ +------------ +# nvme tls-key --export +NVMe0R01 hostnqn0 subsys0 NVMeTLSkey-1:01:/b9tVz2OXJVISnoFgrPAygyS86XYJWkAapQeULns6PMpM8wv: + +# keyctl show +Session Keyring + 573249525 --alswrv 0 0 keyring: _ses + 353599402 --alswrv 0 65534 \_ keyring: _uid.0 + 475911922 ---lswrv 0 0 \_ keyring: .nvme + 649274894 --als-rv 0 0 \_ psk: NVMe0R01 hostnqn0 subsys0 +------------ + +* Revoke a key using the description and verifying with +keyctl the operation ++ +------------ +# nvme tls-key --revoke="NVMe0R01 hostnqn0 subsys0" + +# keyctl show +Session Keyring + 573249525 --alswrv 0 0 keyring: _ses + 353599402 --alswrv 0 65534 \_ keyring: _uid.0 + 475911922 ---lswrv 0 0 \_ keyring: .nvme +649274894: key inaccessible (Key has been revoked) +------------ + +* Import back previously generated key from file and verify with keyctl ++ +------------ +# nvme tls-key --import -f nvme-tls-keys.txt + +# keyctl show +Session Keyring + 573249525 --alswrv 0 0 keyring: _ses + 353599402 --alswrv 0 65534 \_ keyring: _uid.0 + 475911922 ---lswrv 0 0 \_ keyring: .nvme + 734343968 --als-rv 0 0 \_ psk: NVMe0R01 hostnqn0 subsys0 +------------ NVME ---- diff --git a/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1 b/Documentation/nvme-toshiba-clear-pcie-correctable-errors.1 index b64f30a..9edac79 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TOSHIBA\-CLEAR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TOSHIBA\-CLEAR" "1" "08/02/2024" "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 50bb8c3..0e89853 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-toshiba-vs-internal-log.1 b/Documentation/nvme-toshiba-vs-internal-log.1 index 6b0ff47..2b92501 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TOSHIBA\-VS\-I" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TOSHIBA\-VS\-I" "1" "08/02/2024" "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 639ba7c..3dc7e15 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 4b4cd39..f4ea60d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TOSHIBA\-VS\-S" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TOSHIBA\-VS\-S" "1" "08/02/2024" "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 286bed0..37edf9d 100644 --- a/Documentation/nvme-toshiba-vs-smart-add-log.html +++ b/Documentation/nvme-toshiba-vs-smart-add-log.html @@ -841,7 +841,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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-transcend-badblock.1 b/Documentation/nvme-transcend-badblock.1 index 4b08e27..9c3c898 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TRANSCEND\-BAD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TRANSCEND\-BAD" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-transcend-badblock.html b/Documentation/nvme-transcend-badblock.html index 6f7bc96..641f094 100644 --- a/Documentation/nvme-transcend-badblock.html +++ b/Documentation/nvme-transcend-badblock.html @@ -796,7 +796,7 @@ Print the Transcend device’s bad blocks in a human readable format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-transcend-healthvalue.1 b/Documentation/nvme-transcend-healthvalue.1 index d041bae..09c0ef0 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-TRANSCEND\-HEA" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-TRANSCEND\-HEA" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-transcend-healthvalue.html b/Documentation/nvme-transcend-healthvalue.html index a8044fa..554cc1a 100644 --- a/Documentation/nvme-transcend-healthvalue.html +++ b/Documentation/nvme-transcend-healthvalue.html @@ -797,7 +797,7 @@ Print the Transcend Device health value in a human readable format: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-verify.1 b/Documentation/nvme-verify.1 index 6d43ef5..76343ff 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-VERIFY" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-VERIFY" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,6 +43,7 @@ nvme-verify \- Send an NVMe Verify command, return results [\-\-storage\-tag<storage\-tag> | \-S <storage\-tag>] [\-\-storage\-tag\-check | \-C] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -157,6 +158,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-verify.html b/Documentation/nvme-verify.html index 1cc3f2b..58c985e 100644 --- a/Documentation/nvme-verify.html +++ b/Documentation/nvme-verify.html @@ -759,7 +759,8 @@ nvme-verify(1) Manual Page [--app-tag=<apptag> | -a <apptag>]
[--storage-tag<storage-tag> | -S <storage-tag>]
[--storage-tag-check | -C]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -956,6 +957,17 @@ metadata is passes.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -976,7 +988,7 @@ metadata is passes.</p></td> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-verify.txt b/Documentation/nvme-verify.txt index 01dabbf..8affaee 100644 --- a/Documentation/nvme-verify.txt +++ b/Documentation/nvme-verify.txt @@ -19,6 +19,7 @@ SYNOPSIS [--storage-tag<storage-tag> | -S <storage-tag>] [--storage-tag-check | -C] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -92,6 +93,10 @@ metadata is passes. --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-virt-mgmt.txt b/Documentation/nvme-virt-mgmt.txt index 5eede14..e4d14e2 100644 --- a/Documentation/nvme-virt-mgmt.txt +++ b/Documentation/nvme-virt-mgmt.txt @@ -13,6 +13,7 @@ SYNOPSIS [--rt=<rt> | -r <rt>] [--act=<act> | -a <act>] [--nr=<nr> | -n <nr>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -57,6 +58,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- * Has the program issue a virt-mgmt to manage flexible resources. diff --git a/Documentation/nvme-virtium-save-smart-to-vtview-log.1 b/Documentation/nvme-virtium-save-smart-to-vtview-log.1 index 56c634e..d1bf71b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-VIRTIUM\-SAVE\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-VIRTIUM\-SAVE\" "1" "08/02/2024" "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 7f00b3d..45a2827 100644 --- a/Documentation/nvme-virtium-save-smart-to-vtview-log.html +++ b/Documentation/nvme-virtium-save-smart-to-vtview-log.html @@ -878,7 +878,7 @@ Just logging: Default logging is run for 20 hours and log every 10 hours. <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-virtium-show-identify.1 b/Documentation/nvme-virtium-show-identify.1 index 87b28fd..5d7d26a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-VIRTIUM\-SHOW\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-VIRTIUM\-SHOW\" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-virtium-show-identify.html b/Documentation/nvme-virtium-show-identify.html index 62e5247..707c0d3 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-cap-diag.1 b/Documentation/nvme-wdc-cap-diag.1 index d9be7d8..64bc39b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CAP\-DIAG" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CAP\-DIAG" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-cap-diag.html b/Documentation/nvme-wdc-cap-diag.html index a5b1910..23af871 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-capabilities.1 b/Documentation/nvme-wdc-capabilities.1 index 6c8f80c..c4e97ea 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CAPABILIT" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CAPABILIT" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-capabilities.html b/Documentation/nvme-wdc-capabilities.html index f2df9ec..ce569d5 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-clear-assert-dump.1 b/Documentation/nvme-wdc-clear-assert-dump.1 index 07917a0..0336fa1 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CLEAR\-AS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CLEAR\-AS" "1" "08/02/2024" "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 e436bcc..7a71014 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 906d43f..b567cce 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CLEAR\-FW" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CLEAR\-FW" "1" "08/02/2024" "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 fcc0f61..ae4dcb2 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 2944326..37a74e8 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CLEAR\-PC" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CLEAR\-PC" "1" "08/02/2024" "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 5a3ee58..3a7d1b6 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 18752d0..f1e6067 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CLOUD\-SS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CLOUD\-SS" "1" "08/02/2024" "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 f8084aa..d643452 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 c8f506b..a79cda6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-CLOUD\-BO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-CLOUD\-BO" "1" "08/02/2024" "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 5633d02..8c1353c 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-essentials.1 b/Documentation/nvme-wdc-drive-essentials.1 index 4f66c4e..75ee8f9 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-DRIVE\-ES" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-DRIVE\-ES" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-drive-essentials.html b/Documentation/nvme-wdc-drive-essentials.html index 18e3844..daa486d 100644 --- a/Documentation/nvme-wdc-drive-essentials.html +++ b/Documentation/nvme-wdc-drive-essentials.html @@ -822,7 +822,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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-log.1 b/Documentation/nvme-wdc-drive-log.1 index f92e9f7..0c3cd20 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-DRIVE\-LO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-DRIVE\-LO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-drive-log.html b/Documentation/nvme-wdc-drive-log.html index 57fe1de..a0c0847 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-drive-resize.1 b/Documentation/nvme-wdc-drive-resize.1 index 9e6f46b..779a784 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-DRIVE\-RE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-DRIVE\-RE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-drive-resize.html b/Documentation/nvme-wdc-drive-resize.html index 5915777..cc77676 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-enc-get-log.1 b/Documentation/nvme-wdc-enc-get-log.1 index 6de5dd7..b6f6264 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-ENC\-GET\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-ENC\-GET\" "1" "08/02/2024" "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 d04d8a5..8321216 100644 --- a/Documentation/nvme-wdc-enc-get-log.html +++ b/Documentation/nvme-wdc-enc-get-log.html @@ -837,7 +837,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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-crash-dump.1 b/Documentation/nvme-wdc-get-crash-dump.1 index a6e7cf8..b212e48 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-CRAS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-CRAS" "1" "08/02/2024" "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 2516997..846af69 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 ea4d9c6..a173c69 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-DEV\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-DEV\" "1" "08/02/2024" "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 c391d2d..268f2b7 100644 --- a/Documentation/nvme-wdc-get-dev-capabilities-log.html +++ b/Documentation/nvme-wdc-get-dev-capabilities-log.html @@ -815,7 +815,7 @@ Has the program issue WDC get-dev-capabilities-log plugin command : <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-drive-status.1 b/Documentation/nvme-wdc-get-drive-status.1 index 32e82f5..8c6cc7b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-DRIV" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-DRIV" "1" "08/02/2024" "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 529a408..7e5cb2d 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 6cd0acb..e63b54b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-ERRO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-ERRO" "1" "08/02/2024" "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 719bbee..5847029 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 c3c3014..1857abc 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-LATE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-LATE" "1" "08/02/2024" "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 e0f6101..b53ce05 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-get-pfail-dump.1 b/Documentation/nvme-wdc-get-pfail-dump.1 index aaeb429..0ebab5e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-PFAI" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-PFAI" "1" "08/02/2024" "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 4b08016..d25e6aa 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 462f025..fd22bf6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-GET\-UNSU" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-GET\-UNSU" "1" "08/02/2024" "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 8aa5aab..6517bac 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-id-ctrl.1 b/Documentation/nvme-wdc-id-ctrl.1 index e7e7d42..3783e7c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-ID\-CTRL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-ID\-CTRL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-id-ctrl.html b/Documentation/nvme-wdc-id-ctrl.html index 375e2c4..be7235f 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-log-page-directory.1 b/Documentation/nvme-wdc-log-page-directory.1 index adf4078..759cdd2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-LOG\-PAGE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-LOG\-PAGE" "1" "08/02/2024" "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 96beb3d..9207935 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-namespace-resize.1 b/Documentation/nvme-wdc-namespace-resize.1 index f78a96a..1437a80 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-NAMESPACE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-NAMESPACE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-namespace-resize.html b/Documentation/nvme-wdc-namespace-resize.html index cc38baa..4831d24 100644 --- a/Documentation/nvme-wdc-namespace-resize.html +++ b/Documentation/nvme-wdc-namespace-resize.html @@ -836,7 +836,7 @@ Resizes namespace 2 to 7% of the original TNVMCAP reported value: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-purge-monitor.1 b/Documentation/nvme-wdc-purge-monitor.1 index 253d3c9..37aaf39 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-PURGE\-MO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-PURGE\-MO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-purge-monitor.html b/Documentation/nvme-wdc-purge-monitor.html index a64dc22..52ce117 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-purge.1 b/Documentation/nvme-wdc-purge.1 index d007fa3..878ee9b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-PURGE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-PURGE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-wdc-purge.html b/Documentation/nvme-wdc-purge.html index 433fd3b..fc2b362 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-cloud-log.1 b/Documentation/nvme-wdc-vs-cloud-log.1 index 5cde88f..fd14a1a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-CLOUD" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-CLOUD" "1" "08/02/2024" "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 75aa3e3..aa05c49 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-device-waf.1 b/Documentation/nvme-wdc-vs-device-waf.1 index 372d4d8..8fcfaeb 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-DEVIC" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-DEVIC" "1" "08/02/2024" "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 a882eaa..97ede06 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-drive-info.1 b/Documentation/nvme-wdc-vs-drive-info.1 index 583ca23..2cf6a46 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-DRIVE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-DRIVE" "1" "08/02/2024" "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 08f1918..134ae52 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 ba6fe3b..d29eb26 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-ERROR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-ERROR" "1" "08/02/2024" "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 606ab4e..caca97e 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 d904117..36ca07b 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-FW\-A" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-FW\-A" "1" "08/02/2024" "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 4b133ce..55a1ee4 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 dd7cdf5..f345e14 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-HW\-R" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-HW\-R" "1" "08/02/2024" "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 f46d71f..7a4e501 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-internal-log.1 b/Documentation/nvme-wdc-vs-internal-log.1 index feb2748..0c38521 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-INTER" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-INTER" "1" "08/02/2024" "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 12c387e..312486a 100644 --- a/Documentation/nvme-wdc-vs-internal-log.html +++ b/Documentation/nvme-wdc-vs-internal-log.html @@ -958,7 +958,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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-nand-stats.1 b/Documentation/nvme-wdc-vs-nand-stats.1 index 6c6a17b..f9dd70f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-NAND\" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-NAND\" "1" "08/02/2024" "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 498bf22..3056c16 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 57d15b9..49ec601 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-SMART" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-SMART" "1" "08/02/2024" "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 1d720af..cc410fe 100644 --- a/Documentation/nvme-wdc-vs-smart-add-log.html +++ b/Documentation/nvme-wdc-vs-smart-add-log.html @@ -928,7 +928,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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 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 6aad2f9..d3e0ec2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-TELEM" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-TELEM" "1" "08/02/2024" "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 e9ddca1..baf4a22 100644 --- a/Documentation/nvme-wdc-vs-telemetry-controller-option.html +++ b/Documentation/nvme-wdc-vs-telemetry-controller-option.html @@ -855,7 +855,7 @@ Gets the current status (enabled or disabled) of the controller initiated option <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-wdc-vs-temperature-stats.1 b/Documentation/nvme-wdc-vs-temperature-stats.1 index b7131d9..a928d0c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WDC\-VS\-TEMPE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WDC\-VS\-TEMPE" "1" "08/02/2024" "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 b075ca0..27b83d1 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write-uncor.1 b/Documentation/nvme-write-uncor.1 index 3475367..014ff82 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-UNCOR" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-UNCOR" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,6 +38,7 @@ nvme-write-uncor \- Send an NVMe write uncorrectable command, return results [\-\-dir\-type=<dtype> | \-T <dtype>] [\-\-dir\-spec=<dspec> | \-S <dspec>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -82,6 +83,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-write-uncor.html b/Documentation/nvme-write-uncor.html index 96cb97a..1d6d259 100644 --- a/Documentation/nvme-write-uncor.html +++ b/Documentation/nvme-write-uncor.html @@ -754,7 +754,8 @@ nvme-uncor(1) Manual Page [--namespace-id=<nsid> | -n <nsid>]
[--dir-type=<dtype> | -T <dtype>]
[--dir-spec=<dspec> | -S <dspec>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -848,6 +849,17 @@ blocks.</p></div> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -868,7 +880,7 @@ blocks.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write-uncor.txt b/Documentation/nvme-write-uncor.txt index 6e49c61..9fe2df2 100644 --- a/Documentation/nvme-write-uncor.txt +++ b/Documentation/nvme-write-uncor.txt @@ -14,6 +14,7 @@ SYNOPSIS [--dir-type=<dtype> | -T <dtype>] [--dir-spec=<dspec> | -S <dspec>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -51,6 +52,10 @@ OPTIONS --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-write-zeroes.1 b/Documentation/nvme-write-zeroes.1 index b210cae..90e561d 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WRITE\-ZEROES" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WRITE\-ZEROES" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -45,6 +45,7 @@ nvme-write-zeroes \- Send an NVMe write zeroes command, return results [\-\-dir\-type=<dtype> | \-T <dtype>] [\-\-dir\-spec=<dspec> | \-D <dspec>] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout> | \-t <timeout>] .fi .SH "DESCRIPTION" .sp @@ -174,6 +175,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-t <timeout>, \-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-write-zeroes.html b/Documentation/nvme-write-zeroes.html index f8d2159..0154388 100644 --- a/Documentation/nvme-write-zeroes.html +++ b/Documentation/nvme-write-zeroes.html @@ -761,7 +761,8 @@ nvme-write-zeroes(1) Manual Page [--storage-tag-check<storage-tag-check> | -C <storage-tag-check>]
[--dir-type=<dtype> | -T <dtype>]
[--dir-spec=<dspec> | -D <dspec>]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout> | -t <timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -991,6 +992,17 @@ metadata is passes.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+-t <timeout>
+</dt>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1011,7 +1023,7 @@ metadata is passes.</p></td> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write-zeroes.txt b/Documentation/nvme-write-zeroes.txt index 0daf320..3cfdb24 100644 --- a/Documentation/nvme-write-zeroes.txt +++ b/Documentation/nvme-write-zeroes.txt @@ -21,6 +21,7 @@ SYNOPSIS [--dir-type=<dtype> | -T <dtype>] [--dir-spec=<dspec> | -D <dspec>] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout> | -t <timeout>] DESCRIPTION ----------- @@ -106,6 +107,10 @@ metadata is passes. --verbose:: Increase the information detail in the output. +-t <timeout>:: +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-write.1 b/Documentation/nvme-write.1 index 88824a3..383120e 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-WRITE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-WRITE" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,6 +49,7 @@ nvme-write \- Send an NVMe write command, provide results [\-\-storage\-tag<storage\-tag> | \-g <storage\-tag>] [\-\-storage\-tag\-check | \-C] [\-\-force] [\-\-output\-format=<fmt> | \-o <fmt>] [\-\-verbose | \-v] + [\-\-timeout=<timeout>] .fi .SH "DESCRIPTION" .sp @@ -216,6 +217,11 @@ or .RS 4 Increase the information detail in the output\&. .RE +.PP +\-\-timeout=<timeout> +.RS 4 +Override default timeout value\&. In milliseconds\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-write.html b/Documentation/nvme-write.html index a148b82..f6d9a07 100644 --- a/Documentation/nvme-write.html +++ b/Documentation/nvme-write.html @@ -765,7 +765,8 @@ nvme-write(1) Manual Page [--show-command | -V] [--dry-run | -w] [--latency | -t]
[--storage-tag<storage-tag> | -g <storage-tag>]
[--storage-tag-check | -C] [--force]
- [--output-format=<fmt> | -o <fmt>] [--verbose | -v]</pre>
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ [--timeout=<timeout>]</pre>
<div class="attribution">
</div></div>
</div>
@@ -1089,6 +1090,14 @@ metadata is passes.</p></td> Increase the information detail in the output.
</p>
</dd>
+<dt class="hdlist1">
+--timeout=<timeout>
+</dt>
+<dd>
+<p>
+ Override default timeout value. In milliseconds.
+</p>
+</dd>
</dl></div>
</div>
</div>
@@ -1109,7 +1118,7 @@ metadata is passes.</p></td> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-write.txt b/Documentation/nvme-write.txt index af5340e..8dbad98 100644 --- a/Documentation/nvme-write.txt +++ b/Documentation/nvme-write.txt @@ -25,6 +25,7 @@ SYNOPSIS [--storage-tag<storage-tag> | -g <storage-tag>] [--storage-tag-check | -C] [--force] [--output-format=<fmt> | -o <fmt>] [--verbose | -v] + [--timeout=<timeout>] DESCRIPTION ----------- @@ -157,6 +158,9 @@ metadata is passes. --verbose:: Increase the information detail in the output. +--timeout=<timeout>:: + Override default timeout value. In milliseconds. + EXAMPLES -------- No examples yet. diff --git a/Documentation/nvme-zns-changed-zone-list.1 b/Documentation/nvme-zns-changed-zone-list.1 index 12cb781..11d8c87 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-CHANGED\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-CHANGED\-" "1" "08/02/2024" "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 0f9b2b0..3be8d05 100644 --- a/Documentation/nvme-zns-changed-zone-list.html +++ b/Documentation/nvme-zns-changed-zone-list.html @@ -832,7 +832,7 @@ Show the output in json format <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-close-zone.1 b/Documentation/nvme-zns-close-zone.1 index 304b43e..a47a413 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-CLOSE\-ZO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-CLOSE\-ZO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-close-zone.html b/Documentation/nvme-zns-close-zone.html index 6c31f89..acc4e49 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-finish-zone.1 b/Documentation/nvme-zns-finish-zone.1 index a75a64d..3ae99fe 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-FINISH\-Z" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-FINISH\-Z" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-finish-zone.html b/Documentation/nvme-zns-finish-zone.html index 4b45450..aef2d6f 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-id-ctrl.1 b/Documentation/nvme-zns-id-ctrl.1 index 2930fff..a4b22f2 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-ID\-CTRL" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-ID\-CTRL" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-id-ctrl.html b/Documentation/nvme-zns-id-ctrl.html index 62de674..33c1fd3 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-id-ns.1 b/Documentation/nvme-zns-id-ns.1 index 778ddcb..b943584 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-ID\-NS" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-ID\-NS" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-id-ns.html b/Documentation/nvme-zns-id-ns.html index 2ed1566..a8e23a5 100644 --- a/Documentation/nvme-zns-id-ns.html +++ b/Documentation/nvme-zns-id-ns.html @@ -846,7 +846,7 @@ Show the output in json format with extra details <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-offline-zone.1 b/Documentation/nvme-zns-offline-zone.1 index b994985..56554b6 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-OFFLINE\-" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-OFFLINE\-" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-offline-zone.html b/Documentation/nvme-zns-offline-zone.html index ffdd91f..8b900ad 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-open-zone.1 b/Documentation/nvme-zns-open-zone.1 index 3aa47a0..1ff351f 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-OPEN\-ZON" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-OPEN\-ZON" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-open-zone.html b/Documentation/nvme-zns-open-zone.html index 79937f0..bd152bb 100644 --- a/Documentation/nvme-zns-open-zone.html +++ b/Documentation/nvme-zns-open-zone.html @@ -856,7 +856,7 @@ Open the first zone on namespace 1: <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-report-zones.1 b/Documentation/nvme-zns-report-zones.1 index 3567b09..65cde3c 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-REPORT\-Z" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-REPORT\-Z" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-report-zones.html b/Documentation/nvme-zns-report-zones.html index 539635c..a25af65 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-reset-zone.1 b/Documentation/nvme-zns-reset-zone.1 index c62ba0e..7031e3a 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-RESET\-ZO" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-RESET\-ZO" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-reset-zone.html b/Documentation/nvme-zns-reset-zone.html index d67563f..777eed6 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-set-zone-desc.1 b/Documentation/nvme-zns-set-zone-desc.1 index 101d20f..edb3e56 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-SET\-ZONE" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-SET\-ZONE" "1" "08/02/2024" "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 d79d1f2..600f258 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’s first zone <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-append.1 b/Documentation/nvme-zns-zone-append.1 index affdcca..9bd72ba 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-ZONE\-APP" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-ZONE\-APP" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-zns-zone-append.html b/Documentation/nvme-zns-zone-append.html index 2584091..d899b8e 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
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-mgmt-recv.1 b/Documentation/nvme-zns-zone-mgmt-recv.1 index 5e01783..a2232be 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-ZONE\-MGM" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-ZONE\-MGM" "1" "08/02/2024" "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 a998b16..13ae50d 100644 --- a/Documentation/nvme-zns-zone-mgmt-recv.html +++ b/Documentation/nvme-zns-zone-mgmt-recv.html @@ -880,7 +880,7 @@ Binary dump of a report all zones <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme-zns-zone-mgmt-send.1 b/Documentation/nvme-zns-zone-mgmt-send.1 index d8d819e..b8d9e76 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ZNS\-ZONE\-MGM" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ZNS\-ZONE\-MGM" "1" "08/02/2024" "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 c679fdb..bbeba22 100644 --- a/Documentation/nvme-zns-zone-mgmt-send.html +++ b/Documentation/nvme-zns-zone-mgmt-send.html @@ -914,7 +914,7 @@ Write "hello world" into the zone descriptor for namespace 1’s first zone <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:17 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
diff --git a/Documentation/nvme.1 b/Documentation/nvme.1 index 9430ca2..f3df191 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: 05/03/2024 +.\" Date: 08/02/2024 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME" "1" "05/03/2024" "NVMe" "NVMe Manual" +.TH "NVME" "1" "08/02/2024" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -594,6 +594,11 @@ Retrieves NAND statistics Retrieves temperature information of given micron device .RE .PP +\fBnvme-ocp-internal-log\fR(1) +.RS 4 +Retrieves and parses OCP Telemetry DA1 and DA2 logs\&. +.RE +.PP \fBnvme-netapp-ontapdevices\fR(1) .RS 4 Display information about ONTAP devices diff --git a/Documentation/nvme.html b/Documentation/nvme.html index 1adcce5..73c5acb 100644 --- a/Documentation/nvme.html +++ b/Documentation/nvme.html @@ -1656,6 +1656,14 @@ available, run "nvme help".</p></div> </p>
</dd>
<dt class="hdlist1">
+<a href="nvme-ocp-internal-log.html">nvme-ocp-internal-log(1)</a>
+</dt>
+<dd>
+<p>
+ Retrieves and parses OCP Telemetry DA1 and DA2 logs.
+</p>
+</dd>
+<dt class="hdlist1">
<a href="nvme-netapp-ontapdevices.html">nvme-netapp-ontapdevices(1)</a>
</dt>
<dd>
@@ -2114,7 +2122,7 @@ NVM-Express Site</a>.</p></div> <div id="footer">
<div id="footer-text">
Last updated
- 2024-05-03 16:03:16 CEST
+ 2024-08-02 09:57:44 CEST
</div>
</div>
</body>
@@ -10,18 +10,18 @@ NAME := nvme BUILD-DIR := .build ${BUILD-DIR}: - meson $@ + meson setup $@ @echo "Configuration located in: $@" @echo "-------------------------------------------------------" .PHONY: ${NAME} ${NAME}: ${BUILD-DIR} - ninja -C ${BUILD-DIR} + meson compile -C ${BUILD-DIR} .PHONY: clean clean: ifneq ("$(wildcard ${BUILD-DIR})","") - ninja -C ${BUILD-DIR} -t $@ + meson compile --clean -C ${BUILD-DIR} endif .PHONY: purge diff --git a/ccan/ccan/strset/strset.c b/ccan/ccan/strset/strset.c index 06b0d7a..823241f 100644 --- a/ccan/ccan/strset/strset.c +++ b/ccan/ccan/strset/strset.c @@ -194,6 +194,7 @@ char *strset_del(struct strset *set, const char *member) /* Sew empty string back so remaining logic works */ free(n->u.n); + n->u.n = NULL; n->u.s = empty_str; break; } @@ -208,7 +209,7 @@ char *strset_del(struct strset *set, const char *member) } /* Did we find it? */ - if (!streq(member, n->u.s)) { + if (!n->u.s || !streq(member, n->u.s)) { errno = ENOENT; return NULL; } @@ -17,43 +17,81 @@ #define __packed __attribute__((__packed__)) #endif /* __packed */ -static inline uint32_t mmio_read32(void *addr) +/* + * VMs on arm64 can only use a subset of instructions for MMIO that provide + * the hypervisor with a complete instruction decode. Provide assembly MMIO + * accessors to prevent the compiler from using a possibly unsupported + * instruction. + * + * See kernel commit c726200dd106 ("KVM: arm/arm64: Allow reporting non-ISV + * data aborts to userspace") for more details. + */ +#if defined(__aarch64__) +static inline leint32_t __raw_readl(const volatile leint32_t *addr) +{ + leint32_t val; + + asm volatile("ldr %w0, %1" : "=r" (val) : "Qo" (*addr)); + + return val; +} + +static inline void __raw_writel(volatile leint32_t *addr, leint32_t val) { - leint32_t *p = addr; + asm volatile("str %w0, %1" : : "r" (val), "Qo" (*addr)); +} - return le32_to_cpu(*p); +static inline void __raw_writeq(volatile leint64_t *addr, leint64_t val) +{ + asm volatile("str %0, %1" : : "r" (val), "Qo" (*addr)); +} +#else +static inline leint32_t __raw_readl(volatile leint32_t *addr) +{ + return *addr; +} + +static inline void __raw_writel(volatile leint32_t *addr, leint32_t val) +{ + *addr = val; +} + +static inline void __raw_writeq(volatile leint64_t *addr, leint64_t val) +{ + *addr = val; +} +#endif + +static inline uint32_t mmio_read32(void *addr) +{ + return le32_to_cpu(__raw_readl(addr)); } /* Access 64-bit registers as 2 32-bit; Some devices fail 64-bit MMIO. */ static inline uint64_t mmio_read64(void *addr) { - const volatile uint32_t *p = addr; uint32_t low, high; - low = le32_to_cpu(*p); - high = le32_to_cpu(*(p + 1)); + low = le32_to_cpu(__raw_readl(addr)); + high = le32_to_cpu(__raw_readl(addr + sizeof(leint32_t))); return ((uint64_t)high << 32) | low; } static inline void mmio_write32(void *addr, uint32_t value) { - leint32_t *p = addr; - - *p = cpu_to_le32(value); + __raw_writel(addr, cpu_to_le32(value)); } /* Access 64-bit registers as 2 32-bit if write32 flag set; Some devices fail 64-bit MMIO. */ static inline void mmio_write64(void *addr, uint64_t value, bool write32) { - uint64_t *p = addr; - if (write32) { mmio_write32(addr, value); mmio_write32((uint32_t *)addr + 1, value >> 32); return; } - *p = cpu_to_le64(value); + __raw_writeq(addr, cpu_to_le64(value)); } #endif diff --git a/completions/_nvme b/completions/_nvme index 159a4ab..47fdd9d 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -56,7 +56,7 @@ _nvme () { 'set-property:writes and shows the defined NVMe controller property for NVMe over Fabric' 'get-property:Reads and shows the defined NVMe controller property for NVMe over Fabric' 'format:apply new block format to namespace' - 'fw-activate:activate a firmware on the device' + 'fw-commit:verify and commit firmware to a specific slot (fw-activate in old version < 1.2)' 'fw-download:download a firmware to the device' 'admin-passthru:submit a passthrough admin command IOCTL' 'io-passthru:submit a passthrough io command IOCTL' @@ -97,6 +97,7 @@ _nvme () { 'disconnect-all:disconnect from all connected NVMeoF subsystems' 'gen-hostnqn:generate a host NVMe Qualified Name' 'show-hostnqn:show the host NQN configured for the system' + 'tls-key:manipulate NVMeoF TLS PSK' 'dir-receive:read directive parameters of the specified directive type' 'dir-send:set directive parameters of the specified directive type' 'virt-mgmt:submit a Virtualization Management command' @@ -105,10 +106,13 @@ _nvme () { 'nvme-mi-recv:send a NVMe-MI receive command' 'nvme-mi-send:send a NVMe-MI send command' 'get-reg:read and show the defined NVMe controller register' - 'set-seg:write and show the defined NVMe controller register' + 'set-reg:write and show the defined NVMe controller register' + 'io-mgmt-recv:send an I/O management receive command' + 'io-mgmt-send:send an I/O management send command' 'version:show the program version' 'ocp:OCP cloud SSD extensions' 'solidigm:Solidigm plug-in extensions' + 'micron:Micron plug-in extensions' 'help:print brief descriptions of all nvme commands' 'json:dump output in json format' ) @@ -176,12 +180,18 @@ _nvme () { local _internal_log _internal_log=( /dev/nvme':supply a device to use (required)' - --telemetry_type=':Telemetry Type; host (Create bit) or controller' - -t':alias for --telemetry_type' - --telemetry_data_area=':Telemetry Data Area; 1 or 3' - -a':alias for --telemetry_data_area' + --telemetry-type=':Telemetry Type; host or controller generated' + -t':alias for --telemetry-type' + --data-area=':Telemetry Data Area; 1 or 2' + -a':alias for --data-area' --output-file=':Output file name with path' -o':alias for --output-file' + --telemetry-log=':Telemetry log binary' + -l':alias for --telemetry-log' + --string-log=':String log binary' + -s':alias for --string-log' + --output-format':Output format: normal|json' + -f':alias for --output-format' ) _arguments '*:: :->subcmds' _describe -t commands "nvme ocp internal-log options" _internal_log @@ -256,6 +266,20 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme ocp set-dssd-power-state-feature options" _set_dssd_power_state_feature ;; + (get-dssd-power-state-feature) + local _get_dssd_power_state_feature + _get_dssd_power_state_feature=( + /dev/nvme':supply a device to use (required)' + --sel=':select from 0 - current, 1 - default, 2 - saved, 3 - supported' + -S':alias to --sel' + --all=':Print out all 3 values at once - current, default, and saved' + -a':alias to --all' + --no-uuid':Skip UUID index search' + -n':alias for --no-uuid' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme ocp get-dssd-power-state-feature options" _get_dssd_power_state_feature + ;; (telemetry-string-log) local _telemetry_string_log _telemetry_string_log=( @@ -289,6 +313,51 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme ocp get-dssd-async-event-config options" _get_dssd_async_event_config ;; + (tcg-configuration-log) + local _ocp_tcg_configuration_log + _ocp_tcg_configuration_log=( + /dev/nvme':supply a device to use (required)' + --output-format=':Output format: normal|json' + -o':alias for --output-format' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme ocp tcg-configuration-log options" _ocp_tcg_configuration_log + ;; + (get-error-injection) + local _get_error_injection + _get_error_injection=( + /dev/nvme':supply a device to use (required)' + --sel=':0-3: current/default/saved/supported/changed:' + -s':alias for --sel' + --no-uuid':Skip UUID index search' + -n':alias for --no-uuid' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme ocp get-error-injection options" _get_error_injection + ;; + (set-error-injection) + local _set_error_injection + _set_error_injection=( + /dev/nvme':supply a device to use (required)' + --data=':Error injection data structure entries' + -d':alias for --data' + --number=':Number of valid error injection data entries' + -n':alias for --number' + --no-uuid':Skip UUID index search' + -N':alias for --no-uuid' + --type=':Error injection type' + -t':alias for --type' + --nrtdp=':Number of reads to trigger device panic' + -r':alias for --nrtdp' + --verbose':Increase the information detail in the output.' + -v':alias for --verbose' + --output-format=':Output format: normal|json|binary' + -o ':alias for --output-format' + --timeout=':value for timeout' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme ocp set-error-injection options" _set_error_injection + ;; (*) _files ;; @@ -336,16 +405,10 @@ _nvme () { (vs-internal-log) local _vs_internal_log _vs_internal_log=( - --type':Log type: ALL, - CONTROLLERINITTELEMETRY, - HOSTINITTELEMETRY, - HOSTINITTELEMETRYNOGEN, NLOG, - ASSERT, EVENT. Defaults to ALL.' + --type':Log type: ALL, CIT, HIT, NLOG, ASSERT, EVENT. Defaults to ALL.' -t':alias for --type' - --namespace-id':Namespace to get logs from.' - -n':alias for --namespace-id' - --dir-prefix':Output dir prefix; defaults to device serial number.' - -p':alias for --dir-prefix' + --dir-name':Output directory; defaults to current working directory.' + -d':alias for --dir-name' --verbose':To print out verbose info.' -v':alias for --verbose' ) @@ -393,24 +456,24 @@ _nvme () { local _parse_telemetry_log _parse_telemetry_log=( --host-generate':Controls when to generate new - host initiated report. Default - value '1' generates new host - initiated report, value '0' - causes retrieval of existing - log.' + host initiated report. Default + value '1' generates new host + initiated report, value '0' + causes retrieval of existing + log.' -g':alias for --host-generate' --controller-init':Gather report generated by the controller.' -c':alias for --controller-init' --data-area':Pick which telemetry data area to - report. Default is 3 to fetch - areas 1-3. Valid options are 1, - 2, 3, 4.' + report. Default is 3 to fetch + areas 1-3. Valid options are 1, + 2, 3, 4.' -d':alias for --data-area' --config-file':JSON configuration file' -j':alias for --config-file' --source-file':data source <device> is binary - file containing log dump instead - of block or character device' + file containing log dump instead + of block or character device' -s':alias for --source-file' ) _arguments '*:: :->subcmds' @@ -592,6 +655,8 @@ _nvme () { -a':alias of --all' --output-format=':Output format: normal|json|binary' -o':alias for --output-format' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme list-ns options" _listns @@ -974,6 +1039,8 @@ _nvme () { -n':alias to --namespace-id' --raw-binary':dump infos in binary format' -b':alias to --raw-binary' + --verbose':show infos verbosely' + -v':alias to --verbose' ) _arguments '*:: :->subcmds' _describe -t commands "nvme smart-log options" _smartlog @@ -1028,6 +1095,8 @@ _nvme () { -b':alias to --raw-binary' --csi=':command set identifier' -c':alias of --csi' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme effects-log options" _effects_log @@ -1105,6 +1174,8 @@ _nvme () { --cdw11=':dword 11 value, used for interrupt vector configuration only' --raw-binary':dump infos in binary format' -b':alias to --raw-binary' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-feature options" _getf @@ -1119,6 +1190,8 @@ _nvme () { -s':alias for --self-test-code' --wait':Wait for the test to finish' -w':alias to --wait' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme device-self-test options" _device_self_test @@ -1151,6 +1224,8 @@ _nvme () { -s':alias of --scp' --uuid=':UUID Index field required aligned with Scope' -U':alias of --uuid' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme lockdown options" _lockdown @@ -1171,6 +1246,8 @@ _nvme () { -V'alias to --value' --uuid-index=':uuid index' -U':alias for --uuid-index' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-feature options" _setf @@ -1183,6 +1260,8 @@ _nvme () { -O':alias to --offset' --value=':the value of the property to be set' -V':alias to --value' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-property options" _set_property @@ -1195,6 +1274,8 @@ _nvme () { -O':alias to --offset' --human-readable':show infos in readable format' -H':alias of --human-readable' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-property options" _get_property @@ -1221,17 +1302,19 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme format options" _format ;; - (fw-activate) - local _fwact - _fwact=( + (fw-commit) + local _fw_commit + _fw_commit=( /dev/nvme':supply a device to use (required)' --action=':activation action (required)? 0 - replace fw without activating, 1 - replace with activation, 2 - replace with activation at next reset' -a':alias of --action' --slot=':firmware slot to activate' -s':alias of --slot' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' - _describe -t commands "nvme fw-activate options" _fwact + _describe -t commands "nvme fw-commit options" _fw_commit ;; (fw-download) local _fwd @@ -1243,13 +1326,15 @@ _nvme () { -x':alias of --xfer' --offset=':starting offset, in dwords (defaults to 0, only useful if download is split across multiple files)' -O':alias of --offset' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme fw-download options" _fwd ;; (capacity-mgmt) - local _fwd - _fwd=( + local _capacity_mgmt + _capacity_mgmt=( /dev/nvme':supply a device to use (required)' --operation=':Operation to be performed by the controller' -O':alias of --operation' @@ -1259,9 +1344,11 @@ _nvme () { -l':alias of --cap-lower' --cap-upper=':Most significant 32 bits of the capacity in bytes' -u':alias of --cap-upper' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' - _describe -t commands "nvme capacity-mgmt options" _fwd + _describe -t commands "nvme capacity-mgmt options" _capacity_mgmt ;; (write-zeroes) local _write_zeroes @@ -1295,6 +1382,8 @@ _nvme () { -C':alias of --storage-tag-check' --dir-spec=':directive specific' -D':alias of --dir-spec' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write-zeroes options" _write_zeroes @@ -1313,6 +1402,8 @@ _nvme () { -T':alias of --dir-type' --dir-spec':directive specific' -S':alias of --dir-spec' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write-uncor options" _write_uncor @@ -1343,6 +1434,8 @@ _nvme () { -S':alias of --storage-tag' --storage-tag-check':Storage Tag field shall be checked as part of end-to-end data protection processing' -C':alias of --storage-tag-check' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme verify options" _verify @@ -1553,6 +1646,7 @@ _nvme () { -s':alias for --spsp' --tl=':transfer length as defined in SPC-4' -t':alias for --tl' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme security-send options" _ssend @@ -1571,6 +1665,8 @@ _nvme () { -a':alias for --al' --raw-binary':dump output in binary format' -b':alias for --raw-binary' + --timeout=':value for timeout' + -t':alias for --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme security-recv options" _srecv @@ -1613,6 +1709,7 @@ _nvme () { -i':alias for --iekey' --crkey':current reservation key' -c':alias for --crkey' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-acquire options" _acq @@ -1629,6 +1726,7 @@ _nvme () { -a':alias of --rrela' --iekey':ignore existing reservation key' -i':alias of --iekey' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-release options" _rel @@ -1645,6 +1743,8 @@ _nvme () { -e':alias of --eds' --raw-binary':dump output in binary format' -b':alias of --raw-binary' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-report options" _rep @@ -1665,6 +1765,8 @@ _nvme () { -r':alias for --rrega' --iekey':ignore existing reservation key' -i':alias for --iekey' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-register options" _reg @@ -1689,6 +1791,8 @@ _nvme () { -r':alias of --idr' --cdw11=':value for command dword 11' -c':alias for --cdw11' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dsm options" _dsm @@ -1729,10 +1833,12 @@ _nvme () { -S':alias of --dir-spec' --format=':source range entry format' -F':alias of --format' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' - _describe -t commands "nvme copy options" _copy - ;; + _describe -t commands "nvme copy options" _copy + ;; (flush) local _flush _flush=( @@ -1771,6 +1877,9 @@ _nvme () { -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --latency':latency statistics will be output following compare' + -t':alias of --latency' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme compare options" _comp @@ -1807,6 +1916,7 @@ _nvme () { -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme read options" _read @@ -1843,6 +1953,7 @@ _nvme () { -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --timeout=':value for timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write options" _wr @@ -1851,6 +1962,8 @@ _nvme () { local _shor _shor=( /dev/nvme':supply a device to use (required)' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme show-regs options" _shor @@ -1907,7 +2020,6 @@ _nvme () { --duplicate-connect':allow duplicate connections between same transport host and subsystem port' -D':alias for --duplicate-connect' --disable-sqflow':disable controller sq flow control (default false)' - -d':alias for --disable-sqflow' --hdr-digest':enable transport protocol header digest (TCP transport)' -g':alias for --hdr-digest' --data-digest':enable transport protocol data digest (TCP transport)' @@ -1920,7 +2032,6 @@ _nvme () { --persistent':' -p':alias for --' --quiet':' - -S':alias for --' --config=':Use specified JSON configuration file or none to disable' -J':alias for --config' --verbose':Increase logging verbosity' @@ -1979,7 +2090,6 @@ _nvme () { --duplicate-connect':allow duplicate connections between same transport host and subsystem port' -D':alias for --duplicate-connect' --disable-sqflow':disable controller sq flow control (default false)' - -d':alias for --disable-sqflow' --hdr-digest':enable transport protocol header digest (TCP transport)' -g':alias for --hdr-digest' --data-digest':enable transport protocol data digest (TCP transport)' @@ -1992,7 +2102,6 @@ _nvme () { --persistent':' -p':alias for --' --quiet':' - -S':alias for --' --config=':Use specified JSON configuration file or none to disable' -J':alias for --config' --verbose':Increase logging verbosity' @@ -2049,7 +2158,6 @@ _nvme () { --duplicate-connect':allow duplicate connections between same transport host and subsystem port' -D':alias for --duplicate-connect' --disable-sqflow':disable controller sq flow control (default false)' - -d':alias for --disable-sqflow' --hdr-digest':enable transport protocol header digest (TCP transport)' -g':alias for --hdr-digest' --data-digest':enable transport protocol data digest (TCP transport)' @@ -2122,6 +2230,28 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme show-hostnqn options" _show_hostnqn ;; + (tls-key) + local _tls_key + _tls_key=( + --verbose':show infos verbosely' + -v':alias of --verbose' + --output-format=':Output format: normal|json|binary' + -o':alias for --output-format' + --keyring=':name for keyring' + -r':alias for --keyring' + --keytype=':type for the key' + -t':alias for --keytype' + --keyfile='filename for reading/writing keys from' + -f':alias for --keyfile' + --import'import all keys into keyring' + -i':alias for --import' + --export'export all keys from keyring' + -e':alias for --export' + --revoke='revoke key from keyring' + -r':alias for --revoke' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme tls-key options" _tls_key (dir-receive) local _dir_receive _dir_receive=( @@ -2142,6 +2272,8 @@ _nvme () { -r':alias of --req-resource' --human-readable':show infos in readable format' -H':alias of --human-readable' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dir-receive options" _dir_receive @@ -2170,6 +2302,8 @@ _nvme () { -b':alias for --raw-binary' --input-file=':write/send file (default stdin)' -i':alias of --input-file' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dir-send options" _dir_send @@ -2186,6 +2320,8 @@ _nvme () { -a':alias of --act' --nr=':Number of Controller Resources(NR)' -n':alias of --nr' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme virt-mgmt options" _virt_mgmt @@ -2230,6 +2366,7 @@ _nvme () { (nvme-mi-recv) local _nvme_mi_recv _nvme_mi_recv=( + /dev/nvme':supply a device to use (required)' --opcode=':NVMe-MI opcode to send' -O':alias of --opcode' --namespace-id=':value for nsid' @@ -2251,6 +2388,7 @@ _nvme () { (nvme-mi-send) local _nvme_mi_send _nvme_mi_send=( + /dev/nvme':supply a device to use (required)' --opcode=':NVMe-MI opcode to send' -O':alias of --opcode' --namespace-id=':value for nsid' @@ -2272,6 +2410,7 @@ _nvme () { (get-reg) local _get_reg _get_reg=( + /dev/nvme':supply a device to use (required)' --offset=':offset of the requested register' -O':alias for --offset' --human-readable':show register in readable format' @@ -2308,6 +2447,8 @@ _nvme () { -o ':alias for --output-format' --verbose':Increase the information detail in the output.' -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-reg options" _get_reg @@ -2315,6 +2456,7 @@ _nvme () { (set-reg) local _set_reg _set_reg=( + /dev/nvme':supply a device to use (required)' --offset=':offset of the requested register' -O':alias for --offset' --value=':the value of the register to be set' @@ -2340,10 +2482,60 @@ _nvme () { -o ':alias for --output-format' --verbose':Increase the information detail in the output.' -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-reg options" _set_reg ;; + (io-mgmt-recv) + local _io_mgmt_recv + _io_mgmt_recv=( + /dev/nvme':supply a device to use (required)' + --namespace-id=':identifier of desired namespace' + -n':alias for --namespace-id' + --mos=':management operation specific' + -s':alias for --mos' + --mo=':management operation' + -m':alias for --mo' + --data=':optional file for data (default stdout)' + -d':alias for --data' + --data-len=':buffer len (if) data is received' + -l':alias for --data-len' + --output-format=':Output format: normal|json|binary' + -o ':alias for --output-format' + --verbose':Increase the information detail in the output.' + -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme set-reg options" _io_mgmt_recv + ;; + (io-mgmt-send) + local _io_mgmt_send + _io_mgmt_send=( + /dev/nvme':supply a device to use (required)' + --namespace-id=':identifier of desired namespace' + -n':alias for --namespace-id' + --mos=':management operation specific' + -s':alias for --mos' + --mo=':management operation' + -m':alias for --mo' + --data=':optional file for data (default stdin)' + -d':alias for --data' + --data-len=':buffer len (if) data is sent' + -l':alias for --data-len' + --output-format=':Output format: normal|json|binary' + -o ':alias for --output-format' + --verbose':Increase the information detail in the output.' + -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme set-reg options" _io_mgmt_send + ;; (version) local _version _version=( @@ -2364,8 +2556,12 @@ _nvme () { vs-fw-activate-history':Get firmware activation history log' device-capability-log':Get Device capability log' set-dssd-power-state-feature':Set DSSD Power State' + get-dssd-power-state-feature':Get DSSD Power State' telemetry-string-log':Retrieve Telemetry string Log Page' set-telemetry-profile':Set Telemetry Profile' + tcg-configuration-log':tcg configuration log' + get-error-injection':get error injection' + set-error-injection':set error injection' ) _arguments '*:: :->subcmds' _describe -t commands "nvme ocp options" _ocp @@ -2394,24 +2590,52 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme solidigm options" _solidigm ;; + (micron) + local micron + _micron=( + select-download':Selective Firmware Download' + vs-temperature-stats':Retrieve Micron temperature statistics' + vs-pcie-stats':Retrieve Micron PCIe error stats' + clear-pcie-correctable-errors':Clear correctable PCIe errors' + vs-internal-log':Retrieve Micron logs' + vs-telemetry-controller-option':Enable/Disable controller telemetry log generation' + vs-nand-stats':Retrieve NAND Stats' + vs-smart-ext-log':Retrieve extended SMART logs' + vs-drive-info':Retrieve Drive information' + plugin-version':Display plugin version info' + cloud-SSD-plugin-version':Display plugin version info' + log-page-directory':Retrieve log page directory' + vs-fw-activate-history':Display FW activation history' + latency-tracking':Latency monitoring feature control' + latency-stats':Latency information for tracked commands' + latency-logs':Latency log details tracked by drive' + vs-smart-add-log':Retrieve extended SMART data' + clear-fw-activate-history':Clear FW activation history' + vs-smbus-option':Enable/Disable SMBUS on the drive' + ocp-telemetry-log-parse':Parse OCP Telemetry DA1 and DA2 logs' + help':Display this help' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme micron options" _micron + ;; (help) local _h _h=( id-ctrl id-ns list-ns id-iocs create-ns delete-ns attach-ns detach-ns - list-ctrl get-ns-id get-log fw-log smart-log error-log get-feature - set-feature format fw-activate fw-download admin-passthru io-passthru - security-send security-recv resv-acquire resv-register resv-release - resv-report flush compare read write copy show-regs persistent-event-log - pred-lat-event-agg-log nvm-id-ctrl endurance-event-agg-log lba-status-log - resv-notif-log capacity-mgmt id-domain boot-part-log fid-support-effects-log - supported-log-pages lockdown media-unit-stat-log id-ns-lba-format nvm-id-ns - nvm-id-ns-lba-format supported-cap-config-log show-topology - list list-subsys id-ns-granularity primary-ctrl-caps list-secondary ns-descs - id-nvmset id-uuid list-endgrp telemetry-log changed-ns-list-log ana-log - effects-log endurance-log device-self-test self-test-log set-property - get-property write-zeroes write-uncor verify sanitize sanitize-log reset - subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect - dim disconnect disconnect-all gen-hostnqn show-hostnqn dir-receive dir-send - virt-mgmt rpmb version ocp solidigm + list-ctrl get-ns-id get-log fw-log smart-log error-log get-feature + set-feature format fw-activate fw-download admin-passthru io-passthru + security-send security-recv resv-acquire resv-register resv-release + resv-report flush compare read write copy show-regs persistent-event-log + pred-lat-event-agg-log nvm-id-ctrl endurance-event-agg-log lba-status-log + resv-notif-log capacity-mgmt id-domain boot-part-log fid-support-effects-log + supported-log-pages lockdown media-unit-stat-log id-ns-lba-format nvm-id-ns + nvm-id-ns-lba-format supported-cap-config-log show-topology + list list-subsys id-ns-granularity primary-ctrl-caps list-secondary ns-descs + id-nvmset id-uuid list-endgrp telemetry-log changed-ns-list-log ana-log + effects-log endurance-log device-self-test self-test-log set-property + get-property write-zeroes write-uncor verify sanitize sanitize-log reset + subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect + dim disconnect disconnect-all gen-hostnqn show-hostnqn tls-key dir-receive + dir-send virt-mgmt rpmb version ocp solidigm ) _arguments '*:: :->subcmds' _describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index f5cdb43..9e2e277 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -63,7 +63,7 @@ nvme_list_opts () { ;; "list-ns") opts+=" --namespace-id= -n --al -a --csi= -y \ - --outputformat= -o" + --outputformat= -o --timeout= -t" ;; "list-ctrl") opts+=" --namespace-id= -n --cntid= -c \ @@ -149,7 +149,7 @@ nvme_list_opts () { ;; "smart-log") opts+=" --namespace-id= -n --raw-binary -b \ - --output-format= -o" + --output-format= -o --verbose -v" ;; "ana-log") opts+=" --output-format -o" @@ -163,7 +163,7 @@ nvme_list_opts () { ;; "effects-log") opts+=" --output-format= -o --human-readable -H \ - --raw-binary -b" + --raw-binary -b --timeout= -t" ;; "endurance-log") opts+=" --output-format= -o --group-id -g" @@ -173,7 +173,7 @@ nvme_list_opts () { --output-format= -o" ;; "pred-lat-event-agg-log") - opts+=" --log-entries= -e --rae -r \ + opts+=" --log-entries= -e --rae -r \ --raw-binary -b --output-format= -o" ;; "persistent-event-log") @@ -181,7 +181,7 @@ nvme_list_opts () { --raw-binary -b --output-format= -o" ;; "endurance-event-agg-log") - opts+=" --log-entries= -e --rae -r \ + opts+=" --log-entries= -e --rae -r \ --raw-binary -b --output-format= -o" ;; "lba-status-log") @@ -205,10 +205,10 @@ nvme_list_opts () { "get-feature") opts+=" --namespace-id= -n --feature-id= -f --sel= -s \ --data-len= -l --cdw11= --c -uuid-index= -U --raw-binary -b \ - --human-readable -H" + --human-readable -H --timeout= -t" ;; "device-self-test") - opts+=" --namespace-id= -n --self-test-code= -s" + opts+=" --namespace-id= -n --self-test-code= -s --timeout= -t" ;; "self-test-log") opts+=" --dst-entries= -e --output-format= -o \ @@ -217,30 +217,31 @@ nvme_list_opts () { "set-feature") opts+=" --namespace-id= -n --feature-id= -f --value= -v \ --data-len= -l -data= -d --value= -v --save -s --uuid-index= -U \ - --cdw12= -c" + --cdw12= -c --timeout= -t" ;; "set-property") - opts+=" --offset= -O --value= -V" + opts+=" --offset= -O --value= -V --timeout= -t" ;; "get-property") - opts=+" --offset= -O --human-readable -H" + opts=+" --offset= -O --human-readable -H --timeout= -t" ;; "format") opts+=" --namespace-id= -n --timeout= -t --lbaf= -l \ --ses= -s --pil= -p -pi= -i --ms= -m --reset -r" ;; "fw-commit") - opts+=" --slot= -s --action= -a --bpid= -b" + opts+=" --slot= -s --action= -a --bpid= -b --timeout= -t" ;; "fw-download") - opts+=" --fw= -f --xfer= -x --offset= -O" + opts+=" --fw= -f --xfer= -x --offset= -O --timeout= -t" ;; "capacity-mgmt") opts+=" --operation= -O --element-id= -i --cap-lower= -l \ - --cap-upper= -u" + --cap-upper= -u --timeout= -t" ;; "lockdown") - opts+=" --ofi= -O --ifc= -f --prhbt= -p --scp= -s --uuid -U" + opts+=" --ofi= -O --ifc= -f --prhbt= -p --scp= -s --uuid -U \ + --timeout= -t" ;; "admin-passthru") opts+=" --opcode= -O --flags= -f --prefil= -p --rsvd= -R \ @@ -262,11 +263,11 @@ nvme_list_opts () { ;; "security-send") opts+=" --namespace-id= -n --file= -f --nssf= -N --secp= -p \ - --spsp= -s --tl= -t" + --spsp= -s --tl= -t --timeout=" ;; "security-recv") opts+=" --namespace-id= -n --size= -x --secp= -p --spsp= -s \ - --al= -t --raw-binary -b" + --al= -t --raw-binary -b --timeout=" ;; "get-lba-status") opts+=" --namespace-id= -n --start-lba= -s --max-dw= -m \ @@ -275,23 +276,24 @@ nvme_list_opts () { ;; "resv-acquire") opts+=" --namespace-id= -n --crkey= -c --prkey= -p \ - --rtype= -t --racqa= -a --iekey= -i" + --rtype= -t --racqa= -a --iekey= -i --timeout=" ;; "resv-register") opts+=" --namespace-id= -n --crkey= -c --nrkey= -k \ - --rrega= -r --cptpl= -p --iekey -i" + --rrega= -r --cptpl= -p --iekey -i --timeout= -t" ;; "resv-release") opts+=" --namespace-id= -n --crkey -c --rtype= -t \ - --rrela= -a --iekey -i" + --rrela= -a --iekey -i --timeout=" ;; "resv-report") opts+=" --namespace-id= -n --numd= -d --eds -e \ - --raw-binary= -b --output-format= -o" + --raw-binary= -b --output-format= -o --timeout= -t" ;; "dsm") - opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b\ - --slbs= -s --ad -d --idw -w --idr -r --cdw11= -c" + opts+=" --namespace-id= -n --ctx-attrs= -a --blocks= -b \ + --slbs= -s --ad -d --idw -w --idr -r --cdw11= -c \ + --timeout= -t" ;; "copy") opts+=" --namespace-id= -n --sdlba= -d --blocks= -b --slbs= -s \ @@ -300,7 +302,7 @@ nvme_list_opts () { --ref-tag= -r --expected-ref-tag= -R \ --app-tag= -a --expected-app-tag= -A \ --app-tag-mask= -m --expected-app-tag-mask= -M \ - --dir-type= -T --dir-spec= -S --format= -F" + --dir-type= -T --dir-spec= -S --format= -F --timeout= -t" ;; "flush") opts+=" --namespace-id= -n" @@ -312,7 +314,7 @@ nvme_list_opts () { --app-tag= -a --limited-retry -l \ --force-unit-access -f --storage-tag-check -C \ --dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \ - --dry-run -w --latency -t" + --dry-run -w --latency -t --timeout=" ;; "read") opts+=" --start-block= -s --block-count= -c --data-size= -z \ @@ -321,7 +323,7 @@ nvme_list_opts () { --app-tag= -a --limited-retry -l \ --force-unit-access -f --storage-tag-check -C \ --dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \ - --dry-run -w --latency -t" + --dry-run -w --latency -t --timeout=" ;; "write") opts+=" --start-block= -s --block-count= -c --data-size= -z \ @@ -330,7 +332,7 @@ nvme_list_opts () { --app-tag= -a --limited-retry -l \ --force-unit-access -f --storage-tag-check -C \ --dir-type= -T --dir-spec= -S --dsm= -D --show-command -V \ - --dry-run -w --latency -t" + --dry-run -w --latency -t --timeout=" ;; "write-zeroes") opts+=" --namespace-id= -n --start-block= -s \ @@ -338,18 +340,19 @@ nvme_list_opts () { --force-unit-access -f --prinfo= -p --ref-tag= -r \ --app-tag-mask= -m --app-tag= -a \ --storage-tag= -S --storage-tag-check -C \ - --dir-type= -T --dir-spec= -S" + --dir-type= -T --dir-spec= -S --timeout= -t" ;; "write-uncor") opts+=" --namespace-id= -n --start-block= -s \ - --block-count= -c --dir-type= -T --dir-spec= -S" + --block-count= -c --dir-type= -T --dir-spec= -S \ + --timeout= -t" ;; "verify") opts+=" --namespace-id= -n --start-block= -s \ --block-count= -c --limited-retry -l \ --force-unit-access -f --prinfo= -p --ref-tag= -r \ --app-tag= -a --app-tag-mask= -m \ - --storage-tag= -S --storage-tag-check -C" + --storage-tag= -S --storage-tag-check -C --timeout= -t" ;; "sanitize") opts+=" --no-dealloc -d --oipbp -i --owpass= -n \ @@ -374,7 +377,7 @@ nvme_list_opts () { opts+=$NO_OPTS ;; "show-regs") - opts+=" --output-format= -o --human-readable -H" + opts+=" --output-format= -o --human-readable -H --timeout= -t" ;; "discover") opts+=" --transport= -t -traddr= -a -trsvcid= -s \ @@ -385,7 +388,7 @@ nvme_list_opts () { --tos= -T --hdr-digest= -g --data-digest -G \ --nr-io-queues= -i --nr-write-queues= -W \ --nr-poll-queues= -P --queue-size= -Q \ - --persistent -p --quiet -S \ + --persistent -p --quiet \ --output-format= -o" ;; "connect-all") @@ -397,7 +400,7 @@ nvme_list_opts () { --tos= -T --hdr-digest= -g --data-digest -G \ --nr-io-queues= -i --nr-write-queues= -W \ --nr-poll-queues= -P --queue-size= -Q \ - --persistent -p --quiet -S \ + --persistent -p --quiet \ --output-format= -o" ;; "connect") @@ -406,7 +409,7 @@ nvme_list_opts () { --nr-poll-queues= -P --queue-size= -Q \ --keep-alive-tmo= -k --reconnect-delay= -r \ --ctrl-loss-tmo= -l --fast-io-fail-tmo= -f \ - --tos= -T --duplicate-connect -D --disable-sqflow -d\ + --tos= -T --duplicate-connect -D --disable-sqflow \ --hdr-digest -g --data-digest -G --output-format= -o" ;; "dim") @@ -424,18 +427,24 @@ nvme_list_opts () { "show-hostnqn") opts+=$NO_OPTS ;; + "tls-key") + opts+=" --output-format= -o --verbose -v --keyring= -k \ + --keytype= -k --keyfile= -f --import -i \ + --export -e --revoke= -r" + ;; "dir-receive") opts+=" --namespace-id= -n --data-len= -l --raw-binary -b \ --dir-type= -D --dir-spec= -S --dir-oper= -O \ - --req-resource= -r --human-readable -H" + --req-resource= -r --human-readable -H --timeout= -t" ;; "dir-send") opts+=" --namespace-id= -n --data-len= -l --dir-type= -D \ --target-dir= -T --dir-spec= -S --dir-oper= -O \ - --endir= -e --human-readable -H --raw-binary -b" + --endir= -e --human-readable -H --raw-binary -b \ + --timeout= -t" ;; "virt-mgmt") - opts+=" --cntlid= -c --rt= -r --act= -a --nr= -n" + opts+=" --cntlid= -c --rt= -r --act= -a --nr= -n --timeout= -t" ;; "rpmb") opts+=" --cmd= -c --msgfile= -f --keyfile= -g \ @@ -459,13 +468,14 @@ nvme_list_opts () { --pmrcap --pmrsts --pmrebs --pmrswtp --intms --intmc \ --cc --csts --nssr --aqa --asq --acq --bprsel --bpmbl \ --cmbmsc --nssd --pmrctl --pmrmscl --pmrmscu \ - --output-format -o --verbose -v" + --output-format -o --verbose -v --timeout= -t" ;; "set-reg") opts+=" --offset, -O --value= -V --mmio32 -m --intms= --intmc= \ --cc= --csts= --nssr= --aqa= --asq= --acq= --bprsel= \ --bpmbl= --cmbmsc= --nssd= --pmrctl= --pmrmscl= \ - --pmrmscu= --output-format= -o --verbose= -v" + --pmrmscu= --output-format= -o --verbose= -v \ + --timeout= -t" ;; "version") opts+=$NO_OPTS @@ -487,7 +497,7 @@ nvme_list_opts () { } plugin_intel_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -543,7 +553,7 @@ plugin_intel_opts () { } plugin_amzn_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -575,7 +585,7 @@ plugin_amzn_opts () { } plugin_memblaze_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -630,7 +640,7 @@ plugin_memblaze_opts () { } plugin_wdc_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -742,7 +752,7 @@ plugin_wdc_opts () { } plugin_huawei_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -777,7 +787,7 @@ plugin_huawei_opts () { } plugin_toshiba_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -814,7 +824,7 @@ plugin_toshiba_opts () { } plugin_micron_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -890,7 +900,7 @@ plugin_micron_opts () { } plugin_seagate_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -945,7 +955,7 @@ plugin_seagate_opts () { } plugin_virtium_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -979,7 +989,7 @@ plugin_virtium_opts () { } plugin_shannon_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1022,7 +1032,7 @@ plugin_shannon_opts () { } plugin_dera_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1053,7 +1063,7 @@ plugin_dera_opts () { } plugin_sfx_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1102,7 +1112,7 @@ plugin_sfx_opts () { } plugin_solidigm_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1185,7 +1195,7 @@ plugin_solidigm_opts () { } plugin_transcend_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1219,7 +1229,7 @@ plugin_transcend_opts () { } plugin_zns_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1281,7 +1291,7 @@ plugin_zns_opts () { ;; "set-zone-desc") opts+=" --namespace-id= -n --start-lba= -s \ - --data= -d --timeout= -t --zrwa -r" + --data= -d --timeout= -t --zrwa -r" ;; "flush-zone") opts+=" --namespace-id= -n --last-lba= -l --timeout= -t" @@ -1307,7 +1317,7 @@ plugin_zns_opts () { } plugin_nvidia_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1339,7 +1349,7 @@ plugin_nvidia_opts () { } plugin_ymtc_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1370,7 +1380,7 @@ plugin_ymtc_opts () { } plugin_inspur_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1401,7 +1411,7 @@ plugin_inspur_opts () { } plugin_ocp_opts () { - local opts="" + local opts="" local compargs="" local nonopt_args=0 @@ -1434,8 +1444,9 @@ plugin_ocp_opts () { --latency_monitor_feature_enable= -e" ;; "internal-log") - opts+=" --telemetry_type= -t --telemetry_data_area= -a \ - --output-file= -o" + opts+=" --telemetry-log= -l --string-log= -s \ + --output-file= -o --output-format= -f \ + --data-area= -a --telemetry-type= -t" ;; "clear-fw-activate-history") opts+=" --no-uuid -n" @@ -1455,6 +1466,9 @@ plugin_ocp_opts () { "set-dssd-power-state-feature") opts+=" --power-state= -p --no-uuid -n --save -s" ;; + "get-dssd-power-state-feature") + opts+=" --sel= -S --all -a --no-uuid -n" + ;; "telemetry-string-log") opts+=" --output-file= -o" ;; @@ -1464,9 +1478,19 @@ plugin_ocp_opts () { "set-dssd-async-event-config") opts+=" --enable-panic-notices -e --save -s" ;; - "get-dssd-power-state-feature") + "get-dssd-async-event-config") opts+=" --sel= -S" ;; + "tcg-configuration-log") + opts+=" --output-file= -o" + ;; + "get-error-injection") + opts+=" --sel= -s --no-uuid -n" + ;; + "set-error-injection") + opts+=" --data= -d --number= -n --no-uuid -N --type= -t \ + --nrtdp= -r --verbose -v --output-format -o --timeout=" + ;; "help") opts+=$NO_OPTS ;; @@ -1513,7 +1537,7 @@ _nvme_subcmds () { vs-drive-info plugin-version cloud-SSD-plugin-version \ log-page-directory vs-fw-activate-history \ vs-error-reason-identifier vs-smart-add-log \ - clear-fw-activate-history vs-smbus-option" + clear-fw-activate-history vs-smbus-option ocp-telemetry-log-parse" [seagate]="vs-temperature-stats vs-log-page-sup \ vs-smart-add-log vs-pcie-stats clear-pcie-correctable-errors \ get-host-tele get-ctrl-tele vs-internal-log \ @@ -1523,7 +1547,7 @@ _nvme_subcmds () { [dera]="smart-log-add" [sfx]="smart-log-add lat-stats get-bad-block query-cap \ change-cap set-feature get-feature" - [solidigm]="id-ctrl vs-smart-add-log garbage-collect-log \ + [solidigm]="id-ctrl vs-smart-add-log garbage-collect-log \ vs-internal-log latency-tracking-log \ clear-pcie-correctable-errors parse-telemetry-log \ clear-fw-activate-history vs-fw-activate-history log-page-directory \ @@ -1542,9 +1566,10 @@ _nvme_subcmds () { clear-fw-activate-history eol-plp-failure-mode \ clear-pcie-correctable-error-counters \ vs-fw-activate-history device-capability-log \ - set-dssd-power-state-feature telemetry-string-log \ - set-telemetry-profile set-dssd-async-event-config \ - get-dssd-async-event-config" + set-dssd-power-state-feature get-dssd-power-state-feature \ + telemetry-string-log set-telemetry-profile \ + set-dssd-async-event-config get-dssd-async-event-config \ + get-error-injection set-error-injection" ) # Associative array mapping plugins to corresponding option completions @@ -1561,7 +1586,7 @@ _nvme_subcmds () { [shannon]="plugin_shannon_opts" [dera]="plugin_dera_opts" [sfx]="plugin_sfx_opts" - [solidigm]="plugin_solidigm_opts" + [solidigm]="plugin_solidigm_opts" [transcend]="plugin_transcend_opts" [zns]="plugin_zns_opts" [nvidia]="plugin_nvidia_opts" @@ -1592,7 +1617,7 @@ _nvme_subcmds () { sanitize sanitize-log reset subsystem-reset \ ns-rescan show-regs discover connect-all \ connect disconnect disconnect-all gen-hostnqn \ - show-hostnqn dir-receive dir-send virt-mgmt \ + show-hostnqn tls-key dir-receive dir-send virt-mgmt \ rpmb boot-part-log fid-support-effects-log \ supported-log-pages lockdown media-unit-stat-log \ supported-cap-config-log dim show-topology list-endgrp \ @@ -45,6 +45,7 @@ #include "nbft.h" #include "nvme-print.h" #include "fabrics.h" +#include "util/cleanup.h" #include "util/logging.h" #define PATH_NVMF_DISC SYSCONFDIR "/nvme/discovery.conf" @@ -114,7 +115,7 @@ static const char *nvmf_context = "execution context identification string"; 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("disable-sqflow", 0, &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("tls", 0, &c.tls, nvmf_tls), \ @@ -195,9 +196,9 @@ static nvme_ctrl_t __create_discover_ctrl(nvme_root_t r, nvme_host_t h, return c; } -static nvme_ctrl_t create_discover_ctrl(nvme_root_t r, nvme_host_t h, - struct nvme_fabrics_config *cfg, - struct tr_config *trcfg) +nvme_ctrl_t nvmf_create_discover_ctrl(nvme_root_t r, nvme_host_t h, + struct nvme_fabrics_config *cfg, + struct tr_config *trcfg) { _cleanup_free_ struct nvme_id_ctrl *id = NULL; nvme_ctrl_t c; @@ -261,7 +262,7 @@ static void save_discovery_log(char *raw, struct nvmf_discovery_log *log) static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg, char *raw, bool connect, bool persistent, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { struct nvmf_discovery_log *log = NULL; nvme_subsystem_t s = nvme_ctrl_get_subsystem(c); @@ -365,11 +366,15 @@ static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg, nvme_free_ctrl(child); } } else if (errno == ENVME_CONNECT_ALREADY && !quiet) { - char *traddr = log->entries[i].traddr; + const char *subnqn = log->entries[i].subnqn; + const char *trtype = nvmf_trtype_str(log->entries[i].trtype); + const char *traddr = log->entries[i].traddr; + const char *trsvcid = log->entries[i].trsvcid; fprintf(stderr, - "traddr=%s is already connected\n", - traddr); + "already connected to hostnqn=%s,nqn=%s,transport=%s,traddr=%s,trsvcid=%s\n", + nvme_host_get_hostnqn(h), subnqn, + trtype, traddr, trsvcid); } } } @@ -378,8 +383,7 @@ static int __discover(nvme_ctrl_t c, struct nvme_fabrics_config *defcfg, return 0; } -static char *get_default_trsvcid(const char *transport, - bool discovery_ctrl) +char *nvmf_get_default_trsvcid(const char *transport, bool discovery_ctrl) { if (!transport) return NULL; @@ -407,8 +411,8 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, char *ptr, **argv, *p, line[4096]; int argc, ret = 0; unsigned int verbose = 0; - FILE *f; - enum nvme_print_flags flags; + _cleanup_file_ FILE *f = NULL; + nvme_print_flags_t flags; char *format = "normal"; struct nvme_fabrics_config cfg; bool force = false; @@ -417,7 +421,7 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, OPT_FMT("output-format", 'o', &format, output_format), OPT_FILE("raw", 'r', &raw, "save raw output to file"), OPT_FLAG("persistent", 'p', &persistent, "persistent discovery connection"), - OPT_FLAG("quiet", 'S', &quiet, "suppress already connected errors"), + OPT_FLAG("quiet", 0, &quiet, "suppress already connected errors"), OPT_INCR("verbose", 'v', &verbose, "Increase logging verbosity"), OPT_FLAG("force", 0, &force, "Force persistent discovery controller creation")); @@ -432,15 +436,12 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, f = fopen(PATH_NVMF_DISC, "r"); if (f == NULL) { fprintf(stderr, "No params given and no %s\n", PATH_NVMF_DISC); - errno = ENOENT; - return -1; + return -ENOENT; } argv = calloc(MAX_DISC_ARGS, sizeof(char *)); - if (!argv) { - ret = -1; - goto out; - } + if (!argv) + return -1; argv[0] = "discover"; memset(line, 0, sizeof(line)); @@ -465,7 +466,7 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, goto next; if (!trsvcid) - trsvcid = get_default_trsvcid(transport, true); + trsvcid = nvmf_get_default_trsvcid(transport, true); struct tr_config trcfg = { .subsysnqn = subsysnqn, @@ -485,7 +486,7 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, } } - c = create_discover_ctrl(r, h, &cfg, &trcfg); + c = nvmf_create_discover_ctrl(r, h, &cfg, &trcfg); if (!c) goto next; @@ -498,95 +499,134 @@ next: memset(&cfg, 0, sizeof(cfg)); } free(argv); -out: - fclose(f); + return ret; } -static int discover_from_json_config_file(nvme_root_t r, nvme_host_t h, - const char *desc, bool connect, +static int _discover_from_json_config_file(nvme_root_t r, nvme_host_t h, + nvme_ctrl_t c, const char *desc, bool connect, const struct nvme_fabrics_config *defcfg, - enum nvme_print_flags flags, + nvme_print_flags_t flags, bool force) { - const char *transport, *traddr, *host_traddr, *host_iface, *trsvcid, *subsysnqn; - nvme_subsystem_t s; - nvme_ctrl_t c, cn; + const char *transport, *traddr, *host_traddr; + const char *host_iface, *trsvcid, *subsysnqn; struct nvme_fabrics_config cfg; + nvme_ctrl_t cn; int ret = 0; - nvme_for_each_subsystem(h, s) { - nvme_subsystem_for_each_ctrl(s, c) { - transport = nvme_ctrl_get_transport(c); - traddr = nvme_ctrl_get_traddr(c); - host_traddr = nvme_ctrl_get_host_traddr(c); - host_iface = nvme_ctrl_get_host_iface(c); + transport = nvme_ctrl_get_transport(c); + traddr = nvme_ctrl_get_traddr(c); + host_traddr = nvme_ctrl_get_host_traddr(c); + host_iface = nvme_ctrl_get_host_iface(c); + + if (!transport && !traddr) + return 0; + + /* ignore none fabric transports */ + if (strcmp(transport, "tcp") && + strcmp(transport, "rdma") && + strcmp(transport, "fc")) + return 0; + + /* ignore if no host_traddr for fc */ + if (!strcmp(transport, "fc")) { + if (!host_traddr) { + fprintf(stderr, "host_traddr required for fc\n"); + return 0; + } + } - if (!transport && !traddr) - continue; + /* ignore if host_iface set for any transport other than tcp */ + if (!strcmp(transport, "rdma") || !strcmp(transport, "fc")) { + if (host_iface) { + fprintf(stderr, + "host_iface not permitted for rdma or fc\n"); + return 0; + } + } - /* ignore none fabric transports */ - if (strcmp(transport, "tcp") && - strcmp(transport, "rdma") && - strcmp(transport, "fc")) - continue; + trsvcid = nvme_ctrl_get_trsvcid(c); + if (!trsvcid || !strcmp(trsvcid, "")) + trsvcid = nvmf_get_default_trsvcid(transport, true); - /* ignore if no host_traddr for fc */ - if (!strcmp(transport, "fc")) { - if (!host_traddr) { - fprintf(stderr, "host_traddr required for fc\n"); - continue; - } - } + if (force) + subsysnqn = nvme_ctrl_get_subsysnqn(c); + else + subsysnqn = NVME_DISC_SUBSYS_NAME; - /* ignore if host_iface set for any transport other than tcp */ - if (!strcmp(transport, "rdma") || !strcmp(transport, "fc")) { - if (host_iface) { - fprintf(stderr, "host_iface not permitted for rdma or fc\n"); - continue; - } - } + if (nvme_ctrl_is_persistent(c)) + persistent = true; - trsvcid = nvme_ctrl_get_trsvcid(c); - if (!trsvcid || !strcmp(trsvcid, "")) - trsvcid = get_default_trsvcid(transport, true); + memcpy(&cfg, defcfg, sizeof(cfg)); - if (force) - subsysnqn = nvme_ctrl_get_subsysnqn(c); - else - subsysnqn = NVME_DISC_SUBSYS_NAME; + struct tr_config trcfg = { + .subsysnqn = subsysnqn, + .transport = transport, + .traddr = traddr, + .host_traddr = host_traddr, + .host_iface = host_iface, + .trsvcid = trsvcid, + }; - if (nvme_ctrl_is_persistent(c)) - persistent = true; + if (!force) { + cn = lookup_ctrl(h, &trcfg); + if (cn) { + __discover(cn, &cfg, raw, connect, true, flags); + return 0; + } + } - memcpy(&cfg, defcfg, sizeof(cfg)); + cn = nvmf_create_discover_ctrl(r, h, &cfg, &trcfg); + if (!cn) + return 0; - struct tr_config trcfg = { - .subsysnqn = subsysnqn, - .transport = transport, - .traddr = traddr, - .host_traddr = host_traddr, - .host_iface = host_iface, - .trsvcid = trsvcid, - }; + __discover(cn, &cfg, raw, connect, persistent, flags); + if (!(persistent || is_persistent_discovery_ctrl(h, cn))) + ret = nvme_disconnect_ctrl(cn); + nvme_free_ctrl(cn); - if (!force) { - cn = lookup_ctrl(h, &trcfg); - if (cn) { - __discover(cn, &cfg, raw, connect, - true, flags); - continue; - } - } + return ret; +} + +static int discover_from_json_config_file(nvme_root_t r, const char *hostnqn, + const char *hostid, const char *desc, + bool connect, + const struct nvme_fabrics_config *defcfg, + nvme_print_flags_t flags, + bool force) +{ + const char *hnqn, *hid; + nvme_host_t h; + nvme_subsystem_t s; + nvme_ctrl_t c; + int ret = 0, err; - cn = create_discover_ctrl(r, h, &cfg, &trcfg); - if (!cn) + nvme_for_each_host(r, h) { + nvme_for_each_subsystem(h, s) { + hnqn = nvme_host_get_hostnqn(h); + if (hostnqn && hnqn && strcmp(hostnqn, hnqn)) + continue; + hid = nvme_host_get_hostid(h); + if (hostid && hid && strcmp(hostid, hid)) continue; - __discover(cn, &cfg, raw, connect, persistent, flags); - if (!(persistent || is_persistent_discovery_ctrl(h, cn))) - ret = nvme_disconnect_ctrl(cn); - nvme_free_ctrl(cn); + nvme_subsystem_for_each_ctrl(s, c) { + err = _discover_from_json_config_file( + r, h, c, desc, connect, defcfg, + flags, force); + + if (err) { + fprintf(stderr, + "failed to connect to hostnqn=%s,nqn=%s,%s\n", + nvme_host_get_hostnqn(h), + nvme_subsystem_get_name(s), + nvme_ctrl_get_address(c)); + + if (!ret) + ret = err; + } + } } } @@ -627,57 +667,26 @@ static int nvme_read_volatile_config(nvme_root_t r) return ret; } -char *nvmf_hostid_from_hostnqn(const char *hostnqn) +static int nvme_read_config_checked(nvme_root_t r, const char *filename) { - const char *uuid; - - if (!hostnqn) - return NULL; - - uuid = strstr(hostnqn, "uuid:"); - if (!uuid) - return NULL; - - return strdup(uuid + strlen("uuid:")); -} - -void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn, unsigned int verbose) -{ - _cleanup_free_ char *hostid_from_file = NULL; - _cleanup_free_ char *hostid_from_hostnqn = NULL; - - if (!hostid) - return; - - hostid_from_file = nvmf_hostid_from_file(); - if (hostid_from_file && strcmp(hostid_from_file, hostid)) { - if (verbose) - fprintf(stderr, - "warning: use generated hostid instead of hostid file\n"); - } - - if (!hostnqn) - return; - - hostid_from_hostnqn = nvmf_hostid_from_hostnqn(hostnqn); - if (hostid_from_hostnqn && strcmp(hostid_from_hostnqn, hostid)) { - if (verbose) - fprintf(stderr, - "warning: use hostid which does not match uuid in hostnqn\n"); - } + if (!access(filename, F_OK)) + return -ENOENT; + if (nvme_read_config(r, filename)) + return -errno; + return 0; } int nvmf_discover(const char *desc, int argc, char **argv, bool connect) { char *subsysnqn = NVME_DISC_SUBSYS_NAME; char *hostnqn = NULL, *hostid = NULL, *hostkey = NULL; - char *hostnqn_arg, *hostid_arg; char *transport = NULL, *traddr = NULL, *trsvcid = NULL; char *config_file = PATH_NVMF_CONFIG; - char *hnqn = NULL, *hid = NULL; + _cleanup_free_ char *hnqn = NULL; + _cleanup_free_ char *hid = NULL; char *context = NULL; - enum nvme_print_flags flags; - nvme_root_t r; + nvme_print_flags_t flags; + _cleanup_nvme_root_ nvme_root_t r = NULL; nvme_host_t h; nvme_ctrl_t c = NULL; unsigned int verbose = 0; @@ -695,7 +704,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) OPT_FMT("output-format", 'o', &format, output_format), OPT_FILE("raw", 'r', &raw, "save raw output to file"), OPT_FLAG("persistent", 'p', &persistent, "persistent discovery connection"), - OPT_FLAG("quiet", 'S', &quiet, "suppress already connected errors"), + OPT_FLAG("quiet", 0, &quiet, "suppress already connected errors"), OPT_STRING("config", 'J', "FILE", &config_file, nvmf_config_file), OPT_INCR("verbose", 'v', &verbose, "Increase logging verbosity"), OPT_FLAG("dump-config", 'O', &dump_config, "Dump configuration file to stdout"), @@ -730,38 +739,30 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) } if (context) nvme_root_set_application(r, context); - ret = nvme_scan_topology(r, NULL, NULL); - if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); - return ret; - } - if (!nvme_read_config(r, config_file)) + if (!nvme_read_config_checked(r, config_file)) json_config = true; if (!nvme_read_volatile_config(r)) json_config = true; - hostnqn_arg = hostnqn; - hostid_arg = hostid; - if (!hostnqn) - hostnqn = hnqn = nvmf_hostnqn_from_file(); - if (!hostnqn) { - hostnqn = hnqn = nvmf_hostnqn_generate(); - hostid = hid = nvmf_hostid_from_hostnqn(hostnqn); + nvme_root_skip_namespaces(r); + ret = nvme_scan_topology(r, NULL, NULL); + if (ret < 0) { + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); + return ret; } - if (!hostid) - hostid = hid = nvmf_hostid_from_file(); - if (!hostid && hostnqn) - hostid = hid = nvmf_hostid_from_hostnqn(hostnqn); - nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose); - h = nvme_lookup_host(r, hostnqn, hostid); + + ret = nvme_host_get_ids(r, hostnqn, hostid, &hnqn, &hid); + if (ret < 0) + return -errno; + + h = nvme_lookup_host(r, hnqn, hid); if (!h) { ret = ENOMEM; goto out_free; } + if (device) { if (!strcmp(device, "none")) device = NULL; @@ -773,16 +774,16 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) if (!device && !transport && !traddr) { if (!nonbft) - discover_from_nbft(r, hostnqn_arg, hostid_arg, - hostnqn, hostid, desc, connect, + discover_from_nbft(r, hostnqn, hostid, + hnqn, hid, desc, connect, &cfg, nbft_path, flags, verbose); if (nbft) goto out_free; if (json_config) - ret = discover_from_json_config_file(r, h, desc, - connect, &cfg, + ret = discover_from_json_config_file(r, hostnqn, hostid, + desc, connect, &cfg, flags, force); if (ret || access(PATH_NVMF_DISC, F_OK)) goto out_free; @@ -792,7 +793,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) } if (!trsvcid) - trsvcid = get_default_trsvcid(transport, true); + trsvcid = nvmf_get_default_trsvcid(transport, true); struct tr_config trcfg = { .subsysnqn = subsysnqn, @@ -862,7 +863,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) } if (!c) { /* No device or non-matching device, create a new controller */ - c = create_discover_ctrl(r, h, &cfg, &trcfg); + c = nvmf_create_discover_ctrl(r, h, &cfg, &trcfg); if (!c) { if (errno != ENVME_CONNECT_IGNORED) fprintf(stderr, @@ -879,11 +880,8 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect) nvme_free_ctrl(c); out_free: - free(hnqn); - free(hid); if (dump_config) nvme_dump_config(r); - nvme_free_tree(r); return ret; } @@ -894,15 +892,16 @@ int nvmf_connect(const char *desc, int argc, char **argv) char *transport = NULL, *traddr = NULL; char *trsvcid = NULL, *hostnqn = NULL, *hostid = NULL; char *hostkey = NULL, *ctrlkey = NULL; - char *hnqn = NULL, *hid = NULL; + _cleanup_free_ char *hnqn = NULL; + _cleanup_free_ char *hid = NULL; char *config_file = PATH_NVMF_CONFIG; char *context = NULL; unsigned int verbose = 0; - nvme_root_t r; + _cleanup_nvme_root_ nvme_root_t r = NULL; nvme_host_t h; - nvme_ctrl_t c; + _cleanup_nvme_ctrl_ nvme_ctrl_t c = NULL; int ret; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_fabrics_config cfg = { 0 }; char *format = "normal"; @@ -961,29 +960,23 @@ int nvmf_connect(const char *desc, int argc, char **argv) } if (context) nvme_root_set_application(r, context); + + nvme_read_config(r, config_file); + nvme_read_volatile_config(r); + + nvme_root_skip_namespaces(r); ret = nvme_scan_topology(r, NULL, NULL); if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); return ret; } - nvme_read_config(r, config_file); - nvme_read_volatile_config(r); - if (!hostnqn) - hostnqn = hnqn = nvmf_hostnqn_from_file(); - if (!hostnqn) { - hostnqn = hnqn = nvmf_hostnqn_generate(); - hostid = hid = nvmf_hostid_from_hostnqn(hostnqn); - } - if (!hostid) - hostid = hid = nvmf_hostid_from_file(); - if (!hostid && hostnqn) - hostid = hid = nvmf_hostid_from_hostnqn(hostnqn); - nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose); - h = nvme_lookup_host(r, hostnqn, hostid); + ret = nvme_host_get_ids(r, hostnqn, hostid, &hnqn, &hid); + if (ret < 0) + return -errno; + + h = nvme_lookup_host(r, hnqn, hid); if (!h) { errno = ENOMEM; goto out_free; @@ -991,7 +984,7 @@ int nvmf_connect(const char *desc, int argc, char **argv) if (hostkey) nvme_host_set_dhchap_key(h, hostkey); if (!trsvcid) - trsvcid = get_default_trsvcid(transport, false); + trsvcid = nvmf_get_default_trsvcid(transport, false); struct tr_config trcfg = { .subsysnqn = subsysnqn, @@ -1030,11 +1023,8 @@ int nvmf_connect(const char *desc, int argc, char **argv) } out_free: - free(hnqn); - free(hid); if (dump_config) nvme_dump_config(r); - nvme_free_tree(r); return -errno; } @@ -1084,7 +1074,7 @@ static void nvmf_disconnect_nqn(nvme_root_t r, char *nqn) int nvmf_disconnect(const char *desc, int argc, char **argv) { const char *device = "nvme device handle"; - nvme_root_t r; + _cleanup_nvme_root_ nvme_root_t r = NULL; nvme_ctrl_t c; char *p; int ret; @@ -1122,13 +1112,20 @@ int nvmf_disconnect(const char *desc, int argc, char **argv) nvme_strerror(errno)); return -errno; } + nvme_root_skip_namespaces(r); ret = nvme_scan_topology(r, NULL, NULL); if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); - return ret; + /* + * Do not report an error when the modules are not + * loaded, this allows the user to unconditionally call + * disconnect. + */ + if (errno == ENOENT) + return 0; + + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); + return -errno; } if (cfg.nqn) @@ -1145,7 +1142,6 @@ int nvmf_disconnect(const char *desc, int argc, char **argv) if (!c) { fprintf(stderr, "Did not find device %s\n", p); - nvme_free_tree(r); return -errno; } ret = nvme_disconnect_ctrl(c); @@ -1155,16 +1151,15 @@ int nvmf_disconnect(const char *desc, int argc, char **argv) p, nvme_strerror(errno)); } } - nvme_free_tree(r); return 0; } int nvmf_disconnect_all(const char *desc, int argc, char **argv) { + _cleanup_nvme_root_ nvme_root_t r = NULL; nvme_host_t h; nvme_subsystem_t s; - nvme_root_t r; nvme_ctrl_t c; int ret; @@ -1193,13 +1188,20 @@ int nvmf_disconnect_all(const char *desc, int argc, char **argv) nvme_strerror(errno)); return -errno; } + nvme_root_skip_namespaces(r); ret = nvme_scan_topology(r, NULL, NULL); if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); - return ret; + /* + * Do not report an error when the modules are not + * loaded, this allows the user to unconditionally call + * disconnect. + */ + if (errno == ENOENT) + return 0; + + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); + return -errno; } nvme_for_each_host(r, h) { @@ -1219,7 +1221,6 @@ int nvmf_disconnect_all(const char *desc, int argc, char **argv) } } } - nvme_free_tree(r); return 0; } @@ -1229,11 +1230,12 @@ int nvmf_config(const char *desc, int argc, char **argv) char *subsysnqn = NULL; char *transport = NULL, *traddr = NULL; char *trsvcid = NULL, *hostnqn = NULL, *hostid = NULL; - char *hnqn = NULL, *hid = NULL; + _cleanup_free_ char *hnqn = NULL; + _cleanup_free_ char *hid = NULL; char *hostkey = NULL, *ctrlkey = NULL; char *config_file = PATH_NVMF_CONFIG; unsigned int verbose = 0; - nvme_root_t r; + _cleanup_nvme_root_ nvme_root_t r = NULL; int ret; struct nvme_fabrics_config cfg; bool scan_tree = false, modify_config = false, update_config = false; @@ -1264,17 +1266,18 @@ int nvmf_config(const char *desc, int argc, char **argv) nvme_strerror(errno)); return -errno; } + + nvme_read_config(r, config_file); + if (scan_tree) { + nvme_root_skip_namespaces(r); ret = nvme_scan_topology(r, NULL, NULL); if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); - return ret; + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); + return -errno; } } - nvme_read_config(r, config_file); if (modify_config) { nvme_host_t h; @@ -1301,7 +1304,7 @@ int nvmf_config(const char *desc, int argc, char **argv) if (!h) { fprintf(stderr, "Failed to lookup host '%s': %s\n", hostnqn, nvme_strerror(errno)); - goto out; + return -errno; } if (hostkey) nvme_host_set_dhchap_key(h, hostkey); @@ -1309,7 +1312,7 @@ int nvmf_config(const char *desc, int argc, char **argv) if (!s) { fprintf(stderr, "Failed to lookup subsystem '%s': %s\n", subsysnqn, nvme_strerror(errno)); - goto out; + return -errno; } c = nvme_lookup_ctrl(s, transport, traddr, cfg.host_traddr, cfg.host_iface, @@ -1317,7 +1320,7 @@ int nvmf_config(const char *desc, int argc, char **argv) if (!c) { fprintf(stderr, "Failed to lookup controller: %s\n", nvme_strerror(errno)); - goto out; + return -errno; } nvmf_update_config(c, &cfg); if (ctrlkey) @@ -1330,13 +1333,7 @@ int nvmf_config(const char *desc, int argc, char **argv) if (dump_config) nvme_dump_config(r); -out: - if (hid) - free(hid); - if (hnqn) - free(hnqn); - nvme_free_tree(r); - return -errno; + return 0; } static void dim_operation(nvme_ctrl_t c, enum nvmf_dim_tas tas, const char *name) @@ -1364,8 +1361,8 @@ static void dim_operation(nvme_ctrl_t c, enum nvmf_dim_tas tas, const char *name int nvmf_dim(const char *desc, int argc, char **argv) { + _cleanup_nvme_root_ nvme_root_t r = NULL; enum nvmf_dim_tas tas; - nvme_root_t r; nvme_ctrl_t c; char *p; int ret; @@ -1419,13 +1416,12 @@ int nvmf_dim(const char *desc, int argc, char **argv) nvme_strerror(errno)); return -errno; } + nvme_root_skip_namespaces(r); ret = nvme_scan_topology(r, NULL, NULL); if (ret < 0) { - if (errno != ENOENT) - fprintf(stderr, "Failed to scan topology: %s\n", - nvme_strerror(errno)); - nvme_free_tree(r); - return ret; + fprintf(stderr, "Failed to scan topology: %s\n", + nvme_strerror(errno)); + return -errno; } if (cfg.nqn) { @@ -1459,14 +1455,11 @@ int nvmf_dim(const char *desc, int argc, char **argv) fprintf(stderr, "Did not find device %s: %s\n", p, nvme_strerror(errno)); - nvme_free_tree(r); return -errno; } dim_operation(c, tas, p); } } - nvme_free_tree(r); - return 0; } @@ -18,5 +18,11 @@ extern int nvmf_disconnect(const char *desc, int argc, char **argv); extern int nvmf_disconnect_all(const char *desc, int argc, char **argv); extern int nvmf_config(const char *desc, int argc, char **argv); extern int nvmf_dim(const char *desc, int argc, char **argv); +extern nvme_ctrl_t nvmf_create_discover_ctrl(nvme_root_t r, nvme_host_t h, + struct nvme_fabrics_config *cfg, + struct tr_config *trcfg); +extern char *nvmf_get_default_trsvcid(const char *transport, + bool discovery_ctrl); + #endif diff --git a/meson.build b/meson.build index 11f7cc5..af1835e 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project( 'nvme-cli', ['c'], meson_version: '>= 0.50.0', license: 'GPL-2.0-only', - version: '2.9.1', + version: '2.10', default_options: [ 'c_std=gnu99', 'buildtype=debugoptimized', @@ -48,7 +48,7 @@ conf.set('SYSCONFDIR', '"@0@"'.format(sysconfdir)) conf.set('RUNDIR', '"@0@"'.format(rundir)) # Check for libnvme availability -libnvme_dep = dependency('libnvme', version: '>=1.9', required: true, +libnvme_dep = dependency('libnvme', version: '>=1.10', required: true, fallback : ['libnvme', 'libnvme_dep']) libnvme_mi_dep = dependency('libnvme-mi', required: true, fallback : ['libnvme', 'libnvme_mi_dep']) @@ -352,7 +352,8 @@ if meson.version().version_compare('>=0.53.0') } summary(dep_dict, section: 'Dependencies') conf_dict = { - 'pdc enabled': get_option('pdc-enabled') + 'git version': conf.get('GIT_VERSION'), + 'pdc enabled': get_option('pdc-enabled'), } summary(conf_dict, section: 'Configuration') endif @@ -7,6 +7,7 @@ #include <libnvme.h> +#include "common.h" #include "nvme.h" #include "nbft.h" #include "fabrics.h" @@ -77,13 +78,39 @@ void free_nbfts(struct list_head *nbft_list) } } +static bool validate_uri(struct nbft_info_discovery *dd, + struct nvme_fabrics_uri *uri) +{ + if (!uri) { + fprintf(stderr, + "Discovery Descriptor %d: failed to parse URI %s\n", + dd->index, dd->uri); + return false; + } + if (strcmp(uri->scheme, "nvme") != 0) { + fprintf(stderr, + "Discovery Descriptor %d: unsupported scheme '%s'\n", + dd->index, uri->scheme); + return false; + } + if (!uri->protocol || strcmp(uri->protocol, "tcp") != 0) { + fprintf(stderr, + "Discovery Descriptor %d: unsupported transport '%s'\n", + dd->index, uri->protocol); + return false; + } + + return true; +} + /* returns 0 for success or negative errno otherwise */ static int do_connect(nvme_root_t r, nvme_host_t h, + struct nvmf_disc_log_entry *e, struct nbft_info_subsystem_ns *ss, struct tr_config *trcfg, - const struct nvme_fabrics_config *cfg, - enum nvme_print_flags flags, + struct nvme_fabrics_config *cfg, + nvme_print_flags_t flags, unsigned int verbose) { nvme_ctrl_t c; @@ -111,6 +138,12 @@ static int do_connect(nvme_root_t r, nvme_init_logging(r, -1, false, false); } + if (e) { + if (e->trtype == NVMF_TRTYPE_TCP && + e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE) + cfg->tls = true; + } + errno = 0; ret = nvmf_add_ctrl(h, c, cfg); @@ -145,11 +178,115 @@ static int do_connect(nvme_root_t r, return 0; } +static int do_discover(struct nbft_info_discovery *dd, + nvme_root_t r, + nvme_host_t h, + nvme_ctrl_t c, + struct nvme_fabrics_config *defcfg, + struct tr_config *deftrcfg, + nvme_print_flags_t flags, + unsigned int verbose) +{ + struct nvmf_discovery_log *log = NULL; + int i; + int ret; + + struct nvme_get_discovery_args args = { + .c = c, + .args_size = sizeof(args), + .max_retries = 10 /* MAX_DISC_RETRIES */, + .result = 0, + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .lsp = 0, + }; + + log = nvmf_get_discovery_wargs(&args); + if (!log) { + fprintf(stderr, + "Discovery Descriptor %d: failed to get discovery log: %s\n", + dd->index, nvme_strerror(errno)); + return -errno; + } + + for (i = 0; i < le64_to_cpu(log->numrec); i++) { + struct nvmf_disc_log_entry *e = &log->entries[i]; + nvme_ctrl_t cl; + int tmo = defcfg->keep_alive_tmo; + + struct tr_config trcfg = { + .subsysnqn = e->subnqn, + .transport = nvmf_trtype_str(e->trtype), + .traddr = e->traddr, + .host_traddr = deftrcfg->host_traddr, + .host_iface = deftrcfg->host_iface, + .trsvcid = e->trsvcid, + }; + + if (e->subtype == NVME_NQN_CURR) + continue; + + /* Already connected ? */ + cl = lookup_ctrl(h, &trcfg); + if (cl && nvme_ctrl_get_name(cl)) + continue; + + /* Skip connect if the transport types don't match */ + if (strcmp(nvme_ctrl_get_transport(c), + nvmf_trtype_str(e->trtype))) + continue; + + if (e->subtype == NVME_NQN_DISC) { + nvme_ctrl_t child; + + child = nvmf_connect_disc_entry(h, e, defcfg, NULL); + do_discover(dd, r, h, child, defcfg, &trcfg, + flags, verbose); + nvme_disconnect_ctrl(child); + nvme_free_ctrl(child); + } else { + ret = do_connect(r, h, e, NULL, &trcfg, + defcfg, flags, verbose); + + /* + * With TCP/DHCP, it can happen that the OS + * obtains a different local IP address than the + * firmware had. Retry without host_traddr. + */ + if (ret == -ENVME_CONNECT_ADDRNOTAVAIL && + !strcmp(trcfg.transport, "tcp") && + strlen(dd->hfi->tcp_info.dhcp_server_ipaddr) > 0) { + const char *htradr = trcfg.host_traddr; + + trcfg.host_traddr = NULL; + ret = do_connect(r, h, e, NULL, &trcfg, + defcfg, flags, verbose); + + if (ret == 0 && verbose >= 1) + fprintf(stderr, + "Discovery Descriptor %d: connect with host_traddr=\"%s\" failed, success after omitting host_traddr\n", + dd->index, + htradr); + } + + if (ret) + fprintf(stderr, "Discovery Descriptor %d: no controller found\n", + dd->index); + if (ret == -ENOMEM) + break; + } + + defcfg->keep_alive_tmo = tmo; + } + + free(log); + return 0; +} + int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, char *hostnqn_sys, char *hostid_sys, const char *desc, bool connect, - const struct nvme_fabrics_config *cfg, char *nbft_path, - enum nvme_print_flags flags, unsigned int verbose) + struct nvme_fabrics_config *cfg, char *nbft_path, + nvme_print_flags_t flags, unsigned int verbose) { char *hostnqn = NULL, *hostid = NULL, *host_traddr = NULL; nvme_host_t h; @@ -158,6 +295,7 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, struct nbft_file_entry *entry = NULL; struct nbft_info_subsystem_ns **ss; struct nbft_info_hfi *hfi; + struct nbft_info_discovery **dd; if (!connect) /* to do: print discovery-type info from NBFT tables */ @@ -192,16 +330,25 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, if (!h) goto out_free; + /* Subsystem Namespace Descriptor List */ for (ss = entry->nbft->subsystem_ns_list; ss && *ss; ss++) for (i = 0; i < (*ss)->num_hfis; i++) { hfi = (*ss)->hfis[i]; - if (!cfg->host_traddr) { - host_traddr = NULL; - if (!strncmp((*ss)->transport, "tcp", 3)) - host_traddr = hfi->tcp_info.ipaddr; + /* Skip discovery NQN records */ + if (strcmp((*ss)->subsys_nqn, NVME_DISC_SUBSYS_NAME) == 0) { + if (verbose >= 1) + fprintf(stderr, + "SSNS %d points to well-known discovery NQN, skipping\n", + (*ss)->index); + continue; } + host_traddr = NULL; + if (!cfg->host_traddr && + !strncmp((*ss)->transport, "tcp", 3)) + host_traddr = hfi->tcp_info.ipaddr; + struct tr_config trcfg = { .subsysnqn = (*ss)->subsys_nqn, .transport = (*ss)->transport, @@ -211,7 +358,7 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, .trsvcid = (*ss)->trsvcid, }; - ret = do_connect(r, h, *ss, &trcfg, + ret = do_connect(r, h, NULL, *ss, &trcfg, cfg, flags, verbose); /* @@ -220,11 +367,11 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, * firmware had. Retry without host_traddr. */ if (ret == -ENVME_CONNECT_ADDRNOTAVAIL && - !strcmp((*ss)->transport, "tcp") && + !strcmp(trcfg.transport, "tcp") && strlen(hfi->tcp_info.dhcp_server_ipaddr) > 0) { trcfg.host_traddr = NULL; - ret = do_connect(r, h, *ss, &trcfg, + ret = do_connect(r, h, NULL, *ss, &trcfg, cfg, flags, verbose); if (ret == 0 && verbose >= 1) @@ -241,6 +388,89 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, if (ret == -ENOMEM) goto out_free; } + + /* Discovery Descriptor List */ + for (dd = entry->nbft->discovery_list; dd && *dd; dd++) { + nvme_ctrl_t c; + bool linked = false; + bool persistent = false; + _cleanup_uri_ struct nvme_fabrics_uri *uri = NULL; + _cleanup_free_ char *trsvcid = NULL; + + /* only perform discovery when no SSNS record references it */ + for (ss = entry->nbft->subsystem_ns_list; ss && *ss; ss++) + if ((*ss)->discovery && + (*ss)->discovery->index == (*dd)->index && + /* unavailable boot attempts are not discovered + * and may get transferred along with a well-known + * discovery NQN into an SSNS record. + */ + strcmp((*ss)->subsys_nqn, NVME_DISC_SUBSYS_NAME) != 0) { + linked = true; + break; + } + if (linked) + continue; + + hfi = (*dd)->hfi; + uri = nvme_parse_uri((*dd)->uri); + if (!validate_uri(*dd, uri)) + continue; + + host_traddr = NULL; + if (!cfg->host_traddr && + !strncmp(uri->protocol, "tcp", 3)) + host_traddr = hfi->tcp_info.ipaddr; + if (uri->port > 0) { + if (asprintf(&trsvcid, "%d", uri->port) < 0) { + errno = ENOMEM; + goto out_free; + } + } else + trsvcid = strdup(nvmf_get_default_trsvcid(uri->protocol, true)); + + struct tr_config trcfg = { + .subsysnqn = NVME_DISC_SUBSYS_NAME, + .transport = uri->protocol, + .traddr = uri->host, + .host_traddr = host_traddr, + .host_iface = NULL, + .trsvcid = trsvcid, + }; + + /* Lookup existing discovery controller */ + c = lookup_ctrl(h, &trcfg); + if (c && nvme_ctrl_get_name(c)) + persistent = true; + + if (!c) { + c = nvmf_create_discover_ctrl(r, h, cfg, &trcfg); + if (!c && errno == ENVME_CONNECT_ADDRNOTAVAIL && + !strcmp(trcfg.transport, "tcp") && + strlen(hfi->tcp_info.dhcp_server_ipaddr) > 0) { + trcfg.host_traddr = NULL; + c = nvmf_create_discover_ctrl(r, h, cfg, &trcfg); + } + } + + if (!c) { + fprintf(stderr, + "Discovery Descriptor %d: failed to add discovery controller: %s\n", + (*dd)->index, + nvme_strerror(errno)); + if (errno == ENOMEM) + goto out_free; + continue; + } + + ret = do_discover(*dd, r, h, c, cfg, &trcfg, + flags, verbose); + if (!persistent) + nvme_disconnect_ctrl(c); + nvme_free_ctrl(c); + if (ret == -ENOMEM) + goto out_free; + } } out_free: free_nbfts(&nbft_list); @@ -15,5 +15,5 @@ void free_nbfts(struct list_head *nbft_list); extern int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg, char *hostnqn_sys, char *hostid_sys, const char *desc, bool connect, - const struct nvme_fabrics_config *cfg, char *nbft_path, - enum nvme_print_flags flags, unsigned int verbose); + struct nvme_fabrics_config *cfg, char *nbft_path, + nvme_print_flags_t flags, unsigned int verbose); diff --git a/nvme-print-binary.c b/nvme-print-binary.c index e9371e5..33804f1 100644 --- a/nvme-print-binary.c +++ b/nvme-print-binary.c @@ -253,7 +253,7 @@ static void binary_endurance_log(struct nvme_endurance_group_log *endurance_log, } static void binary_smart_log(struct nvme_smart_log *smart, unsigned int nsid, - const char *devname) + const char *devname) { d_raw((unsigned char *)smart, sizeof(*smart)); } @@ -297,6 +297,16 @@ static void binary_discovery_log(struct nvmf_discovery_log *log, int numrec) numrec * sizeof(struct nvmf_disc_log_entry)); } +static void binary_effects_log_pages(struct list_head *list) +{ + nvme_effects_log_node_t *node = NULL; + + list_for_each(list, node, node) { + d_raw((unsigned char *)&node->csi, sizeof(node->csi)); + d_raw((unsigned char *)&node->effects, sizeof(node->effects)); + } +} + static struct print_ops binary_print_ops = { /* libnvme types.h print functions */ .ana_log = binary_ana_log, @@ -306,7 +316,7 @@ static struct print_ops binary_print_ops = { .ctrl_registers = binary_ctrl_registers, .directive = binary_directive, .discovery_log = binary_discovery_log, - .effects_log_list = NULL, + .effects_log_list = binary_effects_log_pages, .endurance_group_event_agg_log = binary_endurance_group_event_agg_log, .endurance_group_list = NULL, .endurance_log = binary_endurance_log, @@ -379,7 +389,7 @@ static struct print_ops binary_print_ops = { .show_error_status = NULL, }; -struct print_ops *nvme_get_binary_print_ops(enum nvme_print_flags flags) +struct print_ops *nvme_get_binary_print_ops(nvme_print_flags_t flags) { binary_print_ops.flags = flags; return &binary_print_ops; diff --git a/nvme-print-json.c b/nvme-print-json.c index fc3ba77..6c3e45f 100644 --- a/nvme-print-json.c +++ b/nvme-print-json.c @@ -11,7 +11,6 @@ #include "common.h" #define ERROR_MSG_LEN 100 -#define STR_LEN 100 #define NAME_LEN 128 #define BUF_LEN 320 #define VAL_LEN 4096 @@ -33,7 +32,7 @@ static const uint8_t zero_uuid[16] = { 0 }; static struct print_ops json_print_ops; -static struct json_object *json_r = NULL; +static struct json_object *json_r; static void json_feature_show_fields(enum nvme_features_id fid, unsigned int result, unsigned char *buf); @@ -132,6 +131,7 @@ static void obj_add_int_secs(struct json_object *o, const char *k, int v) static void obj_add_result(struct json_object *o, const char *v, ...) { va_list ap; + va_start(ap, v); char *value; @@ -143,12 +143,14 @@ static void obj_add_result(struct json_object *o, const char *v, ...) else obj_add_str(o, "Result", "Could not allocate string"); + va_end(ap); free(value); } static void obj_add_key(struct json_object *o, const char *k, const char *v, ...) { va_list ap; + va_start(ap, v); char *value; @@ -160,6 +162,7 @@ static void obj_add_key(struct json_object *o, const char *k, const char *v, ... else obj_add_str(o, k, "Could not allocate string"); + va_end(ap); free(value); } @@ -266,10 +269,11 @@ static void json_nvme_id_ns(struct nvme_id_ns *ns, unsigned int nsid, obj_add_int(r, "nsattr", ns->nsattr); obj_add_int(r, "nvmsetid", le16_to_cpu(ns->nvmsetid)); - if (ns->nsfeat & 0x10) { + if (ns->nsfeat & 0x30) { obj_add_int(r, "npwg", le16_to_cpu(ns->npwg)); obj_add_int(r, "npwa", le16_to_cpu(ns->npwa)); - obj_add_int(r, "npdg", le16_to_cpu(ns->npdg)); + if (ns->nsfeat & 0x10) + obj_add_int(r, "npdg", le16_to_cpu(ns->npdg)); obj_add_int(r, "npda", le16_to_cpu(ns->npda)); obj_add_int(r, "nows", le16_to_cpu(ns->nows)); } @@ -317,7 +321,7 @@ static void json_nvme_id_ns(struct nvme_id_ns *ns, unsigned int nsid, json_print(r); } - void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl, +void json_nvme_id_ctrl(struct nvme_id_ctrl *ctrl, void (*vs)(__u8 *vs, struct json_object *r)) { struct json_object *r = json_create_object(); @@ -389,7 +393,7 @@ static void json_nvme_id_ns(struct nvme_id_ns *ns, unsigned int nsid, obj_add_int(r, "hmmaxd", le16_to_cpu(ctrl->hmmaxd)); obj_add_int(r, "nsetidmax", le16_to_cpu(ctrl->nsetidmax)); obj_add_int(r, "endgidmax", le16_to_cpu(ctrl->endgidmax)); - obj_add_int(r, "anatt",ctrl->anatt); + obj_add_int(r, "anatt", ctrl->anatt); obj_add_int(r, "anacap", ctrl->anacap); obj_add_uint(r, "anagrpmax", le32_to_cpu(ctrl->anagrpmax)); obj_add_uint(r, "nanagrpid", le32_to_cpu(ctrl->nanagrpid)); @@ -449,7 +453,7 @@ static void json_nvme_id_ns(struct nvme_id_ns *ns, unsigned int nsid, array_add_obj(psds, psd); } - if(vs) + if (vs) vs(ctrl->vs, r); json_print(r); @@ -705,7 +709,7 @@ static void json_smart_log(struct nvme_smart_log *smart, unsigned int nsid, if (temp == 0) continue; - sprintf(key, "temperature_sensor_%d",c+1); + sprintf(key, "temperature_sensor_%d", c + 1); obj_add_int(r, key, temp); } @@ -1171,7 +1175,7 @@ static void json_registers_cmbmsc(uint64_t cmbmsc, struct json_object *r) cmbmsc & 1 ? "Enabled" : "Not enabled"); } -static void json_registers_cmbsts(uint32_t cmbsts , struct json_object *r) +static void json_registers_cmbsts(uint32_t cmbsts, struct json_object *r) { obj_add_uint_x(r, "cmbsts", cmbsts); @@ -1183,61 +1187,64 @@ static void json_registers_pmrcap(uint32_t pmrcap, struct json_object *r) obj_add_uint_x(r, "pmrcap", pmrcap); obj_add_str(r, "Controller Memory Space Supported (CMSS)", - ((pmrcap & 0x01000000) >> 24) ? "Supported" : "Not supported"); - obj_add_uint_x(r, "Persistent Memory Region Timeout (PMRTO)", (pmrcap & 0xff0000) >> 16); + NVME_PMRCAP_CMSS(pmrcap) ? "Supported" : "Not supported"); + obj_add_uint_x(r, "Persistent Memory Region Timeout (PMRTO)", NVME_PMRCAP_PMRTO(pmrcap)); obj_add_uint_x(r, "Persistent Memory Region Write Barrier Mechanisms (PMRWBM)", - (pmrcap & 0x3c00) >> 10); + NVME_PMRCAP_PMRWBM(pmrcap)); obj_add_str(r, "Persistent Memory Region Time Units (PMRTU)", - (pmrcap & 0x300) >> 8 ? "minutes" : "500 milliseconds"); - obj_add_uint_x(r, "Base Indicator Register (BIR)", (pmrcap & 0xe0) >> 5); - obj_add_str(r, "Write Data Support (WDS)", pmrcap & 0x10 ? "Supported" : "Not supported"); - obj_add_str(r, "Read Data Support (RDS)", pmrcap & 8 ? "Supported" : "Not supported"); + NVME_PMRCAP_PMRTU(pmrcap) ? "minutes" : "500 milliseconds"); + obj_add_uint_x(r, "Base Indicator Register (BIR)", NVME_PMRCAP_BIR(pmrcap)); + obj_add_str(r, "Write Data Support (WDS)", + NVME_PMRCAP_WDS(pmrcap) ? "Supported" : "Not supported"); + obj_add_str(r, "Read Data Support (RDS)", + NVME_PMRCAP_RDS(pmrcap) ? "Supported" : "Not supported"); } static void json_registers_pmrctl(uint32_t pmrctl, struct json_object *r) { obj_add_uint_x(r, "pmrctl", pmrctl); - obj_add_str(r, "Enable (EN)", pmrctl & 1 ? "Ready" : "Disabled"); + obj_add_str(r, "Enable (EN)", NVME_PMRCTL_EN(pmrctl) ? "Ready" : "Disabled"); } static void json_registers_pmrsts(uint32_t pmrsts, bool ready, struct json_object *r) { obj_add_uint_x(r, "pmrsts", pmrsts); - obj_add_uint_x(r, "Controller Base Address Invalid (CBAI)", (pmrsts & 0x1000) >> 12); + obj_add_uint_x(r, "Controller Base Address Invalid (CBAI)", NVME_PMRSTS_CBAI(pmrsts)); obj_add_str(r, "Health Status (HSTS)", - nvme_register_pmr_hsts_to_string((pmrsts & 0xe00) >> 9)); + nvme_register_pmr_hsts_to_string(NVME_PMRSTS_HSTS(pmrsts))); obj_add_str(r, "Not Ready (NRDY)", - !(pmrsts & 0x100) && ready ? "Ready" : "Not ready"); - obj_add_uint_x(r, "Error (ERR)", pmrsts & 0xff); + !NVME_PMRSTS_NRDY(pmrsts) && ready ? "Ready" : "Not ready"); + obj_add_uint_x(r, "Error (ERR)", NVME_PMRSTS_ERR(pmrsts)); } static void json_registers_pmrebs(uint32_t pmrebs, struct json_object *r) { obj_add_uint_x(r, "pmrebs", pmrebs); - obj_add_uint_x(r, "PMR Elasticity Buffer Size Base (PMRWBZ)", (pmrebs & 0xffffff00) >> 8); - obj_add_str(r, "Read Bypass Behavior", pmrebs & 0x10 ? "Shall" : "May"); + obj_add_uint_x(r, "PMR Elasticity Buffer Size Base (PMRWBZ)", NVME_PMREBS_PMRWBZ(pmrebs)); + obj_add_str(r, "Read Bypass Behavior", NVME_PMREBS_RBB(pmrebs) ? "Shall" : "May"); obj_add_str(r, "PMR Elasticity Buffer Size Units (PMRSZU)", - nvme_register_unit_to_string(pmrebs & 0xf)); + nvme_register_unit_to_string(NVME_PMREBS_PMRSZU(pmrebs))); } static void json_registers_pmrswtp(uint32_t pmrswtp, struct json_object *r) { obj_add_uint_x(r, "pmrswtp", pmrswtp); - obj_add_uint_x(r, "PMR Sustained Write Throughput (PMRSWTV)", (pmrswtp & 0xffffff00) >> 8); + obj_add_uint_x(r, "PMR Sustained Write Throughput (PMRSWTV)", + NVME_PMRSWTP_PMRSWTV(pmrswtp)); obj_add_key(r, "PMR Sustained Write Throughput Units (PMRSWTU)", "%s/second", - nvme_register_unit_to_string(pmrswtp & 0xf)); + nvme_register_unit_to_string(NVME_PMRSWTP_PMRSWTU(pmrswtp))); } static void json_registers_pmrmscl(uint32_t pmrmscl, struct json_object *r) { obj_add_uint_nx(r, "pmrmscl", pmrmscl); - obj_add_uint_nx(r, "Controller Base Address (CBA)", (pmrmscl & 0xfffff000) >> 12); - obj_add_uint_nx(r, "Controller Memory Space Enable (CMSE)", (pmrmscl & 2) >> 1); + obj_add_uint_nx(r, "Controller Base Address (CBA)", (uint32_t)NVME_PMRMSC_CBA(pmrmscl)); + obj_add_uint_nx(r, "Controller Memory Space Enable (CMSE)", NVME_PMRMSC_CMSE(pmrmscl)); } static void json_registers_pmrmscu(uint32_t pmrmscu, struct json_object *r) @@ -1311,8 +1318,8 @@ static void json_single_property(int offset, uint64_t value64) json_print(r); } -struct json_object* json_effects_log(enum nvme_csi csi, - struct nvme_cmd_effects_log *effects_log) +struct json_object *json_effects_log(enum nvme_csi csi, + struct nvme_cmd_effects_log *effects_log) { struct json_object *r = json_create_object(); struct json_object *acs = json_create_object(); @@ -1536,7 +1543,7 @@ static void json_pel_smart_health(void *pevent_log_info, __u32 offset, temp = le16_to_cpu(smart_event->temp_sensor[c]); if (!temp) continue; - sprintf(key, "temperature_sensor_%d",c + 1); + sprintf(key, "temperature_sensor_%d", c + 1); obj_add_int(valid_attrs, key, temp); } @@ -1863,7 +1870,7 @@ static void json_lba_status(struct nvme_lba_status *list, sprintf(json_str, "LSD entry %d", idx); obj_add_array(r, json_str, lsde); e = &list->descs[idx]; - sprintf(json_str, "0x%016"PRIu64"", le64_to_cpu(e->dslba)); + sprintf(json_str, "0x%016"PRIx64"", le64_to_cpu(e->dslba)); obj_add_str(lsde, "DSLBA", json_str); sprintf(json_str, "0x%08x", le32_to_cpu(e->nlb)); obj_add_str(lsde, "NLB", json_str); @@ -2191,7 +2198,7 @@ static void json_supported_cap_config_log( array_add_obj(set_list, set); } chan_desc = (struct nvme_end_grp_chan_desc *) - (cap_log->cap_config_desc[i].egcd[j].nvmsetid[0] * sizeof(__u16) * egsets); + &cap_log->cap_config_desc[i].egcd[j].nvmsetid[egsets]; egchans = le16_to_cpu(chan_desc->egchans); obj_add_uint(endurance, "egchans", le16_to_cpu(chan_desc->egchans)); chan_list = json_create_array(); @@ -2338,6 +2345,7 @@ static void json_nvme_fdp_events(struct nvme_fdp_events_log *log) if (event->type == NVME_FDP_EVENT_REALLOC) { struct nvme_fdp_event_realloc *mr; + mr = (struct nvme_fdp_event_realloc *)&event->type_specific; obj_add_uint(obj_event, "nlbam", le16_to_cpu(mr->nlbam)); @@ -3042,18 +3050,22 @@ static void json_nvme_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, obj_add_uint64(r, "lbstm", le64_to_cpu(nvm_ns->lbstm)); obj_add_int(r, "pic", nvm_ns->pic); + obj_add_int(r, "pifa", nvm_ns->pifa); obj_add_array(r, "elbafs", elbafs); - for (i = 0; i <= ns->nlbaf; i++) { + for (i = 0; i <= ns->nlbaf + ns->nulbaf; i++) { struct json_object *elbaf = json_create_object(); unsigned int elbaf_val = le32_to_cpu(nvm_ns->elbaf[i]); obj_add_uint(elbaf, "sts", elbaf_val & 0x7F); obj_add_uint(elbaf, "pif", (elbaf_val >> 7) & 0x3); + obj_add_uint(elbaf, "qpif", (elbaf_val >> 9) & 0xF); array_add_obj(elbafs, elbaf); } + if (ns->nsfeat & 0x20) + obj_add_int(r, "npdgl", le32_to_cpu(nvm_ns->npdgl)); json_print(r); } @@ -3288,7 +3300,7 @@ static void json_feature_show_fields_temp_thresh(struct json_object *r, unsigned obj_add_uint(r, "Threshold Temperature Select (TMPSEL)", field); obj_add_str(r, "TMPSEL description", nvme_feature_temp_sel_to_string(field)); - sprintf(json_str, "%ld Celsius", kelvin_to_celsius(result & 0xffff)); + sprintf(json_str, "%s", nvme_degrees_string(result & 0xffff)); obj_add_str(r, "Temperature Threshold (TMPTH)", json_str); sprintf(json_str, "%u K", result & 0xffff); @@ -3413,6 +3425,10 @@ static void json_feature_show_fields_host_mem_buf(struct json_object *r, unsigne unsigned char *buf) { obj_add_str(r, "Enable Host Memory (EHM)", result & 1 ? "Enabled" : "Disabled"); + obj_add_str(r, "Host Memory Non-operational Access Restriction Enable (HMNARE)", + (result & 0x00000004) ? "True" : "False"); + obj_add_str(r, "Host Memory Non-operational Access Restricted (HMNAR)", + (result & 0x00000008) ? "True" : "False"); if (buf) json_host_mem_buffer((struct nvme_host_mem_buf_attrs *)buf, r); @@ -3426,7 +3442,7 @@ static void json_timestamp(struct json_object *r, struct nvme_timestamp *ts) obj_add_uint64(r, "timestamp", int48_to_long(ts->timestamp)); - if(!strftime(buffer, sizeof(buffer), "%c %Z", tm)) + if (!strftime(buffer, sizeof(buffer), "%c %Z", tm)) sprintf(buffer, "%s", "-"); obj_add_str(r, "timestamp string", buffer); @@ -3458,13 +3474,13 @@ static void json_feature_show_fields_hctm(struct json_object *r, unsigned int re sprintf(json_str, "%u K", result >> 16); obj_add_str(r, "Thermal Management Temperature 1 (TMT1)", json_str); - sprintf(json_str, "%ld Celsius", kelvin_to_celsius(result >> 16)); + sprintf(json_str, "%s", nvme_degrees_string(result >> 16)); obj_add_str(r, "TMT1 celsius", json_str); sprintf(json_str, "%u K", result & 0xffff); obj_add_str(r, "Thermal Management Temperature 2", json_str); - sprintf(json_str, "%ld Celsius", kelvin_to_celsius(result & 0xffff)); + sprintf(json_str, "%s", nvme_degrees_string(result & 0xffff)); obj_add_str(r, "TMT2 celsius", json_str); } @@ -4082,7 +4098,7 @@ static void json_detail_list(nvme_root_t t) if (hostid) obj_add_str(hss, "HostID", hostid); - nvme_for_each_subsystem(h , s) { + 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(); @@ -4208,9 +4224,10 @@ static void json_simple_list(nvme_root_t t) nvme_subsystem_for_each_ns(s, n) array_add_obj(jdevices, json_list_item_obj(n)); - nvme_subsystem_for_each_ctrl(s, c) + nvme_subsystem_for_each_ctrl(s, c) { nvme_ctrl_for_each_ns(c, n) - array_add_obj(jdevices, json_list_item_obj(n)); + array_add_obj(jdevices, json_list_item_obj(n)); + } } } @@ -4480,7 +4497,7 @@ static void json_discovery_log(struct nvmf_discovery_log *log, int numrec) obj_add_str(entry, "trtype", nvmf_trtype_str(e->trtype)); obj_add_str(entry, "adrfam", nvmf_adrfam_str(e->adrfam)); obj_add_str(entry, "subtype", nvmf_subtype_str(e->subtype)); - obj_add_str(entry,"treq", nvmf_treq_str(e->treq)); + obj_add_str(entry, "treq", nvmf_treq_str(e->treq)); obj_add_uint(entry, "portid", le16_to_cpu(e->portid)); obj_add_str(entry, "trsvcid", e->trsvcid); obj_add_str(entry, "subnqn", e->subnqn); @@ -4694,7 +4711,7 @@ static struct print_ops json_print_ops = { .sanitize_log_page = json_sanitize_log, .secondary_ctrl_list = json_nvme_list_secondary_ctrl, .select_result = json_select_result, - .self_test_log = json_self_test_log, + .self_test_log = json_self_test_log, .single_property = json_single_property, .smart_log = json_smart_log, .supported_cap_config_list_log = json_supported_cap_config_log, @@ -4729,7 +4746,7 @@ static struct print_ops json_print_ops = { .show_error_status = json_output_error_status, }; -struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags) +struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags) { json_print_ops.flags = flags; return &json_print_ops; diff --git a/nvme-print-stdout.c b/nvme-print-stdout.c index bd0d888..0d7514b 100644 --- a/nvme-print-stdout.c +++ b/nvme-print-stdout.c @@ -162,9 +162,7 @@ static void nvme_resources_free(struct nvme_resources *res) static void stdout_feature_show_fields(enum nvme_features_id fid, unsigned int result, unsigned char *buf); -static void stdout_smart_log(struct nvme_smart_log *smart, - unsigned int nsid, - const char *devname); +static void stdout_smart_log(struct nvme_smart_log *smart, unsigned int nsid, const char *devname); static void stdout_predictable_latency_per_nvmset( struct nvme_nvmset_predictable_lat_log *plpns_log, @@ -248,13 +246,25 @@ static void stdout_add_bitmap(int i, __u8 seb) } } +static void stdout_persistent_event_log_fdp_events(unsigned int cdw11, + unsigned int cdw12, + unsigned char *buf) +{ + unsigned int num = (cdw11 >> 16) & 0xff; + + for (unsigned int i = 0; i < num; i++) { + printf("\t%-53s: %sEnabled\n", nvme_fdp_event_to_string(buf[0]), + cdw12 & 0x1 ? "" : "Not "); + } +} + static void stdout_persistent_event_log(void *pevent_log_info, __u8 action, __u32 size, const char *devname) { __u32 offset, por_info_len, por_info_list; __u64 *fw_rev; - int fid, cdw11, dword_cnt; + int fid, cdw11, cdw12, dword_cnt; unsigned char *mem_buf = NULL; struct nvme_smart_log *smart_event; struct nvme_fw_commit_event *fw_commit_event; @@ -490,8 +500,13 @@ static void stdout_persistent_event_log(void *pevent_log_info, printf("Set Feature ID :%#02x (%s), value:%#08x\n", fid, nvme_feature_to_string(fid), cdw11); if (NVME_SET_FEAT_EVENT_MB_COUNT(set_feat_event->layout)) { - mem_buf = (unsigned char *)(set_feat_event + 4 + dword_cnt * 4); - stdout_feature_show_fields(fid, cdw11, mem_buf); + mem_buf = (unsigned char *)set_feat_event + 4 + dword_cnt * 4; + if (fid == NVME_FEAT_FID_FDP_EVENTS) { + cdw12 = le32_to_cpu(set_feat_event->cdw_mem[2]); + stdout_persistent_event_log_fdp_events(cdw11, cdw12, + mem_buf); + } else + stdout_feature_show_fields(fid, cdw11, mem_buf); } break; case NVME_PEL_TELEMETRY_CRT: @@ -623,8 +638,7 @@ static void stdout_fid_support_effects_log(struct nvme_fid_supported_effects_log fid_effect); if (human) stdout_fid_support_effects_log_human(fid_effect); - else - printf("\n"); + printf("\n"); } } } @@ -666,8 +680,7 @@ static void stdout_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effec mi_cmd_effect); if (human) stdout_mi_cmd_support_effects_log_human(mi_cmd_effect); - else - printf("\n"); + printf("\n"); } } } @@ -1050,6 +1063,18 @@ static void stdout_subsystem_ctrls(nvme_subsystem_t s) } } +static void stdout_subsys_config(nvme_subsystem_t s) +{ + int len = strlen(nvme_subsystem_get_name(s)); + + printf("%s - NQN=%s\n", nvme_subsystem_get_name(s), + nvme_subsystem_get_nqn(s)); + printf("%*s hostnqn=%s\n", len, " ", + nvme_host_get_hostnqn(nvme_subsystem_get_host(s))); + printf("%*s iopolicy=%s\n", len, " ", + nvme_subsystem_get_iopolicy(s)); +} + static void stdout_subsystem(nvme_root_t r, bool show_ana) { nvme_host_t h; @@ -1059,18 +1084,11 @@ static void stdout_subsystem(nvme_root_t r, bool show_ana) nvme_subsystem_t s; nvme_for_each_subsystem(h, s) { - int len = strlen(nvme_subsystem_get_name(s)); - if (!first) printf("\n"); first = false; - printf("%s - NQN=%s\n", nvme_subsystem_get_name(s), - nvme_subsystem_get_nqn(s)); - printf("%*s hostnqn=%s\n", len, " ", - nvme_host_get_hostnqn(nvme_subsystem_get_host(s))); - printf("%*s iopolicy=%s\n", len, " ", - nvme_subsystem_get_iopolicy(s)); + stdout_subsys_config(s); printf("\\\n"); if (!show_ana || !stdout_subsystem_multipath(s)) @@ -1379,7 +1397,7 @@ static void stdout_registers_pmrcap(__u32 pmrcap) printf("\tPersistent Memory Region Timeout (PMRTO): %x\n", NVME_PMRCAP_PMRTO(pmrcap)); printf("\tPersistent Memory Region Write Barrier Mechanisms (PMRWBM): %x\n", - NVME_PMRCAP_PMRWMB(pmrcap)); + NVME_PMRCAP_PMRWBM(pmrcap)); printf("\tPersistent Memory Region Time Units (PMRTU): "); printf("PMR time unit is %s\n", NVME_PMRCAP_PMRTU(pmrcap) ? "minutes" : "500 milliseconds"); printf("\tBase Indicator Register (BIR): %x\n", @@ -1713,7 +1731,9 @@ static void stdout_id_ctrl_ctratt(__le32 ctrl_ctratt) __u32 ctratt = le32_to_cpu(ctrl_ctratt); __u32 rsvd20 = (ctratt >> 20); __u32 fdps = (ctratt >> 19) & 0x1; - __u32 rsvd16 = (ctratt >> 16) & 0x7; + __u32 rsvd18 = (ctratt >> 18) & 0x1; + __u32 hmbr = (ctratt >> 17) & 0x1; + __u32 mem = (ctratt >> 16) & 0x1; __u32 elbas = (ctratt >> 15) & 0x1; __u32 delnvmset = (ctratt >> 14) & 0x1; __u32 delegrp = (ctratt >> 13) & 0x1; @@ -1735,8 +1755,12 @@ static void stdout_id_ctrl_ctratt(__le32 ctrl_ctratt) printf(" [31:20] : %#x\tReserved\n", rsvd20); printf(" [19:19] : %#x\tFlexible Data Placement %sSupported\n", fdps, fdps ? "" : "Not "); - if (rsvd16) - printf(" [18:16] : %#x\tReserved\n", rsvd16); + if (rsvd18) + printf(" [18:18] : %#x\tReserved\n", rsvd18); + printf(" [17:17] : %#x\tHMB Restrict Non-Operational Power State Access %sSupported\n", + hmbr, hmbr ? "" : "Not "); + printf(" [16:16] : %#x\tMDTS and Size Limits Exclude Metadata %sSupported\n", + mem, mem ? "" : "Not "); printf(" [15:15] : %#x\tExtended LBA Formats %sSupported\n", elbas, elbas ? "" : "Not "); printf(" [14:14] : %#x\tDelete NVM Set %sSupported\n", @@ -1964,15 +1988,15 @@ static void stdout_id_ctrl_apsta(__u8 apsta) static void stdout_id_ctrl_wctemp(__le16 wctemp) { - 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(" [15:0] : %s (%u K)\tWarning Composite Temperature Threshold (WCTEMP)\n", + nvme_degrees_string(le16_to_cpu(wctemp)), le16_to_cpu(wctemp)); printf("\n"); } static void stdout_id_ctrl_cctemp(__le16 cctemp) { - 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(" [15:0] : %s (%u K)\tCritical Composite Temperature Threshold (CCTEMP)\n", + nvme_degrees_string(le16_to_cpu(cctemp)), le16_to_cpu(cctemp)); printf("\n"); } @@ -2021,15 +2045,15 @@ static void stdout_id_ctrl_hctma(__le16 ctrl_hctma) static void stdout_id_ctrl_mntmt(__le16 mntmt) { - 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(" [15:0] : %s (%u K)\tMinimum Thermal Management Temperature (MNTMT)\n", + nvme_degrees_string(le16_to_cpu(mntmt)), le16_to_cpu(mntmt)); printf("\n"); } static void stdout_id_ctrl_mxtmt(__le16 mxtmt) { - 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(" [15:0] : %s (%u K)\tMaximum Thermal Management Temperature (MXTMT)\n", + nvme_degrees_string(le16_to_cpu(mxtmt)), le16_to_cpu(mxtmt)); printf("\n"); } @@ -2341,17 +2365,18 @@ static void stdout_id_ctrl_ofcs(__le16 ofcs) static void stdout_id_ns_nsfeat(__u8 nsfeat) { - __u8 rsvd = (nsfeat & 0xE0) >> 5; - __u8 ioopt = (nsfeat & 0x10) >> 4; + __u8 rsvd = (nsfeat & 0xC0) >> 6; + __u8 optperf = (nsfeat & 0x30) >> 4; __u8 uidreuse = (nsfeat & 0x8) >> 3; __u8 dulbe = (nsfeat & 0x4) >> 2; __u8 na = (nsfeat & 0x2) >> 1; __u8 thin = nsfeat & 0x1; if (rsvd) - printf(" [7:5] : %#x\tReserved\n", rsvd); - printf(" [4:4] : %#x\tNPWG, NPWA, NPDG, NPDA, and NOWS are %sSupported\n", - ioopt, ioopt ? "" : "Not "); + printf(" [7:6] : %#x\tReserved\n", rsvd); + printf(" [5:4] : %#x\tNPWG, NPWA, %s%sNPDA, and NOWS are %sSupported\n", + optperf, ((optperf & 0x1) || (!optperf)) ? "NPDG, " : "", + ((optperf & 0x2) || (!optperf)) ? "NPDGL, " : "", optperf ? "" : "Not "); printf(" [3:3] : %#x\tNGUID and EUI64 fields if non-zero, %sReused\n", uidreuse, uidreuse ? "Never " : ""); printf(" [2:2] : %#x\tDeallocated or Unwritten Logical Block error %sSupported\n", @@ -2584,10 +2609,11 @@ static void stdout_id_ns(struct nvme_id_ns *ns, unsigned int nsid, printf("noiob : %d\n", le16_to_cpu(ns->noiob)); printf("nvmcap : %s\n", uint128_t_to_l10n_string(le128_to_cpu(ns->nvmcap))); - if (ns->nsfeat & 0x10) { + if (ns->nsfeat & 0x30) { printf("npwg : %u\n", le16_to_cpu(ns->npwg)); printf("npwa : %u\n", le16_to_cpu(ns->npwa)); - printf("npdg : %u\n", le16_to_cpu(ns->npdg)); + if (ns->nsfeat & 0x10) + printf("npdg : %u\n", le16_to_cpu(ns->npdg)); printf("npda : %u\n", le16_to_cpu(ns->npda)); printf("nows : %u\n", le16_to_cpu(ns->nows)); } @@ -3040,30 +3066,69 @@ static void stdout_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm) static void stdout_nvm_id_ns_pic(__u8 pic) { - __u8 rsvd = (pic & 0xF8) >> 3; - __u8 stcrs = (pic & 0x3) >> 2; + __u8 rsvd = (pic & 0xF0) >> 4; + __u8 qpifs = (pic & 0x8) >> 3; + __u8 stcrs = (pic & 0x4) >> 2; __u8 pic_16bpistm = (pic & 0x2) >> 1; __u8 pic_16bpists = pic & 0x1; if (rsvd) - printf(" [7:3] : %#x\tReserved\n", rsvd); - printf(" [2:2] : %#x\tStorage Tag Check Read Support\n", stcrs); + printf(" [7:4] : %#x\tReserved\n", rsvd); + printf(" [3:3] : %#x\tQualified Protection Information Format %sSupported\n", + qpifs, qpifs ? "" : "Not "); + printf(" [2:2] : %#x\tStorage Tag Check Read %sSupported\n", + stcrs, stcrs ? "" : "Not "); printf(" [1:1] : %#x\t16b Guard Protection Information Storage Tag Mask\n", pic_16bpistm); - printf(" [0:0] : %#x\t16b Guard Protection Information Storage Tag Support\n", - pic_16bpists); + printf(" [0:0] : %#x\t16b Guard Protection Information Storage Tag %sSupported\n", + pic_16bpists, pic_16bpists ? "" : "Not "); printf("\n"); } +static void stdout_nvm_id_ns_pifa(__u8 pifa) +{ + __u8 rsvd = (pifa & 0xF8) >> 3; + __u8 stmla = pifa & 0x7; + + if (rsvd) + printf(" [7:3] : %#x\tReserved\n", rsvd); + printf(" [2:0] : %#x\tStorage Tag Masking Level Attribute : %s\n", stmla, + stmla == 0 ? "Bit Granularity Masking" : + stmla == 1 ? "Byte Granularity Masking" : + stmla == 2 ? "Masking Not Supported" : "Reserved"); + printf("\n"); +} + +static char *pif_to_string(__u8 pif, bool qpifs, bool pif_field) +{ + switch (pif) { + case NVME_NVM_PIF_16B_GUARD: + return "16b Guard"; + case NVME_NVM_PIF_32B_GUARD: + return "32b Guard"; + case NVME_NVM_PIF_64B_GUARD: + return "64b Guard"; + case NVME_NVM_PIF_QTYPE: + if (pif_field && qpifs) + return "Qualified Type"; + default: + return "Reserved"; + } +} + static void stdout_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid, struct nvme_id_ns *ns, unsigned int lba_index, bool cap_only) { int i, verbose = stdout_print_ops.flags & VERBOSE; + bool qpifs = (nvm_ns->pic & 0x8) >> 3; __u32 elbaf; - int pif, sts; + __u8 lbaf; + int pif, sts, qpif; char *in_use = "(in use)"; + nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lbaf); + if (!cap_only) { printf("NVMe NVM Identify Namespace %d:\n", nsid); printf("lbstm : %#"PRIx64"\n", le64_to_cpu(nvm_ns->lbstm)); @@ -3074,22 +3139,26 @@ static void stdout_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid, printf("pic : %#x\n", nvm_ns->pic); if (verbose) stdout_nvm_id_ns_pic(nvm_ns->pic); + printf("pifa : %#x\n", nvm_ns->pifa); + if (verbose) + stdout_nvm_id_ns_pifa(nvm_ns->pifa); for (i = 0; i <= ns->nlbaf + ns->nulbaf; i++) { elbaf = le32_to_cpu(nvm_ns->elbaf[i]); + qpif = (elbaf >> 9) & 0xF; pif = (elbaf >> 7) & 0x3; sts = elbaf & 0x7f; if (verbose) - printf("Extended LBA Format %2d : Protection Information Format: " - "%s(%d) - Storage Tag Size (MSB): %-2d %s\n", - i, pif == 3 ? "Reserved" : - pif == 2 ? "64b Guard" : - pif == 1 ? "32b Guard" : "16b Guard", - pif, sts, i == (ns->flbas & 0xf) ? in_use : ""); + printf("Extended LBA Format %2d : Qualified Protection Information Format: " + "%s(%d) - Protection Information Format: %s(%d) - Storage Tag Size " + "(MSB): %-2d %s\n", i, pif_to_string(qpif, qpifs, false), qpif, + pif_to_string(pif, qpifs, true), pif, sts, i == lbaf ? in_use : ""); else - printf("elbaf %2d : pif:%d sts:%-2d %s\n", i, - pif, sts, i == (ns->flbas & 0xf) ? in_use : ""); + printf("elbaf %2d : qpif:%d pif:%d sts:%-2d %s\n", i, + qpif, pif, sts, i == lbaf ? in_use : ""); } + if (ns->nsfeat & 0x20) + printf("npdgl : %#x\n", le32_to_cpu(nvm_ns->npdgl)); } static void stdout_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl) @@ -3199,9 +3268,9 @@ static void stdout_zns_id_ns(struct nvme_zns_id_ns *ns, stdout_zns_id_ns_recommended_limit(ns->rrl1, human, "rrl1"); stdout_zns_id_ns_recommended_limit(ns->rrl2, human, "rrl2"); stdout_zns_id_ns_recommended_limit(ns->rrl3, human, "rrl3"); - stdout_zns_id_ns_recommended_limit(ns->frl, human, "frl1"); - stdout_zns_id_ns_recommended_limit(ns->frl, human, "frl2"); - stdout_zns_id_ns_recommended_limit(ns->frl, human, "frl3"); + stdout_zns_id_ns_recommended_limit(ns->frl1, human, "frl1"); + stdout_zns_id_ns_recommended_limit(ns->frl2, human, "frl2"); + stdout_zns_id_ns_recommended_limit(ns->frl3, human, "frl3"); printf("numzrwa : %#x\n", le32_to_cpu(ns->numzrwa)); printf("zrwafg : %u\n", le16_to_cpu(ns->zrwafg)); @@ -3833,80 +3902,79 @@ static void stdout_endurance_log(struct nvme_endurance_group_log *endurance_log, uint128_t_to_l10n_string(le128_to_cpu(endurance_log->unalloc_end_grp_cap))); } -static void stdout_smart_log(struct nvme_smart_log *smart, unsigned int nsid, - const char *devname) +static void stdout_smart_log(struct nvme_smart_log *smart, unsigned int nsid, const char *devname) { __u16 temperature = smart->temperature[1] << 8 | smart->temperature[0]; int i; bool human = stdout_print_ops.flags & VERBOSE; printf("Smart Log for NVME device:%s namespace-id:%x\n", devname, nsid); - printf("critical_warning : %#x\n", - smart->critical_warning); + printf("critical_warning : %#x\n", smart->critical_warning); if (human) { - printf(" Available Spare[0] : %d\n", smart->critical_warning & 0x01); - printf(" Temp. Threshold[1] : %d\n", (smart->critical_warning & 0x02) >> 1); - printf(" NVM subsystem Reliability[2] : %d\n", (smart->critical_warning & 0x04) >> 2); - printf(" Read-only[3] : %d\n", (smart->critical_warning & 0x08) >> 3); - printf(" Volatile mem. backup failed[4] : %d\n", (smart->critical_warning & 0x10) >> 4); - printf(" Persistent Mem. RO[5] : %d\n", (smart->critical_warning & 0x20) >> 5); + printf(" Available Spare[0] : %d\n", + smart->critical_warning & 0x01); + printf(" Temp. Threshold[1] : %d\n", + (smart->critical_warning & 0x02) >> 1); + printf(" NVM subsystem Reliability[2] : %d\n", + (smart->critical_warning & 0x04) >> 2); + printf(" Read-only[3] : %d\n", + (smart->critical_warning & 0x08) >> 3); + printf(" Volatile mem. backup failed[4] : %d\n", + (smart->critical_warning & 0x10) >> 4); + printf(" Persistent Mem. RO[5] : %d\n", + (smart->critical_warning & 0x20) >> 5); } - printf("temperature : %ld °C (%u K)\n", - kelvin_to_celsius(temperature), temperature); - printf("available_spare : %u%%\n", - smart->avail_spare); - printf("available_spare_threshold : %u%%\n", - smart->spare_thresh); - printf("percentage_used : %u%%\n", - smart->percent_used); - printf("endurance group critical warning summary: %#x\n", - smart->endu_grp_crit_warn_sumry); + printf("temperature : %s (%u K)\n", + nvme_degrees_string(temperature), temperature); + printf("available_spare : %u%%\n", smart->avail_spare); + printf("available_spare_threshold : %u%%\n", smart->spare_thresh); + printf("percentage_used : %u%%\n", smart->percent_used); + printf("endurance group critical warning summary: %#x\n", smart->endu_grp_crit_warn_sumry); printf("Data Units Read : %s (%s)\n", - 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)); + 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_l10n_string(le128_to_cpu(smart->data_units_written)), - uint128_t_to_si_string(le128_to_cpu(smart->data_units_written), - 1000 * 512)); + 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_l10n_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_l10n_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_l10n_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_l10n_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_l10n_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_l10n_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_l10n_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_l10n_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)); + le32_to_cpu(smart->warning_temp_time)); printf("Critical Composite Temperature Time : %u\n", - le32_to_cpu(smart->critical_comp_time)); - for (i = 0; i < 8; i++) { - __s32 temp = le16_to_cpu(smart->temp_sensor[i]); + le32_to_cpu(smart->critical_comp_time)); - if (temp == 0) + for (i = 0; i < ARRAY_SIZE(smart->temp_sensor); i++) { + temperature = le16_to_cpu(smart->temp_sensor[i]); + if (!temperature) continue; - printf("Temperature Sensor %d : %ld °C (%u K)\n", - i + 1, kelvin_to_celsius(temp), temp); + printf("Temperature Sensor %d : %s (%u K)\n", i + 1, + nvme_degrees_string(temperature), temperature); } + printf("Thermal Management T1 Trans Count : %u\n", - le32_to_cpu(smart->thm_temp1_trans_count)); + le32_to_cpu(smart->thm_temp1_trans_count)); printf("Thermal Management T2 Trans Count : %u\n", - le32_to_cpu(smart->thm_temp2_trans_count)); + le32_to_cpu(smart->thm_temp2_trans_count)); printf("Thermal Management T1 Total Time : %u\n", - le32_to_cpu(smart->thm_temp1_total_time)); + le32_to_cpu(smart->thm_temp1_total_time)); printf("Thermal Management T2 Total Time : %u\n", - le32_to_cpu(smart->thm_temp2_total_time)); + le32_to_cpu(smart->thm_temp2_total_time)); } static void stdout_ana_log(struct nvme_ana_log *ana_log, const char *devname, @@ -4408,8 +4476,8 @@ static void stdout_feature_show_fields(enum nvme_features_id fid, 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 K)\n", - kelvin_to_celsius(result & 0x0000ffff), result & 0x0000ffff); + printf("\tTemperature Threshold (TMPTH): %s (%u K)\n", + nvme_degrees_string(result & 0x0000ffff), result & 0x0000ffff); break; case NVME_FEAT_FID_ERR_RECOVERY: printf("\tDeallocated or Unwritten Logical Block Error Enable (DULBE): %s\n", @@ -4463,6 +4531,10 @@ static void stdout_feature_show_fields(enum nvme_features_id fid, break; case NVME_FEAT_FID_HOST_MEM_BUF: printf("\tEnable Host Memory (EHM): %s\n", (result & 0x00000001) ? "Enabled" : "Disabled"); + printf("\tHost Memory Non-operational Access Restriction Enable (HMNARE): %s\n", + (result & 0x00000004) ? "True" : "False"); + printf("\tHost Memory Non-operational Access Restricted (HMNAR): %s\n", + (result & 0x00000008) ? "True" : "False"); if (buf) stdout_host_mem_buffer((struct nvme_host_mem_buf_attrs *)buf); break; @@ -4474,10 +4546,10 @@ static void stdout_feature_show_fields(enum nvme_features_id fid, printf("\tKeep Alive Timeout (KATO) in milliseconds: %u\n", result); break; case NVME_FEAT_FID_HCTM: - 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 K (%ld °C)\n", - result & 0x0000ffff, kelvin_to_celsius(result & 0x0000ffff)); + printf("\tThermal Management Temperature 1 (TMT1) : %u K (%s)\n", + result >> 16, nvme_degrees_string(result >> 16)); + printf("\tThermal Management Temperature 2 (TMT2) : %u K (%s)\n", + result & 0x0000ffff, nvme_degrees_string(result & 0x0000ffff)); break; case NVME_FEAT_FID_NOPSC: printf("\tNon-Operational Power State Permissive Mode Enable (NOPPME): %s\n", @@ -5001,18 +5073,11 @@ static void stdout_simple_topology(nvme_root_t r, nvme_for_each_host(r, h) { nvme_for_each_subsystem(h, s) { - int len = strlen(nvme_subsystem_get_name(s)); - if (!first) printf("\n"); first = false; - printf("%s - NQN=%s\n", nvme_subsystem_get_name(s), - nvme_subsystem_get_nqn(s)); - printf("%*s hostnqn=%s\n", len, " ", - nvme_host_get_hostnqn(nvme_subsystem_get_host(s))); - printf("%*s iopolicy=%s\n", len, " ", - nvme_subsystem_get_iopolicy(s)); + stdout_subsys_config(s); printf("\\\n"); if (nvme_is_multipath(s)) @@ -5176,7 +5241,7 @@ static struct print_ops stdout_print_ops = { .show_error_status = stdout_error_status, }; -struct print_ops *nvme_get_stdout_print_ops(enum nvme_print_flags flags) +struct print_ops *nvme_get_stdout_print_ops(nvme_print_flags_t flags) { stdout_print_ops.flags = flags; return &stdout_print_ops; diff --git a/nvme-print.c b/nvme-print.c index c3993f1..3165ab9 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -6,6 +6,7 @@ #include <stdlib.h> #include <time.h> #include <sys/stat.h> +#include <locale.h> #include "nvme.h" #include "libnvme.h" @@ -25,7 +26,7 @@ #define nvme_print_output_format(name, ...) \ nvme_print(name, nvme_is_output_format_json() ? JSON : NORMAL, ##__VA_ARGS__); -static struct print_ops *nvme_print_ops(enum nvme_print_flags flags) +static struct print_ops *nvme_print_ops(nvme_print_flags_t flags) { struct print_ops *ops = NULL; @@ -101,6 +102,7 @@ const char *nvme_cmd_to_string(int admin, __u8 opcode) case nvme_cmd_resv_report: return "Reservation Report"; case nvme_cmd_resv_acquire: return "Reservation Acquire"; case nvme_cmd_resv_release: return "Reservation Release"; + case nvme_cmd_cancel: return "Cancel"; case nvme_cmd_verify: return "Verify"; case nvme_cmd_copy: return "Copy"; case nvme_zns_cmd_mgmt_send: return "Zone Management Send"; @@ -133,7 +135,7 @@ const char *nvme_sstat_status_to_string(__u16 status) void nvme_show_predictable_latency_per_nvmset( struct nvme_nvmset_predictable_lat_log *plpns_log, __u16 nvmset_id, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(predictable_latency_per_nvmset, flags, plpns_log, nvmset_id, devname); @@ -142,32 +144,59 @@ void nvme_show_predictable_latency_per_nvmset( void nvme_show_predictable_latency_event_agg_log( struct nvme_aggregate_predictable_lat_event *pea_log, __u64 log_entries, __u32 size, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(predictable_latency_event_agg_log, flags, pea_log, log_entries, size, devname); } -const char *nvme_pel_event_to_string(int type) +static const char *pel_event_to_string(int type) { switch (type) { - case NVME_PEL_SMART_HEALTH_EVENT: return "SMART/Health Log Snapshot Event(0x1)"; - case NVME_PEL_FW_COMMIT_EVENT: return "Firmware Commit Event(0x2)"; - case NVME_PEL_TIMESTAMP_EVENT: return "Timestamp Change Event(0x3)"; - case NVME_PEL_POWER_ON_RESET_EVENT: return "Power-on or Reset Event(0x4)"; - case NVME_PEL_NSS_HW_ERROR_EVENT: return "NVM Subsystem Hardware Error Event(0x5)"; - case NVME_PEL_CHANGE_NS_EVENT: return "Change Namespace Event(0x6)"; - case NVME_PEL_FORMAT_START_EVENT: return "Format NVM Start Event(0x7)"; - case NVME_PEL_FORMAT_COMPLETION_EVENT: return "Format NVM Completion Event(0x8)"; - case NVME_PEL_SANITIZE_START_EVENT: return "Sanitize Start Event(0x9)"; - case NVME_PEL_SANITIZE_COMPLETION_EVENT: return "Sanitize Completion Event(0xa)"; - case NVME_PEL_SET_FEATURE_EVENT: return "Set Feature Event(0xb)"; - case NVME_PEL_TELEMETRY_CRT: return "Set Telemetry CRT Event(0xc)"; - case NVME_PEL_THERMAL_EXCURSION_EVENT: return "Thermal Excursion Event(0xd)"; - default: return NULL; + case NVME_PEL_SMART_HEALTH_EVENT: + return "SMART/Health Log Snapshot Event"; + case NVME_PEL_FW_COMMIT_EVENT: + return "Firmware Commit Event"; + case NVME_PEL_TIMESTAMP_EVENT: + return "Timestamp Change Event"; + case NVME_PEL_POWER_ON_RESET_EVENT: + return "Power-on or Reset Event"; + case NVME_PEL_NSS_HW_ERROR_EVENT: + return "NVM Subsystem Hardware Error Event"; + case NVME_PEL_CHANGE_NS_EVENT: + return "Change Namespace Event"; + case NVME_PEL_FORMAT_START_EVENT: + return "Format NVM Start Event"; + case NVME_PEL_FORMAT_COMPLETION_EVENT: + return "Format NVM Completion Event"; + case NVME_PEL_SANITIZE_START_EVENT: + return "Sanitize Start Event"; + case NVME_PEL_SANITIZE_COMPLETION_EVENT: + return "Sanitize Completion Event"; + case NVME_PEL_SET_FEATURE_EVENT: + return "Set Feature Event"; + case NVME_PEL_TELEMETRY_CRT: + return "Set Telemetry CRT Event"; + case NVME_PEL_THERMAL_EXCURSION_EVENT: + return "Thermal Excursion Event"; + case NVME_PEL_VENDOR_SPECIFIC_EVENT: + return "Vendor Specific Event"; + case NVME_PEL_TCG_DEFINED_EVENT: + return "TCG Defined Event"; + default: + return "Reserved Event"; } } +const char *nvme_pel_event_to_string(int type) +{ + static char str[STR_LEN]; + + sprintf(str, "%s(%#x)", pel_event_to_string(type), type); + + return str; +} + const char *nvme_nss_hw_error_to_string(__u16 error_code) { switch (error_code) { @@ -200,7 +229,7 @@ const char *nvme_nss_hw_error_to_string(__u16 error_code) void nvme_show_persistent_event_log(void *pevent_log_info, __u8 action, __u32 size, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(persistent_event_log, flags, pevent_log_info, action, size, devname); @@ -209,14 +238,14 @@ void nvme_show_persistent_event_log(void *pevent_log_info, void nvme_show_endurance_group_event_agg_log( struct nvme_aggregate_predictable_lat_event *endurance_log, __u64 log_entries, __u32 size, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(endurance_group_event_agg_log, flags, endurance_log, log_entries, size, devname); } void nvme_show_lba_status_log(void *lba_status, __u32 size, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(lba_status_log, flags, lba_status, size, devname); } @@ -233,56 +262,56 @@ const char *nvme_resv_notif_to_string(__u8 type) } void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(resv_notification_log, flags, resv, devname); } void nvme_show_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(fid_supported_effects_log, flags, fid_log, devname); } void nvme_show_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(mi_cmd_support_effects_log, flags, mi_cmd_log, devname); } void nvme_show_boot_part_log(void *bp_log, const char *devname, - __u32 size, enum nvme_print_flags flags) + __u32 size, nvme_print_flags_t flags) { nvme_print(boot_part_log, flags, bp_log, devname, size); } void nvme_show_phy_rx_eom_log(struct nvme_phy_rx_eom_log *log, __u16 controller, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(phy_rx_eom_log, flags, log, controller); } void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus_log, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(media_unit_stat_log, flags, mus_log); } void nvme_show_fdp_configs(struct nvme_fdp_config_log *log, size_t len, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(fdp_config_log, flags, log, len); } void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(fdp_usage_log, flags,log, len); } void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(fdp_stats_log, flags, log); } @@ -302,26 +331,26 @@ const char *nvme_fdp_event_to_string(enum nvme_fdp_event_type event) } void nvme_show_fdp_events(struct nvme_fdp_events_log *log, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(fdp_event_log, flags, log); } void nvme_show_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(fdp_ruh_status, flags, status, len); } void nvme_show_supported_cap_config_log( struct nvme_supported_cap_config_list_log *cap, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(supported_cap_config_list_log, flags, cap); } void nvme_show_subsystem_list(nvme_root_t r, bool show_ana, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(print_nvme_subsystem_list, flags, r, show_ana); } @@ -396,7 +425,7 @@ bool nvme_registers_pmrctl_ready(__u32 pmrctl) return NVME_PMRCTL_EN(pmrctl); } -void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_print_flags flags) +void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, nvme_print_flags_t flags) { uint64_t value; @@ -414,12 +443,12 @@ void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_prin nvme_print(ctrl_register, flags, offset, value); } -void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags) +void nvme_show_ctrl_registers(void *bar, bool fabrics, nvme_print_flags_t flags) { nvme_print(ctrl_registers, flags, bar, fabrics); } -void nvme_show_single_property(int offset, uint64_t value64, enum nvme_print_flags flags) +void nvme_show_single_property(int offset, uint64_t value64, nvme_print_flags_t flags) { nvme_print(single_property, flags, offset, value64); } @@ -468,13 +497,13 @@ void nvme_show_error_status(int status, const char *msg, ...) va_end(ap); } -void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, enum nvme_print_flags flags) +void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, nvme_print_flags_t flags) { nvme_print(id_ctrl_rpmbs, flags, ctrl_rpmbs); } void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid, - unsigned int lba_index, bool cap_only, enum nvme_print_flags flags) + unsigned int lba_index, bool cap_only, nvme_print_flags_t flags) { nvme_print(id_ns, flags, ns, nsid, lba_index, cap_only); } @@ -482,67 +511,67 @@ void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid, void nvme_show_cmd_set_independent_id_ns( struct nvme_id_independent_id_ns *ns, unsigned int nsid, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_independent_id_ns, flags, ns, nsid); } -void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flags) +void nvme_show_id_ns_descs(void *data, unsigned int nsid, nvme_print_flags_t flags) { nvme_print(id_ns_descs, flags, data, nsid); } -void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags, +void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, nvme_print_flags_t flags, void (*vendor_show)(__u8 *vs, struct json_object *root)) { nvme_print(id_ctrl, flags, ctrl, vendor_show); } void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_ctrl_nvm, flags, ctrl_nvm); } void nvme_show_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid, struct nvme_id_ns *ns, unsigned int lba_index, - bool cap_only, enum nvme_print_flags flags) + bool cap_only, nvme_print_flags_t flags) { nvme_print(nvm_id_ns, flags, nvm_ns, nsid, ns, lba_index, cap_only); } void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_id_ctrl, flags, ctrl); } void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns, struct nvme_id_ns *id_ns, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_id_ns, flags, ns, id_ns); } -void nvme_show_list_ns(struct nvme_ns_list *ns_list, enum nvme_print_flags flags) +void nvme_show_list_ns(struct nvme_ns_list *ns_list, nvme_print_flags_t flags) { nvme_print(ns_list, flags, ns_list); } void nvme_zns_start_zone_list(__u64 nr_zones, struct json_object **zone_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_start_zone_list, flags, nr_zones, zone_list); } void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_changed_zone_log, flags, log); } void nvme_zns_finish_zone_list(__u64 nr_zones, struct json_object *zone_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_finish_zone_list, flags, nr_zones, zone_list); } @@ -582,33 +611,33 @@ const char *nvme_zone_state_to_string(__u8 state) void nvme_show_zns_report_zones(void *report, __u32 descs, __u8 ext_size, __u32 report_size, struct json_object *zone_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(zns_report_zones, flags, report, descs, ext_size, report_size, zone_list); } void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(ctrl_list, flags, ctrl_list); } void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_nvmset_list, flags, nvmset, nvmset_id); } void nvme_show_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *caps, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(primary_ctrl_cap, flags, caps); } void nvme_show_list_secondary_ctrl( const struct nvme_secondary_ctrl_list *sc_list, - __u32 count, enum nvme_print_flags flags) + __u32 count, nvme_print_flags_t flags) { __u16 num = sc_list->num; __u32 entries = min(num, count); @@ -617,30 +646,30 @@ void nvme_show_list_secondary_ctrl( } void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *glist, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_ns_granularity_list, flags, glist); } void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_uuid_list, flags, uuid_list); } void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(id_domain_list, flags, id_dom); } void nvme_show_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(endurance_group_list, flags, endgrp_list); } -void nvme_show_id_iocs(struct nvme_id_iocs *iocs, enum nvme_print_flags flags) +void nvme_show_id_iocs(struct nvme_id_iocs *iocs, nvme_print_flags_t flags) { nvme_print(id_iocs, flags, iocs); } @@ -659,32 +688,32 @@ const char *nvme_trtype_to_string(__u8 trtype) } void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(error_log, flags, err_log, entries, devname); } void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, - bool eds, enum nvme_print_flags flags) + bool eds, nvme_print_flags_t flags) { nvme_print(resv_report, flags, status, bytes, eds); } void nvme_show_fw_log(struct nvme_firmware_slot *fw_log, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(fw_log, flags, fw_log, devname); } void nvme_show_changed_ns_list_log(struct nvme_ns_list *log, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(ns_list_log, flags, log, devname); } void nvme_print_effects_log_pages(struct list_head *list, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(effects_log_list, flags, list); } @@ -712,6 +741,7 @@ const char *nvme_log_to_string(__u8 lid) case NVME_LOG_LID_ENDURANCE_GRP_EVT: return "Endurance Group Event Aggregate"; case NVME_LOG_LID_FID_SUPPORTED_EFFECTS: return "Feature Identifiers Supported and Effects"; case NVME_LOG_LID_MI_CMD_SUPPORTED_EFFECTS: return "NVMe-MI Commands Supported and Effects"; + case NVME_LOG_LID_CMD_AND_FEAT_LOCKDOWN: return "Command and Feature Lockdown"; case NVME_LOG_LID_BOOT_PARTITION: return "Boot Partition"; case NVME_LOG_LID_FDP_CONFIGS: return "FDP Configurations"; case NVME_LOG_LID_FDP_RUH_USAGE: return "Reclaim Unit Handle Usage"; @@ -726,38 +756,91 @@ const char *nvme_log_to_string(__u8 lid) } void nvme_show_supported_log(struct nvme_supported_log_pages *support_log, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(supported_log_pages, flags, support_log, devname); } void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log, __u16 group_id, const char *devname, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(endurance_log, flags, endurance_log, group_id, devname); } +static bool is_fahrenheit_country(const char *country) +{ + static const char * const countries[] = { + "AQ", "AS", "BS", "BZ", "CY", "FM", "GU", "KN", "KY", "LR", + "MH", "MP", "MS", "PR", "PW", "TC", "US", "VG", "VI" + }; + int i; + + for (i = 0; i < ARRAY_SIZE(countries); i++) { + if (!strcmp(country, countries[i])) + return true; + } + + return false; +} + +static bool is_temperature_fahrenheit(void) +{ + const char *locale, *underscore; + char country[3] = { 0 }; + + setlocale(LC_ALL, ""); + locale = setlocale(LC_ALL, NULL); + + if (!locale || strlen(locale) < 2) + return false; + + underscore = strchr(locale, '_'); + if (underscore && strlen(underscore) >= 3) + locale = underscore + 1; + + memcpy(country, locale, 2); + + return is_fahrenheit_country(country); +} + +const char *nvme_degrees_string(long t) +{ + static char str[STR_LEN]; + long val = kelvin_to_celsius(t); + bool fahrenheit = is_temperature_fahrenheit(); + + if (fahrenheit) + val = kelvin_to_fahrenheit(t); + + if (nvme_is_output_format_json()) + sprintf(str, "%ld %s", val, fahrenheit ? "Fahrenheit" : "Celsius"); + else + sprintf(str, "%ld °%s", val, fahrenheit ? "F" : "C"); + + return str; +} + void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(smart_log, flags, smart, nsid, devname); } void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname, - size_t len, enum nvme_print_flags flags) + size_t len, nvme_print_flags_t flags) { nvme_print(ana_log, flags, ana_log, devname, len); } void nvme_show_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries, - __u32 size, const char *devname, enum nvme_print_flags flags) + __u32 size, const char *devname, nvme_print_flags_t flags) { nvme_print(self_test_log, flags, self_test, dst_entries, size, devname); } void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize, - const char *devname, enum nvme_print_flags flags) + const char *devname, nvme_print_flags_t flags) { nvme_print(sanitize_log_page, flags, sanitize, devname); } @@ -910,7 +993,7 @@ const char *nvme_feature_lba_type_to_string(__u8 type) } void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(lba_range, flags, lbrt, nr_ranges); } @@ -967,7 +1050,7 @@ const char *nvme_ns_wp_cfg_to_string(enum nvme_ns_write_protect_cfg state) } void nvme_directive_show(__u8 type, __u8 oper, __u16 spec, __u32 nsid, __u32 result, - void *buf, __u32 len, enum nvme_print_flags flags) + void *buf, __u32 len, nvme_print_flags_t flags) { nvme_print(directive, flags, type, oper, spec, nsid, result, buf, len); } @@ -1157,7 +1240,7 @@ void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, un } void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(lba_status, flags, list, len); } @@ -1211,14 +1294,14 @@ void nvme_show_list_item(nvme_ns_t n) nvme_print(list_item, NORMAL, n); } -void nvme_show_list_items(nvme_root_t r, enum nvme_print_flags flags) +void nvme_show_list_items(nvme_root_t r, nvme_print_flags_t flags) { nvme_print(list_items, flags, r); } void nvme_show_topology(nvme_root_t r, enum nvme_cli_topo_ranking ranking, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { if (ranking == NVME_CLI_TOPO_NAMESPACE) nvme_print(topology_namespace, flags, r); @@ -1254,12 +1337,12 @@ void nvme_show_perror(const char *msg) } void nvme_show_discovery_log(struct nvmf_discovery_log *log, uint64_t numrec, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { nvme_print(discovery_log, flags, log, numrec); } -void nvme_show_connect_msg(nvme_ctrl_t c, enum nvme_print_flags flags) +void nvme_show_connect_msg(nvme_ctrl_t c, nvme_print_flags_t flags) { nvme_print(connect_msg, flags, c); } diff --git a/nvme-print.h b/nvme-print.h index b17172e..a3943cc 100644 --- a/nvme-print.h +++ b/nvme-print.h @@ -18,6 +18,8 @@ typedef struct nvme_effects_log_node { #define POWER_OF_TWO(exponent) (1 << (exponent)) +#define STR_LEN 100 + void d(unsigned char *buf, int len, int width, int group); void d_raw(unsigned char *buf, unsigned len); @@ -103,7 +105,7 @@ struct print_ops { void (*show_status)(int status); void (*show_error_status)(int status, const char *msg, va_list ap); - enum nvme_print_flags flags; + nvme_print_flags_t flags; }; struct nvme_bar_cap { @@ -129,158 +131,158 @@ struct nvme_bar_cap { #ifdef CONFIG_JSONC -struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags); +struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags); #else /* !CONFIG_JSONC */ -static inline struct print_ops *nvme_get_json_print_ops(enum nvme_print_flags flags) { return NULL; } +static inline struct print_ops *nvme_get_json_print_ops(nvme_print_flags_t flags) { return NULL; } #endif /* !CONFIG_JSONC */ -struct print_ops *nvme_get_stdout_print_ops(enum nvme_print_flags flags); -struct print_ops *nvme_get_binary_print_ops(enum nvme_print_flags flags); +struct print_ops *nvme_get_stdout_print_ops(nvme_print_flags_t flags); +struct print_ops *nvme_get_binary_print_ops(nvme_print_flags_t flags); void nvme_show_status(int status); void nvme_show_lba_status_info(__u32 result); void nvme_show_relatives(const char *name); -void nvme_show_id_iocs(struct nvme_id_iocs *iocs, enum nvme_print_flags flags); -void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, enum nvme_print_flags flags, +void nvme_show_id_iocs(struct nvme_id_iocs *iocs, nvme_print_flags_t flags); +void nvme_show_id_ctrl(struct nvme_id_ctrl *ctrl, nvme_print_flags_t flags, void (*vendor_show)(__u8 *vs, struct json_object *root)); -void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, enum nvme_print_flags flags); +void nvme_show_id_ctrl_rpmbs(__le32 ctrl_rpmbs, nvme_print_flags_t flags); void nvme_show_id_ns(struct nvme_id_ns *ns, unsigned int nsid, - unsigned int lba_index, bool cap_only, enum nvme_print_flags flags); + unsigned int lba_index, bool cap_only, nvme_print_flags_t flags); void nvme_show_cmd_set_independent_id_ns( struct nvme_id_independent_id_ns *ns, unsigned int nsid, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_resv_report(struct nvme_resv_status *status, int bytes, bool eds, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_lba_range(struct nvme_lba_range_type *lbrt, int nr_ranges, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_supported_log(struct nvme_supported_log_pages *support, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_error_log(struct nvme_error_log_page *err_log, int entries, - const char *devname, enum nvme_print_flags flags); -void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); +void nvme_show_smart_log(struct nvme_smart_log *smart, unsigned int nsid, const char *devname, + nvme_print_flags_t flags); void nvme_show_ana_log(struct nvme_ana_log *ana_log, const char *devname, - size_t len, enum nvme_print_flags flags); + size_t len, nvme_print_flags_t flags); void nvme_show_self_test_log(struct nvme_self_test_log *self_test, __u8 dst_entries, - __u32 size, const char *devname, enum nvme_print_flags flags); + __u32 size, const char *devname, nvme_print_flags_t flags); void nvme_show_fw_log(struct nvme_firmware_slot *fw_log, const char *devname, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_print_effects_log_pages(struct list_head *list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_changed_ns_list_log(struct nvme_ns_list *log, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_endurance_log(struct nvme_endurance_group_log *endurance_log, - __u16 group_id, const char *devname, enum nvme_print_flags flags); + __u16 group_id, const char *devname, nvme_print_flags_t flags); void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_predictable_latency_per_nvmset( struct nvme_nvmset_predictable_lat_log *plpns_log, - __u16 nvmset_id, const char *devname, enum nvme_print_flags flags); + __u16 nvmset_id, const char *devname, nvme_print_flags_t flags); void nvme_show_predictable_latency_event_agg_log( struct nvme_aggregate_predictable_lat_event *pea_log, __u64 log_entries, __u32 size, const char *devname, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_persistent_event_log(void *pevent_log_info, __u8 action, __u32 size, const char *devname, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_endurance_group_event_agg_log( struct nvme_aggregate_predictable_lat_event *endurance_log, __u64 log_entries, __u32 size, const char *devname, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_lba_status_log(void *lba_status, __u32 size, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_resv_notif_log(struct nvme_resv_notification_log *resv, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_boot_part_log(void *bp_log, const char *devname, - __u32 size, enum nvme_print_flags flags); + __u32 size, nvme_print_flags_t flags); void nvme_show_phy_rx_eom_log(struct nvme_phy_rx_eom_log *log, - __u16 controller, enum nvme_print_flags flags); + __u16 controller, nvme_print_flags_t flags); void nvme_show_fid_support_effects_log(struct nvme_fid_supported_effects_log *fid_log, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_mi_cmd_support_effects_log(struct nvme_mi_cmd_supported_effects_log *mi_cmd_log, - const char *devname, enum nvme_print_flags flags); + const char *devname, nvme_print_flags_t flags); void nvme_show_media_unit_stat_log(struct nvme_media_unit_stat_log *mus, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_supported_cap_config_log(struct nvme_supported_cap_config_list_log *caplog, - enum nvme_print_flags flags); -void nvme_show_ctrl_registers(void *bar, bool fabrics, enum nvme_print_flags flags); -void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, enum nvme_print_flags flags); -void nvme_show_single_property(int offset, uint64_t prop, enum nvme_print_flags flags); -void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flags); + nvme_print_flags_t flags); +void nvme_show_ctrl_registers(void *bar, bool fabrics, nvme_print_flags_t flags); +void nvme_show_ctrl_register(void *bar, bool fabrics, int offset, nvme_print_flags_t flags); +void nvme_show_single_property(int offset, uint64_t prop, nvme_print_flags_t flags); +void nvme_show_id_ns_descs(void *data, unsigned int nsid, nvme_print_flags_t flags); void nvme_show_lba_status(struct nvme_lba_status *list, unsigned long len, - enum nvme_print_flags flags); -void nvme_show_list_items(nvme_root_t t, enum nvme_print_flags flags); + nvme_print_flags_t flags); +void nvme_show_list_items(nvme_root_t t, nvme_print_flags_t flags); void nvme_show_subsystem_list(nvme_root_t t, bool show_ana, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_id_nvmset(struct nvme_id_nvmset_list *nvmset, unsigned nvmset_id, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_primary_ctrl_cap(const struct nvme_primary_ctrl_cap *cap, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_list_secondary_ctrl(const struct nvme_secondary_ctrl_list *sc_list, - __u32 count, enum nvme_print_flags flags); + __u32 count, nvme_print_flags_t flags); void nvme_show_id_ns_granularity_list(const struct nvme_id_ns_granularity_list *glist, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_id_uuid_list(const struct nvme_id_uuid_list *uuid_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_list_ctrl(struct nvme_ctrl_list *ctrl_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_id_domain_list(struct nvme_id_domain_list *id_dom, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_endurance_group_list(struct nvme_id_endurance_group_list *endgrp_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_list_ns(struct nvme_ns_list *ns_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_topology(nvme_root_t t, enum nvme_cli_topo_ranking ranking, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_feature_show(enum nvme_features_id fid, int sel, unsigned int result); void nvme_feature_show_fields(enum nvme_features_id fid, unsigned int result, unsigned char *buf); void nvme_directive_show(__u8 type, __u8 oper, __u16 spec, __u32 nsid, __u32 result, - void *buf, __u32 len, enum nvme_print_flags flags); + void *buf, __u32 len, nvme_print_flags_t flags); void nvme_show_select_result(enum nvme_features_id fid, __u32 result); void nvme_show_zns_id_ctrl(struct nvme_zns_id_ctrl *ctrl, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_nvm_id_ns(struct nvme_nvm_id_ns *nvm_ns, unsigned int nsid, struct nvme_id_ns *ns, unsigned int lba_index, - bool cap_only, enum nvme_print_flags flags); + bool cap_only, nvme_print_flags_t flags); void nvme_show_zns_id_ns(struct nvme_zns_id_ns *ns, - struct nvme_id_ns *id_ns, enum nvme_print_flags flags); + struct nvme_id_ns *id_ns, nvme_print_flags_t flags); void nvme_zns_start_zone_list(__u64 nr_zones, struct json_object **zone_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_zns_changed(struct nvme_zns_changed_zone_log *log, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_zns_finish_zone_list(__u64 nr_zones, struct json_object *zone_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_zns_report_zones(void *report, __u32 descs, __u8 ext_size, __u32 report_size, struct json_object *zone_list, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void json_nvme_finish_zone_list(__u64 nr_zones, struct json_object *zone_list); void nvme_show_list_item(nvme_ns_t n); void nvme_show_fdp_configs(struct nvme_fdp_config_log *configs, size_t len, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_fdp_stats(struct nvme_fdp_stats_log *log, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_fdp_events(struct nvme_fdp_events_log *log, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_fdp_usage(struct nvme_fdp_ruhu_log *log, size_t len, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_fdp_ruh_status(struct nvme_fdp_ruh_status *status, size_t len, - enum nvme_print_flags flags); + nvme_print_flags_t flags); void nvme_show_discovery_log(struct nvmf_discovery_log *log, uint64_t numrec, - enum nvme_print_flags flags); -void nvme_show_connect_msg(nvme_ctrl_t c, enum nvme_print_flags flags); + nvme_print_flags_t flags); +void nvme_show_connect_msg(nvme_ctrl_t c, nvme_print_flags_t flags); const char *nvme_ana_state_to_string(enum nvme_ana_state state); const char *nvme_cmd_to_string(int admin, __u8 opcode); @@ -320,4 +322,5 @@ void nvme_show_finish(void); bool nvme_is_fabrics_reg(int offset); bool nvme_registers_cmbloc_support(__u32 cmbsz); bool nvme_registers_pmrctl_ready(__u32 pmrctl); +const char *nvme_degrees_string(long t); #endif /* NVME_PRINT_H */ diff --git a/nvme-rpmb.c b/nvme-rpmb.c index 345e6ea..692b062 100644 --- a/nvme-rpmb.c +++ b/nvme-rpmb.c @@ -207,7 +207,7 @@ static void write_file(unsigned char *data, size_t len, const char *dir, const char *file, const char *msg) { char temp_folder[PATH_MAX] = { 0 }; - FILE *fp = NULL; + _cleanup_file_ FILE *fp = NULL; if (dir != NULL) sprintf(temp_folder, "%s/%s", dir, file); @@ -219,7 +219,6 @@ static void write_file(unsigned char *data, size_t len, const char *dir, fprintf(stderr, "Failed to write %s data to %s\n", msg ? msg : "", temp_folder); } - fclose(fp); } else { fprintf(stderr, "Failed to open %s file to write %s\n", temp_folder, msg ? msg : ""); @@ -602,9 +601,28 @@ static int rpmb_program_auth_key(int fd, unsigned char target, goto out; } - /* send request and read the result first */ - rsp = rpmb_read_request(fd, req, req_size, rsp_size); - if (rsp == NULL || rsp->result != 0) { + /* send the request and get response */ + err = send_rpmb_req(fd, req->target, req_size, req); + if (err) { + fprintf(stderr, "RPMB request 0x%04x for 0x%x, err: %d\n", req->type, req->target, + err); + goto out; + } + + /* send the request to get the result and then request to get the response */ + rsp = (struct rpmb_data_frame_t *)calloc(rsp_size, 1); + if (!rsp) { + fprintf(stderr, "failed to allocate response buffer memory\n"); + err = -ENOMEM; + goto out; + } + + rsp->target = req->target; + rsp->type = RPMB_REQ_READ_RESULT; + err = send_rpmb_req(fd, req->target, rsp_size, rsp); + if (err || rsp->result) { + fprintf(stderr, "Program auth key read result 0x%x, error = 0x%x\n", rsp->result, + err); goto out; } diff --git a/nvme-wrap.c b/nvme-wrap.c index 1327c86..2a18d4d 100644 --- a/nvme-wrap.c +++ b/nvme-wrap.c @@ -119,8 +119,11 @@ int nvme_cli_get_features(struct nvme_dev *dev, return do_admin_args_op(get_features, dev, args); } -int nvme_cli_ns_mgmt_delete(struct nvme_dev *dev, __u32 nsid) +int nvme_cli_ns_mgmt_delete(struct nvme_dev *dev, __u32 nsid, __u32 timeout) { + if (dev->type == NVME_DEV_DIRECT) + return nvme_ns_mgmt_delete_timeout(dev_fd(dev), nsid, timeout); + return do_admin_op(ns_mgmt_delete, dev, nsid); } @@ -256,11 +259,11 @@ int nvme_cli_get_log_predictable_lat_event(struct nvme_dev *dev, bool rae, len, log); } -int nvme_cli_get_log_ana(struct nvme_dev *dev, - enum nvme_log_ana_lsp lsp, bool rae, - __u64 offset, __u32 len, void *log) +int nvme_cli_get_ana_log_atomic(struct nvme_dev *dev, bool rgo, bool rae, + unsigned int retries, + struct nvme_ana_log *log, __u32 *len) { - return do_admin_op(get_log_ana, dev, lsp, rae, offset, len, log); + return do_admin_op(get_ana_log_atomic, dev, rgo, rae, retries, log, len); } int nvme_cli_get_log_lba_status(struct nvme_dev *dev, bool rae, diff --git a/nvme-wrap.h b/nvme-wrap.h index c3bb09a..67807b0 100644 --- a/nvme-wrap.h +++ b/nvme-wrap.h @@ -30,7 +30,7 @@ int nvme_cli_identify_primary_ctrl(struct nvme_dev *dev, __u16 cntid, struct nvme_primary_ctrl_cap *cap); int nvme_cli_identify_secondary_ctrl_list(struct nvme_dev *dev, __u16 cntid, struct nvme_secondary_ctrl_list *sc_list); -int nvme_cli_ns_mgmt_delete(struct nvme_dev *dev, __u32 nsid); +int nvme_cli_ns_mgmt_delete(struct nvme_dev *dev, __u32 nsid, __u32 timeout); int nvme_cli_ns_mgmt_create(struct nvme_dev *dev, struct nvme_ns_mgmt_host_sw_specified *data, __u32 *nsid, __u32 timeout, __u8 csi); @@ -88,9 +88,9 @@ int nvme_cli_get_log_predictable_lat_nvmset(struct nvme_dev *dev, struct nvme_nvmset_predictable_lat_log *log); int nvme_cli_get_log_predictable_lat_event(struct nvme_dev *dev, bool rae, __u32 offset, __u32 len, void *log); -int nvme_cli_get_log_ana(struct nvme_dev *dev, - enum nvme_log_ana_lsp lsp, bool rae, - __u64 offset, __u32 len, void *log); +int nvme_cli_get_ana_log_atomic(struct nvme_dev *dev, bool rgo, bool rae, + unsigned int retries, + struct nvme_ana_log *log, __u32 *len); int nvme_cli_get_log_lba_status(struct nvme_dev *dev, bool rae, __u64 offset, __u32 len, void *log); int nvme_cli_get_log_endurance_grp_evt(struct nvme_dev *dev, bool rae, @@ -34,6 +34,7 @@ #include <inttypes.h> #include <locale.h> #include <stdio.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -88,7 +89,6 @@ struct passthru_config { __u32 namespace_id; __u32 data_len; __u32 metadata_len; - __u32 timeout; __u32 cdw2; __u32 cdw3; __u32 cdw10; @@ -163,14 +163,6 @@ struct set_reg_config { __u32 pmrmscu; }; -#define NVME_ARGS(n, ...) \ - struct argconfig_commandline_options n[] = { \ - OPT_INCR("verbose", 'v', &verbose_level, verbose), \ - OPT_FMT("output-format", 'o', &output_format_val, output_format), \ - ##__VA_ARGS__, \ - OPT_END() \ - } - static const char nvme_version_string[] = NVME_VERSION; static struct plugin builtin = { @@ -193,6 +185,9 @@ static struct program nvme = { }; const char *output_format = "Output format: normal|json|binary"; +const char *timeout = "timeout value, in milliseconds"; +const char *verbose = "Increase output verbosity"; + static const char *app_tag = "app tag for end-to-end PI"; static const char *app_tag_mask = "app tag mask for end-to-end PI"; static const char *block_count = "number of blocks (zeroes based) on device to access"; @@ -235,10 +230,8 @@ static const char *secp = "security protocol (cf. SPC-4)"; static const char *spsp = "security-protocol-specific (cf. SPC-4)"; static const char *start_block = "64-bit LBA of first block to access"; static const char *storage_tag = "storage tag for end-to-end PI"; -static const char *timeout = "timeout value, in milliseconds"; static const char *uuid_index = "UUID index"; static const char *uuid_index_specify = "specify uuid index"; -static const char *verbose = "Increase output verbosity"; static const char dash[51] = {[0 ... 49] = '=', '\0'}; static const char space[51] = {[0 ... 49] = ' ', '\0'}; static const char *offset = "offset of the requested register"; @@ -258,8 +251,9 @@ static const char *pmrctl = "PMRCTL=0xe04 register offset"; static const char *pmrmscl = "PMRMSCL=0xe14 register offset"; static const char *pmrmscu = "PMRMSCU=0xe18 register offset"; -static char *output_format_val = "normal"; -int verbose_level; +struct nvme_config nvme_cfg = { + .output_format = "normal", +}; static void *mmap_registers(struct nvme_dev *dev, bool writable); @@ -423,13 +417,29 @@ static int get_dev(struct nvme_dev **dev, int argc, char **argv, int flags) return ret; devname = argv[optind]; + errno = ENXIO; if (!strncmp(devname, "mctp:", strlen("mctp:"))) ret = open_dev_mi_mctp(dev, devname); else ret = open_dev_direct(dev, devname, flags); - return ret != 0 ? -errno : 0; + return ret ? -errno : 0; +} + +static int parse_args(int argc, char *argv[], const char *desc, + struct argconfig_commandline_options *opts) +{ + int ret; + + ret = argconfig_parse(argc, argv, desc, opts); + if (ret) + return ret; + + log_level = map_log_level(nvme_cfg.verbose, false); + nvme_init_default_logging(stderr, log_level, false, false); + + return 0; } int parse_and_open(struct nvme_dev **dev, int argc, char **argv, @@ -438,15 +448,13 @@ int parse_and_open(struct nvme_dev **dev, int argc, char **argv, { int ret; - ret = argconfig_parse(argc, argv, desc, opts); + ret = parse_args(argc, argv, desc, opts); if (ret) return ret; ret = get_dev(dev, argc, argv, O_RDONLY); if (ret < 0) argconfig_print_help(desc, opts); - else - log_level = map_log_level(verbose_level, false); return ret; } @@ -462,9 +470,9 @@ int open_exclusive(struct nvme_dev **dev, int argc, char **argv, return get_dev(dev, argc, argv, flags); } -int validate_output_format(const char *format, enum nvme_print_flags *flags) +int validate_output_format(const char *format, nvme_print_flags_t *flags) { - enum nvme_print_flags f; + nvme_print_flags_t f; if (!format) return -EINVAL; @@ -485,9 +493,9 @@ int validate_output_format(const char *format, enum nvme_print_flags *flags) bool nvme_is_output_format_json(void) { - enum nvme_print_flags flags; + nvme_print_flags_t flags; - if (validate_output_format(output_format_val, &flags)) + if (validate_output_format(nvme_cfg.output_format, &flags)) return false; return flags == JSON; @@ -516,7 +524,7 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug _cleanup_free_ struct nvme_smart_log *smart_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; const char *namespace = "(optional) desired namespace"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -540,7 +548,7 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -549,7 +557,7 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug if (cfg.raw_binary) flags = BINARY; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; smart_log = nvme_alloc(sizeof(*smart_log)); @@ -578,10 +586,10 @@ static int get_ana_log(int argc, char **argv, struct command *cmd, _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL; - _cleanup_free_ void *ana_log = NULL; - size_t ana_log_len; - enum nvme_print_flags flags; - enum nvme_log_ana_lsp lsp; + _cleanup_free_ struct nvme_ana_log *ana_log = NULL; + size_t max_ana_log_len; + __u32 ana_log_len; + nvme_print_flags_t flags; int err = -1; struct config { @@ -599,7 +607,7 @@ static int get_ana_log(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -616,19 +624,19 @@ static int get_ana_log(int argc, char **argv, struct command *cmd, return err; } - ana_log_len = sizeof(struct nvme_ana_log) + - le32_to_cpu(ctrl->nanagrpid) * sizeof(struct nvme_ana_group_desc); - if (!(ctrl->anacap & (1 << 6))) - ana_log_len += le32_to_cpu(ctrl->mnan) * sizeof(__le32); + max_ana_log_len = nvme_get_ana_log_len_from_id_ctrl(ctrl, cfg.groups); + ana_log_len = max_ana_log_len; + if (ana_log_len < max_ana_log_len) { + nvme_show_error("ANA log length %zu too large", max_ana_log_len); + return -ENOMEM; + } ana_log = nvme_alloc(ana_log_len); if (!ana_log) return -ENOMEM; - lsp = cfg.groups ? NVME_LOG_ANA_LSP_RGO_GROUPS_ONLY : - NVME_LOG_ANA_LSP_RGO_NAMESPACES; - - err = nvme_cli_get_log_ana(dev, lsp, true, 0, ana_log_len, ana_log); + err = nvme_cli_get_ana_log_atomic(dev, cfg.groups, true, 10, + ana_log, &ana_log_len); if (!err) nvme_show_ana_log(ana_log, dev->name, ana_log_len, flags); else if (err > 0) @@ -703,7 +711,10 @@ static int get_log_telemetry_ctrl(struct nvme_dev *dev, bool rae, size_t size, err = nvme_cli_get_log_telemetry_ctrl(dev, rae, 0, size, log); if (err) { free(log); - return -errno; + if (errno) + return -errno; + else + return err; } *buf = log; @@ -723,7 +734,10 @@ static int get_log_telemetry_host(struct nvme_dev *dev, size_t size, err = nvme_cli_get_log_telemetry_host(dev, 0, size, log); if (err) { free(log); - return -errno; + if (errno) + return -errno; + else + return err; } *buf = log; @@ -743,8 +757,12 @@ static int __create_telemetry_log_host(struct nvme_dev *dev, return -ENOMEM; err = nvme_cli_get_log_create_telemetry_host(dev, log); - if (err) - return -errno; + if (err) { + if (errno) + return -errno; + else + return err; + } err = parse_telemetry_da(dev, da, log, size); if (err) @@ -838,7 +856,7 @@ static int get_telemetry_log(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_telemetry_log *log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - _cleanup_file_ int output = -1; + _cleanup_fd_ int output = -1; int err = 0; size_t total_size; __u8 *data_ptr = NULL; @@ -944,7 +962,7 @@ static int get_endurance_log(int argc, char **argv, struct command *cmd, struct _cleanup_free_ struct nvme_endurance_group_log *endurance_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -962,7 +980,7 @@ static int get_endurance_log(int argc, char **argv, struct command *cmd, struct if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1017,7 +1035,7 @@ static int get_effects_log(int argc, char **argv, struct command *cmd, struct pl void *bar = NULL; int err = -1; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct config { bool human_readable; @@ -1040,7 +1058,7 @@ static int get_effects_log(int argc, char **argv, struct command *cmd, struct pl if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1049,7 +1067,7 @@ static int get_effects_log(int argc, char **argv, struct command *cmd, struct pl if (cfg.raw_binary) flags = BINARY; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; list_head_init(&log_pages); @@ -1068,7 +1086,7 @@ static int get_effects_log(int argc, char **argv, struct command *cmd, struct pl .fd = dev_fd(dev), .offset = NVME_REG_CAP, .value = &cap, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, }; err = nvme_get_property(&args); if (err) @@ -1107,7 +1125,7 @@ static int get_supported_log_pages(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_supported_log_pages *supports = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; NVME_ARGS(opts); @@ -1116,7 +1134,7 @@ static int get_supported_log_pages(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1151,7 +1169,7 @@ static int get_error_log(int argc, char **argv, struct command *cmd, struct plug _cleanup_free_ struct nvme_error_log_page *err_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; struct nvme_id_ctrl ctrl; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -1172,7 +1190,7 @@ static int get_error_log(int argc, char **argv, struct command *cmd, struct plug if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1219,7 +1237,7 @@ static int get_fw_log(int argc, char **argv, struct command *cmd, struct plugin _cleanup_free_ struct nvme_firmware_slot *fw_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -1237,7 +1255,7 @@ static int get_fw_log(int argc, char **argv, struct command *cmd, struct plugin if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1268,7 +1286,7 @@ static int get_changed_ns_list_log(int argc, char **argv, struct command *cmd, s _cleanup_free_ struct nvme_ns_list *changed_ns_list_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -1286,7 +1304,7 @@ static int get_changed_ns_list_log(int argc, char **argv, struct command *cmd, s if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1322,7 +1340,7 @@ static int get_pred_lat_per_nvmset_log(int argc, char **argv, _cleanup_free_ struct nvme_nvmset_predictable_lat_log *plpns_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -1343,7 +1361,7 @@ static int get_pred_lat_per_nvmset_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1380,7 +1398,7 @@ static int get_pred_lat_event_agg_log(int argc, char **argv, _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL; _cleanup_free_ void *pea_log = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; __u32 log_size; int err; @@ -1405,7 +1423,7 @@ static int get_pred_lat_event_agg_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1462,11 +1480,11 @@ static int get_persistent_event_log(int argc, char **argv, "processing this persistent log page command."; const char *log_len = "number of bytes to retrieve"; - _cleanup_free_ struct nvme_persistent_event_log *pevent_collected = NULL; _cleanup_free_ struct nvme_persistent_event_log *pevent = NULL; + struct nvme_persistent_event_log *pevent_collected = NULL; _cleanup_huge_ struct nvme_mem_huge mh = { 0, }; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; void *pevent_log_info; int err; @@ -1491,7 +1509,7 @@ static int get_persistent_event_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1582,7 +1600,7 @@ static int get_endurance_event_agg_log(int argc, char **argv, _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL; _cleanup_free_ void *endurance_log = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; __u32 log_size; int err; @@ -1607,7 +1625,7 @@ static int get_endurance_event_agg_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1663,7 +1681,7 @@ static int get_lba_status_log(int argc, char **argv, _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *lba_status = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; __u32 lslplen; int err; @@ -1682,7 +1700,7 @@ static int get_lba_status_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1723,7 +1741,7 @@ static int get_resv_notif_log(int argc, char **argv, _cleanup_free_ struct nvme_resv_notification_log *resv = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; NVME_ARGS(opts); @@ -1732,7 +1750,7 @@ static int get_resv_notif_log(int argc, char **argv, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1764,9 +1782,9 @@ static int get_boot_part_log(int argc, char **argv, struct command *cmd, struct _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_boot_partition *boot = NULL; _cleanup_free_ __u8 *bp_log = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; - _cleanup_file_ int output = -1; + _cleanup_fd_ int output = -1; __u32 bpsz = 0; struct config { @@ -1787,7 +1805,7 @@ static int get_boot_part_log(int argc, char **argv, struct command *cmd, struct if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1858,7 +1876,7 @@ static int get_phy_rx_eom_log(int argc, char **argv, struct command *cmd, const char *controller = "Target Controller ID."; _cleanup_free_ struct nvme_phy_rx_eom_log *phy_rx_eom_log = NULL; size_t phy_rx_eom_log_len; - enum nvme_print_flags flags; + nvme_print_flags_t flags; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; int err = -1; __u8 lsp_tmp; @@ -1881,7 +1899,7 @@ static int get_phy_rx_eom_log(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -1948,7 +1966,7 @@ static int get_media_unit_stat_log(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_media_unit_stat_log *mus = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -1969,7 +1987,7 @@ static int get_media_unit_stat_log(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -2000,7 +2018,7 @@ static int get_supp_cap_config_log(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_supported_cap_config_list_log *cap_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -2021,7 +2039,7 @@ static int get_supp_cap_config_log(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -2054,7 +2072,7 @@ static int io_mgmt_send(int argc, char **argv, struct command *cmd, struct plugi _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *buf = NULL; int err = -1; - int dfd = STDIN_FILENO; + _cleanup_fd_ int dfd = STDIN_FILENO; struct config { __u16 mos; @@ -2104,7 +2122,7 @@ static int io_mgmt_send(int argc, char **argv, struct command *cmd, struct plugi err = read(dfd, buf, cfg.data_len); if (err < 0) { nvme_show_perror("read"); - goto close_fd; + return err; } struct nvme_io_mgmt_send_args args = { @@ -2115,7 +2133,7 @@ static int io_mgmt_send(int argc, char **argv, struct command *cmd, struct plugi .mo = cfg.mo, .data_len = cfg.data_len, .data = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, }; err = nvme_io_mgmt_send(&args); @@ -2127,9 +2145,6 @@ static int io_mgmt_send(int argc, char **argv, struct command *cmd, struct plugi else nvme_show_perror("io-mgmt-send"); -close_fd: - if (cfg.file) - close(dfd); return err; } @@ -2141,7 +2156,7 @@ static int io_mgmt_recv(int argc, char **argv, struct command *cmd, struct plugi _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *buf = NULL; int err = -1; - _cleanup_file_ int dfd = -1; + _cleanup_fd_ int dfd = -1; struct config { __u16 mos; @@ -2188,7 +2203,7 @@ static int io_mgmt_recv(int argc, char **argv, struct command *cmd, struct plugi .mo = cfg.mo, .data_len = cfg.data_len, .data = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, }; err = nvme_io_mgmt_recv(&args); @@ -2357,7 +2372,7 @@ static int sanitize_log(int argc, char **argv, struct command *command, struct p _cleanup_free_ struct nvme_sanitize_log_page *sanitize_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -2381,7 +2396,7 @@ static int sanitize_log(int argc, char **argv, struct command *command, struct p if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -2390,7 +2405,7 @@ static int sanitize_log(int argc, char **argv, struct command *command, struct p if (cfg.raw_binary) flags = BINARY; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; sanitize_log = nvme_alloc(sizeof(*sanitize_log)); @@ -2415,7 +2430,7 @@ static int get_fid_support_effects_log(int argc, char **argv, struct command *cm _cleanup_free_ struct nvme_fid_supported_effects_log *fid_support_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -2433,13 +2448,13 @@ static int get_fid_support_effects_log(int argc, char **argv, struct command *cm if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; } - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; fid_support_log = nvme_alloc(sizeof(*fid_support_log)); @@ -2464,7 +2479,7 @@ static int get_mi_cmd_support_effects_log(int argc, char **argv, struct command _cleanup_free_ struct nvme_mi_cmd_supported_effects_log *mi_cmd_support_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -2482,13 +2497,13 @@ static int get_mi_cmd_support_effects_log(int argc, char **argv, struct command if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; } - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; mi_cmd_support_log = nvme_alloc(sizeof(*mi_cmd_support_log)); @@ -2514,7 +2529,7 @@ static int list_ctrl(int argc, char **argv, struct command *cmd, struct plugin * _cleanup_free_ struct nvme_ctrl_list *cntlist = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -2535,7 +2550,7 @@ static int list_ctrl(int argc, char **argv, struct command *cmd, struct plugin * if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -2570,7 +2585,7 @@ static int list_ns(int argc, char **argv, struct command *cmd, struct plugin *pl _cleanup_free_ struct nvme_ns_list *ns_list = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -2594,7 +2609,7 @@ static int list_ns(int argc, char **argv, struct command *cmd, struct plugin *pl if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0 || (flags != JSON && flags != NORMAL)) { nvme_show_error("Invalid output format"); return -EINVAL; @@ -2611,7 +2626,7 @@ static int list_ns(int argc, char **argv, struct command *cmd, struct plugin *pl struct nvme_identify_args args = { .args_size = sizeof(args), - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .data = ns_list, .nsid = cfg.namespace_id - 1. }; @@ -2643,7 +2658,7 @@ static int id_ns_lba_format(int argc, char **argv, struct command *cmd, struct p _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -2664,7 +2679,7 @@ static int id_ns_lba_format(int argc, char **argv, struct command *cmd, struct p if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -2698,7 +2713,7 @@ static int id_endurance_grp_list(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_id_endurance_group_list *endgrp_list = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -2716,7 +2731,7 @@ static int id_endurance_grp_list(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0 || (flags != JSON && flags != NORMAL)) { nvme_show_error("invalid output format"); return -EINVAL; @@ -2752,17 +2767,16 @@ static int delete_ns(int argc, char **argv, struct command *cmd, struct plugin * struct config { __u32 namespace_id; - __u32 timeout; }; struct config cfg = { .namespace_id = 0, - .timeout = 120000, }; + nvme_cfg.timeout = 120000; + NVME_ARGS(opts, - OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id), - OPT_UINT("timeout", 't', &cfg.timeout, timeout)); + OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id)); err = parse_and_open(&dev, argc, argv, desc, opts); if (err) @@ -2776,7 +2790,7 @@ static int delete_ns(int argc, char **argv, struct command *cmd, struct plugin * } } - err = nvme_cli_ns_mgmt_delete(dev, cfg.namespace_id); + err = nvme_cli_ns_mgmt_delete(dev, cfg.namespace_id, nvme_cfg.timeout); if (!err) printf("%s: Success, deleted nsid:%d\n", cmd->name, cfg.namespace_id); else if (err > 0) @@ -2790,9 +2804,9 @@ static int delete_ns(int argc, char **argv, struct command *cmd, struct plugin * static int nvme_attach_ns(int argc, char **argv, int attach, const char *desc, struct command *cmd) { _cleanup_free_ struct nvme_ctrl_list *cntlist = NULL; - _cleanup_free_ __u16 *ctrlist = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - int err, num, i, list[2048]; + int err, num; + __u16 list[NVME_ID_CTRL_LIST_MAX]; const char *namespace_id = "namespace to attach"; const char *cont = "optional comma-sep controller id list"; @@ -2820,7 +2834,8 @@ static int nvme_attach_ns(int argc, char **argv, int attach, const char *desc, s return -EINVAL; } - num = argconfig_parse_comma_sep_array(cfg.cntlist, list, 2047); + num = argconfig_parse_comma_sep_array_u16(cfg.cntlist, + list, ARRAY_SIZE(list)); if (!num) fprintf(stderr, "warning: empty controller-id list will result in no actual change in namespace attachment\n"); @@ -2833,14 +2848,7 @@ static int nvme_attach_ns(int argc, char **argv, int attach, const char *desc, s if (!cntlist) return -ENOMEM; - ctrlist = nvme_alloc(sizeof(*ctrlist) * 2048); - if (!ctrlist) - return -ENOMEM; - - for (i = 0; i < num; i++) - ctrlist[i] = (__u16)list[i]; - - nvme_init_ctrl_list(cntlist, num, ctrlist); + nvme_init_ctrl_list(cntlist, num, list); if (attach) err = nvme_cli_ns_attach_ctrls(dev, cfg.namespace_id, @@ -2887,15 +2895,15 @@ static int parse_lba_num_si(struct nvme_dev *dev, const char *opt, _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; __u32 nsid = 1; + __u8 lbaf; unsigned int remainder; char *endptr; int err = -EINVAL; - int i; int lbas; struct nvme_identify_args args = { .args_size = sizeof(args), - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .cns = NVME_IDENTIFY_CNS_NS_ACTIVE_LIST, .nsid = nsid - 1. }; @@ -2956,8 +2964,8 @@ static int parse_lba_num_si(struct nvme_dev *dev, const char *opt, return err; } - i = flbas & NVME_NS_FLBAS_LOWER_MASK; - lbas = (1 << ns->lbaf[i].ds) + ns->lbaf[i].ms; + nvme_id_ns_flbas_to_lbaf_inuse(flbas, &lbaf); + lbas = (1 << ns->lbaf[lbaf].ds) + ns->lbaf[lbaf].ms; if (suffix_si_parse(val, &endptr, (uint64_t *)num)) { nvme_show_error("Expected long suffixed integer argument for '%s-si' but got '%s'!", @@ -3028,7 +3036,6 @@ static int create_ns(int argc, char **argv, struct command *cmd, struct plugin * __u16 nvmsetid; __u16 endgid; __u64 bs; - __u32 timeout; __u8 csi; __u64 lbstm; __u16 nphndls; @@ -3051,7 +3058,6 @@ static int create_ns(int argc, char **argv, struct command *cmd, struct plugin * .nvmsetid = 0, .endgid = 0, .bs = 0x00, - .timeout = 120000, .csi = 0, .lbstm = 0, .nphndls = 0, @@ -3064,6 +3070,8 @@ static int create_ns(int argc, char **argv, struct command *cmd, struct plugin * .phndls = "", }; + nvme_cfg.timeout = 120000; + NVME_ARGS(opts, OPT_SUFFIX("nsze", 's', &cfg.nsze, nsze), OPT_SUFFIX("ncap", 'c', &cfg.ncap, ncap), @@ -3074,7 +3082,6 @@ static int create_ns(int argc, char **argv, struct command *cmd, struct plugin * OPT_UINT("nvmset-id", 'i', &cfg.nvmsetid, nvmsetid), OPT_UINT("endg-id", 'e', &cfg.endgid, endgid), OPT_SUFFIX("block-size", 'b', &cfg.bs, bs), - OPT_UINT("timeout", 't', &cfg.timeout, timeout), OPT_BYTE("csi", 'y', &cfg.csi, csi), OPT_SUFFIX("lbstm", 'l', &cfg.lbstm, lbstm), OPT_SHRT("nphndls", 'n', &cfg.nphndls, nphndls), @@ -3220,7 +3227,7 @@ parse_lba: for (i = 0; i < num_phandle; i++) data->phndl[i] = cpu_to_le16(phndl[i]); - err = nvme_cli_ns_mgmt_create(dev, data, &nsid, cfg.timeout, cfg.csi); + err = nvme_cli_ns_mgmt_create(dev, data, &nsid, nvme_cfg.timeout, cfg.csi); if (!err) printf("%s: Success, created nsid:%d\n", cmd->name, nsid); else if (err > 0) @@ -3269,8 +3276,8 @@ static bool nvme_match_device_filter(nvme_subsystem_t s, static int list_subsys(int argc, char **argv, struct command *cmd, struct plugin *plugin) { - nvme_root_t r = NULL; - enum nvme_print_flags flags; + _cleanup_nvme_root_ nvme_root_t r = NULL; + nvme_print_flags_t flags; const char *desc = "Retrieve information for subsystems"; nvme_scan_filter_t filter = NULL; char *devname; @@ -3279,15 +3286,15 @@ static int list_subsys(int argc, char **argv, struct command *cmd, NVME_ARGS(opts); - err = argconfig_parse(argc, argv, desc, opts); - if (err < 0) - goto ret; + err = parse_args(argc, argv, desc, opts); + if (err) + return err; devname = NULL; if (optind < argc) devname = basename(argv[optind++]); - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0 || (flags != JSON && flags != NORMAL)) { nvme_show_error("Invalid output format"); return -EINVAL; @@ -3303,8 +3310,7 @@ static int list_subsys(int argc, char **argv, struct command *cmd, nvme_show_error("Failed to scan nvme subsystem for %s", devname); else nvme_show_error("Failed to scan nvme subsystem"); - err = -errno; - goto ret; + return -errno; } if (devname) { @@ -3312,41 +3318,36 @@ static int list_subsys(int argc, char **argv, struct command *cmd, if (sscanf(devname, "nvme%dn%d", &subsys_num, &nsid) != 2) { nvme_show_error("Invalid device name %s", devname); - err = -EINVAL; - goto ret; + return -EINVAL; } filter = nvme_match_device_filter; } err = nvme_scan_topology(r, filter, (void *)devname); if (err) { - if (errno != ENOENT) - nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); - goto ret; + nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); + return -errno; } nvme_show_subsystem_list(r, nsid != NVME_NSID_ALL, flags); -ret: - if (r) - nvme_free_tree(r); - return err; + return 0; } static int list(int argc, char **argv, struct command *cmd, struct plugin *plugin) { const char *desc = "Retrieve basic information for all NVMe namespaces"; - enum nvme_print_flags flags; - nvme_root_t r; + nvme_print_flags_t flags; + _cleanup_nvme_root_ nvme_root_t r = NULL; int err = 0; NVME_ARGS(opts); - err = argconfig_parse(argc, argv, desc, opts); - if (err < 0) + err = parse_args(argc, argv, desc, opts); + if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0 || (flags != JSON && flags != NORMAL)) { nvme_show_error("Invalid output format"); return -EINVAL; @@ -3362,14 +3363,11 @@ static int list(int argc, char **argv, struct command *cmd, struct plugin *plugi } err = nvme_scan_topology(r, NULL, NULL); if (err < 0) { - if (errno != ENOENT) - nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); - nvme_free_tree(r); + nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); return err; } nvme_show_list_items(r, flags); - nvme_free_tree(r); return err; } @@ -3386,7 +3384,7 @@ int __id_ctrl(int argc, char **argv, struct command *cmd, struct plugin *plugin, _cleanup_free_ struct nvme_id_ctrl *ctrl = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -3410,7 +3408,7 @@ int __id_ctrl(int argc, char **argv, struct command *cmd, struct plugin *plugin, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3422,7 +3420,7 @@ int __id_ctrl(int argc, char **argv, struct command *cmd, struct plugin *plugin, if (cfg.vendor_specific) flags |= VS; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; ctrl = nvme_alloc(sizeof(*ctrl)); @@ -3454,7 +3452,7 @@ static int nvm_id_ctrl(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_id_ctrl_nvm *ctrl_nvm = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; NVME_ARGS(opts); @@ -3463,7 +3461,7 @@ static int nvm_id_ctrl(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3494,7 +3492,7 @@ static int nvm_id_ns(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_nvm_id_ns *id_ns = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -3515,7 +3513,7 @@ static int nvm_id_ns(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3568,7 +3566,7 @@ static int nvm_id_ns_lba_format(int argc, char **argv, struct command *cmd, stru _cleanup_free_ struct nvme_nvm_id_ns *nvm_ns = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -3589,7 +3587,7 @@ static int nvm_id_ns_lba_format(int argc, char **argv, struct command *cmd, stru if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3633,7 +3631,7 @@ static int ns_descs(int argc, char **argv, struct command *cmd, struct plugin *p _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *nsdescs = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -3654,7 +3652,7 @@ static int ns_descs(int argc, char **argv, struct command *cmd, struct plugin *p if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3700,7 +3698,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -3730,7 +3728,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3742,7 +3740,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug if (cfg.vendor_specific) flags |= VS; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; if (!cfg.namespace_id) { @@ -3781,7 +3779,7 @@ static int cmd_set_independent_id_ns(int argc, char **argv, struct command *cmd, _cleanup_free_ struct nvme_id_independent_id_ns *ns = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err = -1; struct config { @@ -3805,7 +3803,7 @@ static int cmd_set_independent_id_ns(int argc, char **argv, struct command *cmd, if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3814,7 +3812,7 @@ static int cmd_set_independent_id_ns(int argc, char **argv, struct command *cmd, if (cfg.raw_binary) flags = BINARY; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; if (!cfg.namespace_id) { @@ -3849,7 +3847,7 @@ static int id_ns_granularity(int argc, char **argv, struct command *cmd, struct _cleanup_free_ struct nvme_id_ns_granularity_list *granularity_list = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; NVME_ARGS(opts); @@ -3858,7 +3856,7 @@ static int id_ns_granularity(int argc, char **argv, struct command *cmd, struct if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3889,7 +3887,7 @@ static int id_nvmset(int argc, char **argv, struct command *cmd, struct plugin * _cleanup_free_ struct nvme_id_nvmset_list *nvmset = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -3907,7 +3905,7 @@ static int id_nvmset(int argc, char **argv, struct command *cmd, struct plugin * if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3938,7 +3936,7 @@ static int id_uuid(int argc, char **argv, struct command *cmd, struct plugin *pl _cleanup_free_ struct nvme_id_uuid_list *uuid_list = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -3959,7 +3957,7 @@ static int id_uuid(int argc, char **argv, struct command *cmd, struct plugin *pl if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -3968,7 +3966,7 @@ static int id_uuid(int argc, char **argv, struct command *cmd, struct plugin *pl if (cfg.raw_binary) flags = BINARY; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; uuid_list = nvme_alloc(sizeof(*uuid_list)); @@ -4038,7 +4036,7 @@ static int id_domain(int argc, char **argv, struct command *cmd, struct plugin * _cleanup_free_ struct nvme_id_domain_list *id_domain = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -4056,7 +4054,7 @@ static int id_domain(int argc, char **argv, struct command *cmd, struct plugin * if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -4158,7 +4156,7 @@ static int virtual_mgmt(int argc, char **argv, struct command *cmd, struct plugi .rt = cfg.rt, .cntlid = cfg.cntlid, .nr = cfg.nr, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_virtual_mgmt(&args); @@ -4181,7 +4179,7 @@ static int primary_ctrl_caps(int argc, char **argv, struct command *cmd, struct _cleanup_free_ struct nvme_primary_ctrl_cap *caps = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -4202,13 +4200,13 @@ static int primary_ctrl_caps(int argc, char **argv, struct command *cmd, struct if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; } - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; caps = nvme_alloc(sizeof(*caps)); @@ -4236,7 +4234,7 @@ static int list_secondary_ctrl(int argc, char **argv, struct command *cmd, struc _cleanup_free_ struct nvme_secondary_ctrl_list *sc_list = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -4257,7 +4255,7 @@ static int list_secondary_ctrl(int argc, char **argv, struct command *cmd, struc if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -4458,7 +4456,7 @@ static int device_self_test(int argc, char **argv, struct command *cmd, struct p .fd = dev_fd(dev), .nsid = cfg.namespace_id, .stc = cfg.stc, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_dev_self_test(&args); @@ -4494,7 +4492,7 @@ static int self_test_log(int argc, char **argv, struct command *cmd, struct plug _cleanup_free_ struct nvme_self_test_log *log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err; struct config { @@ -4512,7 +4510,7 @@ static int self_test_log(int argc, char **argv, struct command *cmd, struct plug if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -4570,7 +4568,7 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg, .uuidx = cfg->uuid_index, .data_len = cfg->data_len, .data = *buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = result, }; return nvme_cli_get_features(dev, &args); @@ -4617,8 +4615,8 @@ static int get_feature_id_changed(struct nvme_dev *dev, struct feat_cfg cfg, int err_def = 0; __u32 result; __u32 result_def; - void *buf = NULL; - void *buf_def = NULL; + _cleanup_free_ void *buf = NULL; + _cleanup_free_ void *buf_def = NULL; if (changed) cfg.sel = 0; @@ -4637,9 +4635,6 @@ static int get_feature_id_changed(struct nvme_dev *dev, struct feat_cfg cfg, (buf && buf_def && !strcmp(buf, buf_def))) get_feature_id_print(cfg, err, result, buf); - free(buf); - free(buf_def); - return err; } @@ -4778,7 +4773,7 @@ static int fw_download_single(struct nvme_dev *dev, void *fw_buf, .offset = offset, .data_len = len, .data = fw_buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; @@ -4870,7 +4865,7 @@ static int fw_download(int argc, char **argv, struct command *cmd, struct plugin _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_huge_ struct nvme_mem_huge mh = { 0, }; - _cleanup_file_ int fw_fd = -1; + _cleanup_fd_ int fw_fd = -1; unsigned int fw_size, pos; int err; struct stat sb; @@ -5012,11 +5007,11 @@ static void fw_commit_print_mud(struct nvme_dev *dev, __u32 result) if (result & 0x1) printf("Detected an overlapping firmware/boot partition image update command\n" - "sequence due to processing a command from a Management Endpoint"); + "sequence due to processing a command from an Admin SQ on a controller\n"); if (result >> 1 & 0x1) printf("Detected an overlapping firmware/boot partition image update command\n" - "sequence due to processing a command from an Admin SQ on a controller"); + "sequence due to processing a command from a Management Endpoint\n"); } static int fw_commit(int argc, char **argv, struct command *cmd, struct plugin *plugin) @@ -5073,7 +5068,7 @@ static int fw_commit(int argc, char **argv, struct command *cmd, struct plugin * .slot = cfg.slot, .action = cfg.action, .bpid = cfg.bpid, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_cli_fw_commit(dev, &args); @@ -5287,7 +5282,7 @@ static int nvme_get_single_property(int fd, struct get_reg_config *cfg, __u64 *v .fd = fd, .offset = cfg->offset, .value = value, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, }; err = nvme_get_property(&args); @@ -5358,7 +5353,7 @@ static void *mmap_registers(struct nvme_dev *dev, bool writable) sprintf(path, "/sys/class/nvme/%s/device/resource0", dev->name); fd = open(path, writable ? O_RDWR : O_RDONLY); if (fd < 0) { - if (log_level >= LOG_DEBUG) + if (log_level >= LOG_INFO) nvme_show_error("%s did not find a pci resource, open failed %s", dev->name, strerror(errno)); return NULL; @@ -5366,9 +5361,12 @@ static void *mmap_registers(struct nvme_dev *dev, bool writable) membase = mmap(NULL, getpagesize(), prot, MAP_SHARED, fd, 0); if (membase == MAP_FAILED) { - if (log_level >= LOG_DEBUG) { - fprintf(stderr, "%s failed to map. ", dev->name); - fprintf(stderr, "Did your kernel enable CONFIG_IO_STRICT_DEVMEM?\n"); + if (log_level >= LOG_INFO) { + fprintf(stderr, "Failed to map registers to userspace.\n\n" + "Did your kernel enable CONFIG_IO_STRICT_DEVMEM?\n" + "You can disable this feature with command line argument\n\n" + "\tio_memory=relaxed\n\n" + "Also ensure secure boot is disabled.\n\n"); } membase = NULL; } @@ -5385,7 +5383,7 @@ static int show_registers(int argc, char **argv, struct command *cmd, struct plu "show info in readable format in case of output_format == normal"; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; bool fabrics = false; void *bar; int err; @@ -5401,13 +5399,13 @@ static int show_registers(int argc, char **argv, struct command *cmd, struct plu if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; } - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; bar = mmap_registers(dev, false); @@ -5509,7 +5507,7 @@ static int get_register_properties(int fd, void **pbar, struct get_reg_config *c .args_size = sizeof(args), .fd = fd, .value = &value, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, }; size = offset + get_reg_size(offset); @@ -5585,7 +5583,7 @@ bool nvme_is_ctrl_reg(int offset) } static bool get_register_offset(void *bar, bool fabrics, struct get_reg_config *cfg, - enum nvme_print_flags flags) + nvme_print_flags_t flags) { bool offset_matched = cfg->offset >= 0; int offset; @@ -5632,7 +5630,7 @@ static int get_register(int argc, char **argv, struct command *cmd, struct plugi _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; int err; - enum nvme_print_flags flags; + nvme_print_flags_t flags; bool fabrics = false; void *bar; @@ -5677,13 +5675,13 @@ static int get_register(int argc, char **argv, struct command *cmd, struct plugi if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; } - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; bar = mmap_registers(dev, false); @@ -5718,7 +5716,7 @@ static int nvme_set_single_property(int fd, int offset, uint64_t value) .fd = fd, .offset = offset, .value = value, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; int err = nvme_set_property(&args); @@ -6076,7 +6074,7 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin "Can also be used to change LBAF to change the namespaces reported physical block format."; const char *lbaf = "LBA format to apply (required)"; const char *ses = "[0-2]: secure erase"; - const char *pil = "[0-1]: protection info location last/first 8 bytes of metadata"; + const char *pil = "[0-1]: protection info location last/first bytes of metadata"; const char *pi = "[0-3]: protection info off/Type 1/Type 2/Type 3"; const char *ms = "[0-1]: extended format off/on"; const char *reset = "Automatically reset the controller after successful format"; @@ -6092,7 +6090,6 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin struct config { __u32 namespace_id; - __u32 timeout; __u8 lbaf; __u8 ses; __u8 pi; @@ -6105,7 +6102,6 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin struct config cfg = { .namespace_id = 0, - .timeout = 600000, .lbaf = 0xff, .ses = 0, .pi = 0, @@ -6116,9 +6112,10 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin .bs = 0, }; + nvme_cfg.timeout = 600000; + NVME_ARGS(opts, OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id_desired), - OPT_UINT("timeout", 't', &cfg.timeout, timeout), OPT_BYTE("lbaf", 'l', &cfg.lbaf, lbaf), OPT_BYTE("ses", 's', &cfg.ses, ses), OPT_BYTE("pi", 'i', &cfg.pi, pi), @@ -6128,7 +6125,7 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin OPT_FLAG("force", 0, &cfg.force, force), OPT_SUFFIX("block-size", 'b', &cfg.bs, bs)); - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; @@ -6269,13 +6266,13 @@ static int format_cmd(int argc, char **argv, struct command *cmd, struct plugin struct nvme_format_nvm_args args = { .args_size = sizeof(args), .nsid = cfg.namespace_id, - .lbafu = (cfg.lbaf & NVME_NS_FLBAS_HIGHER_MASK) >> 4, - .lbaf = cfg.lbaf & NVME_NS_FLBAS_LOWER_MASK, + .lbafu = (cfg.lbaf >> 4) & 0x3, + .lbaf = cfg.lbaf & 0xf, .mset = cfg.ms, .pi = cfg.pi, .pil = cfg.pil, .ses = cfg.ses, - .timeout = cfg.timeout, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_cli_format_nvm(dev, &args); @@ -6342,7 +6339,7 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *buf = NULL; - _cleanup_file_ int ffd = STDIN_FILENO; + _cleanup_fd_ int ffd = STDIN_FILENO; int err; __u32 result; @@ -6420,7 +6417,8 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin * should use the buffer method if the value exceeds this * length. */ - if (cfg.feature_id == NVME_FEAT_FID_TIMESTAMP && cfg.value) { + if (cfg.feature_id == NVME_FEAT_FID_TIMESTAMP && + argconfig_parse_seen(opts, "value")) { memcpy(buf, &cfg.value, NVME_FEAT_TIMESTAMP_DATA_SIZE); } else { if (strlen(cfg.file)) @@ -6453,7 +6451,7 @@ static int set_feature(int argc, char **argv, struct command *cmd, struct plugin .cdw15 = 0, .data_len = cfg.data_len, .data = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_set_features(&args); @@ -6492,7 +6490,7 @@ static int sec_send(int argc, char **argv, struct command *cmd, struct plugin *p _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *sec_buf = NULL; - _cleanup_file_ int sec_fd = -1; + _cleanup_fd_ int sec_fd = -1; unsigned int sec_size; int err; @@ -6574,7 +6572,7 @@ static int sec_send(int argc, char **argv, struct command *cmd, struct plugin *p .tl = cfg.tl, .data_len = cfg.tl, .data = sec_buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; @@ -6601,7 +6599,7 @@ static int dir_send(int argc, char **argv, struct command *cmd, struct plugin *p _cleanup_free_ void *buf = NULL; __u32 result; __u32 dw12 = 0; - _cleanup_file_ int ffd = STDIN_FILENO; + _cleanup_fd_ int ffd = STDIN_FILENO; int err; struct config { @@ -6709,7 +6707,7 @@ static int dir_send(int argc, char **argv, struct command *cmd, struct plugin *p .cdw12 = dw12, .data_len = cfg.data_len, .data = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_directive_send(&args); @@ -6789,7 +6787,7 @@ static int write_uncor(int argc, char **argv, struct command *cmd, struct plugin .nlb = cfg.block_count, .control = cfg.dtype << 4, .dspec = cfg.dspec, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_write_uncorrectable(&args); @@ -6813,15 +6811,15 @@ static int invalid_tags(__u64 storage_tag, __u64 ref_tag, __u8 sts, __u8 pif) } switch (pif) { - case 0: + case NVME_NVM_PIF_16B_GUARD: if (ref_tag >= (1LL << (32 - sts))) result = 1; break; - case 1: + case NVME_NVM_PIF_32B_GUARD: if (sts > 16 && ref_tag >= (1LL << (80 - sts))) result = 1; break; - case 2: + case NVME_NVM_PIF_64B_GUARD: if (sts > 0 && ref_tag >= (1LL << (48 - sts))) result = 1; break; @@ -6837,12 +6835,25 @@ static int invalid_tags(__u64 storage_tag, __u64 ref_tag, __u8 sts, __u8 pif) return result; } +static void get_pif_sts(struct nvme_id_ns *ns, struct nvme_nvm_id_ns *nvm_ns, __u8 *pif, __u8 *sts) +{ + __u8 lba_index; + __u32 elbaf; + + nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lba_index); + elbaf = le32_to_cpu(nvm_ns->elbaf[lba_index]); + *sts = elbaf & NVME_NVM_ELBAF_STS_MASK; + *pif = (elbaf & NVME_NVM_ELBAF_PIF_MASK) >> 7; + if (*pif == NVME_NVM_PIF_QTYPE && (nvm_ns->pic & 0x8)) + *pif = (elbaf & NVME_NVM_ELBAF_QPIF_MASK) >> 9; +} + static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugin *plugin) { _cleanup_free_ struct nvme_nvm_id_ns *nvm_ns = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - __u8 lba_index, sts = 0, pif = 0; + __u8 sts = 0, pif = 0; __u16 control = 0; int err; @@ -6953,9 +6964,7 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi err = nvme_identify_ns_csi(dev_fd(dev), cfg.namespace_id, 0, NVME_CSI_NVM, nvm_ns); if (!err) { - nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lba_index); - sts = nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_STS_MASK; - pif = (nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_PIF_MASK) >> 7; + get_pif_sts(ns, nvm_ns, &pif, &sts); } if (invalid_tags(cfg.storage_tag, cfg.ref_tag, sts, pif)) @@ -6975,7 +6984,7 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi .pif = pif, .storage_tag = cfg.storage_tag, .dspec = cfg.dspec, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_write_zeros(&args); @@ -7078,7 +7087,7 @@ static int dsm(int argc, char **argv, struct command *cmd, struct plugin *plugin .attrs = cfg.cdw11, .nr_ranges = nr, .dsm = dsm, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_dsm(&args); @@ -7282,7 +7291,7 @@ static int copy_cmd(int argc, char **argv, struct command *cmd, struct plugin *p .ilbrt_u64 = cfg.ilbrt, .lbatm = cfg.lbatm, .lbat = cfg.lbat, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_copy(&args); @@ -7405,7 +7414,7 @@ static int resv_acquire(int argc, char **argv, struct command *cmd, struct plugi .iekey = !!cfg.iekey, .crkey = cfg.crkey, .nrkey = cfg.prkey, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_resv_acquire(&args); @@ -7486,7 +7495,7 @@ static int resv_register(int argc, char **argv, struct command *cmd, struct plug .iekey = !!cfg.iekey, .crkey = cfg.crkey, .nrkey = cfg.nrkey, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_resv_register(&args); @@ -7562,7 +7571,7 @@ static int resv_release(int argc, char **argv, struct command *cmd, struct plugi .rrela = cfg.rrela, .iekey = !!cfg.iekey, .crkey = cfg.crkey, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_resv_release(&args); @@ -7587,7 +7596,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin _cleanup_free_ struct nvme_resv_status *status = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int err, size; struct config { @@ -7614,7 +7623,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -7649,7 +7658,7 @@ static int resv_report(int argc, char **argv, struct command *cmd, struct plugin .eds = cfg.eds, .len = size, .report = status, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_resv_report(&args); @@ -7677,8 +7686,8 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char void *buffer; _cleanup_free_ void *mbuffer = NULL; int err = 0; - _cleanup_file_ int dfd = -1, mfd = -1; - int flags; + _cleanup_fd_ int dfd = -1, mfd = -1; + int flags, pi_size; int mode = 0644; __u16 control = 0, nblocks = 0; __u32 dsmgmt = 0; @@ -7783,7 +7792,7 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char if (err) return err; } else { - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; err = open_exclusive(&dev, argc, argv, cfg.force); @@ -7874,13 +7883,23 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lba_index); logical_block_size = 1 << ns->lbaf[lba_index].ds; ms = ns->lbaf[lba_index].ms; + + nvm_ns = nvme_alloc(sizeof(*nvm_ns)); + if (!nvm_ns) + return -ENOMEM; + + err = nvme_identify_ns_csi(dev_fd(dev), cfg.namespace_id, 0, NVME_CSI_NVM, nvm_ns); + if (!err) + get_pif_sts(ns, nvm_ns, &pif, &sts); + + pi_size = (pif == NVME_NVM_PIF_16B_GUARD) ? 8 : 16; if (NVME_FLBAS_META_EXT(ns->flbas)) { /* - * No meta data is transferred for PRACT=1 and MD=8: + * No meta data is transferred for PRACT=1 and MD=PI size: * 5.2.2.1 Protection Information and Write Commands * 5.2.2.2 Protection Information and Read Commands */ - if (!((cfg.prinfo & 0x8) != 0 && ms == 8)) + if (!((cfg.prinfo & 0x8) != 0 && ms == pi_size)) logical_block_size += ms; } @@ -7905,17 +7924,7 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char if (!buffer) return -ENOMEM; - nvm_ns = nvme_alloc(sizeof(*nvm_ns)); - if (!nvm_ns) - return -ENOMEM; - if (cfg.metadata_size) { - err = nvme_identify_ns_csi(dev_fd(dev), 1, 0, NVME_CSI_NVM, nvm_ns); - if (!err) { - sts = nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_STS_MASK; - pif = (nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_PIF_MASK) >> 7; - } - mbuffer_size = ((unsigned long long)cfg.block_count + 1) * ms; if (ms && cfg.metadata_size < mbuffer_size) nvme_show_error("Rounding metadata size to fit block count (%lld bytes)", @@ -7990,7 +7999,7 @@ static int submit_io(int opcode, char *command, const char *desc, int argc, char .data = buffer, .metadata_len = mbuffer_size, .metadata = mbuffer, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; gettimeofday(&start_time, NULL); @@ -8048,11 +8057,11 @@ static int write_cmd(int argc, char **argv, struct command *cmd, struct plugin * static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin *plugin) { - __u16 control = 0; - __u8 lba_index, sts = 0, pif = 0; _cleanup_free_ struct nvme_nvm_id_ns *nvm_ns = NULL; _cleanup_free_ struct nvme_id_ns *ns = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; + __u8 sts = 0, pif = 0; + __u16 control = 0; int err; const char *desc = "Verify specified logical blocks on the given device."; @@ -8145,9 +8154,7 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin err = nvme_identify_ns_csi(dev_fd(dev), cfg.namespace_id, 0, NVME_CSI_NVM, nvm_ns); if (!err) { - nvme_id_ns_flbas_to_lbaf_inuse(ns->flbas, &lba_index); - sts = nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_STS_MASK; - pif = (nvm_ns->elbaf[lba_index] & NVME_NVM_ELBAF_PIF_MASK) >> 7; + get_pif_sts(ns, nvm_ns, &pif, &sts); } if (invalid_tags(cfg.storage_tag, cfg.ref_tag, sts, pif)) @@ -8166,7 +8173,7 @@ static int verify_cmd(int argc, char **argv, struct command *cmd, struct plugin .sts = sts, .pif = pif, .storage_tag = cfg.storage_tag, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_verify(&args); @@ -8244,7 +8251,7 @@ static int sec_recv(int argc, char **argv, struct command *cmd, struct plugin *p .al = cfg.al, .data_len = cfg.size, .data = sec_buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; @@ -8279,7 +8286,7 @@ static int get_lba_status(int argc, char **argv, struct command *cmd, _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *buf = NULL; - enum nvme_print_flags flags; + nvme_print_flags_t flags; unsigned long buf_len; int err; @@ -8289,7 +8296,6 @@ static int get_lba_status(int argc, char **argv, struct command *cmd, __u32 mndw; __u8 atype; __u16 rl; - __u32 timeout; }; struct config cfg = { @@ -8298,7 +8304,6 @@ static int get_lba_status(int argc, char **argv, struct command *cmd, .mndw = 0, .atype = 0, .rl = 0, - .timeout = 0, }; NVME_ARGS(opts, @@ -8306,14 +8311,13 @@ static int get_lba_status(int argc, char **argv, struct command *cmd, OPT_SUFFIX("start-lba", 's', &cfg.slba, slba), OPT_UINT("max-dw", 'm', &cfg.mndw, mndw), OPT_BYTE("action", 'a', &cfg.atype, atype), - OPT_SHRT("range-len", 'l', &cfg.rl, rl), - OPT_UINT("timeout", 't', &cfg.timeout, timeout)); + OPT_SHRT("range-len", 'l', &cfg.rl, rl)); err = parse_and_open(&dev, argc, argv, desc, opts); if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -8338,7 +8342,7 @@ static int get_lba_status(int argc, char **argv, struct command *cmd, .rl = cfg.rl, .atype = cfg.atype, .lbas = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_get_lba_status(&args); @@ -8405,7 +8409,7 @@ static int capacity_mgmt(int argc, char **argv, struct command *cmd, struct plug .element_id = cfg.element_id, .cdw11 = cfg.dw11, .cdw12 = cfg.dw12, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_capacity_mgmt(&args); @@ -8429,7 +8433,7 @@ static int dir_receive(int argc, char **argv, struct command *cmd, struct plugin const char *desc = "Read directive parameters of the specified directive type."; const char *nsr = "namespace stream requested"; - enum nvme_print_flags flags = NORMAL; + nvme_print_flags_t flags = NORMAL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; _cleanup_free_ void *buf = NULL; __u32 result; @@ -8472,7 +8476,7 @@ static int dir_receive(int argc, char **argv, struct command *cmd, struct plugin if (err) return err; - if (cfg.human_readable) + if (cfg.human_readable || argconfig_parse_seen(opts, "verbose")) flags |= VERBOSE; if (cfg.raw_binary) flags = BINARY; @@ -8528,7 +8532,7 @@ static int dir_receive(int argc, char **argv, struct command *cmd, struct plugin .cdw12 = dw12, .data_len = cfg.data_len, .data = buf, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = &result, }; err = nvme_directive_recv(&args); @@ -8627,7 +8631,7 @@ static int lockdown_cmd(int argc, char **argv, struct command *cmd, struct plugi .ifc = cfg.ifc, .ofi = cfg.ofi, .uuidx = cfg.uuid, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .timeout = nvme_cfg.timeout, .result = NULL, }; err = nvme_lockdown(&args); @@ -8691,7 +8695,7 @@ static int passthru(int argc, char **argv, bool admin, _cleanup_huge_ struct nvme_mem_huge mh = { 0, }; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - _cleanup_file_ int dfd = -1, mfd = -1; + _cleanup_fd_ int dfd = -1, mfd = -1; int flags; int mode = 0644; void *data = NULL; @@ -8709,7 +8713,6 @@ static int passthru(int argc, char **argv, bool admin, .namespace_id = 0, .data_len = 0, .metadata_len = 0, - .timeout = 0, .cdw2 = 0, .cdw3 = 0, .cdw10 = 0, @@ -8736,7 +8739,6 @@ static int passthru(int argc, char **argv, bool admin, OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_desired), OPT_UINT("data-len", 'l', &cfg.data_len, data_len), OPT_UINT("metadata-len", 'm', &cfg.metadata_len, metadata_len), - OPT_UINT("timeout", 't', &cfg.timeout, timeout), OPT_UINT("cdw2", '2', &cfg.cdw2, cdw2), OPT_UINT("cdw3", '3', &cfg.cdw3, cdw3), OPT_UINT("cdw10", '4', &cfg.cdw10, cdw10), @@ -8837,7 +8839,7 @@ static int passthru(int argc, char **argv, bool admin, printf("cdw13 : %08x\n", cfg.cdw13); printf("cdw14 : %08x\n", cfg.cdw14); printf("cdw15 : %08x\n", cfg.cdw15); - printf("timeout_ms : %08x\n", cfg.timeout); + printf("timeout_ms : %08x\n", nvme_cfg.timeout); } if (cfg.dry_run) return 0; @@ -8853,7 +8855,7 @@ static int passthru(int argc, char **argv, bool admin, cfg.cdw14, cfg.cdw15, cfg.data_len, data, cfg.metadata_len, - mdata, cfg.timeout, &result); + mdata, nvme_cfg.timeout, &result); else err = nvme_io_passthru(dev_fd(dev), cfg.opcode, cfg.flags, cfg.rsvd, @@ -8863,7 +8865,7 @@ static int passthru(int argc, char **argv, bool admin, cfg.cdw14, cfg.cdw15, cfg.data_len, data, cfg.metadata_len, - mdata, cfg.timeout, &result); + mdata, nvme_cfg.timeout, &result); gettimeofday(&end_time, NULL); cmd_name = nvme_cmd_to_string(admin, cfg.opcode); @@ -8975,7 +8977,7 @@ static int gen_dhchap_key(int argc, char **argv, struct command *command, struct OPT_STR("nqn", 'n', &cfg.nqn, nqn), OPT_UINT("hmac", 'm', &cfg.hmac, hmac)); - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; @@ -9075,8 +9077,8 @@ static int check_dhchap_key(int argc, char **argv, struct command *command, stru unsigned char decoded_key[128]; unsigned int decoded_len; - u_int32_t crc = crc32(0L, NULL, 0); - u_int32_t key_crc; + uint32_t crc = crc32(0L, NULL, 0); + uint32_t key_crc; int err = 0, hmac; struct config { char *key; @@ -9089,7 +9091,7 @@ static int check_dhchap_key(int argc, char **argv, struct command *command, stru NVME_ARGS(opts, OPT_STR("key", 'k', &cfg.key, key)); - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; @@ -9144,10 +9146,10 @@ static int check_dhchap_key(int argc, char **argv, struct command *command, stru return -EINVAL; } crc = crc32(crc, decoded_key, decoded_len); - key_crc = ((u_int32_t)decoded_key[decoded_len]) | - ((u_int32_t)decoded_key[decoded_len + 1] << 8) | - ((u_int32_t)decoded_key[decoded_len + 2] << 16) | - ((u_int32_t)decoded_key[decoded_len + 3] << 24); + key_crc = ((uint32_t)decoded_key[decoded_len]) | + ((uint32_t)decoded_key[decoded_len + 1] << 8) | + ((uint32_t)decoded_key[decoded_len + 2] << 16) | + ((uint32_t)decoded_key[decoded_len + 3] << 24); if (key_crc != crc) { nvme_show_error("CRC mismatch (key %08x, crc %08x)", key_crc, crc); return -EINVAL; @@ -9208,7 +9210,7 @@ static int gen_tls_key(int argc, char **argv, struct command *command, struct pl OPT_UINT("identity", 'I', &cfg.identity, identity), OPT_FLAG("insert", 'i', &cfg.insert, insert)); - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; if (cfg.hmac < 1 || cfg.hmac > 2) { @@ -9326,7 +9328,7 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct OPT_UINT("identity", 'I', &cfg.identity, identity), OPT_FLAG("insert", 'i', &cfg.insert, insert)); - err = argconfig_parse(argc, argv, desc, opts); + err = parse_args(argc, argv, desc, opts); if (err) return err; @@ -9402,6 +9404,47 @@ static void __scan_tls_key(long keyring_id, long key_id, fprintf(fd, "%s %s\n", desc, encoded_key); } +static int import_key(const char *keyring, FILE *fd) +{ + long keyring_id; + char tls_str[512]; + char *tls_key; + unsigned char *psk; + unsigned int hmac; + int linenum = -1, key_len; + + keyring_id = nvme_lookup_keyring(keyring); + if (!keyring_id) { + nvme_show_error("Invalid keyring '%s'", keyring); + return -ENOKEY; + } + + while (fgets(tls_str, 512, fd)) { + linenum++; + tls_key = strrchr(tls_str, ' '); + if (!tls_key) { + nvme_show_error("Parse error in line %d", + linenum); + continue; + } + *tls_key = '\0'; + tls_key++; + tls_key[strcspn(tls_key, "\n")] = 0; + psk = nvme_import_tls_key(tls_key, &key_len, &hmac); + if (!psk) { + nvme_show_error("Failed to import key in line %d", + linenum); + continue; + } + nvme_update_key(keyring_id, "psk", tls_str, + psk, key_len); + free(psk); + } + + return 0; +} + + static int tls_key(int argc, char **argv, struct command *command, struct plugin *plugin) { const char *desc = "Manipulation of TLS keys.\n"; @@ -9410,9 +9453,10 @@ static int tls_key(int argc, char **argv, struct command *command, struct plugin const char *keyfile = "File for list of keys."; const char *import = "Import all keys into the keyring."; const char *export = "Export all keys from the keyring."; + const char *revoke = "Revoke key from the keyring."; - FILE *fd; - int err = 0; + _cleanup_file_ FILE *fd = NULL; + int cnt, err = 0; struct config { char *keyring; @@ -9420,6 +9464,7 @@ static int tls_key(int argc, char **argv, struct command *command, struct plugin char *keyfile; bool import; bool export; + char *revoke; }; struct config cfg = { @@ -9428,6 +9473,7 @@ static int tls_key(int argc, char **argv, struct command *command, struct plugin .keyfile = NULL, .import = false, .export = false, + .revoke = NULL, }; NVME_ARGS(opts, @@ -9435,71 +9481,56 @@ static int tls_key(int argc, char **argv, struct command *command, struct plugin OPT_STR("keytype", 't', &cfg.keytype, keytype), OPT_STR("keyfile", 'f', &cfg.keyfile, keyfile), OPT_FLAG("import", 'i', &cfg.import, import), - OPT_FLAG("export", 'e', &cfg.export, export)); + OPT_FLAG("export", 'e', &cfg.export, export), + OPT_STR("revoke", 'r', &cfg.revoke, revoke)); err = argconfig_parse(argc, argv, desc, opts); if (err) return err; if (cfg.keyfile) { - fd = fopen(cfg.keyfile, "r"); + const char *mode; + + if (cfg.import) + mode = "r"; + else + mode = "w"; + + fd = fopen(cfg.keyfile, mode); if (!fd) { nvme_show_error("Cannot open keyfile %s, error %d\n", cfg.keyfile, errno); return -errno; } - } else - fd = stdin; + } else { + if (cfg.import) + fd = freopen(NULL, "r", stdin); + else + fd = freopen(NULL, "w", stdout); + } - if (cfg.export && cfg.import) { - nvme_show_error("Cannot specify both --import and --export"); - err = -EINVAL; + cnt = 0; + if (cfg.export) cnt++; + if (cfg.import) cnt++; + if (cfg.revoke) cnt++; + + if (cnt != 1) { + nvme_show_error("Must specify either --import, --export or --revoke"); + return -EINVAL; } else if (cfg.export) { - nvme_scan_tls_keys(cfg.keyring, __scan_tls_key, fd); + err = nvme_scan_tls_keys(cfg.keyring, __scan_tls_key, fd); + if (err) + nvme_show_error("Export of TLS keys failed with '%s'", + nvme_strerror(errno)); } else if (cfg.import) { - long keyring_id; - char tls_str[512]; - char *tls_key; - unsigned char *psk; - unsigned int hmac; - int linenum = -1, key_len; - - keyring_id = nvme_lookup_keyring(cfg.keyring); - if (!keyring_id) { - nvme_show_error("Invalid keyring '%s'", cfg.keyring); - err = -ENOKEY; - goto out; - } - - while (fgets(tls_str, 512, fd)) { - linenum++; - tls_key = strrchr(tls_str, ' '); - if (!tls_key) { - nvme_show_error("Parse error in line %d", - linenum); - continue; - } - *tls_key = '\0'; - tls_key++; - psk = nvme_import_tls_key(tls_key, &key_len, &hmac); - if (!psk) { - nvme_show_error("Failed to import key in line %d", - linenum); - continue; - } - nvme_update_key(keyring_id, "psk", tls_str, - psk, key_len); - free(psk); - } + err = import_key(cfg.keyring, fd); } else { - nvme_show_error("Must specify either --import or --export"); - err = -EINVAL; + err = nvme_revoke_tls_key(cfg.keyring, cfg.keytype, cfg.revoke); + if (err) + nvme_show_error("Failed to revoke key '%s'", + nvme_strerror(errno)); } -out: - if (cfg.keyfile) - fclose(fd); - return err; } @@ -9507,8 +9538,8 @@ static int show_topology_cmd(int argc, char **argv, struct command *command, str { const char *desc = "Show the topology\n"; const char *ranking = "Ranking order: namespace|ctrl"; - enum nvme_print_flags flags; - nvme_root_t r; + nvme_print_flags_t flags; + _cleanup_nvme_root_ nvme_root_t r = NULL; enum nvme_cli_topo_ranking rank; int err; @@ -9527,7 +9558,7 @@ static int show_topology_cmd(int argc, char **argv, struct command *command, str if (err) return err; - err = validate_output_format(output_format_val, &flags); + err = validate_output_format(nvme_cfg.output_format, &flags); if (err < 0) { nvme_show_error("Invalid output format"); return err; @@ -9553,14 +9584,11 @@ static int show_topology_cmd(int argc, char **argv, struct command *command, str err = nvme_scan_topology(r, NULL, NULL); if (err < 0) { - if (errno != ENOENT) - nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); - nvme_free_tree(r); + nvme_show_error("Failed to scan topology: %s", nvme_strerror(errno)); return err; } nvme_show_topology(r, rank, flags); - nvme_free_tree(r); return err; } @@ -9629,7 +9657,7 @@ static int nvme_mi(int argc, char **argv, __u8 admin_opcode, const char *desc) void *data = NULL; int err = 0; bool send; - _cleanup_file_ int fd = -1; + _cleanup_fd_ int fd = -1; int flags; _cleanup_huge_ struct nvme_mem_huge mh = { 0, }; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; @@ -33,13 +33,15 @@ #include "util/cleanup.h" enum nvme_print_flags { - NORMAL = 0, - VERBOSE = 1 << 0, /* verbosely decode complex values for humans */ - JSON = 1 << 1, /* display in json format */ - VS = 1 << 2, /* hex dump vendor specific data areas */ - BINARY = 1 << 3, /* binary dump raw bytes */ + NORMAL = 0, + VERBOSE = 1 << 0, /* verbosely decode complex values for humans */ + JSON = 1 << 1, /* display in json format */ + VS = 1 << 2, /* hex dump vendor specific data areas */ + BINARY = 1 << 3, /* binary dump raw bytes */ }; +typedef uint32_t nvme_print_flags_t; + enum nvme_cli_topo_ranking { NVME_CLI_TOPO_NAMESPACE, NVME_CLI_TOPO_CTRL, @@ -71,6 +73,25 @@ struct nvme_dev { #define dev_fd(d) __dev_fd(d, __func__, __LINE__) +struct nvme_config { + char *output_format; + int verbose; + __u32 timeout; +}; + +/* + * the ordering of the arguments matters, as the argument parser uses the first match, thus any + * command which defines -t shorthand will match first. + */ +#define NVME_ARGS(n, ...) \ + struct argconfig_commandline_options n[] = { \ + OPT_INCR("verbose", 'v', &nvme_cfg.verbose, verbose), \ + OPT_FMT("output-format", 'o', &nvme_cfg.output_format, output_format), \ + ##__VA_ARGS__, \ + OPT_UINT("timeout", 't', &nvme_cfg.timeout, timeout), \ + OPT_END() \ + } + static inline int __dev_fd(struct nvme_dev *dev, const char *func, int line) { if (dev->type != NVME_DEV_DIRECT) { @@ -107,8 +128,11 @@ static inline DEFINE_CLEANUP_FUNC( #define _cleanup_nvme_dev_ __cleanup__(cleanup_nvme_dev) extern const char *output_format; +extern const char *timeout; +extern const char *verbose; +extern struct nvme_config nvme_cfg; -int validate_output_format(const char *format, enum nvme_print_flags *flags); +int validate_output_format(const char *format, nvme_print_flags_t *flags); bool nvme_is_output_format_json(void); int __id_ctrl(int argc, char **argv, struct command *cmd, struct plugin *plugin, void (*vs)(uint8_t *vs, struct json_object *root)); diff --git a/plugins/fdp/fdp.c b/plugins/fdp/fdp.c index 2a221f8..1efdd76 100644 --- a/plugins/fdp/fdp.c +++ b/plugins/fdp/fdp.c @@ -25,7 +25,7 @@ static int fdp_configs(int argc, char **argv, struct command *cmd, const char *human_readable = "show log in readable format"; const char *raw = "use binary output"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; struct nvme_fdp_config_log hdr; void *log = NULL; @@ -107,7 +107,7 @@ static int fdp_usage(int argc, char **argv, struct command *cmd, struct plugin * const char *egid = "Endurance group identifier"; const char *raw = "use binary output"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; struct nvme_fdp_ruhu_log hdr; size_t len; @@ -180,7 +180,7 @@ static int fdp_stats(int argc, char **argv, struct command *cmd, struct plugin * const char *egid = "Endurance group identifier"; const char *raw = "use binary output"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; struct nvme_fdp_stats_log stats; int err; @@ -238,7 +238,7 @@ static int fdp_events(int argc, char **argv, struct command *cmd, struct plugin const char *host_events = "Get host events"; const char *raw = "use binary output"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; struct nvme_fdp_events_log events; int err; @@ -299,7 +299,7 @@ static int fdp_status(int argc, char **argv, struct command *cmd, struct plugin const char *namespace_id = "Namespace identifier"; const char *raw = "use binary output"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; struct nvme_fdp_ruh_status hdr; size_t len; diff --git a/plugins/huawei/huawei-nvme.c b/plugins/huawei/huawei-nvme.c index 0272dea..c09d8d3 100644 --- a/plugins/huawei/huawei-nvme.c +++ b/plugins/huawei/huawei-nvme.c @@ -296,7 +296,7 @@ static int huawei_list(int argc, char **argv, struct command *command, struct huawei_list_item *list_items; unsigned int i, n, ret; unsigned int huawei_num = 0; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; const char *desc = "Retrieve basic information for the given huawei device"; struct config { char *output_format; diff --git a/plugins/innogrit/typedef.h b/plugins/innogrit/typedef.h index f2a59b4..7220d38 100644 --- a/plugins/innogrit/typedef.h +++ b/plugins/innogrit/typedef.h @@ -53,14 +53,14 @@ struct vsc_smart_log { unsigned int low_pwr_cnt; unsigned int wa; unsigned int ps3_entry_cnt; - u_char highest_temp[4]; + unsigned char highest_temp[4]; unsigned int weight_ec; unsigned int slc_cap_mb; unsigned long long nand_page_write_cnt; unsigned int program_error_cnt; unsigned int erase_error_cnt; - u_char flash_type; - u_char reserved2[3]; + unsigned char flash_type; + unsigned char reserved2[3]; unsigned int hs_crc_err_cnt; unsigned int ddr_ecc_err_cnt; unsigned int reserved3[44]; diff --git a/plugins/micron/micron-nvme.c b/plugins/micron/micron-nvme.c index ddecc97..2782595 100644 --- a/plugins/micron/micron-nvme.c +++ b/plugins/micron/micron-nvme.c @@ -1,4 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) Micron, Inc 2024. + * + * @file: micron-nvme.c + * @brief: This module contains all the constructs needed for micron nvme-cli plugin. + * @authors:Chaithanya Shoba <ashoba@micron.com>, + */ + #include <stdio.h> #include <string.h> #include <ctype.h> @@ -9,6 +17,8 @@ #include <time.h> #include <string.h> #include <libgen.h> +#include <stddef.h> +#include <sys/types.h> #include <sys/stat.h> #include "common.h" #include "nvme.h" @@ -17,6 +27,7 @@ #include "linux/types.h" #include "nvme-print.h" #include "util/cleanup.h" +#include "util/utils.h" #define CREATE_CMD #include "micron-nvme.h" @@ -1191,14 +1202,8 @@ static void init_d0_log_page(__u8 *buf, __u8 nsze) sprintf(d0_log_page[6].datastr, "0x%x", logD0[1]); } -/* OCP and Vendor specific log data format */ -struct micron_vs_logpage { - char *field; - int size; /* FB client spec version 1.0 sizes - M5410 models */ - int size2; /* FB client spec version 0.7 sizes - M5407 models */ -} /* Smart Health Log information as per OCP spec M51CX models */ -ocp_c0_log_page[] = { +struct request_data ocp_c0_log_page[] = { { "Physical Media Units Written", 16}, { "Physical Media Units Read", 16 }, { "Raw Bad User NAND Block Count", 6}, @@ -1317,82 +1322,6 @@ fb_log_page[] = { { "Log Page GUID", 0, 16}, }; -/* - * Common function to print Micron VS log pages - * - buf: raw log data - * - log_page: format of the data - * - field_count: log field count - * - stats: json object to add fields - * - spec: ocp spec index - */ -static void print_micron_vs_logs(__u8 *buf, struct micron_vs_logpage *log_page, int field_count, - struct json_object *stats, __u8 spec) -{ - __u64 lval_lo, lval_hi; - __u32 ival; - __u16 sval; - __u8 cval, lval[8] = { 0 }; - int field; - int offset = 0; - - for (field = 0; field < field_count; field++) { - char datastr[1024] = { 0 }; - char *sfield = NULL; - int size = !spec ? log_page[field].size : log_page[field].size2; - - if (!size) - continue; - sfield = log_page[field].field; - if (size == 16) { - if (strstr(sfield, "GUID")) { - sprintf(datastr, "0x%"PRIx64"%"PRIx64"", - (uint64_t)le64_to_cpu(*(uint64_t *)(&buf[offset + 8])), - (uint64_t)le64_to_cpu(*(uint64_t *)(&buf[offset]))); - } else { - lval_lo = *((__u64 *)(&buf[offset])); - lval_hi = *((__u64 *)(&buf[offset + 8])); - if (lval_hi) - sprintf(datastr, "0x%"PRIx64"%016"PRIx64"", - le64_to_cpu(lval_hi), le64_to_cpu(lval_lo)); - else - sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); - } - } else if (size == 8) { - lval_lo = *((__u64 *)(&buf[offset])); - sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); - } else if (size == 7) { - /* 7 bytes will be in little-endian format, with last byte as MSB */ - memcpy(&lval[0], &buf[offset], 7); - memcpy((void *)&lval_lo, lval, 8); - sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); - } else if (size == 6) { - ival = *((__u32 *)(&buf[offset])); - sval = *((__u16 *)(&buf[offset + 4])); - lval_lo = (((__u64)sval << 32) | ival); - sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); - } else if (size == 4) { - ival = *((__u32 *)(&buf[offset])); - sprintf(datastr, "0x%x", le32_to_cpu(ival)); - } else if (size == 2) { - sval = *((__u16 *)(&buf[offset])); - sprintf(datastr, "0x%04x", le16_to_cpu(sval)); - } else if (size == 1) { - cval = buf[offset]; - sprintf(datastr, "0x%02x", cval); - } else { - sprintf(datastr, "0"); - } - offset += size; - /* do not print reserved values */ - if (strstr(sfield, "Reserved")) - continue; - if (stats) - json_object_add_value_string(stats, sfield, datastr); - else - printf("%-40s : %-4s\n", sfield, datastr); - } -} - static void print_smart_cloud_health_log(__u8 *buf, bool is_json) { struct json_object *root; @@ -1408,7 +1337,7 @@ static void print_smart_cloud_health_log(__u8 *buf, bool is_json) logPages); } - print_micron_vs_logs(buf, ocp_c0_log_page, field_count, stats, 0); + generic_structure_parser(buf, ocp_c0_log_page, field_count, stats, 0, NULL); if (is_json) { json_array_add_value_object(logPages, stats); @@ -1433,7 +1362,7 @@ static void print_nand_stats_fb(__u8 *buf, __u8 *buf2, __u8 nsze, bool is_json, logPages); } - print_micron_vs_logs(buf, fb_log_page, field_count, stats, spec); + generic_structure_parser(buf, fb_log_page, field_count, stats, spec, NULL); /* print last three entries from D0 log page */ if (buf2) { @@ -1587,7 +1516,7 @@ static void print_ext_smart_logs_e1(__u8 *buf, bool is_json) printf("SMART Extended Log:0xE1\n"); } - print_micron_vs_logs(buf, e1_log_page, field_count, stats, 0); + generic_structure_parser(buf, e1_log_page, field_count, stats, 0, NULL); if (is_json) { json_array_add_value_object(logPages, stats); @@ -1756,6 +1685,7 @@ static void GetGenericLogs(int fd, const char *dir) struct nvme_firmware_slot fw_log; struct nvme_cmd_effects_log effects; struct nvme_persistent_event_log pevent_log; + _cleanup_huge_ struct nvme_mem_huge mh = { 0, }; void *pevent_log_info = NULL; __u32 log_len = 0; diff --git a/plugins/micron/micron-nvme.h b/plugins/micron/micron-nvme.h index 4f7b892..c9e3ca7 100644 --- a/plugins/micron/micron-nvme.h +++ b/plugins/micron/micron-nvme.h @@ -1,4 +1,11 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) Micron, Inc 2024. + * + * @file: micron-nvme.h + * @brief: This module contains all the constructs needed for micron nvme-cli plugin. + * @authors:Chaithanya Shoba <ashoba@micron.com>, + */ #undef CMD_INC_FILE #define CMD_INC_FILE plugins/micron/micron-nvme diff --git a/plugins/nbft/nbft-plugin.c b/plugins/nbft/nbft-plugin.c index 1bb60be..f25941a 100644 --- a/plugins/nbft/nbft-plugin.c +++ b/plugins/nbft/nbft-plugin.c @@ -531,11 +531,10 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) struct list_head nbft_list; char *format = "normal"; char *nbft_path = NBFT_SYSFS_PATH; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int ret; bool show_subsys = false, show_hfi = false, show_discovery = false; unsigned int verbose = 0; - nvme_root_t r; OPT_ARGS(opts) = { OPT_FMT("output-format", 'o', &format, "Output format: normal|json"), @@ -552,14 +551,12 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) return ret; log_level = map_log_level(verbose, false /* quiet */); + nvme_init_default_logging(stderr, log_level, false, false); ret = validate_output_format(format, &flags); if (ret < 0) return ret; - /* initialize libnvme logging */ - r = nvme_create_root(stderr, log_level); - if (!(show_subsys || show_hfi || show_discovery)) show_subsys = show_hfi = show_discovery = true; @@ -572,6 +569,5 @@ int show_nbft(int argc, char **argv, struct command *cmd, struct plugin *plugin) ret = json_show_nbfts(&nbft_list, show_subsys, show_hfi, show_discovery); free_nbfts(&nbft_list); } - nvme_free_tree(r); return ret; } diff --git a/plugins/ocp/meson.build b/plugins/ocp/meson.build index 64447ff..7835444 100644 --- a/plugins/ocp/meson.build +++ b/plugins/ocp/meson.build @@ -4,5 +4,6 @@ sources += [ 'plugins/ocp/ocp-clear-features.c', 'plugins/ocp/ocp-smart-extended-log.c', 'plugins/ocp/ocp-fw-activation-history.c', + 'plugins/ocp/ocp-telemetry-decode.c', ] diff --git a/plugins/ocp/ocp-fw-activation-history.c b/plugins/ocp/ocp-fw-activation-history.c index 16598a0..543042f 100644 --- a/plugins/ocp/ocp-fw-activation-history.c +++ b/plugins/ocp/ocp-fw-activation-history.c @@ -207,7 +207,7 @@ int ocp_fw_activation_history_log(int argc, char **argv, struct command *cmd, } if (!err) { - enum nvme_print_flags print_flag; + nvme_print_flags_t print_flag; err = validate_output_format(format, &print_flag); if (err < 0) { diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c index 6eaa773..91f4083 100644 --- a/plugins/ocp/ocp-nvme.c +++ b/plugins/ocp/ocp-nvme.c @@ -23,10 +23,12 @@ #include "linux/types.h" #include "util/types.h" #include "nvme-print.h" +#include "nvme-wrap.h" #include "ocp-smart-extended-log.h" #include "ocp-clear-features.h" #include "ocp-fw-activation-history.h" +#include "ocp-telemetry-decode.h" #define CREATE_CMD #include "ocp-nvme.h" @@ -112,6 +114,93 @@ struct __packed feature_latency_monitor { __u8 reserved[4083]; }; +struct erri_entry { + union { + __u8 flags; + struct { + __u8 enable:1; + __u8 single:1; + __u8 rsvd2:6; + }; + }; + __u8 rsvd1; + __le16 type; + union { + __u8 specific[28]; + struct { + __le16 nrtdp; + __u8 rsvd4[26]; + }; + }; +}; + +#define ERRI_ENTRIES_MAX 127 + +enum erri_type { + ERRI_TYPE_CPU_CTRL_HANG = 1, + ERRI_TYPE_NAND_HANG, + ERRI_TYPE_PLP_DEFECT, + ERRI_TYPE_LOGICAL_FIRMWARE_ERROR, + ERRI_TYPE_DRAM_CORRUPT_CRIT, + ERRI_TYPE_DRAM_CORRUPT_NON_CRIT, + ERRI_TYPE_NAND_CORRUPT, + ERRI_TYPE_SRAM_CORRUPT, + ERRI_TYPE_HW_MALFUNCTION, + ERRI_TYPE_NO_MORE_NAND_SPARES, + ERRI_TYPE_INCOMPLETE_SHUTDOWN, +}; + +const char *erri_type_to_string(__le16 type) +{ + switch (type) { + case ERRI_TYPE_CPU_CTRL_HANG: + return "CPU/controller hang"; + case ERRI_TYPE_NAND_HANG: + return "NAND hang"; + case ERRI_TYPE_PLP_DEFECT: + return "PLP defect"; + case ERRI_TYPE_LOGICAL_FIRMWARE_ERROR: + return "logical firmware error"; + case ERRI_TYPE_DRAM_CORRUPT_CRIT: + return "DRAM corruption critical path"; + case ERRI_TYPE_DRAM_CORRUPT_NON_CRIT: + return "DRAM corruption non-critical path"; + case ERRI_TYPE_NAND_CORRUPT: + return "NAND corruption"; + case ERRI_TYPE_SRAM_CORRUPT: + return "SRAM corruption"; + case ERRI_TYPE_HW_MALFUNCTION: + return "HW malfunction"; + case ERRI_TYPE_NO_MORE_NAND_SPARES: + return "no more NAND spares available"; + case ERRI_TYPE_INCOMPLETE_SHUTDOWN: + return "incomplete shutdown"; + default: + break; + } + + return "unknown"; +} + +struct erri_get_cq_entry { + __u32 nume:7; + __u32 rsvd7:25; +}; + +struct erri_config { + char *file; + __u8 number; + __u16 type; + __u16 nrtdp; +}; + +static const char *sel = "[0-3]: current/default/saved/supported"; +static const char *no_uuid = "Skip UUID index search (UUID index not required for OCP 1.0)"; +const char *data = "Error injection data structure entries"; +const char *number = "Number of valid error injection data entries"; +static const char *type = "Error injection type"; +static const char *nrtdp = "Number of reads to trigger device panic"; + static int ocp_print_C3_log_normal(struct nvme_dev *dev, struct ssd_latency_monitor_log *log_data) { @@ -140,7 +229,7 @@ static int ocp_print_C3_log_normal(struct nvme_dev *dev, printf(" Active Threshold D %d ms\n", C3_ACTIVE_THRESHOLD_INCREMENT * le16_to_cpu(log_data->active_threshold_d+1)); - printf(" Active Latency Configuration 0x%x \n", + printf(" Active Latency Configuration 0x%x\n", le16_to_cpu(log_data->active_latency_config)); printf(" Active Latency Minimum Window %d ms\n", C3_MINIMUM_WINDOW_INCREMENT * @@ -397,7 +486,7 @@ static void ocp_print_C3_log_json(struct ssd_latency_monitor_log *log_data) static int get_c3_log_page(struct nvme_dev *dev, char *format) { struct ssd_latency_monitor_log *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; int i; @@ -664,8 +753,8 @@ static const char *eol_plp_failure_mode_to_string(__u8 mode) return "Reserved"; } -static int eol_plp_failure_mode_get(struct nvme_dev *dev, const __u32 nsid, - const __u8 fid, __u8 sel) +static int eol_plp_failure_mode_get(struct nvme_dev *dev, const __u32 nsid, const __u8 fid, + __u8 sel, bool uuid) { __u32 result; int err; @@ -684,6 +773,15 @@ static int eol_plp_failure_mode_get(struct nvme_dev *dev, const __u32 nsid, .result = &result, }; + if (uuid) { + /* OCP 2.0 requires UUID index support */ + err = ocp_get_uuid_index(dev, &args.uuidx); + if (err || !args.uuidx) { + nvme_show_error("ERROR: No OCP UUID index found"); + return err; + } + } + err = nvme_get_features(&args); if (!err) { nvme_show_result("End of Life Behavior (feature: %#0*x): %#0*x (%s: %s)", @@ -716,7 +814,6 @@ static int eol_plp_failure_mode_set(struct nvme_dev *dev, const __u32 nsid, } } - struct nvme_set_features_args args = { .args_size = sizeof(args), .fd = dev_fd(dev), @@ -756,7 +853,7 @@ static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd, "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 char *sel = "[0-3]: current/default/saved/supported"; const __u32 nsid = 0; const __u8 fid = 0xc2; struct nvme_dev *dev; @@ -774,14 +871,12 @@ static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd, .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() - }; + NVME_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)")); err = parse_and_open(&dev, argc, argv, desc, opts); if (err) @@ -792,7 +887,8 @@ static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd, cfg.save, !argconfig_parse_seen(opts, "no-uuid")); else - err = eol_plp_failure_mode_get(dev, nsid, fid, cfg.sel); + err = eol_plp_failure_mode_get(dev, nsid, fid, cfg.sel, + !argconfig_parse_seen(opts, "no-uuid")); dev_close(dev); @@ -804,58 +900,15 @@ static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd, /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /// Telemetry Log +//global buffers +static __le64 total_log_page_sz; +static __u8 *header_data; +static struct telemetry_str_log_format *log_data; -#define TELEMETRY_HEADER_SIZE 512 -#define TELEMETRY_BYTE_PER_BLOCK 512 -#define TELEMETRY_TRANSFER_SIZE 1024 -#define FILE_NAME_SIZE 2048 - -enum TELEMETRY_TYPE { - TELEMETRY_TYPE_NONE = 0, - TELEMETRY_TYPE_HOST = 7, - TELEMETRY_TYPE_CONTROLLER = 8, - TELEMETRY_TYPE_HOST_0 = 9, - TELEMETRY_TYPE_HOST_1 = 10, -}; +__u8 *ptelemetry_buffer; +__u8 *pstring_buffer; +__u8 *pC9_string_buffer; -struct telemetry_initiated_log { - __u8 LogIdentifier; - __u8 Reserved1[4]; - __u8 IEEE[3]; - __le16 DataArea1LastBlock; - __le16 DataArea2LastBlock; - __le16 DataArea3LastBlock; - __u8 Reserved2[368]; - __u8 DataAvailable; - __u8 DataGenerationNumber; - __u8 ReasonIdentifier[128]; -}; - -struct telemetry_data_area_1 { - __le16 major_version; - __le16 minor_version; - __u8 reserved1[4]; - __le64 timestamp; - __u8 log_page_guid[16]; - __u8 no_of_tps_supp; - __u8 tps; - __u8 reserved2[6]; - __le16 sls; - __u8 reserved3[8]; - __le16 fw_revision; - __u8 reserved4[32]; - __le16 da1_stat_start; - __le16 da1_stat_size; - __le16 da2_stat_start; - __le16 da2_stat_size; - __u8 reserved5[32]; - __u8 event_fifo_da[16]; - __le64 event_fifo_start[16]; - __le64 event_fifo_size[16]; - __u8 reserved6[80]; - __u8 smart_health_info[512]; - __u8 smart_health_info_extended[512]; -}; static void get_serial_number(struct nvme_id_ctrl *ctrl, char *sn) { int i; @@ -867,39 +920,20 @@ static void get_serial_number(struct nvme_id_ctrl *ctrl, char *sn) } } -static int get_telemetry_header(struct nvme_dev *dev, __u32 ns, __u8 tele_type, - __u32 data_len, void *data, __u8 nLSP, __u8 nRAE) -{ - struct nvme_passthru_cmd cmd = { - .opcode = nvme_admin_get_log_page, - .nsid = ns, - .addr = (__u64)(uintptr_t) data, - .data_len = data_len, - }; - - __u32 numd = (data_len >> 2) - 1; - __u16 numdu = numd >> 16; - __u16 numdl = numd & 0xffff; - - cmd.cdw10 = tele_type | (nLSP & 0x0F) << 8 | (nRAE & 0x01) << 15 | (numdl & 0xFFFF) << 16; - cmd.cdw11 = numdu; - cmd.cdw12 = 0; - cmd.cdw13 = 0; - cmd.cdw14 = 0; - - return nvme_submit_admin_passthru(dev_fd(dev), &cmd, NULL); -} - static void print_telemetry_header(struct telemetry_initiated_log *logheader, int tele_type) { if (logheader) { unsigned int i = 0, j = 0; + __u8 dataGenNum; - if (tele_type == TELEMETRY_TYPE_HOST) + if (tele_type == TELEMETRY_TYPE_HOST) { printf("============ Telemetry Host Header ============\n"); - else + dataGenNum = logheader->DataHostGenerationNumber; + } else { printf("========= Telemetry Controller Header =========\n"); + dataGenNum = logheader->DataCtlrGenerationNumber; + } printf("Log Identifier : 0x%02X\n", logheader->LogIdentifier); printf("IEEE : 0x%02X%02X%02X\n", @@ -910,8 +944,10 @@ static void print_telemetry_header(struct telemetry_initiated_log *logheader, le16_to_cpu(logheader->DataArea2LastBlock)); printf("Data Area 3 Last Block : 0x%04X\n", le16_to_cpu(logheader->DataArea3LastBlock)); - printf("Data Available : 0x%02X\n", logheader->DataAvailable); - printf("Data Generation Number : 0x%02X\n", logheader->DataGenerationNumber); + printf("Data Available : 0x%02X\n", + logheader->CtlrDataAvailable); + printf("Data Generation Number : 0x%02X\n", + dataGenNum); printf("Reason Identifier :\n"); for (i = 0; i < 8; i++) { @@ -922,6 +958,7 @@ static void print_telemetry_header(struct telemetry_initiated_log *logheader, printf("===============================================\n\n"); } } + static int get_telemetry_data(struct nvme_dev *dev, __u32 ns, __u8 tele_type, __u32 data_len, void *data, __u8 nLSP, __u8 nRAE, __u64 offset) @@ -935,10 +972,14 @@ static int get_telemetry_data(struct nvme_dev *dev, __u32 ns, __u8 tele_type, __u32 numd = (data_len >> 2) - 1; __u16 numdu = numd >> 16; __u16 numdl = numd & 0xffff; - cmd.cdw10 = tele_type | (nLSP & 0x0F) << 8 | (nRAE & 0x01) << 15 | (numdl & 0xFFFF) << 16; + + cmd.cdw10 = tele_type | + (nLSP & 0x0F) << 8 | + (nRAE & 0x01) << 15 | + (numdl & 0xFFFF) << 16; cmd.cdw11 = numdu; - cmd.cdw12 = offset; - cmd.cdw13 = 0; + cmd.cdw12 = (__u32)(0x00000000FFFFFFFF & offset); + cmd.cdw13 = (__u32)((0xFFFFFFFF00000000 & offset) >> 8); cmd.cdw14 = 0; return nvme_submit_admin_passthru(dev_fd(dev), &cmd, NULL); } @@ -946,121 +987,117 @@ static void print_telemetry_data_area_1(struct telemetry_data_area_1 *da1, int tele_type) { if (da1) { - unsigned int i = 0; + int i = 0; + if (tele_type == TELEMETRY_TYPE_HOST) printf("============ Telemetry Host Data area 1 ============\n"); else printf("========= Telemetry Controller Data area 1 =========\n"); - printf("Major Version : 0x%x\n", le16_to_cpu(da1->major_version)); - printf("Minor Version : 0x%x\n", le16_to_cpu(da1->minor_version)); - for (i = 0; i < 4; i++) - printf("reserved1 : 0x%x\n", da1->reserved1[i]); + printf("Major Version : 0x%x\n", le16_to_cpu(da1->major_version)); + printf("Minor Version : 0x%x\n", le16_to_cpu(da1->minor_version)); printf("Timestamp : %"PRIu64"\n", le64_to_cpu(da1->timestamp)); - for (i = 15; i >= 0; i--) - printf("%x", da1->log_page_guid[i]); - printf("Number Telemetry Profiles Supported : 0x%x\n", da1->no_of_tps_supp); - printf("Telemetry Profile Selected (TPS) : 0x%x\n", da1->tps); - for (i = 0; i < 6; i++) - printf("reserved2 : 0x%x\n", da1->reserved2[i]); - printf("Telemetry String Log Size (SLS) : 0x%x\n", le16_to_cpu(da1->sls)); + printf("Log Page GUID : 0x"); + for (int j = 15; j >= 0; j--) + printf("%02x", da1->log_page_guid[j]); + printf("\n"); + printf("Number Telemetry Profiles Supported : 0x%x\n", + da1->no_of_tps_supp); + printf("Telemetry Profile Selected (TPS) : 0x%x\n", + da1->tps); + printf("Telemetry String Log Size (SLS) : 0x%lx\n", + le64_to_cpu(da1->sls)); + printf("Firmware Revision : "); for (i = 0; i < 8; i++) - printf("reserved3 : 0x%x\n", da1->reserved3[i]); - printf("Firmware Revision : 0x%x\n", le16_to_cpu(da1->fw_revision)); - for (i = 0; i < 32; i++) - printf("reserved4 : 0x%x\n", da1->reserved4[i]); - printf("Data Area 1 Statistic Start : 0x%x\n", le16_to_cpu(da1->da1_stat_start)); - printf("Data Area 1 Statistic Size : 0x%x\n", le16_to_cpu(da1->da1_stat_size)); - printf("Data Area 2 Statistic Start : 0x%x\n", le16_to_cpu(da1->da2_stat_start)); - printf("Data Area 2 Statistic Size : 0x%x\n", le16_to_cpu(da1->da2_stat_size)); - for (i = 0; i < 32; i++) - printf("reserved5 : 0x%x\n", da1->reserved5[i]); - for (i = 0; i < 17; i++){ - printf("Event FIFO %d Data Area : 0x%x\n", i, da1->event_fifo_da[i]); - printf("Event FIFO %d Start : %"PRIu64"\n", i, le64_to_cpu(da1->event_fifo_start[i])); - printf("Event FIFO %d Size : %"PRIu64"\n", i, le64_to_cpu(da1->event_fifo_size[i])); - } - for (i = 0; i < 80; i++) - printf("reserved6 : 0x%x\n", da1->reserved6[i]); - for (i = 0; i < 512; i++){ - printf("SMART / Health Information : 0x%x\n", da1->smart_health_info[i]); - printf("SMART / Health Information Extended : 0x%x\n", da1->smart_health_info_extended[i]); - } - printf("===============================================\n\n"); - } -} -static void print_telemetry_da1_stat(__u8 *da1_stat, int tele_type, __u16 buf_size) -{ - if (da1_stat) { - unsigned int i = 0; - if (tele_type == TELEMETRY_TYPE_HOST) - printf("============ Telemetry Host Data area 1 Statistics ============\n"); - else - printf("========= Telemetry Controller Data area 1 Statistics =========\n"); - while((i + 8) < buf_size) { - printf("Statistics Identifier : 0x%x\n", (da1_stat[i] | da1_stat[i+1] << 8)); - printf("Statistics info : 0x%x\n", da1_stat[i+2]); - printf("NS info : 0x%x\n", da1_stat[i+3]); - printf("Statistic Data Size : 0x%x\n", (da1_stat[i+4] | da1_stat[i+5] << 8)); - printf("Reserved : 0x%x\n", (da1_stat[i+6] | da1_stat[i+7] << 8)); - i = 8 + ((da1_stat[i+4] | da1_stat[i+5] << 8) * 4); - } - printf("===============================================\n\n"); - } -} -static void print_telemetry_da1_fifo(__u8 *da1_fifo, int tele_type, __u16 buf_size) -{ - if (da1_fifo) { - unsigned int i = 0; - if (tele_type == TELEMETRY_TYPE_HOST) - printf("============ Telemetry Host Data area 1 FIFO ============\n"); - else - printf("========= Telemetry Controller Data area 1 FIFO =========\n"); - while((i + 4) < buf_size) { - printf("Debug Event Class Type : 0x%x\n", da1_fifo[i]); - printf("Event ID : 0x%x\n", (da1_fifo[i+1] | da1_fifo[i+2] << 8)); - printf("Event Data Size : 0x%x\n", da1_fifo[3]); - i = 4 + ((da1_fifo[3]) * 4); + printf("%c", (char)da1->fw_revision[i]); + printf("\n"); + printf("Data Area 1 Statistic Start : 0x%lx\n", + le64_to_cpu(da1->da1_stat_start)); + printf("Data Area 1 Statistic Size : 0x%lx\n", + le64_to_cpu(da1->da1_stat_size)); + printf("Data Area 2 Statistic Start : 0x%lx\n", + le64_to_cpu(da1->da2_stat_start)); + printf("Data Area 2 Statistic Size : 0x%lx\n", + le64_to_cpu(da1->da2_stat_size)); + for (i = 0; i < 16; i++) { + printf("Event FIFO %d Data Area : 0x%x\n", + i, da1->event_fifo_da[i]); + printf("Event FIFO %d Start : 0x%"PRIx64"\n", + i, le64_to_cpu(da1->event_fifos[i].start)); + printf("Event FIFO %d Size : 0x%"PRIx64"\n", + i, le64_to_cpu(da1->event_fifos[i].size)); } + printf("SMART / Health Information :\n"); + printf("0x"); + for (i = 0; i < 512; i++) + printf("%02x", da1->smart_health_info[i]); + printf("\n"); + + printf("SMART / Health Information Extended :\n"); + printf("0x"); + for (i = 0; i < 512; i++) + printf("%02x", da1->smart_health_info_extended[i]); + printf("\n"); + printf("===============================================\n\n"); } } -static void print_telemetry_da2_stat(__u8 *da1_stat, int tele_type, __u16 buf_size) +static void print_telemetry_da_stat(struct telemetry_stats_desc *da_stat, + int tele_type, + __u16 buf_size, + __u8 data_area) { - if (da1_stat) { + if (da_stat) { unsigned int i = 0; + struct telemetry_stats_desc *next_da_stat = da_stat; + if (tele_type == TELEMETRY_TYPE_HOST) - printf("============ Telemetry Host Data area 1 Statistics ============\n"); + printf("============ Telemetry Host Data Area %d Statistics ============\n", + data_area); else - printf("========= Telemetry Controller Data area 1 Statistics =========\n"); - while((i + 8) < buf_size) { - printf("Statistics Identifier : 0x%x\n", (da1_stat[i] | da1_stat[i+1] << 8)); - printf("Statistics info : 0x%x\n", da1_stat[i+2]); - printf("NS info : 0x%x\n", da1_stat[i+3]); - printf("Statistic Data Size : 0x%x\n", (da1_stat[i+4] | da1_stat[i+5] << 8)); - printf("Reserved : 0x%x\n", (da1_stat[i+6] | da1_stat[i+7] << 8)); - i = 8 + ((da1_stat[i+4] | da1_stat[i+5] << 8) * 4); + printf("========= Telemetry Controller Data Area %d Statistics =========\n", + data_area); + while ((i + 8) < buf_size) { + print_stats_desc(next_da_stat); + i += 8 + ((next_da_stat->size) * 4); + next_da_stat = (struct telemetry_stats_desc *)((__u64)da_stat + i); + + if ((next_da_stat->id == 0) && (next_da_stat->size == 0)) + break; } printf("===============================================\n\n"); } } -static void print_telemetry_da2_fifo(__u8 *da1_fifo, int tele_type, __u16 buf_size) +static void print_telemetry_da_fifo(struct telemetry_event_desc *da_fifo, + __le64 buf_size, + int tele_type, + int da, + int index) { - if (da1_fifo) { + if (da_fifo) { unsigned int i = 0; + struct telemetry_event_desc *next_da_fifo = da_fifo; + if (tele_type == TELEMETRY_TYPE_HOST) - printf("============ Telemetry Host Data area 1 Statistics ============\n"); + printf("========= Telemetry Host Data area %d Event FIFO %d =========\n", + da, index); else - printf("========= Telemetry Controller Data area 1 Statistics =========\n"); - while((i + 4) < buf_size) { - printf("Debug Event Class Type : 0x%x\n", da1_fifo[i]); - printf("Event ID : 0x%x\n", (da1_fifo[i+1] | da1_fifo[i+2] << 8)); - printf("Event Data Size : 0x%x\n", da1_fifo[3]); - i = 4 + ((da1_fifo[3]) * 4); + printf("====== Telemetry Controller Data area %d Event FIFO %d ======\n", + da, index); + + + while ((i + 4) < buf_size) { + /* Print Event Data */ + print_telemetry_fifo_event(next_da_fifo->class, /* Event class type */ + next_da_fifo->id, /* Event ID */ + next_da_fifo->size, /* Event data size */ + (__u8 *)&next_da_fifo->data); /* Event data */ + + i += (4 + (next_da_fifo->size * 4)); + next_da_fifo = (struct telemetry_event_desc *)((__u64)da_fifo + i); } printf("===============================================\n\n"); } } - static int extract_dump_get_log(struct nvme_dev *dev, char *featurename, char *filename, char *sn, int dumpsize, int transfersize, __u32 nsid, __u8 log_id, __u8 lsp, __u64 offset, bool rae) @@ -1146,10 +1183,12 @@ static int get_telemetry_dump(struct nvme_dev *dev, char *filename, char *sn, enum TELEMETRY_TYPE tele_type, int data_area, bool header_print) { __u32 err = 0, nsid = 0; - __u8 lsp = 0, rae = 0; + __le64 da1_sz = 512, m_512_sz = 0, da1_off = 0, m_512_off = 0, diff = 0, + temp_sz = 0, temp_ofst = 0; + __u8 lsp = 0, rae = 0, flag = 0; + __u8 data[TELEMETRY_HEADER_SIZE] = { 0 }; unsigned int i = 0; - char data[TELEMETRY_TRANSFER_SIZE] = { 0 }; - char data1[1536] = { 0 }; + char data1[TELEMETRY_DATA_SIZE] = { 0 }; char *featurename = 0; struct telemetry_initiated_log *logheader = (struct telemetry_initiated_log *)data; struct telemetry_data_area_1 *da1 = (struct telemetry_data_area_1 *)data1; @@ -1172,51 +1211,245 @@ static int get_telemetry_dump(struct nvme_dev *dev, char *filename, char *sn, rae = 1; } - err = get_telemetry_header(dev, nsid, tele_type, TELEMETRY_HEADER_SIZE, - (void *)data, lsp, rae); - if (err) + /* Get the telemetry header */ + err = get_telemetry_data(dev, nsid, tele_type, TELEMETRY_HEADER_SIZE, + (void *)data, lsp, rae, 0); + if (err) { + printf("get_telemetry_header failed, err: %d.\n", err); return err; + } if (header_print) print_telemetry_header(logheader, tele_type); - err = get_telemetry_data(dev, nsid, tele_type, 1536, + + /* Get the telemetry data */ + err = get_telemetry_data(dev, nsid, tele_type, TELEMETRY_DATA_SIZE, (void *)data1, lsp, rae, 512); - if (err) + if (err) { + printf("get_telemetry_data failed for type: 0x%x, err: %d.\n", tele_type, err); return err; + } + print_telemetry_data_area_1(da1, tele_type); - char *da1_stat = calloc((da1->da1_stat_size * 4), sizeof(char)); - err = get_telemetry_data(dev, nsid, tele_type, (da1->da1_stat_size) * 4, - (void *)da1_stat, lsp, rae, (da1->da1_stat_start) * 4); - if (err) - return err; - print_telemetry_da1_stat((void *)da1_stat, tele_type, (da1->da1_stat_size) * 4); - for (i = 0; i < 17 ; i++){ - if (da1->event_fifo_da[i] == 1){ - char *da1_fifo = calloc((da1->event_fifo_size[i]) * 4, sizeof(char)); - err = get_telemetry_data(dev, nsid, tele_type, (da1->event_fifo_size[i]) * 4, - (void *)da1_stat, lsp, rae, (da1->event_fifo_start[i]) * 4); - if (err) + + /* Print the Data Area 1 Stats */ + if (da1->da1_stat_size != 0) { + diff = 0; + da1_sz = (da1->da1_stat_size) * 4; + m_512_sz = (da1->da1_stat_size) * 4; + da1_off = (da1->da1_stat_start) * 4; + m_512_off = (da1->da1_stat_start) * 4; + temp_sz = (da1->da1_stat_size) * 4; + temp_ofst = (da1->da1_stat_start) * 4; + flag = 0; + + if ((da1_off % 512) > 0) { + m_512_off = (__le64) ((da1_off / 512)); + da1_off = m_512_off * 512; + diff = temp_ofst - da1_off; + flag = 1; + } + + if (da1_sz < 512) + da1_sz = 512; + else if ((da1_sz % 512) > 0) { + if (flag == 0) { + m_512_sz = (__le64) ((da1_sz / 512) + 1); + da1_sz = m_512_sz * 512; + } else { + if (diff < 512) + diff = 1; + else + diff = (diff / 512) * 512; + + m_512_sz = (__le64) ((da1_sz / 512) + 1 + diff + 1); + da1_sz = m_512_sz * 512; + } + } + + char *da1_stat = calloc(da1_sz, sizeof(char)); + + err = get_telemetry_data(dev, nsid, tele_type, da1_sz, + (void *)da1_stat, lsp, rae, da1_off); + if (err) { + printf("get_telemetry_data da1 stats failed, err: %d.\n", err); + return err; + } + + print_telemetry_da_stat((void *)(da1_stat + (temp_ofst - da1_off)), + tele_type, (da1->da1_stat_size) * 4, 1); + } + + /* Print the Data Area 1 Event FIFO's */ + for (i = 0; i < 16 ; i++) { + if ((da1->event_fifo_da[i] == 1) && (da1->event_fifos[i].size != 0)) { + diff = 0; + da1_sz = da1->event_fifos[i].size * 4; + m_512_sz = da1->event_fifos[i].size * 4; + da1_off = da1->event_fifos[i].start * 4; + m_512_off = da1->event_fifos[i].start * 4; + temp_sz = da1->event_fifos[i].size * 4; + temp_ofst = da1->event_fifos[i].start * 4; + flag = 0; + + if ((da1_off % 512) > 0) { + m_512_off = (__le64) ((da1_off / 512)); + da1_off = m_512_off * 512; + diff = temp_ofst - da1_off; + flag = 1; + } + + if (da1_sz < 512) + da1_sz = 512; + else if ((da1_sz % 512) > 0) { + if (flag == 0) { + m_512_sz = (__le64) ((da1_sz / 512) + 1); + da1_sz = m_512_sz * 512; + } else { + if (diff < 512) + diff = 1; + else + diff = (diff / 512) * 512; + + m_512_sz = (__le64) ((da1_sz / 512) + 1 + diff + 1); + da1_sz = m_512_sz * 512; + } + } + + char *da1_fifo = calloc(da1_sz, sizeof(char)); + + err = get_telemetry_data(dev, nsid, tele_type, + (da1->event_fifos[i].size) * 4, + (void *)da1_fifo, lsp, rae, da1_off); + if (err) { + printf("get_telemetry_data da1 event fifos failed, err: %d.\n", + err); return err; - print_telemetry_da1_fifo((void *)da1_fifo, tele_type, (da1->event_fifo_size[i]) * 4); + } + print_telemetry_da_fifo((void *)(da1_fifo + (temp_ofst - da1_off)), + temp_sz, + tele_type, + da1->event_fifo_da[i], + i); } } - char *da2_stat = calloc((da1->da2_stat_size * 4), sizeof(char)); - err = get_telemetry_data(dev, nsid, tele_type, (da1->da2_stat_size) * 4, - (void *)da2_stat, lsp, rae, (da1->da2_stat_start) * 4); - if (err) - return err; - print_telemetry_da2_stat((void *)da2_stat, tele_type, (da1->da2_stat_size) * 4); - for (i = 0; i < 17 ; i++){ - if (da1->event_fifo_da[i] == 2){ - char *da1_fifo = calloc((da1->event_fifo_size[i]) * 4, sizeof(char)); - err = get_telemetry_data(dev, nsid, tele_type, (da1->event_fifo_size[i]) * 4, - (void *)da1_stat, lsp, rae, (da1->event_fifo_start[i]) * 4); - if (err) + + /* Print the Data Area 2 Stats */ + if (da1->da2_stat_size != 0) { + da1_off = (da1->da2_stat_start) * 4; + temp_ofst = (da1->da2_stat_start) * 4; + da1_sz = (da1->da2_stat_size) * 4; + diff = 0; + flag = 0; + + if (da1->da2_stat_start == 0) { + da1_off = 512 + (logheader->DataArea1LastBlock * 512); + temp_ofst = 512 + (le16_to_cpu(logheader->DataArea1LastBlock) * 512); + if ((da1_off % 512) == 0) { + m_512_off = (__le64) (((da1_off) / 512)); + da1_off = m_512_off * 512; + diff = temp_ofst - da1_off; + flag = 1; + } + } else { + + if (((da1_off * 4) % 512) > 0) { + m_512_off = (__le64) ((((da1->da2_stat_start) * 4) / 512)); + da1_off = m_512_off * 512; + diff = ((da1->da2_stat_start) * 4) - da1_off; + flag = 1; + } + } + + if (da1_sz < 512) + da1_sz = 512; + else if ((da1_sz % 512) > 0) { + if (flag == 0) { + m_512_sz = (__le64) ((da1->da2_stat_size / 512) + 1); + da1_sz = m_512_sz * 512; + } else { + if (diff < 512) + diff = 1; + else + diff = (diff / 512) * 512; + m_512_sz = (__le64) ((da1->da2_stat_size / 512) + 1 + diff + 1); + da1_sz = m_512_sz * 512; + } + } + + char *da2_stat = calloc(da1_sz, sizeof(char)); + + err = get_telemetry_data(dev, nsid, tele_type, da1_sz, + (void *)da2_stat, lsp, rae, da1_off); + if (err) { + printf("get_telemetry_data da2 stats failed, err: %d.\n", err); + return err; + } + + print_telemetry_da_stat((void *)(da2_stat + (temp_ofst - da1_off)), + tele_type, + (da1->da2_stat_size) * 4, + 2); + } + + /* Print the Data Area 2 Event FIFO's */ + for (i = 0; i < 16 ; i++) { + if ((da1->event_fifo_da[i] == 2) && (da1->event_fifos[i].size != 0)) { + diff = 0; + da1_sz = da1->event_fifos[i].size * 4; + m_512_sz = da1->event_fifos[i].size * 4; + da1_off = da1->event_fifos[i].start * 4; + m_512_off = da1->event_fifos[i].start * 4; + temp_sz = da1->event_fifos[i].size * 4; + temp_ofst = da1->event_fifos[i].start * 4; + flag = 0; + + if ((da1_off % 512) > 0) { + m_512_off = (__le64) ((da1_off / 512)); + da1_off = m_512_off * 512; + diff = temp_ofst - da1_off; + flag = 1; + } + + if (da1_sz < 512) + da1_sz = 512; + else if ((da1_sz % 512) > 0) { + if (flag == 0) { + m_512_sz = (__le64) ((da1_sz / 512) + 1); + da1_sz = m_512_sz * 512; + } + + else { + if (diff < 512) + diff = 1; + else + diff = (diff / 512) * 512; + + m_512_sz = (__le64) ((da1_sz / 512) + 1 + diff + 1); + da1_sz = m_512_sz * 512; + } + } + + char *da1_fifo = calloc(da1_sz, sizeof(char)); + + err = get_telemetry_data(dev, nsid, tele_type, + (da1->event_fifos[i].size) * 4, + (void *)da1_fifo, lsp, rae, da1_off); + if (err) { + printf("get_telemetry_data da2 event fifos failed, err: %d.\n", + err); return err; - print_telemetry_da2_fifo((void *)da1_fifo, tele_type, (da1->event_fifo_size[i]) * 4); + } + print_telemetry_da_fifo((void *)(da1_fifo + (temp_ofst - da1_off)), + temp_sz, + tele_type, + da1->event_fifo_da[i], + i); } } + printf("------------------------------FIFO End---------------------------\n"); + switch (data_area) { case 1: offset = TELEMETRY_HEADER_SIZE; @@ -1252,43 +1485,283 @@ static int get_telemetry_dump(struct nvme_dev *dev, char *filename, char *sn, return err; } +static int get_telemetry_log_page_data(struct nvme_dev *dev, int tele_type) +{ + char file_path[PATH_MAX]; + void *telemetry_log; + const size_t bs = 512; + struct nvme_telemetry_log *hdr; + size_t full_size, offset = bs; + int err, fd; + + if ((tele_type == TELEMETRY_TYPE_HOST_0) || (tele_type == TELEMETRY_TYPE_HOST_1)) + tele_type = TELEMETRY_TYPE_HOST; + + int log_id = (tele_type == TELEMETRY_TYPE_HOST ? NVME_LOG_LID_TELEMETRY_HOST : + NVME_LOG_LID_TELEMETRY_CTRL); + + hdr = malloc(bs); + telemetry_log = malloc(bs); + if (!hdr || !telemetry_log) { + fprintf(stderr, "Failed to allocate %zu bytes for log: %s\n", + bs, strerror(errno)); + err = -ENOMEM; + goto exit_status; + } + memset(hdr, 0, bs); + + sprintf(file_path, DEFAULT_TELEMETRY_BIN); + fd = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + if (fd < 0) { + fprintf(stderr, "Failed to open output file %s: %s!\n", + file_path, strerror(errno)); + err = fd; + goto exit_status; + } + + struct nvme_get_log_args args = { + .lpo = 0, + .result = NULL, + .log = hdr, + .args_size = sizeof(args), + .fd = dev_fd(dev), + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .lid = log_id, + .len = bs, + .nsid = NVME_NSID_ALL, + .csi = NVME_CSI_NVM, + .lsi = NVME_LOG_LSI_NONE, + .lsp = NVME_LOG_TELEM_HOST_LSP_CREATE, + .uuidx = NVME_UUID_NONE, + .rae = true, + .ot = false, + }; + + err = nvme_get_log(&args); + if (err < 0) + nvme_show_error("Failed to fetch the log from drive.\n"); + else if (err > 0) { + nvme_show_status(err); + nvme_show_error("Failed to fetch telemetry-header. Error:%d.\n", err); + goto close_fd; + } + + err = write(fd, (void *)hdr, bs); + if (err != bs) { + nvme_show_error("Failed to write data to file.\n"); + goto close_fd; + } + + full_size = (le16_to_cpu(hdr->dalb3) * bs) + offset; + + while (offset != full_size) { + args.log = telemetry_log; + args.lpo = offset; + args.lsp = NVME_LOG_LSP_NONE; + err = nvme_get_log(&args); + if (err < 0) { + nvme_show_error("Failed to fetch the log from drive.\n"); + break; + } else if (err > 0) { + nvme_show_error("Failed to fetch telemetry-log.\n"); + nvme_show_status(err); + break; + } + + err = write(fd, (void *)telemetry_log, bs); + if (err != bs) { + nvme_show_error("Failed to write data to file.\n"); + break; + } + err = 0; + offset += bs; + } + +close_fd: + close(fd); +exit_status: + free(hdr); + free(telemetry_log); + + return err; +} + +static int get_c9_log_page_data(struct nvme_dev *dev, int print_data, int save_bin) +{ + int ret = 0, fd; + __le64 stat_id_str_table_ofst = 0; + __le64 event_str_table_ofst = 0; + __le64 vu_event_str_table_ofst = 0; + __le64 ascii_table_ofst = 0; + char file_path[PATH_MAX]; + + header_data = (__u8 *)malloc(sizeof(__u8) * C9_TELEMETRY_STR_LOG_LEN); + if (!header_data) { + fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno)); + return -1; + } + memset(header_data, 0, sizeof(__u8) * C9_TELEMETRY_STR_LOG_LEN); + + ret = nvme_get_log_simple(dev_fd(dev), C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE, + C9_TELEMETRY_STR_LOG_LEN, header_data); + + if (!ret) { + log_data = (struct telemetry_str_log_format *)header_data; + if (print_data) { + printf("Statistics Identifier String Table Size = %lld\n", + log_data->sitsz); + printf("Event String Table Size = %lld\n", log_data->estsz); + printf("VU Event String Table Size = %lld\n", log_data->vu_eve_st_sz); + printf("ASCII Table Size = %lld\n", log_data->asctsz); + } + + //Calculating the offset for dynamic fields. + + stat_id_str_table_ofst = log_data->sits * 4; + event_str_table_ofst = log_data->ests * 4; + vu_event_str_table_ofst = log_data->vu_eve_sts * 4; + ascii_table_ofst = log_data->ascts * 4; + total_log_page_sz = C9_TELEMETRY_STR_LOG_LEN + + (log_data->sitsz * 4) + (log_data->estsz * 4) + + (log_data->vu_eve_st_sz * 4) + (log_data->asctsz * 4); + + if (print_data) { + printf("stat_id_str_table_ofst = %lld\n", stat_id_str_table_ofst); + printf("event_str_table_ofst = %lld\n", event_str_table_ofst); + printf("vu_event_str_table_ofst = %lld\n", vu_event_str_table_ofst); + printf("ascii_table_ofst = %lld\n", ascii_table_ofst); + printf("total_log_page_sz = %lld\n", total_log_page_sz); + } + + pC9_string_buffer = (__u8 *)malloc(sizeof(__u8) * total_log_page_sz); + if (!pC9_string_buffer) { + fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno)); + return -1; + } + memset(pC9_string_buffer, 0, sizeof(__u8) * total_log_page_sz); + + ret = nvme_get_log_simple(dev_fd(dev), C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE, + total_log_page_sz, pC9_string_buffer); + } else + fprintf(stderr, "ERROR : OCP : Unable to read C9 data.\n"); + + if (save_bin) { + sprintf(file_path, DEFAULT_STRING_BIN); + fd = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + if (fd < 0) { + fprintf(stderr, "Failed to open output file %s: %s!\n", + file_path, strerror(errno)); + goto exit_status; + } + + ret = write(fd, (void *)pC9_string_buffer, total_log_page_sz); + if (ret != total_log_page_sz) + fprintf(stderr, "Failed to flush all data to file!\n"); + + close(fd); + } + +exit_status: + return 0; +} + +int parse_ocp_telemetry_log(struct ocp_telemetry_parse_options *options) +{ + int status = 0; + long telemetry_buffer_size = 0; + long string_buffer_size = 0; + enum nvme_print_flags fmt; + unsigned char log_id; + + if (options->telemetry_log) { + if (strstr((const char *)options->telemetry_log, "bin")) { + // Read the data from the telemetry binary file + ptelemetry_buffer = + read_binary_file(NULL, (const char *)options->telemetry_log, + &telemetry_buffer_size, 1); + if (ptelemetry_buffer == NULL) { + nvme_show_error("Failed to read telemetry-log.\n"); + return -1; + } + } + } else { + nvme_show_error("telemetry-log is empty.\n"); + return -1; + } + + log_id = ptelemetry_buffer[0]; + if ((log_id != NVME_LOG_LID_TELEMETRY_HOST) && (log_id != NVME_LOG_LID_TELEMETRY_CTRL)) { + nvme_show_error("Invalid LogPageId [0x%02X]\n", log_id); + return -1; + } + + if (options->string_log) { + // Read the data from the string binary file + if (strstr((const char *)options->string_log, "bin")) { + pstring_buffer = read_binary_file(NULL, (const char *)options->string_log, + &string_buffer_size, 1); + if (pstring_buffer == NULL) { + nvme_show_error("Failed to read string-log.\n"); + return -1; + } + } + } else { + nvme_show_error("string-log is empty.\n"); + return -1; + } + + status = validate_output_format(options->output_format, &fmt); + if (status < 0) { + nvme_show_error("Invalid output format\n"); + return status; + } + + switch (fmt) { + case NORMAL: + print_ocp_telemetry_normal(options); + break; + case JSON: + print_ocp_telemetry_json(options); + break; + default: + break; + } + + return 0; +} + static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, struct plugin *plugin) { - struct nvme_dev *dev; - int err = 0; - const char *desc = "Retrieve and save telemetry log."; - const char *type = "Telemetry Type; 'host[Create bit]' or 'controller'"; - const char *area = "Telemetry Data Area; 1 or 3"; - const char *file = "Output file name with path;\n" + const char *desc = "Retrieve and parse OCP Telemetry log."; + const char *telemetry_log = "Telemetry log binary;\n 'host.bin' or 'controller.bin'"; + const char *string_log = "String log binary; 'C9.bin'"; + const char *output_file = "Output file name with path;\n" "e.g. '-o ./path/name'\n'-o ./path1/path2/';\n" "If requested path does not exist, the directory will be newly created."; + const char *output_format = "output format normal|json"; + const char *data_area = "Telemetry Data Area; 1 or 2;\n" + "e.g. '-a 1 for Data Area 1.'\n'-a 2 for Data Areas 1 and 2.';\n"; + const char *telemetry_type = "Telemetry Type; 'host' or 'controller'"; + struct nvme_dev *dev; + int err = 0; __u32 nsid = NVME_NSID_ALL; struct stat nvme_stat; char sn[21] = {0,}; struct nvme_id_ctrl ctrl; bool is_support_telemetry_controller; - + struct ocp_telemetry_parse_options opt; int tele_type = 0; int tele_area = 0; - struct config { - char *type; - int area; - char *file; - }; - - struct config cfg = { - .type = NULL, - .area = 0, - .file = NULL, - }; - OPT_ARGS(opts) = { - OPT_STR("telemetry_type", 't', &cfg.type, type), - OPT_INT("telemetry_data_area", 'a', &cfg.area, area), - OPT_FILE("output-file", 'o', &cfg.file, file), + OPT_STR("telemetry-log", 'l', &opt.telemetry_log, telemetry_log), + OPT_STR("string-log", 's', &opt.string_log, string_log), + OPT_FILE("output-file", 'o', &opt.output_file, output_file), + OPT_FMT("output-format", 'f', &opt.output_format, output_format), + OPT_INT("data-area", 'a', &opt.data_area, data_area), + OPT_STR("telemetry-type", 't', &opt.telemetry_type, telemetry_type), OPT_END() }; @@ -1314,36 +1787,84 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, is_support_telemetry_controller = ((ctrl.lpa & 0x8) >> 3); - if (!cfg.type && !cfg.area) { - tele_type = TELEMETRY_TYPE_NONE; - tele_area = 0; - } else if (cfg.type && cfg.area) { - if (!strcmp(cfg.type, "host0")) + if (!opt.data_area) { + nvme_show_result("Missing data-area. Using default data area 1.\n"); + opt.data_area = DATA_AREA_1;//Default data area 1 + } else if (opt.data_area != 1 && opt.data_area != 2) { + nvme_show_result("Invalid data-area specified. Please specify 1 or 2.\n"); + goto out; + } + + tele_area = opt.data_area; + + if (opt.telemetry_type) { + if (!strcmp(opt.telemetry_type, "host0")) tele_type = TELEMETRY_TYPE_HOST_0; - else if (!strcmp(cfg.type, "host1")) + else if (!strcmp(opt.telemetry_type, "host1")) tele_type = TELEMETRY_TYPE_HOST_1; - else if (!strcmp(cfg.type, "controller")) + else if (!strcmp(opt.telemetry_type, "host")) + tele_type = TELEMETRY_TYPE_HOST; + else if (!strcmp(opt.telemetry_type, "controller")) tele_type = TELEMETRY_TYPE_CONTROLLER; + else { + nvme_show_error("telemetry-type should be host or controller.\n"); + goto out; + } + } else { + tele_type = TELEMETRY_TYPE_HOST; //Default Type - Host + nvme_show_result("Missing telemetry-type. Using default - host.\n"); + } - tele_area = cfg.area; + if (!opt.telemetry_log) { + nvme_show_result("\nMissing telemetry-log. Fetching from drive...\n"); + err = get_telemetry_log_page_data(dev, tele_type);//Pull Telemetry log + if (err) { + nvme_show_error("Failed to fetch telemetry-log from the drive.\n"); + goto out; + } + nvme_show_result("telemetry.bin generated. Proceeding with next steps.\n"); + opt.telemetry_log = DEFAULT_TELEMETRY_BIN; + } - if ((tele_area != 1 && tele_area != 3) || - (tele_type == TELEMETRY_TYPE_CONTROLLER && tele_area != 3)) { - printf("\nUnsupported parameters entered.\n"); - printf("Possible combinations; {'host0',1}, {'host0',3}, {'host1',1}, {'host1',3}, {'controller',3}\n"); - return err; + if (!opt.string_log) { + nvme_show_result("Missing string-log. Fetching from drive...\n"); + err = get_c9_log_page_data(dev, 0, 1); //Pull String log + if (err) { + nvme_show_error("Failed to fetch string-log from the drive.\n"); + goto out; } - } else { - printf("\nShould provide these all; 'telemetry_type' and 'telemetry_data_area'\n"); - return err; + nvme_show_result("string.bin generated. Proceeding with next steps.\n"); + opt.string_log = DEFAULT_STRING_BIN; } - if (tele_type == TELEMETRY_TYPE_NONE) { + if (!opt.output_format) { + nvme_show_result("Missing format. Using default format - JSON.\n"); + opt.output_format = DEFAULT_OUTPUT_FORMAT_JSON; + } + + switch (tele_type) { + case TELEMETRY_TYPE_HOST: { + printf("Extracting Telemetry Host Dump (Data Area %d)...\n", tele_area); + err = parse_ocp_telemetry_log(&opt); + if (err) + nvme_show_result("Status:(%x)\n", err); + } + break; + case TELEMETRY_TYPE_CONTROLLER: { + printf("Extracting Telemetry Controller Dump (Data Area %d)...\n", tele_area); + if (is_support_telemetry_controller == true) { + err = parse_ocp_telemetry_log(&opt); + if (err) + nvme_show_result("Status:(%x)\n", err); + } + } + break; + case TELEMETRY_TYPE_NONE: { printf("\n-------------------------------------------------------------\n"); /* Host 0 (lsp == 0) must be executed before Host 1 (lsp == 1). */ printf("\nExtracting Telemetry Host 0 Dump (Data Area 1)...\n"); - err = get_telemetry_dump(dev, cfg.file, sn, + err = get_telemetry_dump(dev, opt.output_file, sn, TELEMETRY_TYPE_HOST_0, 1, true); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); @@ -1352,7 +1873,7 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, printf("\nExtracting Telemetry Host 0 Dump (Data Area 3)...\n"); - err = get_telemetry_dump(dev, cfg.file, sn, + err = get_telemetry_dump(dev, opt.output_file, sn, TELEMETRY_TYPE_HOST_0, 3, false); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); @@ -1361,7 +1882,7 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, printf("\nExtracting Telemetry Host 1 Dump (Data Area 1)...\n"); - err = get_telemetry_dump(dev, cfg.file, sn, + err = get_telemetry_dump(dev, opt.output_file, sn, TELEMETRY_TYPE_HOST_1, 1, true); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); @@ -1370,7 +1891,7 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, printf("\nExtracting Telemetry Host 1 Dump (Data Area 3)...\n"); - err = get_telemetry_dump(dev, cfg.file, sn, + err = get_telemetry_dump(dev, opt.output_file, sn, TELEMETRY_TYPE_HOST_1, 3, false); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); @@ -1380,35 +1901,35 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd, printf("\nExtracting Telemetry Controller Dump (Data Area 3)...\n"); if (is_support_telemetry_controller == true) { - err = get_telemetry_dump(dev, cfg.file, sn, + err = get_telemetry_dump(dev, opt.output_file, sn, TELEMETRY_TYPE_CONTROLLER, 3, true); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); } printf("\n-------------------------------------------------------------\n"); - } else if (tele_type == TELEMETRY_TYPE_CONTROLLER) { - printf("Extracting Telemetry Controller Dump (Data Area %d)...\n", tele_area); - - if (is_support_telemetry_controller == true) { - err = get_telemetry_dump(dev, cfg.file, sn, tele_type, tele_area, true); - if (err) - fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); - } - } else { + } + break; + case TELEMETRY_TYPE_HOST_0: + case TELEMETRY_TYPE_HOST_1: + default: { printf("Extracting Telemetry Host(%d) Dump (Data Area %d)...\n", (tele_type == TELEMETRY_TYPE_HOST_0) ? 0 : 1, tele_area); - err = get_telemetry_dump(dev, cfg.file, sn, tele_type, tele_area, true); + err = get_telemetry_dump(dev, opt.output_file, sn, tele_type, tele_area, true); if (err) fprintf(stderr, "NVMe Status: %s(%x)\n", nvme_status_to_string(err, false), err); } + break; + } - printf("telemetry-log done.\n"); - -return err; + printf("ocp internal-log command completed.\n"); +out: + dev_close(dev); + return err; } + /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -1511,7 +2032,7 @@ static void ocp_print_c5_log_binary(struct unsupported_requirement_log *log_data static int get_c5_log_page(struct nvme_dev *dev, char *format) { - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; int i; @@ -1585,7 +2106,6 @@ out: return ret; } - static int ocp_unsupported_requirements_log(int argc, char **argv, struct command *cmd, struct plugin *plugin) { @@ -1738,7 +2258,7 @@ static void ocp_print_c1_log_binary(struct ocp_error_recovery_log_page *log_data static int get_c1_log_page(struct nvme_dev *dev, char *format) { struct ocp_error_recovery_log_page *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; int i, j; @@ -1954,7 +2474,7 @@ static void ocp_print_c4_log_binary(struct ocp_device_capabilities_log_page *log static int get_c4_log_page(struct nvme_dev *dev, char *format) { struct ocp_device_capabilities_log_page *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; int i, j; @@ -2241,6 +2761,106 @@ static int set_dssd_power_state_feature(int argc, char **argv, struct command *c /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// +/// DSSD Power State (Feature Identifier C7h) Get Feature + +static int get_dssd_power_state(struct nvme_dev *dev, const __u32 nsid, + const __u8 fid, __u8 sel, bool uuid) +{ + __u32 result; + int err; + __u8 uuid_index = 0; + + if (uuid) { + /* OCP 2.0 requires UUID index support */ + err = ocp_get_uuid_index(dev, &uuid_index); + if (err || !uuid_index) { + nvme_show_error("ERROR: No OCP UUID index found"); + return err; + } + } + + struct nvme_get_features_args args = { + .args_size = sizeof(args), + .fd = dev_fd(dev), + .fid = fid, + .nsid = nsid, + .sel = sel, + .cdw11 = 0, + .uuidx = uuid_index, + .data_len = 0, + .data = NULL, + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .result = &result, + }; + + err = nvme_get_features(&args); + if (!err) { + printf("get-feature:0xC7 %s value: %#08x\n", nvme_select_to_string(sel), result); + + if (sel == NVME_GET_FEATURES_SEL_SUPPORTED) + nvme_show_select_result(fid, result); + } else { + nvme_show_error("Could not get feature: 0xC7 with sel: %d\n", sel); + } + + return err; +} + +static int get_dssd_power_state_feature(int argc, char **argv, struct command *cmd, + struct plugin *plugin) +{ + const char *desc = "Define DSSD Power State (Feature Identifier C7h) Get Feature."; + const char *all = "Print out all 3 values at once - Current, Default, and Saved"; + const char *sel = "[0-3]: current/default/saved/supported/"; + const __u32 nsid = 0; + const __u8 fid = 0xC7; + struct nvme_dev *dev; + int i, err; + + struct config { + __u8 sel; + bool all; + }; + + struct config cfg = { + .sel = 0, + .all = false, + }; + + OPT_ARGS(opts) = { + OPT_BYTE("sel", 'S', &cfg.sel, sel), + OPT_FLAG("all", 'a', NULL, all), + 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, "all")) { + for (i = 0; i < 3; i++) { + err = get_dssd_power_state(dev, nsid, fid, i, + !argconfig_parse_seen(opts, "no-uuid")); + if (err) + break; + } + } else if (argconfig_parse_seen(opts, "sel")) + err = get_dssd_power_state(dev, nsid, fid, cfg.sel, + !argconfig_parse_seen(opts, "no-uuid")); + else + nvme_show_error("Required to have --sel as an argument, or pass the --all flag."); + + dev_close(dev); + + return err; +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// /// plp_health_check_interval static int set_plp_health_check_interval(int argc, char **argv, struct command *cmd, @@ -2517,139 +3137,12 @@ static int get_dssd_async_event_config(int argc, char **argv, struct command *cm /////////////////////////////////////////////////////////////////////////////// /// Telemetry String Log Format Log Page (LID : C9h) -/* C9 Telemetry String Log Format Log Page */ -#define C9_GUID_LENGTH 16 -#define C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE 0xC9 -#define C9_TELEMETRY_STR_LOG_LEN 432 -#define C9_TELEMETRY_STR_LOG_SIST_OFST 431 - -/** - * struct telemetry_str_log_format - Telemetry String Log Format - * @log_page_version: indicates the version of the mapping this log page uses - * Shall be set to 01h. - * @reserved1: Reserved. - * @log_page_guid: Shall be set to B13A83691A8F408B9EA495940057AA44h. - * @sls: Shall be set to the number of DWORDS in the String Log. - * @reserved2: reserved. - * @sits: shall be set to the number of DWORDS in the Statistics - * Identifier String Table - * @ests: Shall be set to the number of DWORDS from byte 0 of this - * log page to the start of the Event String Table - * @estsz: shall be set to the number of DWORDS in the Event String Table - * @vu_eve_sts: Shall be set to the number of DWORDS from byte 0 of this - * log page to the start of the VU Event String Table - * @vu_eve_st_sz: shall be set to the number of DWORDS in the VU Event String Table - * @ascts: the number of DWORDS from byte 0 of this log page until the ASCII Table Starts. - * @asctsz: the number of DWORDS in the ASCII Table - * @fifo1: FIFO 0 ASCII String - * @fifo2: FIFO 1 ASCII String - * @fifo3: FIFO 2 ASCII String - * @fifo4: FIFO 3 ASCII String - * @fif05: FIFO 4 ASCII String - * @fifo6: FIFO 5 ASCII String - * @fifo7: FIFO 6 ASCII String - * @fifo8: FIFO 7 ASCII String - * @fifo9: FIFO 8 ASCII String - * @fifo10: FIFO 9 ASCII String - * @fif011: FIFO 10 ASCII String - * @fif012: FIFO 11 ASCII String - * @fifo13: FIFO 12 ASCII String - * @fif014: FIFO 13 ASCII String - * @fif015: FIFO 14 ASCII String - * @fif016: FIFO 15 ASCII String - * @reserved3: reserved - */ -struct __attribute__((__packed__)) telemetry_str_log_format { - __u8 log_page_version; - __u8 reserved1[15]; - __u8 log_page_guid[C9_GUID_LENGTH]; - __le64 sls; - __u8 reserved2[24]; - __le64 sits; - __le64 sitsz; - __le64 ests; - __le64 estsz; - __le64 vu_eve_sts; - __le64 vu_eve_st_sz; - __le64 ascts; - __le64 asctsz; - __u8 fifo1[16]; - __u8 fifo2[16]; - __u8 fifo3[16]; - __u8 fifo4[16]; - __u8 fifo5[16]; - __u8 fifo6[16]; - __u8 fifo7[16]; - __u8 fifo8[16]; - __u8 fifo9[16]; - __u8 fifo10[16]; - __u8 fifo11[16]; - __u8 fifo12[16]; - __u8 fifo13[16]; - __u8 fifo14[16]; - __u8 fifo15[16]; - __u8 fifo16[16]; - __u8 reserved3[48]; -}; - -/* - * struct statistics_id_str_table_entry - Statistics Identifier String Table Entry - * @vs_si: Shall be set the Vendor Unique Statistic Identifier number. - * @reserved1: Reserved - * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. - * @ascii_id_ofst: Shall be set to the offset from DWORD 0/Byte 0 of the Start - * of the ASCII Table to the first character of the string for - * this Statistic Identifier string.. - * @reserved2 reserved - */ -struct __attribute__((__packed__)) statistics_id_str_table_entry { - __le16 vs_si; - __u8 reserved1; - __u8 ascii_id_len; - __le64 ascii_id_ofst; - __le32 reserved2; -}; - -/* - * struct event_id_str_table_entry - Event Identifier String Table Entry - * @deb_eve_class: Shall be set the Debug Class. - * @ei: Shall be set to the Event Identifier - * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. - * @ascii_id_ofst: This is the offset from DWORD 0/ Byte 0 of the start of the - * ASCII table to the ASCII data for this identifier - * @reserved2 reserved - */ -struct __attribute__((__packed__)) event_id_str_table_entry { - __u8 deb_eve_class; - __le16 ei; - __u8 ascii_id_len; - __le64 ascii_id_ofst; - __le32 reserved2; -}; - -/* - * struct vu_event_id_str_table_entry - VU Event Identifier String Table Entry - * @deb_eve_class: Shall be set the Debug Class. - * @vu_ei: Shall be set to the VU Event Identifier - * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. - * @ascii_id_ofst: This is the offset from DWORD 0/ Byte 0 of the start of the - * ASCII table to the ASCII data for this identifier - * @reserved reserved - */ -struct __attribute__((__packed__)) vu_event_id_str_table_entry { - __u8 deb_eve_class; - __le16 vu_ei; - __u8 ascii_id_len; - __le64 ascii_id_ofst; - __le32 reserved; -}; - /* Function declaration for Telemetry String Log Format (LID:C9h) */ static int ocp_telemetry_str_log_format(int argc, char **argv, struct command *cmd, struct plugin *plugin); -static int ocp_print_C9_log_normal(struct telemetry_str_log_format *log_data,__u8 *log_data_buf) +static int ocp_print_C9_log_normal(struct telemetry_str_log_format *log_data, __u8 *log_data_buf) { //calculating the index value for array __le64 stat_id_index = (log_data->sitsz * 4) / 16; @@ -2657,14 +3150,13 @@ static int ocp_print_C9_log_normal(struct telemetry_str_log_format *log_data,__u __le64 vu_eve_index = (log_data->vu_eve_st_sz * 4) / 16; __le64 ascii_table_index = (log_data->asctsz * 4); //Calculating the offset for dynamic fields. - __le64 stat_id_str_table_ofst = C9_TELEMETRY_STR_LOG_SIST_OFST + (log_data->sitsz * 4); - __le64 event_str_table_ofst = stat_id_str_table_ofst + (log_data->estsz * 4); - __le64 vu_event_str_table_ofst = event_str_table_ofst + (log_data->vu_eve_st_sz * 4); - __le64 ascii_table_ofst = vu_event_str_table_ofst + (log_data->asctsz * 4); + __le64 stat_id_str_table_ofst = log_data->sits * 4; + __le64 event_str_table_ofst = log_data->ests * 4; + __le64 vu_event_str_table_ofst = log_data->vu_eve_sts * 4; + __le64 ascii_table_ofst = log_data->ascts * 4; struct statistics_id_str_table_entry stat_id_str_table_arr[stat_id_index]; struct event_id_str_table_entry event_id_str_table_arr[eve_id_index]; struct vu_event_id_str_table_entry vu_event_id_str_table_arr[vu_eve_index]; - __u8 ascii_table_info_arr[ascii_table_index]; int j; printf(" Log Page Version : 0x%x\n", log_data->log_page_version); @@ -2697,172 +3189,180 @@ static int ocp_print_C9_log_normal(struct telemetry_str_log_format *log_data,__u printf(" FIFO 1 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo1[j], log_data->fifo1[j]); - } printf(" FIFO 2 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo2[j], log_data->fifo2[j]); - } printf(" FIFO 3 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo3[j], log_data->fifo3[j]); - } printf(" FIFO 4 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ - + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo4[j], log_data->fifo4[j]); - } printf(" FIFO 5 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo5[j], log_data->fifo5[j]); - } printf(" FIFO 6 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo6[j], log_data->fifo6[j]); - } printf(" FIFO 7 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo7[j], log_data->fifo7[j]); - } printf(" FIFO 8 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ - printf("index value ascii_val"); + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo8[j], log_data->fifo8[j]); - } printf(" FIFO 9 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo9[j], log_data->fifo9[j]); - } printf(" FIFO 10 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo10[j], log_data->fifo10[j]); - } printf(" FIFO 11 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo11[j], log_data->fifo11[j]); - } printf(" FIFO 12 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo12[j], log_data->fifo12[j]); - } printf(" FIFO 13 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo13[j], log_data->fifo13[j]); - } printf(" FIFO 14 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo14[j], log_data->fifo14[j]); - } printf(" FIFO 15 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo15[j], log_data->fifo16[j]); - } printf(" FIFO 16 ASCII String\n"); printf(" index value ascii_val\n"); - for (j = 0; j < 16; j++){ + for (j = 0; j < 16; j++) printf(" %d %d %c \n", j, log_data->fifo16[j], log_data->fifo16[j]); - } printf(" Reserved : "); for (j = 0; j < 48; j++) printf("%d", log_data->reserved3[j]); printf("\n"); - memcpy(stat_id_str_table_arr, (__u8*)log_data_buf + stat_id_str_table_ofst, (log_data->sitsz * 4)); - memcpy(event_id_str_table_arr, (__u8*)log_data_buf + event_str_table_ofst, (log_data->estsz * 4)); - memcpy(vu_event_id_str_table_arr, (__u8*)log_data_buf + vu_event_str_table_ofst, (log_data->vu_eve_st_sz * 4)); - memcpy(ascii_table_info_arr, (__u8*)log_data_buf + ascii_table_ofst, (log_data->asctsz * 4)); - printf(" Statistics Identifier String Table\n"); - for (j = 0; j < stat_id_index; j++){ - printf(" Vendor Specific Statistic Identifier : 0x%x\n",le16_to_cpu(stat_id_str_table_arr[j].vs_si)); - printf(" Reserved : 0x%d",stat_id_str_table_arr[j].reserved1); - printf(" ASCII ID Length : 0x%x\n",stat_id_str_table_arr[j].ascii_id_len); - printf(" ASCII ID offset : 0x%lx\n",le64_to_cpu(stat_id_str_table_arr[j].ascii_id_ofst)); - printf(" Reserved : 0x%d\n",stat_id_str_table_arr[j].reserved2); + if (log_data->sitsz != 0) { + memcpy(stat_id_str_table_arr, + (__u8 *)log_data_buf + stat_id_str_table_ofst, + (log_data->sitsz * 4)); + printf(" Statistics Identifier String Table\n"); + for (j = 0; j < stat_id_index; j++) { + printf(" Vendor Specific Statistic Identifier : 0x%x\n", + le16_to_cpu(stat_id_str_table_arr[j].vs_si)); + printf(" Reserved : 0x%x\n", + stat_id_str_table_arr[j].reserved1); + printf(" ASCII ID Length : 0x%x\n", + stat_id_str_table_arr[j].ascii_id_len); + printf(" ASCII ID offset : 0x%lx\n", + le64_to_cpu(stat_id_str_table_arr[j].ascii_id_ofst)); + printf(" Reserved : 0x%x\n", + stat_id_str_table_arr[j].reserved2); + } } - printf(" Event Identifier String Table Entry\n"); - for (j = 0; j < eve_id_index; j++){ - printf(" Debug Event Class : 0x%x\n",event_id_str_table_arr[j].deb_eve_class); - printf(" Event Identifier : 0x%x\n",le16_to_cpu(event_id_str_table_arr[j].ei)); - printf(" ASCII ID Length : 0x%x\n",event_id_str_table_arr[j].ascii_id_len); - printf(" ASCII ID offset : 0x%lx\n",le64_to_cpu(event_id_str_table_arr[j].ascii_id_ofst)); - printf(" Reserved : 0x%d\n",event_id_str_table_arr[j].reserved2); + if (log_data->estsz != 0) { + memcpy(event_id_str_table_arr, (__u8 *)log_data_buf + + event_str_table_ofst, (log_data->estsz * 4)); + printf(" Event Identifier String Table Entry\n"); + for (j = 0; j < eve_id_index; j++) { + printf(" Debug Event Class : 0x%x\n", + event_id_str_table_arr[j].deb_eve_class); + printf(" Event Identifier : 0x%x\n", + le16_to_cpu(event_id_str_table_arr[j].ei)); + printf(" ASCII ID Length : 0x%x\n", + event_id_str_table_arr[j].ascii_id_len); + printf(" ASCII ID offset : 0x%lx\n", + le64_to_cpu(event_id_str_table_arr[j].ascii_id_ofst)); + printf(" Reserved : 0x%x\n", + event_id_str_table_arr[j].reserved2); + + } } - printf(" VU Event Identifier String Table Entry\n"); - for (j = 0; j < vu_eve_index; j++){ - printf(" Debug Event Class : 0x%x\n",vu_event_id_str_table_arr[j].deb_eve_class); - printf(" VU Event Identifier : 0x%x\n",le16_to_cpu(vu_event_id_str_table_arr[j].vu_ei)); - printf(" ASCII ID Length : 0x%x\n",vu_event_id_str_table_arr[j].ascii_id_len); - printf(" ASCII ID offset : 0x%lx\n",le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_ofst)); - printf(" Reserved : 0x%d\n",vu_event_id_str_table_arr[j].reserved); + if (log_data->vu_eve_st_sz != 0) { + memcpy(vu_event_id_str_table_arr, (__u8 *)log_data_buf + + vu_event_str_table_ofst, (log_data->vu_eve_st_sz * 4)); + printf(" VU Event Identifier String Table Entry\n"); + for (j = 0; j < vu_eve_index; j++) { + printf(" Debug Event Class : 0x%x\n", + vu_event_id_str_table_arr[j].deb_eve_class); + printf(" VU Event Identifier : 0x%x\n", + le16_to_cpu(vu_event_id_str_table_arr[j].vu_ei)); + printf(" ASCII ID Length : 0x%x\n", + vu_event_id_str_table_arr[j].ascii_id_len); + printf(" ASCII ID offset : 0x%lx\n", + le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_ofst)); + printf(" Reserved : 0x%x\n", + vu_event_id_str_table_arr[j].reserved); + } } - printf(" ASCII Table\n"); - printf(" Byte Data_Byte ASCII_Character\n"); - for (j = 0; j < ascii_table_index; j++){ - printf(" %lld 0x%x %c \n",ascii_table_ofst+j,ascii_table_info_arr[j],ascii_table_info_arr[j]); + if (log_data->asctsz != 0) { + printf(" ASCII Table\n"); + printf(" Byte Data_Byte ASCII_Character\n"); + for (j = 0; j < ascii_table_index; j++) + printf(" %lld %d %c\n", + ascii_table_ofst+j, log_data_buf[ascii_table_ofst + j], + (char)log_data_buf[ascii_table_ofst + j]); } + return 0; } -static int ocp_print_C9_log_json(struct telemetry_str_log_format *log_data,__u8 *log_data_buf) +static int ocp_print_C9_log_json(struct telemetry_str_log_format *log_data, __u8 *log_data_buf) { struct json_object *root = json_create_object(); - struct json_object *stat_table = json_create_object(); - struct json_object *eve_table = json_create_object(); - struct json_object *vu_eve_table = json_create_object(); - struct json_object *entry = json_create_object(); char res_arr[48]; char *res = res_arr; char guid_buf[C9_GUID_LENGTH]; char *guid = guid_buf; char fifo_arr[16]; char *fifo = fifo_arr; + char buf[128]; //calculating the index value for array __le64 stat_id_index = (log_data->sitsz * 4) / 16; __le64 eve_id_index = (log_data->estsz * 4) / 16; __le64 vu_eve_index = (log_data->vu_eve_st_sz * 4) / 16; __le64 ascii_table_index = (log_data->asctsz * 4); //Calculating the offset for dynamic fields. - __le64 stat_id_str_table_ofst = C9_TELEMETRY_STR_LOG_SIST_OFST + (log_data->sitsz * 4); - __le64 event_str_table_ofst = stat_id_str_table_ofst + (log_data->estsz * 4); - __le64 vu_event_str_table_ofst = event_str_table_ofst + (log_data->vu_eve_st_sz * 4); - __le64 ascii_table_ofst = vu_event_str_table_ofst + (log_data->asctsz * 4); + __le64 stat_id_str_table_ofst = log_data->sits * 4; + __le64 event_str_table_ofst = log_data->ests * 4; + __le64 vu_event_str_table_ofst = log_data->vu_eve_sts * 4; + __le64 ascii_table_ofst = log_data->ascts * 4; struct statistics_id_str_table_entry stat_id_str_table_arr[stat_id_index]; struct event_id_str_table_entry event_id_str_table_arr[eve_id_index]; struct vu_event_id_str_table_entry vu_event_id_str_table_arr[vu_eve_index]; @@ -2982,74 +3482,117 @@ static int ocp_print_C9_log_json(struct telemetry_str_log_format *log_data,__u8 for (j = 0; j < 48; j++) res += sprintf(res, "%d", log_data->reserved3[j]); json_object_add_value_string(root, "Reserved", res_arr); - - memcpy(stat_id_str_table_arr, (__u8*)log_data_buf + stat_id_str_table_ofst, (log_data->sitsz * 4)); - memcpy(event_id_str_table_arr, (__u8*)log_data_buf + event_str_table_ofst, (log_data->estsz * 4)); - memcpy(vu_event_id_str_table_arr, (__u8*)log_data_buf + vu_event_str_table_ofst, (log_data->vu_eve_st_sz * 4)); - memcpy(ascii_table_info_arr, (__u8*)log_data_buf + ascii_table_ofst, (log_data->asctsz * 4)); - - for (j = 0; j < stat_id_index; j++){ - json_object_add_value_int(entry, "Vendor Specific Statistic Identifier", le16_to_cpu(stat_id_str_table_arr[j].vs_si)); - json_object_add_value_int(entry, "Reserved", le64_to_cpu(stat_id_str_table_arr[j].reserved1)); - json_object_add_value_int(entry, "ASCII ID Length", le64_to_cpu(stat_id_str_table_arr[j].ascii_id_len)); - json_object_add_value_int(entry, "ASCII ID offset", le64_to_cpu(stat_id_str_table_arr[j].ascii_id_ofst)); - json_object_add_value_int(entry, "Reserved", le64_to_cpu(stat_id_str_table_arr[j].reserved2)); - json_array_add_value_object(stat_table, entry); - } - json_object_add_value_array(root, "Statistics Identifier String Table", stat_table); - - for (j = 0; j < eve_id_index; j++){ - json_object_add_value_int(entry, "Debug Event Class", le16_to_cpu(event_id_str_table_arr[j].deb_eve_class)); - json_object_add_value_int(entry, "Event Identifier", le16_to_cpu(event_id_str_table_arr[j].ei)); - json_object_add_value_int(entry, "ASCII ID Length", le64_to_cpu(event_id_str_table_arr[j].ascii_id_len)); - json_object_add_value_int(entry, "ASCII ID offset", le64_to_cpu(event_id_str_table_arr[j].ascii_id_ofst)); - json_object_add_value_int(entry, "Reserved", le64_to_cpu(event_id_str_table_arr[j].reserved2)); - json_array_add_value_object(eve_table, entry); - } - json_object_add_value_array(root, "Event Identifier String Table Entry", eve_table); - - for (j = 0; j < vu_eve_index; j++){ - json_object_add_value_int(entry, "Debug Event Class", le16_to_cpu(vu_event_id_str_table_arr[j].deb_eve_class)); - json_object_add_value_int(entry, "VU Event Identifier", le16_to_cpu(vu_event_id_str_table_arr[j].vu_ei)); - json_object_add_value_int(entry, "ASCII ID Length", le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_len)); - json_object_add_value_int(entry, "ASCII ID offset", le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_ofst)); - json_object_add_value_int(entry, "Reserved", le64_to_cpu(vu_event_id_str_table_arr[j].reserved)); - json_array_add_value_object(vu_eve_table, entry); - } - json_object_add_value_array(root, "VU Event Identifier String Table Entry", vu_eve_table); - - memset((void *)ascii, 0, ascii_table_index); - for (j = 0; j < ascii_table_index; j++) - ascii += sprintf(ascii, "%c", ascii_table_info_arr[j]); - json_object_add_value_string(root, "ASCII Table", ascii_buf); + + if (log_data->sitsz != 0) { + + memcpy(stat_id_str_table_arr, + (__u8 *)log_data_buf + stat_id_str_table_ofst, + (log_data->sitsz * 4)); + struct json_object *stat_table = json_create_object(); + + for (j = 0; j < stat_id_index; j++) { + struct json_object *entry = json_create_object(); + + json_object_add_value_uint(entry, "Vendor Specific Statistic Identifier", + le16_to_cpu(stat_id_str_table_arr[j].vs_si)); + json_object_add_value_uint(entry, "Reserved", + le64_to_cpu(stat_id_str_table_arr[j].reserved1)); + json_object_add_value_uint(entry, "ASCII ID Length", + le64_to_cpu(stat_id_str_table_arr[j].ascii_id_len)); + json_object_add_value_uint(entry, "ASCII ID offset", + le64_to_cpu(stat_id_str_table_arr[j].ascii_id_ofst)); + json_object_add_value_uint(entry, "Reserved2", + le64_to_cpu(stat_id_str_table_arr[j].reserved2)); + sprintf(buf, "Statistics Identifier String Table %d", j); + json_object_add_value_object(stat_table, buf, entry); + } + + json_object_add_value_object(root, + "Statistics Identifier String Table", stat_table); + } + + if (log_data->estsz != 0) { + struct json_object *eve_table = json_create_object(); + + memcpy(event_id_str_table_arr, + (__u8 *)log_data_buf + event_str_table_ofst, + (log_data->estsz * 4)); + for (j = 0; j < eve_id_index; j++) { + struct json_object *entry = json_create_object(); + + json_object_add_value_int(entry, "Debug Event Class", + le16_to_cpu(event_id_str_table_arr[j].deb_eve_class)); + json_object_add_value_int(entry, "Event Identifier", + le16_to_cpu(event_id_str_table_arr[j].ei)); + json_object_add_value_int(entry, "ASCII ID Length", + le64_to_cpu(event_id_str_table_arr[j].ascii_id_len)); + json_object_add_value_int(entry, "ASCII ID offset", + le64_to_cpu(event_id_str_table_arr[j].ascii_id_ofst)); + json_object_add_value_int(entry, "Reserved", + le64_to_cpu(event_id_str_table_arr[j].reserved2)); + sprintf(buf, "Event Identifier String Table Entry %d", j); + json_object_add_value_object(eve_table, buf, entry); + } + json_object_add_value_object(root, + "Event Identifier String Table Entry", + eve_table); + } + + if (log_data->vu_eve_st_sz != 0) { + struct json_object *vu_eve_table = json_create_object(); + + memcpy(vu_event_id_str_table_arr, + (__u8 *)log_data_buf + vu_event_str_table_ofst, + (log_data->vu_eve_st_sz * 4)); + for (j = 0; j < vu_eve_index; j++) { + struct json_object *entry = json_create_object(); + + json_object_add_value_int(entry, "Debug Event Class", + le16_to_cpu(vu_event_id_str_table_arr[j].deb_eve_class)); + json_object_add_value_int(entry, "VU Event Identifier", + le16_to_cpu(vu_event_id_str_table_arr[j].vu_ei)); + json_object_add_value_int(entry, "ASCII ID Length", + le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_len)); + json_object_add_value_int(entry, "ASCII ID offset", + le64_to_cpu(vu_event_id_str_table_arr[j].ascii_id_ofst)); + json_object_add_value_int(entry, "Reserved", + le64_to_cpu(vu_event_id_str_table_arr[j].reserved)); + sprintf(buf, "VU Event Identifier String Table Entry %d", j); + json_object_add_value_object(vu_eve_table, buf, entry); + } + json_object_add_value_object(root, + "VU Event Identifier String Table Entry", + vu_eve_table); + } + + if (log_data->asctsz != 0) { + memcpy(ascii_table_info_arr, + (__u8 *)log_data_buf + ascii_table_ofst, + (log_data->asctsz * 4)); + memset((void *)ascii, 0, ascii_table_index); + for (j = 0; j < ascii_table_index; j++) + ascii += sprintf(ascii, "%c", ascii_table_info_arr[j]); + json_object_add_value_string(root, "ASCII Table", ascii_buf); + } json_print_object(root, NULL); printf("\n"); json_free_object(root); - json_free_object(stat_table); - json_free_object(eve_table); - json_free_object(vu_eve_table); return 0; } -static void ocp_print_c9_log_binary(__u8 *log_data_buf,int total_log_page_size) +static void ocp_print_c9_log_binary(__u8 *log_data_buf, int total_log_page_size) { return d_raw((unsigned char *)log_data_buf, total_log_page_size); } static int get_c9_log_page(struct nvme_dev *dev, char *format) { + int ret = 0; - __u8 *header_data; - struct telemetry_str_log_format *log_data; - enum nvme_print_flags fmt; - __u8 *full_log_buf_data = NULL; - __le64 stat_id_str_table_ofst = 0; - __le64 event_str_table_ofst = 0; - __le64 vu_event_str_table_ofst = 0; - __le64 ascii_table_ofst = 0; - __le64 total_log_page_sz = 0; + + nvme_print_flags_t fmt; ret = validate_output_format(format, &fmt); if (ret < 0) { @@ -3057,80 +3600,320 @@ static int get_c9_log_page(struct nvme_dev *dev, char *format) return ret; } - header_data = (__u8 *)malloc(sizeof(__u8) * C9_TELEMETRY_STR_LOG_LEN); - if (!header_data) { + get_c9_log_page_data(dev, 1, 0); + + if (!ret) { + switch (fmt) { + case NORMAL: + ocp_print_C9_log_normal(log_data, pC9_string_buffer); + break; + case JSON: + ocp_print_C9_log_json(log_data, pC9_string_buffer); + break; + case BINARY: + ocp_print_c9_log_binary(pC9_string_buffer, total_log_page_sz); + break; + default: + fprintf(stderr, "unhandled output format\n"); + break; + } + } else + fprintf(stderr, "ERROR : OCP : Unable to read C9 data from buffer\n"); + free(header_data); + return ret; +} + +static int ocp_telemetry_str_log_format(int argc, char **argv, struct command *cmd, + struct plugin *plugin) +{ + struct nvme_dev *dev; + int ret = 0; + const char *desc = "Retrieve telemetry string log format"; + + 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_c9_log_page(dev, cfg.output_format); + if (ret) + fprintf(stderr, "ERROR : OCP : Failure reading the C9 Log Page, ret = %d\n", ret); + + dev_close(dev); + + return ret; +} + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +/// TCG Configuration Log Page (LID : C7h) + +/* C7 TCG Configuration Log Page */ +#define C7_GUID_LENGTH 16 +#define C7_TCG_CONFIGURATION_LEN 512 +#define C7_TCG_CONFIGURATION_OPCODE 0xC7 +#define C7_TCG_CONFIGURATION_LOG_VERSION 0x1 + +static __u8 tcg_configuration_guid[C7_GUID_LENGTH] = { + 0x06, 0x40, 0x24, 0xBD, + 0x7E, 0xE0, 0xE6, 0x83, + 0xC0, 0x47, 0x54, 0xFA, + 0x9D, 0x2A, 0xE0, 0x54 +}; + +/* + * struct tcg_configuration_log - TCG Configuration Log Page Structure + * @state: state + * @rsvd1: Reserved1 + * @locking_sp_act_count: Locking SP Activation Count + * @type_rev_count: Tper Revert Count + * @locking_sp_rev_count: Locking SP Revert Count. + * @no_of_locking_obj: Number of Locking Objects + * @no_of_single_um_locking_obj: Number of Single User Mode Locking Objects + * @no_of_range_prov_locking_obj: Number of Range Provisioned Locking Objects + * @no_of_ns_prov_locking_obj: Number of Namespace Provisioned Locking Objects + * @no_of_read_lock_locking_obj: Number of Read Locked Locking Objects + * @no_of_write_lock_locking_obj: Number of Write Locked Locking Objects + * @no_of_read_unlock_locking_obj: Number of Read Unlocked Locking Objects + * @no_of_read_unlock_locking_obj: Number of Write Unlocked Locking Objects + * @rsvd2: Reserved2 + * @sid_auth_try_count: SID Authentication Try Count + * @sid_auth_try_limit: SID Authentication Try Limit + * @pro_tcg_rc: Programmatic TCG Reset Count + * @pro_rlc: Programmatic Reset Lock Count + * @tcg_ec: TCG Error Count + * @rsvd3: Reserved3 + * @log_page_version: Log Page Version + */ +struct __packed tcg_configuration_log { + __u8 state; + __u8 rsvd1[3]; + __u8 locking_sp_act_count; + __u8 type_rev_count; + __u8 locking_sp_rev_count; + __u8 no_of_locking_obj; + __u8 no_of_single_um_locking_obj; + __u8 no_of_range_prov_locking_obj; + __u8 no_of_ns_prov_locking_obj; + __u8 no_of_read_lock_locking_obj; + __u8 no_of_write_lock_locking_obj; + __u8 no_of_read_unlock_locking_obj; + __u8 no_of_write_unlock_locking_obj; + __u8 rsvd2; + __u32 sid_auth_try_count; + __u32 sid_auth_try_limit; + __u32 pro_tcg_rc; + __u32 pro_rlc; + __u32 tcg_ec; + __u8 rsvd3[458]; + __le16 log_page_version; + __u8 log_page_guid[C7_GUID_LENGTH]; + +}; + +/* Function declaration for TCG Configuration log page (LID:C7h) */ +static int ocp_tcg_configuration_log(int argc, char **argv, struct command *cmd, + struct plugin *plugin); + +static int ocp_print_C7_log_normal(struct nvme_dev *dev, + struct tcg_configuration_log *log_data) +{ + int j; + + printf("TCG Configuration C7 Log Page Data-\n"); + + printf(" State : 0x%x\n", log_data->state); + printf(" Reserved1 : 0x"); + for (j = 0; j < 3; j++) + printf("%d", log_data->rsvd1[j]); + printf("\n"); + printf(" Locking SP Activation Count : 0x%x\n", log_data->locking_sp_act_count); + printf(" Tper Revert Count : 0x%x\n", log_data->type_rev_count); + printf(" Locking SP Revert Count : 0x%x\n", log_data->locking_sp_rev_count); + printf(" Number of Locking Objects : 0x%x\n", log_data->no_of_locking_obj); + printf(" Number of Single User Mode Locking Objects : 0x%x\n", log_data->no_of_single_um_locking_obj); + printf(" Number of Range Provisioned Locking Objects : 0x%x\n", log_data->no_of_range_prov_locking_obj); + printf(" Number of Namespace Provisioned Locking Objects : 0x%x\n", log_data->no_of_ns_prov_locking_obj); + printf(" Number of Read Locked Locking Objects : 0x%x\n", log_data->no_of_read_lock_locking_obj); + printf(" Number of Write Locked Locking Objects : 0x%x\n", log_data->no_of_write_lock_locking_obj); + printf(" Number of Read Unlocked Locking Objects : 0x%x\n", log_data->no_of_read_unlock_locking_obj); + printf(" Number of Write Unlocked Locking Objects : 0x%x\n", log_data->no_of_write_unlock_locking_obj); + printf(" Reserved2 : 0x%x\n", log_data->rsvd2); + + printf(" SID Authentication Try Count : 0x%x\n", le32_to_cpu(log_data->sid_auth_try_count)); + printf(" SID Authentication Try Limit : 0x%x\n", le32_to_cpu(log_data->sid_auth_try_limit)); + printf(" Programmatic TCG Reset Count : 0x%x\n", le32_to_cpu(log_data->pro_tcg_rc)); + printf(" Programmatic Reset Lock Count : 0x%x\n", le32_to_cpu(log_data->pro_rlc)); + printf(" TCG Error Count : 0x%x\n", le32_to_cpu(log_data->tcg_ec)); + + printf(" Reserved3 : 0x"); + for (j = 0; j < 458; j++) + printf("%d", log_data->rsvd3[j]); + printf("\n"); + + printf(" Log Page Version : 0x%x\n", le16_to_cpu(log_data->log_page_version)); + printf(" Log page GUID : 0x"); + for (j = C7_GUID_LENGTH - 1; j >= 0; j--) + printf("%x", log_data->log_page_guid[j]); + printf("\n"); + + return 0; +} + +static void ocp_print_C7_log_json(struct tcg_configuration_log *log_data) +{ + int j; + struct json_object *root; + char guid_buf[C7_GUID_LENGTH]; + char *guid = guid_buf; + char res_arr[458]; + char *res = res_arr; + + root = json_create_object(); + + json_object_add_value_int(root, "State", le16_to_cpu(log_data->state)); + memset((__u8 *)res, 0, 3); + for (j = 0; j < 3; j++) + res += sprintf(res, "%d", log_data->rsvd1[j]); + json_object_add_value_string(root, "Reserved1", res_arr); + json_object_add_value_int(root, "Locking SP Activation Count", le16_to_cpu(log_data->locking_sp_act_count)); + json_object_add_value_int(root, "Tper Revert Count", le16_to_cpu(log_data->locking_sp_rev_count)); + json_object_add_value_int(root, "Number of Locking Objects", le16_to_cpu(log_data->no_of_locking_obj)); + json_object_add_value_int(root, "Number of Single User Mode Locking Objects", le16_to_cpu(log_data->no_of_single_um_locking_obj)); + json_object_add_value_int(root, "Number of Range Provisioned Locking Objects", le16_to_cpu(log_data->no_of_range_prov_locking_obj)); + json_object_add_value_int(root, "Number of Namespace Provisioned Locking Objects", le16_to_cpu(log_data->no_of_ns_prov_locking_obj)); + json_object_add_value_int(root, "Number of Read Locked Locking Objects", le16_to_cpu(log_data->no_of_read_lock_locking_obj)); + json_object_add_value_int(root, "Number of Write Locked Locking Objects", le16_to_cpu(log_data->no_of_write_lock_locking_obj)); + json_object_add_value_int(root, "Number of Read Unlocked Locking Objects", le16_to_cpu(log_data->no_of_read_unlock_locking_obj)); + json_object_add_value_int(root, "Number of Write Unlocked Locking Objects", le16_to_cpu(log_data->no_of_write_unlock_locking_obj)); + json_object_add_value_int(root, "Reserved2", le16_to_cpu(log_data->rsvd2)); + + json_object_add_value_int(root, "SID Authentication Try Count", le16_to_cpu(log_data->sid_auth_try_count)); + json_object_add_value_int(root, "SID Authentication Try Limit", le16_to_cpu(log_data->sid_auth_try_limit)); + json_object_add_value_int(root, "Programmatic TCG Reset Count", le16_to_cpu(log_data->pro_tcg_rc)); + json_object_add_value_int(root, "Programmatic Reset Lock Count", le16_to_cpu(log_data->pro_rlc)); + json_object_add_value_int(root, "TCG Error Count", le16_to_cpu(log_data->tcg_ec)); + + memset((__u8 *)res, 0, 458); + for (j = 0; j < 458; j++) + res += sprintf(res, "%d", log_data->rsvd3[j]); + json_object_add_value_string(root, "Reserved3", res_arr); + + json_object_add_value_int(root, "Log Page Version", le16_to_cpu(log_data->log_page_version)); + + memset((void *)guid, 0, C7_GUID_LENGTH); + for (j = C7_GUID_LENGTH - 1; j >= 0; j--) + guid += sprintf(guid, "%02x", log_data->log_page_guid[j]); + json_object_add_value_string(root, "Log page GUID", guid_buf); + + json_print_object(root, NULL); + printf("\n"); + + json_free_object(root); +} + +static void ocp_print_c7_log_binary(struct tcg_configuration_log *log_data) +{ + return d_raw((unsigned char *)log_data, sizeof(*log_data)); +} + +static int get_c7_log_page(struct nvme_dev *dev, char *format) +{ + nvme_print_flags_t fmt; + int ret; + __u8 *data; + int i; + struct tcg_configuration_log *log_data; + int j; + + ret = validate_output_format(format, &fmt); + if (ret < 0) { + fprintf(stderr, "ERROR : OCP : invalid output format\n"); + return ret; + } + + data = (__u8 *)malloc(sizeof(__u8) * C7_TCG_CONFIGURATION_LEN); + if (!data) { fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno)); return -1; } - memset(header_data, 0, sizeof(__u8) * C9_TELEMETRY_STR_LOG_LEN); - - ret = nvme_get_log_simple(dev_fd(dev), C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE, - C9_TELEMETRY_STR_LOG_LEN, header_data); + memset(data, 0, sizeof(__u8) * C7_TCG_CONFIGURATION_LEN); + ret = nvme_get_log_simple(dev_fd(dev), C7_TCG_CONFIGURATION_OPCODE, + C7_TCG_CONFIGURATION_LEN, data); if (!ret) { - log_data = (struct telemetry_str_log_format *)header_data; - printf("Statistics Identifier String Table Size = %lld\n",log_data->sitsz); - printf("Event String Table Size = %lld\n",log_data->estsz); - printf("VU Event String Table Size = %lld\n",log_data->vu_eve_st_sz); - printf("ASCII Table Size = %lld\n",log_data->asctsz); + log_data = (struct tcg_configuration_log *)data; - //Calculating the offset for dynamic fields. - stat_id_str_table_ofst = C9_TELEMETRY_STR_LOG_SIST_OFST + (log_data->sitsz * 4); - event_str_table_ofst = stat_id_str_table_ofst + (log_data->estsz * 4); - vu_event_str_table_ofst = event_str_table_ofst + (log_data->vu_eve_st_sz * 4); - ascii_table_ofst = vu_event_str_table_ofst + (log_data->asctsz * 4); - total_log_page_sz = stat_id_str_table_ofst + event_str_table_ofst + vu_event_str_table_ofst + ascii_table_ofst; - - printf("stat_id_str_table_ofst = %lld\n",stat_id_str_table_ofst); - printf("event_str_table_ofst = %lld\n",event_str_table_ofst); - printf("vu_event_str_table_ofst = %lld\n",vu_event_str_table_ofst); - printf("ascii_table_ofst = %lld\n",ascii_table_ofst); - printf("total_log_page_sz = %lld\n",total_log_page_sz); - - full_log_buf_data = (__u8 *)malloc(sizeof(__u8) * total_log_page_sz); - if (!full_log_buf_data) { - fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno)); - return -1; + /* check log page version */ + if (log_data->log_page_version != C7_TCG_CONFIGURATION_LOG_VERSION) { + fprintf(stderr, "ERROR : OCP : invalid TCG Configuration Log Page version\n"); + ret = -1; + goto out; } - memset(full_log_buf_data, 0, sizeof(__u8) * total_log_page_sz); - ret = nvme_get_log_simple(dev_fd(dev), C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE, - total_log_page_sz, full_log_buf_data); + /* + * check log page guid + * Verify GUID matches + */ + for (i = 0; i < 16; i++) { + if (tcg_configuration_guid[i] != log_data->log_page_guid[i]) { + fprintf(stderr, "ERROR : OCP : Unknown GUID in C7 Log Page data\n"); + fprintf(stderr, "ERROR : OCP : Expected GUID: 0x"); + for (j = 0; j < 16; j++) + fprintf(stderr, "%x", tcg_configuration_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"); - if (!ret) { - switch (fmt) { - case NORMAL: - ocp_print_C9_log_normal(log_data,full_log_buf_data); - break; - case JSON: - ocp_print_C9_log_json(log_data,full_log_buf_data); - break; - case BINARY: - ocp_print_c9_log_binary(full_log_buf_data,total_log_page_sz); - break; - default: - fprintf(stderr, "unhandled output format\n"); - break; + ret = -1; + goto out; } - } else{ - fprintf(stderr, "ERROR : OCP : Unable to read C9 data from buffer\n"); + } + + switch (fmt) { + case NORMAL: + ocp_print_C7_log_normal(dev, log_data); + break; + case JSON: + ocp_print_C7_log_json(log_data); + break; + case BINARY: + ocp_print_c7_log_binary(log_data); + break; + default: + break; } } else { - fprintf(stderr, "ERROR : OCP : Unable to read C9 data from buffer\n"); + fprintf(stderr, "ERROR : OCP : Unable to read C7 data from buffer\n"); } - free(header_data); - free(full_log_buf_data); - +out: + free(data); return ret; } -static int ocp_telemetry_str_log_format(int argc, char **argv, struct command *cmd, - struct plugin *plugin) + +static int ocp_tcg_configuration_log(int argc, char **argv, struct command *cmd, + struct plugin *plugin) { + const char *desc = "Retrieve TCG Configuration Log Page Data"; struct nvme_dev *dev; int ret = 0; - const char *desc = "Retrieve telemetry string log format"; struct config { char *output_format; @@ -3149,12 +3932,11 @@ static int ocp_telemetry_str_log_format(int argc, char **argv, struct command *c if (ret) return ret; - ret = get_c9_log_page(dev, cfg.output_format); + ret = get_c7_log_page(dev, cfg.output_format); if (ret) - fprintf(stderr, "ERROR : OCP : Failure reading the C9 Log Page, ret = %d\n", ret); + fprintf(stderr, "ERROR : OCP : Failure reading the C7 Log Page, ret = %d\n", ret); dev_close(dev); - return ret; } @@ -3187,3 +3969,177 @@ static int fw_activation_history_log(int argc, char **argv, struct command *cmd, { return ocp_fw_activation_history_log(argc, argv, cmd, plugin); } + +static int error_injection_get(struct nvme_dev *dev, const __u8 sel, bool uuid) +{ + struct erri_get_cq_entry cq_entry; + int err; + int i; + const __u8 fid = 0xc0; + + _cleanup_free_ struct erri_entry *entry = NULL; + + struct nvme_get_features_args args = { + .result = (__u32 *)&cq_entry, + .data = entry, + .args_size = sizeof(args), + .fd = dev_fd(dev), + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .sel = sel, + .data_len = sizeof(*entry) * ERRI_ENTRIES_MAX, + .fid = fid, + }; + + if (uuid) { + /* OCP 2.0 requires UUID index support */ + err = ocp_get_uuid_index(dev, &args.uuidx); + if (err || !args.uuidx) { + nvme_show_error("ERROR: No OCP UUID index found"); + return err; + } + } + + entry = nvme_alloc(args.data_len); + if (!entry) { + nvme_show_error("malloc: %s", strerror(errno)); + return -errno; + } + + err = nvme_cli_get_features(dev, &args); + if (!err) { + nvme_show_result("Number of Error Injecttions (feature: %#0*x): %#0*x (%s: %d)", + fid ? 4 : 2, fid, cq_entry.nume ? 10 : 8, cq_entry.nume, + nvme_select_to_string(sel), cq_entry.nume); + if (sel == NVME_GET_FEATURES_SEL_SUPPORTED) + nvme_show_select_result(fid, *args.result); + for (i = 0; i < cq_entry.nume; i++) { + printf("Entry: %d, Flags: %x (%s%s), Type: %x (%s), NRTDP: %d\n", i, + entry->flags, entry->enable ? "Enabled" : "Disabled", + entry->single ? ", Single instance" : "", entry->type, + erri_type_to_string(entry->type), entry->nrtdp); + } + } else { + nvme_show_error("Could not get feature: %#0*x.", fid ? 4 : 2, fid); + } + + return err; +} + +static int get_error_injection(int argc, char **argv, struct command *cmd, struct plugin *plugin) +{ + const char *desc = "Return set of error injection"; + int err; + struct config { + __u8 sel; + }; + struct config cfg = { 0 }; + + _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; + + OPT_ARGS(opts) = { + OPT_BYTE("sel", 's', &cfg.sel, sel), + OPT_FLAG("no-uuid", 'n', NULL, no_uuid), + OPT_END() + }; + + err = parse_and_open(&dev, argc, argv, desc, opts); + if (err) + return err; + + return error_injection_get(dev, cfg.sel, !argconfig_parse_seen(opts, "no-uuid")); +} + +static int error_injection_set(struct nvme_dev *dev, struct erri_config *cfg, bool uuid) +{ + int err; + __u32 result; + struct nvme_set_features_args args = { + .args_size = sizeof(args), + .fd = dev_fd(dev), + .fid = 0xc0, + .cdw11 = cfg->number, + .data_len = cfg->number * sizeof(struct erri_entry), + .timeout = nvme_cfg.timeout, + .result = &result, + }; + + _cleanup_fd_ int ffd = -1; + + _cleanup_free_ struct erri_entry *entry = NULL; + + if (uuid) { + /* OCP 2.0 requires UUID index support */ + err = ocp_get_uuid_index(dev, &args.uuidx); + if (err || !args.uuidx) { + nvme_show_error("ERROR: No OCP UUID index found"); + return err; + } + } + + entry = nvme_alloc(args.data_len); + if (!entry) { + nvme_show_error("malloc: %s", strerror(errno)); + return -errno; + } + + if (cfg->file && strlen(cfg->file)) { + ffd = open(cfg->file, O_RDONLY); + if (ffd < 0) { + nvme_show_error("Failed to open file %s: %s", cfg->file, strerror(errno)); + return -EINVAL; + } + err = read(ffd, entry, args.data_len); + if (err < 0) { + nvme_show_error("failed to read data buffer from input file: %s", + strerror(errno)); + return -errno; + } + } else { + entry->enable = 1; + entry->single = 1; + entry->type = cfg->type; + entry->nrtdp = cfg->nrtdp; + } + + args.data = entry; + + err = nvme_set_features(&args); + if (err) { + if (err < 0) + nvme_show_error("set-error-injection: %s", nvme_strerror(errno)); + else if (err > 0) + nvme_show_status(err); + return err; + } + + printf("set-error-injection, data: %s, number: %d, uuid: %d, type: %d, nrtdp: %d\n", + cfg->file, cfg->number, args.uuidx, cfg->type, cfg->nrtdp); + if (args.data) + d(args.data, args.data_len, 16, 1); + + return 0; +} + +static int set_error_injection(int argc, char **argv, struct command *cmd, struct plugin *plugin) +{ + const char *desc = "Inject error conditions"; + int err; + struct erri_config cfg = { + .number = 1, + }; + + _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; + + NVME_ARGS(opts, + OPT_FILE("data", 'd', &cfg.file, data), + OPT_BYTE("number", 'n', &cfg.number, number), + OPT_FLAG("no-uuid", 'N', NULL, no_uuid), + OPT_SHRT("type", 't', &cfg.type, type), + OPT_SHRT("nrtdp", 'r', &cfg.nrtdp, nrtdp)); + + err = parse_and_open(&dev, argc, argv, desc, opts); + if (err) + return err; + + return error_injection_set(dev, &cfg, !argconfig_parse_seen(opts, "no-uuid")); +} diff --git a/plugins/ocp/ocp-nvme.h b/plugins/ocp/ocp-nvme.h index 0317ea7..16d929d 100644 --- a/plugins/ocp/ocp-nvme.h +++ b/plugins/ocp/ocp-nvme.h @@ -11,9 +11,10 @@ #if !defined(OCP_NVME) || defined(CMD_HEADER_MULTI_READ) #define OCP_NVME +#define OCP_PLUGIN_VERSION "2.9.0" #include "cmd.h" -PLUGIN(NAME("ocp", "OCP cloud SSD extensions", NVME_VERSION), +PLUGIN(NAME("ocp", "OCP cloud SSD extensions", OCP_PLUGIN_VERSION), COMMAND_LIST( ENTRY("smart-add-log", "Retrieve extended SMART Information", smart_add_log) ENTRY("latency-monitor-log", "Get Latency Monitor Log Page", ocp_latency_monitor_log) @@ -26,13 +27,17 @@ PLUGIN(NAME("ocp", "OCP cloud SSD extensions", NVME_VERSION), ENTRY("unsupported-reqs-log", "Get Unsupported Requirements Log Page", ocp_unsupported_requirements_log) ENTRY("error-recovery-log", "Retrieve Error Recovery Log Page", ocp_error_recovery_log) ENTRY("device-capability-log", "Get Device capabilities Requirements Log Page", ocp_device_capabilities_log) - ENTRY("set-dssd-power-state-feature", "Get Device capabilities Requirements Log Page", set_dssd_power_state_feature) + ENTRY("set-dssd-power-state-feature", "Set DSSD Power State feature", set_dssd_power_state_feature) + ENTRY("get-dssd-power-state-feature", "Get DSSD Power State feature", get_dssd_power_state_feature) ENTRY("set-plp-health-check-interval", "Set PLP Health Check Interval", set_plp_health_check_interval) ENTRY("get-plp-health-check-interval", "Get PLP Health Check Interval", get_plp_health_check_interval) ENTRY("telemetry-string-log", "Retrieve Telemetry string Log Page", ocp_telemetry_str_log_format) ENTRY("set-telemetry-profile", "Set Telemetry Profile Feature", ocp_set_telemetry_profile_feature) ENTRY("set-dssd-async-event-config", "Set DSSD Async Event Config", set_dssd_async_event_config) ENTRY("get-dssd-async-event-config", "Get DSSD Async Event Config", get_dssd_async_event_config) + ENTRY("tcg-configuration-log", "Retrieve TCG Configuration Log Page", ocp_tcg_configuration_log) + ENTRY("get-error-injection", "Return set of error injection", get_error_injection) + ENTRY("set-error-injection", "Inject error conditions", set_error_injection) ) ); diff --git a/plugins/ocp/ocp-smart-extended-log.c b/plugins/ocp/ocp-smart-extended-log.c index 0d8ba81..6a524d3 100644 --- a/plugins/ocp/ocp-smart-extended-log.c +++ b/plugins/ocp/ocp-smart-extended-log.c @@ -252,7 +252,7 @@ static void ocp_print_C0_log_json(void *data) static int get_c0_log_page(int fd, char *format) { - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u8 *data; int i; int ret; diff --git a/plugins/ocp/ocp-telemetry-decode.c b/plugins/ocp/ocp-telemetry-decode.c new file mode 100644 index 0000000..11963be --- /dev/null +++ b/plugins/ocp/ocp-telemetry-decode.c @@ -0,0 +1,1566 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Copyright (c) 2024 Western Digital Corporation or its affiliates. + * + * Authors: Jeff Lien <jeff.lien@wdc.com>, + */ + +#include "common.h" +#include "nvme.h" +#include "libnvme.h" +#include "plugin.h" +#include "linux/types.h" +#include "util/types.h" +#include "nvme-print.h" + +#include "ocp-telemetry-decode.h" + + +void print_vu_event_data(__u32 size, __u8 *data) +{ + int j; + __u16 vu_event_id = *(__u16 *)data; + + printf(" VU Event ID : 0x%02x\n", le16_to_cpu(vu_event_id)); + printf(" VU Data : 0x"); + for (j = 2; j < size; j++) + printf("%x", data[j]); + printf("\n\n"); +} + +void print_stats_desc(struct telemetry_stats_desc *stat_desc) +{ + int j; + /* Get the statistics Identifier string name and data size */ + __u16 stat_id = stat_desc->id; + __u32 stat_data_sz = ((stat_desc->size) * 4); + + printf("Statistics Identifier : 0x%x, %s\n", + stat_id, telemetry_stat_id_to_string(stat_id)); + printf("Statistics info : 0x%x\n", stat_desc->info); + printf("NS info : 0x%x\n", stat_desc->ns_info); + printf("Statistic Data Size : 0x%x\n", le16_to_cpu(stat_data_sz)); + + if (stat_data_sz > 0) { + printf("%s : 0x", + telemetry_stat_id_to_string(stat_id)); + for (j = 0; j < stat_data_sz; j++) + printf("%02x", stat_desc->data[j]); + printf("\n"); + } + printf("\n"); +} + +void print_telemetry_fifo_event(__u8 class_type, + __u16 id, __u8 size_dw, __u8 *data) +{ + int j; + const char *class_str = NULL; + __u32 size = size_dw * 4; + char time_str[40]; + uint64_t timestamp = 0; + + memset((void *)time_str, '\0', 40); + + if (class_type) { + class_str = telemetry_event_class_to_string(class_type); + printf("Event Class : %s\n", class_str); + } + + switch (class_type) { + case TELEMETRY_TIMESTAMP_CLASS: + timestamp = (0x0000FFFFFFFFFFFF & le64_to_cpu(*(uint64_t *)data)); + + memset((void *)time_str, 0, 9); + sprintf((char *)time_str, "%04d:%02d:%02d", (int)(le64_to_cpu(timestamp)/3600), + (int)((le64_to_cpu(timestamp%3600)/60)), + (int)(le64_to_cpu(timestamp%60))); + + printf(" Event ID : 0x%02x %s\n", id, telemetry_ts_event_to_string(id)); + printf(" Timestamp : %s\n", time_str); + printf(" Size : %d\n", size); + if (size > 8) { + printf(" VU Data : 0x"); + for (j = 8; j < size; j++) + printf("%02x", data[j]); + printf("\n\n"); + } + break; + + case TELEMETRY_PCIE_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_pcie_event_id_to_string(id)); + printf(" State : 0x%02x %s\n", + data[0], telemetry_pcie_state_data_to_string(data[0])); + printf(" Speed : 0x%02x %s\n", + data[1], telemetry_pcie_speed_data_to_string(data[1])); + printf(" Width : 0x%02x %s\n", + data[2], telemetry_pcie_width_data_to_string(data[2])); + if (size > 4) { + printf(" VU Data : "); + for (j = 4; j < size; j++) + printf("%x", data[j]); + printf("\n\n"); + } + break; + + case TELEMETRY_NVME_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_nvme_event_id_to_string(id)); + if ((id == ADMIN_QUEUE_NONZERO_STATUS) || + (id == IO_QUEUE_NONZERO_STATUS)) { + printf(" Cmd Op Code : 0x%02x\n", data[0]); + __u16 status = *(__u16 *)&data[1]; + __u16 cmd_id = *(__u16 *)&data[3]; + __u16 sq_id = *(__u16 *)&data[5]; + + printf(" Status Code : 0x%04x\n", le16_to_cpu(status)); + printf(" Cmd ID : 0x%04x\n", le16_to_cpu(cmd_id)); + printf(" SQ ID : 0x%04x\n", le16_to_cpu(sq_id)); + } else if (id == CC_REGISTER_CHANGED) { + __u32 cc_reg_data = *(__u32 *)data; + + printf(" CC Reg Data : 0x%08x\n", + le32_to_cpu(cc_reg_data)); + } else if (id == CSTS_REGISTER_CHANGED) { + __u32 csts_reg_data = *(__u32 *)data; + + printf(" CSTS Reg Data : 0x%08x\n", + le32_to_cpu(csts_reg_data)); + } + if (size > 8) + print_vu_event_data(size, (__u8 *)&data[8]); + break; + + case TELEMETRY_RESET_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_reset_event_id_to_string(id)); + if (size) + print_vu_event_data(size, data); + break; + + case TELEMETRY_BOOT_SEQ_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_boot_seq_event_id_to_string(id)); + if (size) + print_vu_event_data(size, data); + break; + + case TELEMETRY_FW_ASSERT_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_fw_assert_event_id_to_string(id)); + if (size) + print_vu_event_data(size, data); + break; + + case TELEMETRY_TEMPERATURE_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_temperature_event_id_to_string(id)); + if (size) + print_vu_event_data(size, data); + break; + + case TELEMETRY_MEDIA_DBG_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_media_debug_event_id_to_string(id)); + if (size) + print_vu_event_data(size, data); + break; + + case TELEMETRY_MEDIA_WEAR_CLASS: + printf(" Event ID : 0x%02x %s\n", + id, telemetry_media_debug_event_id_to_string(id)); + __u32 host_tb_written = *(__u32 *)&data[0]; + __u32 media_tb_written = *(__u32 *)&data[4]; + __u32 media_tb_erased = *(__u32 *)&data[8]; + + printf(" Host TB Written : 0x%04x\n", + le16_to_cpu(host_tb_written)); + printf(" Media TB Written : 0x%04x\n", + le16_to_cpu(media_tb_written)); + printf(" Media TB Erased : 0x%04x\n", + le16_to_cpu(media_tb_erased)); + + if (size > 12) + print_vu_event_data(size, (__u8 *)&data[12]); + break; + + case TELEMETRY_STAT_SNAPSHOT_CLASS: + printf(" Statistic ID : 0x%02x %s\n", + id, telemetry_stat_id_to_string(id)); + print_stats_desc((struct telemetry_stats_desc *)data); + break; + + default: + /* + * printf("Unknown Event Class Type\n"); + * printf("Data : 0x"); + * for (j = 0; j < size; j++) + * printf("%x", data[j]); + * printf("\n\n"); + */ + break; + } +} + +struct statistic_entry statistic_identifiers_map[] = { + { 0x00, "Error, this entry does not exist." }, + { 0x01, "Outstanding Admin Commands" }, + { 0x02, "Host Write Bandwidth"}, + { 0x03, "GC Write Bandwidth"}, + { 0x04, "Active Namespaces"}, + { 0x05, "Internal Write Workload"}, + { 0x06, "Internal Read Workload"}, + { 0x07, "Internal Write Queue Depth"}, + { 0x08, "Internal Read Queue Depth"}, + { 0x09, "Pending Trim LBA Count"}, + { 0x0A, "Host Trim LBA Request Count"}, + { 0x0B, "Current NVMe Power State"}, + { 0x0C, "Current DSSD Power State"}, + { 0x0D, "Program Fail Count"}, + { 0x0E, "Erase Fail Count"}, + { 0x0F, "Read Disturb Writes"}, + { 0x10, "Retention Writes"}, + { 0x11, "Wear Leveling Writes"}, + { 0x12, "Read Recovery Writes"}, + { 0x13, "GC Writes"}, + { 0x14, "SRAM Correctable Count"}, + { 0x15, "DRAM Correctable Count"}, + { 0x16, "SRAM Uncorrectable Count"}, + { 0x17, "DRAM Uncorrectable Count"}, + { 0x18, "Data Integrity Error Count"}, + { 0x19, "Read Retry Error Count"}, + { 0x1A, "PERST Events Count"}, + { 0x1B, "Max Die Bad Block"}, + { 0x1C, "Max NAND Channel Bad Block"}, + { 0x1D, "Minimum NAND Channel Bad Block"} +}; + +struct request_data host_log_page_header[] = { + { "LogIdentifier", 1 }, + { "Reserved1", 4 }, + { "IEEE OUI Identifier", 3 }, + { "Telemetry Host-Initiated Data Area 1 Last Block", 2 }, + { "Telemetry Host-Initiated Data Area 2 Last Block", 2 }, + { "Telemetry Host-Initiated Data Area 3 Last Block", 2 }, + { "Reserved2", 2 }, + { "Telemetry Host-Initiated Data Area 4 Last Block", 4 }, + { "Reserved3", 360 }, + { "Telemetry Host-Initiated Scope", 1 }, + { "Telemetry Host Initiated Generation Number", 1 }, + { "Telemetry Host-Initiated Data Available", 1 }, + { "Telemetry Controller-Initiated Data Generation Number", 1 } +}; + +struct request_data controller_log_page_header[] = { + { "LogIdentifier", 1 }, + { "Reserved1", 4 }, + { "IEEE OUI Identifier", 3 }, + { "Telemetry Host-Initiated Data Area 1 Last Block", 2 }, + { "Telemetry Host-Initiated Data Area 2 Last Block", 2 }, + { "Telemetry Host-Initiated Data Area 3 Last Block", 2 }, + { "Reserved2", 2 }, + { "Telemetry Host-Initiated Data Area 4 Last Block", 4 }, + { "Reserved3", 361 }, + { "Telemetry Controller-Initiated Scope", 1 }, + { "Telemetry Controller-Initiated Data Available", 1 }, + { "Telemetry Controller-Initiated Data Generation Number", 1 } +}; + +struct request_data reason_identifier[] = { + { "Error ID", 64 }, + { "File ID", 8 }, + { "Line Number", 2 }, + { "Valid Flags", 1 }, + { "Reserved", 21 }, + { "VU Reason Extension", 32 } +}; + +struct request_data ocp_header_in_da1[] = { + { "Major Version", 2 }, + { "Minor Version", 2 }, + { "Reserved1", 4 }, + { "Timestamp", 8 }, + { "Log page GUID", 16 }, + { "Number Telemetry Profiles Supported", 1 }, + { "Telemetry Profile Selected", 1 }, + { "Reserved2", 6 }, + { "Telemetry String Log Size", 8 }, + { "Reserved3", 8 }, + { "Firmware Revision", 8 }, + { "Reserved4", 32 }, + { "Data Area 1 Statistic Start", 8 }, + { "Data Area 1 Statistic Size", 8 }, + { "Data Area 2 Statistic Start", 8 }, + { "Data Area 2 Statistic Size", 8 }, + { "Reserved5", 32 }, + { "Event FIFO 1 Data Area", 1 }, + { "Event FIFO 2 Data Area", 1 }, + { "Event FIFO 3 Data Area", 1 }, + { "Event FIFO 4 Data Area", 1 }, + { "Event FIFO 5 Data Area", 1 }, + { "Event FIFO 6 Data Area", 1 }, + { "Event FIFO 7 Data Area", 1 }, + { "Event FIFO 8 Data Area", 1 }, + { "Event FIFO 9 Data Area", 1 }, + { "Event FIFO 10 Data Area", 1 }, + { "Event FIFO 11 Data Area", 1 }, + { "Event FIFO 12 Data Area", 1 }, + { "Event FIFO 13 Data Area", 1 }, + { "Event FIFO 14 Data Area", 1 }, + { "Event FIFO 15 Data Area", 1 }, + { "Event FIFO 16 Data Area", 1 }, + { "Event FIFO 1 Start", 8 }, + { "Event FIFO 1 Size", 8 }, + { "Event FIFO 2 Start", 8 }, + { "Event FIFO 2 Size", 8 }, + { "Event FIFO 3 Start", 8 }, + { "Event FIFO 3 Size", 8 }, + { "Event FIFO 4 Start", 8 }, + { "Event FIFO 4 Size", 8 }, + { "Event FIFO 5 Start", 8 }, + { "Event FIFO 5 Size", 8 }, + { "Event FIFO 6 Start", 8 }, + { "Event FIFO 6 Size", 8 }, + { "Event FIFO 7 Start", 8 }, + { "Event FIFO 7 Size", 8 }, + { "Event FIFO 8 Start", 8 }, + { "Event FIFO 8 Size", 8 }, + { "Event FIFO 9 Start", 8 }, + { "Event FIFO 9 Size", 8 }, + { "Event FIFO 10 Start", 8 }, + { "Event FIFO 10 Size", 8 }, + { "Event FIFO 11 Start", 8 }, + { "Event FIFO 11 Size", 8 }, + { "Event FIFO 12 Start", 8 }, + { "Event FIFO 12 Size", 8 }, + { "Event FIFO 13 Start", 8 }, + { "Event FIFO 13 Size", 8 }, + { "Event FIFO 14 Start", 8 }, + { "Event FIFO 14 Size", 8 }, + { "Event FIFO 15 Start", 8 }, + { "Event FIFO 15 Size", 8 }, + { "Event FIFO 16 Start", 8 }, + { "Event FIFO 16 Size", 8 }, + { "Reserved6", 80 } +}; + +struct request_data smart[] = { + { "Critical Warning", 1 }, + { "Composite Temperature", 2 }, + { "Available Spare", 1 }, + { "Available Spare Threshold", 1 }, + { "Percentage Used", 1 }, + { "Reserved1", 26 }, + { "Data Units Read", 16 }, + { "Data Units Written", 16 }, + { "Host Read Commands", 16 }, + { "Host Write Commands", 16 }, + { "Controller Busy Time", 16 }, + { "Power Cycles", 16 }, + { "Power On Hours", 16 }, + { "Unsafe Shutdowns", 16 }, + { "Media and Data Integrity Errors", 16 }, + { "Number of Error Information Log Entries", 16 }, + { "Warning Composite Temperature Time", 4 }, + { "Critical Composite Temperature Time", 4 }, + { "Temperature Sensor 1", 2 }, + { "Temperature Sensor 2", 2 }, + { "Temperature Sensor 3", 2 }, + { "Temperature Sensor 4", 2 }, + { "Temperature Sensor 5", 2 }, + { "Temperature Sensor 6", 2 }, + { "Temperature Sensor 7", 2 }, + { "Temperature Sensor 8", 2 }, + { "Thermal Management Temperature 1 Transition Count", 4 }, + { "Thermal Management Temperature 2 Transition Count", 4 }, + { "Total Time for Thermal Management Temperature 1", 4 }, + { "Total Time for Thermal Management Temperature 2", 4 }, + { "Reserved2", 280 } +}; + +struct request_data smart_extended[] = { + { "Physical Media Units Written", 16 }, + { "Physical Media Units Read", 16 }, + { "Bad User NAND Blocks Raw Count", 6 }, + { "Bad User NAND Blocks Normalized Value", 2 }, + { "Bad System NAND Blocks Raw Count", 6 }, + { "Bad System NAND Blocks Normalized Value", 2 }, + { "XOR Recovery Count", 8 }, + { "Uncorrectable Read Error Count", 8 }, + { "Soft ECC Error Count", 8 }, + { "End to End Correction Counts Detected Errors", 4 }, + { "End to End Correction Counts Corrected Errors", 4 }, + { "System Data Percent Used", 1 }, + { "Refresh Counts", 7 }, + { "Maximum User Data Erase Count", 4 }, + { "Minimum User Data Erase Count", 4 }, + { "Number of thermal throttling events", 1 }, + { "Current Throttling Status", 1 }, + { "Errata Version Field", 1 }, + { "Point Version Field", 2 }, + { "Minor Version Field", 2 }, + { "Major Version Field", 1 }, + { "PCIe Correctable Error Count", 8 }, + { "Incomplete Shutdowns", 4 }, + { "Reserved1", 4 }, + { "Percent Free Blocks", 1 }, + { "Reserved2", 7 }, + { "Capacitor Health", 2 }, + { "NVMe Base Errata Version", 1 }, + { "NVMe Command Set Errata Version", 1 }, + { "Reserved3", 4 }, + { "Unaligned IO", 8 }, + { "Security Version Number", 8 }, + { "Total NUSE", 8 }, + { "PLP Start Count", 16 }, + { "Endurance Estimate", 16 }, + { "PCIe Link Retraining Count", 8 }, + { "Power State Change Count", 8 }, + { "Lowest Permitted Firmware Revision", 8 }, + { "Reserved4", 278 }, + { "Log Page Version", 2 }, + { "Log page GUID", 16 } +}; + +void json_add_formatted_u32_str(struct json_object *pobject, const char *msg, unsigned int pdata) +{ + char data_str[70] = { 0 }; + + sprintf(data_str, "0x%x", pdata); + json_object_add_value_string(pobject, msg, data_str); +} + +void json_add_formatted_var_size_str(struct json_object *pobject, const char *msg, __u8 *pdata, + unsigned int data_size) +{ + char description_str[256] = ""; + char temp_buffer[3] = { 0 }; + + for (size_t i = 0; i < data_size; ++i) { + sprintf(temp_buffer, "%02X", pdata[i]); + strcat(description_str, temp_buffer); + } + + json_object_add_value_string(pobject, msg, description_str); +} + +int get_telemetry_das_offset_and_size( + struct nvme_ocp_telemetry_common_header *ptelemetry_common_header, + struct nvme_ocp_telemetry_offsets *ptelemetry_das_offset) +{ + if (NULL == ptelemetry_common_header || NULL == ptelemetry_das_offset) { + nvme_show_error("Invalid input arguments."); + return -1; + } + + if (ptelemetry_common_header->log_id == NVME_LOG_LID_TELEMETRY_HOST) + ptelemetry_das_offset->header_size = + sizeof(struct nvme_ocp_telemetry_host_initiated_header); + else if (ptelemetry_common_header->log_id == NVME_LOG_LID_TELEMETRY_CTRL) + ptelemetry_das_offset->header_size = + sizeof(struct nvme_ocp_telemetry_controller_initiated_header); + else + return -1; + + ptelemetry_das_offset->da1_start_offset = ptelemetry_das_offset->header_size; + ptelemetry_das_offset->da1_size = ptelemetry_common_header->da1_last_block * + OCP_TELEMETRY_DATA_BLOCK_SIZE; + + ptelemetry_das_offset->da2_start_offset = ptelemetry_das_offset->da1_start_offset + + ptelemetry_das_offset->da1_size; + ptelemetry_das_offset->da2_size = + (ptelemetry_common_header->da2_last_block - + ptelemetry_common_header->da1_last_block) * OCP_TELEMETRY_DATA_BLOCK_SIZE; + + ptelemetry_das_offset->da3_start_offset = ptelemetry_das_offset->da2_start_offset + + ptelemetry_das_offset->da2_size; + ptelemetry_das_offset->da3_size = + (ptelemetry_common_header->da3_last_block - + ptelemetry_common_header->da2_last_block) * OCP_TELEMETRY_DATA_BLOCK_SIZE; + + ptelemetry_das_offset->da4_start_offset = ptelemetry_das_offset->da3_start_offset + + ptelemetry_das_offset->da3_size; + ptelemetry_das_offset->da4_size = + (ptelemetry_common_header->da4_last_block - + ptelemetry_common_header->da3_last_block) * OCP_TELEMETRY_DATA_BLOCK_SIZE; + + return 0; +} + +int get_static_id_ascii_string(int identifier, char *description) +{ + if (pstring_buffer == NULL) + return -1; + + struct nvme_ocp_telemetry_string_header *pocp_ts_header = + (struct nvme_ocp_telemetry_string_header *)pstring_buffer; + + //Calculating the sizes of the tables. Note: Data is present in the form of DWORDS, + //So multiplying with sizeof(DWORD) + unsigned long long sits_table_size = (pocp_ts_header->sitsz) * SIZE_OF_DWORD; + + //Calculating number of entries present in all 3 tables + int sits_entries = (int)sits_table_size / + sizeof(struct nvme_ocp_statistics_identifier_string_table); + + for (int sits_entry = 0; sits_entry < sits_entries; sits_entry++) { + struct nvme_ocp_statistics_identifier_string_table + *peach_statistic_entry = + (struct nvme_ocp_statistics_identifier_string_table *) + (pstring_buffer + (pocp_ts_header->sits * SIZE_OF_DWORD) + + (sits_entry * + sizeof(struct nvme_ocp_statistics_identifier_string_table))); + + if (identifier == (int)peach_statistic_entry->vs_statistic_identifier) { + char *pdescription = (char *)(pstring_buffer + + (pocp_ts_header->ascts * SIZE_OF_DWORD) + + (peach_statistic_entry->ascii_id_offset * + SIZE_OF_DWORD)); + + memcpy(description, pdescription, + peach_statistic_entry->ascii_id_length + 1); + + // If ASCII string isn't found, see in our internal Map + // for 2.5 Spec defined strings (id < 0x1D). + if ((description == NULL) && (identifier < 0x1D)) + memcpy(description, + statistic_identifiers_map[identifier].description, + peach_statistic_entry->ascii_id_length + 1); + return 0; + } + } + + return -1; +} + +int get_event_id_ascii_string(int identifier, int debug_event_class, char *description) +{ + if (pstring_buffer == NULL) + return -1; + + struct nvme_ocp_telemetry_string_header *pocp_ts_header = + (struct nvme_ocp_telemetry_string_header *)pstring_buffer; + + //Calculating the sizes of the tables. Note: Data is present in the form of DWORDS, + //So multiplying with sizeof(DWORD) + unsigned long long ests_table_size = (pocp_ts_header->estsz) * SIZE_OF_DWORD; + + //Calculating number of entries present in all 3 tables + int ests_entries = (int)ests_table_size / sizeof(struct nvme_ocp_event_string_table); + + for (int ests_entry = 0; ests_entry < ests_entries; ests_entry++) { + struct nvme_ocp_event_string_table *peach_event_entry = + (struct nvme_ocp_event_string_table *) + (pstring_buffer + (pocp_ts_header->ests * SIZE_OF_DWORD) + + (ests_entry * sizeof(struct nvme_ocp_event_string_table))); + + if (identifier == (int)peach_event_entry->event_identifier && + debug_event_class == (int)peach_event_entry->debug_event_class) { + char *pdescription = (char *)(pstring_buffer + + (pocp_ts_header->ascts * SIZE_OF_DWORD) + + (peach_event_entry->ascii_id_offset * SIZE_OF_DWORD)); + + memcpy(description, pdescription, + peach_event_entry->ascii_id_length + 1); + return 0; + } + } + + return -1; +} + +int get_vu_event_id_ascii_string(int identifier, int debug_event_class, char *description) +{ + if (pstring_buffer == NULL) + return -1; + + struct nvme_ocp_telemetry_string_header *pocp_ts_header = + (struct nvme_ocp_telemetry_string_header *)pstring_buffer; + + //Calculating the sizes of the tables. Note: Data is present in the form of DWORDS, + //So multiplying with sizeof(DWORD) + unsigned long long vuests_table_size = (pocp_ts_header->vu_estsz) * SIZE_OF_DWORD; + + //Calculating number of entries present in all 3 tables + int vu_ests_entries = (int)vuests_table_size / + sizeof(struct nvme_ocp_vu_event_string_table); + + for (int vu_ests_entry = 0; vu_ests_entry < vu_ests_entries; vu_ests_entry++) { + struct nvme_ocp_vu_event_string_table *peach_vu_event_entry = + (struct nvme_ocp_vu_event_string_table *) + (pstring_buffer + (pocp_ts_header->vu_ests * SIZE_OF_DWORD) + + (vu_ests_entry * sizeof(struct nvme_ocp_vu_event_string_table))); + + if (identifier == (int)peach_vu_event_entry->vu_event_identifier && + debug_event_class == + (int)peach_vu_event_entry->debug_event_class) { + char *pdescription = (char *)(pstring_buffer + + (pocp_ts_header->ascts * SIZE_OF_DWORD) + + (peach_vu_event_entry->ascii_id_offset * SIZE_OF_DWORD)); + + memcpy(description, pdescription, + peach_vu_event_entry->ascii_id_length + 1); + return 0; + } + } + + return -1; +} + +int parse_ocp_telemetry_string_log(int event_fifo_num, int identifier, int debug_event_class, + enum ocp_telemetry_string_tables string_table, char *description) +{ + if (pstring_buffer == NULL) + return -1; + + if (event_fifo_num != 0) { + struct nvme_ocp_telemetry_string_header *pocp_ts_header = + (struct nvme_ocp_telemetry_string_header *)pstring_buffer; + + if (*pocp_ts_header->fifo_ascii_string[event_fifo_num-1] != '\0') + memcpy(description, pocp_ts_header->fifo_ascii_string[event_fifo_num-1], + 16); + else + description = ""; + + return 0; + } + + if (string_table == STATISTICS_IDENTIFIER_STRING) + get_static_id_ascii_string(identifier, description); + else if (string_table == EVENT_STRING) + get_event_id_ascii_string(identifier, debug_event_class, description); + else if (string_table == VU_EVENT_STRING) + get_vu_event_id_ascii_string(identifier, debug_event_class, description); + + return 0; +} + +void parse_time_stamp_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp) +{ + struct nvme_ocp_time_stamp_dbg_evt_class_format *ptime_stamp_event = + (struct nvme_ocp_time_stamp_dbg_evt_class_format *) pevent_specific_data; + + int vu_event_id = (int)ptime_stamp_event->vu_event_identifier; + + unsigned int data_size = ((pevent_descriptor->event_data_size * SIZE_OF_DWORD)- + sizeof(struct nvme_ocp_time_stamp_dbg_evt_class_format)); + + __u8 *pdata = (__u8 *)ptime_stamp_event + + sizeof(struct nvme_ocp_time_stamp_dbg_evt_class_format); + + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, ptime_stamp_event->vu_event_identifier, + pevent_descriptor->debug_event_class_type, + VU_EVENT_STRING, description_str); + + if (pevent_fifos_object != NULL) { + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_CLASS_SPECIFIC_DATA, + ptime_stamp_event->time_stamp, DATA_SIZE_8); + json_add_formatted_u32_str(pevent_descriptor_obj, STR_VU_EVENT_ID_STRING, + vu_event_id); + json_object_add_value_string(pevent_descriptor_obj, STR_VU_EVENT_STRING, + description_str); + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_VU_DATA, pdata, + data_size); + } else { + if (fp) { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + ptime_stamp_event->time_stamp, DATA_SIZE_8, fp); + fprintf(fp, "%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + fprintf(fp, "%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } else { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + ptime_stamp_event->time_stamp, DATA_SIZE_8, fp); + printf("%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + printf("%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } + } +} + +void parse_pcie_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp) +{ + struct nvme_ocp_pcie_dbg_evt_class_format *ppcie_event = + (struct nvme_ocp_pcie_dbg_evt_class_format *) pevent_specific_data; + int vu_event_id = (int) ppcie_event->vu_event_identifier; + unsigned int data_size = ((pevent_descriptor->event_data_size * SIZE_OF_DWORD) - + sizeof(struct nvme_ocp_pcie_dbg_evt_class_format)); + __u8 *pdata = (__u8 *) ppcie_event + sizeof(struct nvme_ocp_pcie_dbg_evt_class_format); + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, ppcie_event->vu_event_identifier, + pevent_descriptor->debug_event_class_type, VU_EVENT_STRING, description_str); + + if (pevent_fifos_object != NULL) { + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_CLASS_SPECIFIC_DATA, + ppcie_event->pCIeDebugEventData, DATA_SIZE_4); + json_add_formatted_u32_str(pevent_descriptor_obj, STR_VU_EVENT_ID_STRING, + vu_event_id); + json_object_add_value_string(pevent_descriptor_obj, STR_VU_EVENT_STRING, + description_str); + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_VU_DATA, pdata, + data_size); + } else { + if (fp) { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + ppcie_event->pCIeDebugEventData, DATA_SIZE_4, fp); + fprintf(fp, "%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + fprintf(fp, "%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } else { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + ppcie_event->pCIeDebugEventData, DATA_SIZE_4, fp); + printf("%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + printf("%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } + } +} + +void parse_nvme_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp) +{ + struct nvme_ocp_nvme_dbg_evt_class_format *pnvme_event = + (struct nvme_ocp_nvme_dbg_evt_class_format *) pevent_specific_data; + int vu_event_id = (int) pnvme_event->vu_event_identifier; + unsigned int data_size = ((pevent_descriptor->event_data_size * + SIZE_OF_DWORD) - sizeof(struct nvme_ocp_nvme_dbg_evt_class_format)); + __u8 *pdata = (__u8 *) pnvme_event + sizeof(struct nvme_ocp_nvme_dbg_evt_class_format); + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, pnvme_event->vu_event_identifier, + pevent_descriptor->debug_event_class_type, VU_EVENT_STRING, + description_str); + + if (pevent_fifos_object != NULL) { + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_CLASS_SPECIFIC_DATA, + pnvme_event->nvmeDebugEventData, DATA_SIZE_8); + json_add_formatted_u32_str(pevent_descriptor_obj, STR_VU_EVENT_ID_STRING, + vu_event_id); + json_object_add_value_string(pevent_descriptor_obj, STR_VU_EVENT_STRING, + description_str); + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_VU_DATA, pdata, + data_size); + } else { + if (fp) { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + pnvme_event->nvmeDebugEventData, DATA_SIZE_8, fp); + fprintf(fp, "%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + fprintf(fp, "%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } else { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + pnvme_event->nvmeDebugEventData, DATA_SIZE_8, fp); + printf("%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + printf("%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } + } +} + +void parse_common_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp) +{ + struct nvme_ocp_common_dbg_evt_class_format *pcommon_debug_event = + (struct nvme_ocp_common_dbg_evt_class_format *) pevent_specific_data; + int vu_event_id = (int) pcommon_debug_event->vu_event_identifier; + unsigned int data_size = ((pevent_descriptor->event_data_size * + SIZE_OF_DWORD) - sizeof(struct nvme_ocp_common_dbg_evt_class_format)); + __u8 *pdata = (__u8 *) pcommon_debug_event + + sizeof(struct nvme_ocp_common_dbg_evt_class_format); + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, pcommon_debug_event->vu_event_identifier, + pevent_descriptor->debug_event_class_type, VU_EVENT_STRING, description_str); + + if (pevent_fifos_object != NULL) { + json_add_formatted_u32_str(pevent_descriptor_obj, STR_VU_EVENT_ID_STRING, + vu_event_id); + json_object_add_value_string(pevent_descriptor_obj, STR_VU_EVENT_STRING, + description_str); + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_VU_DATA, pdata, + data_size); + } else { + if (fp) { + fprintf(fp, "%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + fprintf(fp, "%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } else { + printf("%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + printf("%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } + } +} + +void parse_media_wear_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp) +{ + struct nvme_ocp_media_wear_dbg_evt_class_format *pmedia_wear_event = + (struct nvme_ocp_media_wear_dbg_evt_class_format *) pevent_specific_data; + int vu_event_id = (int) pmedia_wear_event->vu_event_identifier; + unsigned int data_size = ((pevent_descriptor->event_data_size * SIZE_OF_DWORD) - + sizeof(struct nvme_ocp_media_wear_dbg_evt_class_format)); + __u8 *pdata = (__u8 *) pmedia_wear_event + + sizeof(struct nvme_ocp_media_wear_dbg_evt_class_format); + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, pmedia_wear_event->vu_event_identifier, + pevent_descriptor->debug_event_class_type, VU_EVENT_STRING, + description_str); + + if (pevent_fifos_object != NULL) { + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_CLASS_SPECIFIC_DATA, + pmedia_wear_event->currentMediaWear, DATA_SIZE_12); + json_add_formatted_u32_str(pevent_descriptor_obj, STR_VU_EVENT_ID_STRING, + vu_event_id); + json_object_add_value_string(pevent_descriptor_obj, STR_VU_EVENT_STRING, + description_str); + json_add_formatted_var_size_str(pevent_descriptor_obj, STR_VU_DATA, pdata, + data_size); + } else { + if (fp) { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + pmedia_wear_event->currentMediaWear, DATA_SIZE_12, fp); + fprintf(fp, "%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + fprintf(fp, "%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } else { + print_formatted_var_size_str(STR_CLASS_SPECIFIC_DATA, + pmedia_wear_event->currentMediaWear, DATA_SIZE_12, NULL); + printf("%s: 0x%x\n", STR_VU_EVENT_ID_STRING, vu_event_id); + printf("%s: %s\n", STR_VU_EVENT_STRING, description_str); + print_formatted_var_size_str(STR_VU_DATA, pdata, data_size, fp); + } + } +} + +int parse_event_fifo(unsigned int fifo_num, unsigned char *pfifo_start, + struct json_object *pevent_fifos_object, unsigned char *pstring_buffer, + struct nvme_ocp_telemetry_offsets *poffsets, __u64 fifo_size, FILE *fp) +{ + if (NULL == pfifo_start || NULL == poffsets) { + nvme_show_error("Input buffer was NULL"); + return -1; + } + + int status = 0; + unsigned int event_fifo_number = fifo_num + 1; + char *description = (char *)malloc((40 + 1) * sizeof(char)); + + memset(description, 0, sizeof(40)); + + status = + parse_ocp_telemetry_string_log(event_fifo_number, 0, 0, EVENT_STRING, description); + + if (status != 0) { + nvme_show_error("Failed to get C9 String. status: %d\n", status); + return -1; + } + + char event_fifo_name[100] = {0}; + + snprintf(event_fifo_name, sizeof(event_fifo_name), "%s%d%s%s", "EVENT FIFO ", + event_fifo_number, " - ", description); + + struct json_object *pevent_fifo_array = NULL; + + if (pevent_fifos_object != NULL) + pevent_fifo_array = json_create_array(); + else { + char buffer[1024] = {0}; + + sprintf(buffer, "%s%s\n%s", STR_LINE, event_fifo_name, STR_LINE); + if (fp) + fprintf(fp, "%s", buffer); + else + printf("%s", buffer); + } + + int offset_to_move = 0; + unsigned int event_des_size = sizeof(struct nvme_ocp_telemetry_event_descriptor); + + while ((fifo_size > 0) && (offset_to_move < fifo_size)) { + struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor = + (struct nvme_ocp_telemetry_event_descriptor *) + (pfifo_start + offset_to_move); + + if (pevent_descriptor != NULL && pevent_descriptor->event_data_size >= 0) { + //Data is present in the form of DWORDS, So multiplying with sizeof(DWORD) + unsigned int data_size = pevent_descriptor->event_data_size * + SIZE_OF_DWORD; + + __u8 *pevent_specific_data = (__u8 *)pevent_descriptor + event_des_size; + + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, pevent_descriptor->event_id, + pevent_descriptor->debug_event_class_type, EVENT_STRING, + description_str); + + struct json_object *pevent_descriptor_obj = + ((pevent_fifos_object != NULL)?json_create_object():NULL); + + if (pevent_descriptor_obj != NULL) { + json_add_formatted_u32_str(pevent_descriptor_obj, + STR_DBG_EVENT_CLASS_TYPE, + pevent_descriptor->debug_event_class_type); + json_add_formatted_u32_str(pevent_descriptor_obj, + STR_EVENT_IDENTIFIER, pevent_descriptor->event_id); + json_object_add_value_string(pevent_descriptor_obj, + STR_EVENT_STRING, description_str); + json_add_formatted_u32_str(pevent_descriptor_obj, + STR_EVENT_DATA_SIZE, pevent_descriptor->event_data_size); + + if (pevent_descriptor->debug_event_class_type >= 0x80) + json_add_formatted_var_size_str(pevent_descriptor_obj, + STR_VU_DATA, pevent_specific_data, data_size); + } else { + if (fp) { + fprintf(fp, "%s: 0x%x\n", STR_DBG_EVENT_CLASS_TYPE, + pevent_descriptor->debug_event_class_type); + fprintf(fp, "%s: 0x%x\n", STR_EVENT_IDENTIFIER, + pevent_descriptor->event_id); + fprintf(fp, "%s: %s\n", STR_EVENT_STRING, description_str); + fprintf(fp, "%s: 0x%x\n", STR_EVENT_DATA_SIZE, + pevent_descriptor->event_data_size); + } else { + printf("%s: 0x%x\n", STR_DBG_EVENT_CLASS_TYPE, + pevent_descriptor->debug_event_class_type); + printf("%s: 0x%x\n", STR_EVENT_IDENTIFIER, + pevent_descriptor->event_id); + printf("%s: %s\n", STR_EVENT_STRING, description_str); + printf("%s: 0x%x\n", STR_EVENT_DATA_SIZE, + pevent_descriptor->event_data_size); + } + + if (pevent_descriptor->debug_event_class_type >= 0x80) + print_formatted_var_size_str(STR_VU_DATA, + pevent_specific_data, data_size, fp); + } + + switch (pevent_descriptor->debug_event_class_type) { + case TIME_STAMP_CLASS_TYPE: + parse_time_stamp_event(pevent_descriptor, pevent_descriptor_obj, + pevent_specific_data, pevent_fifos_object, fp); + break; + case PCIE_CLASS_TYPE: + parse_pcie_event(pevent_descriptor, pevent_descriptor_obj, + pevent_specific_data, pevent_fifos_object, fp); + break; + case NVME_CLASS_TYPE: + parse_nvme_event(pevent_descriptor, pevent_descriptor_obj, + pevent_specific_data, pevent_fifos_object, fp); + break; + case RESET_CLASS_TYPE: + case BOOT_SEQUENCE_CLASS_TYPE: + case FIRMWARE_ASSERT_CLASS_TYPE: + case TEMPERATURE_CLASS_TYPE: + case MEDIA_CLASS_TYPE: + parse_common_event(pevent_descriptor, pevent_descriptor_obj, + pevent_specific_data, pevent_fifos_object, fp); + break; + case MEDIA_WEAR_CLASS_TYPE: + parse_media_wear_event(pevent_descriptor, pevent_descriptor_obj, + pevent_specific_data, pevent_fifos_object, fp); + break; + case STATISTIC_SNAPSHOT_CLASS_TYPE: { + struct nvme_ocp_statistic_snapshot_evt_class_format + *pStaticSnapshotEvent = + (struct nvme_ocp_statistic_snapshot_evt_class_format *) + pevent_specific_data; + struct nvme_ocp_telemetry_statistic_descriptor *pstatistic_entry = + (struct nvme_ocp_telemetry_statistic_descriptor *) + (&pStaticSnapshotEvent->statisticDescriptorData); + + parse_statistic(pstatistic_entry, pevent_descriptor_obj, fp); + break; + } + case RESERVED_CLASS_TYPE: + default: + break; + } + + if (pevent_descriptor_obj != NULL && pevent_fifo_array != NULL) + json_array_add_value_object(pevent_fifo_array, pevent_descriptor_obj); + else { + if (fp) + fprintf(fp, STR_LINE2); + else + printf(STR_LINE2); + } + } else + break; + + offset_to_move += (pevent_descriptor->event_data_size * SIZE_OF_DWORD + event_des_size); + } + + if (pevent_fifos_object != NULL && pevent_fifo_array != NULL) + json_object_add_value_array(pevent_fifos_object, event_fifo_name, + pevent_fifo_array); + + free(description); + return 0; +} + +int parse_event_fifos(struct json_object *root, struct nvme_ocp_telemetry_offsets *poffsets, + FILE *fp) +{ + if (poffsets == NULL) { + nvme_show_error("Input buffer was NULL"); + return -1; + } + + struct json_object *pevent_fifos_object = NULL; + + if (root != NULL) + pevent_fifos_object = json_create_object(); + + __u8 *pda1_header_offset = ptelemetry_buffer + poffsets->da1_start_offset;//512 + __u8 *pda2_offset = ptelemetry_buffer + poffsets->da2_start_offset; + struct nvme_ocp_header_in_da1 *pda1_header = (struct nvme_ocp_header_in_da1 *) + pda1_header_offset; + struct nvme_ocp_event_fifo_data event_fifo[MAX_NUM_FIFOS]; + + for (int fifo_num = 0; fifo_num < MAX_NUM_FIFOS; fifo_num++) { + event_fifo[fifo_num].event_fifo_num = fifo_num; + event_fifo[fifo_num].event_fifo_da = pda1_header->event_fifo_da[fifo_num]; + event_fifo[fifo_num].event_fifo_start = + pda1_header->fifo_offsets[fifo_num].event_fifo_start; + event_fifo[fifo_num].event_fifo_size = + pda1_header->fifo_offsets[fifo_num].event_fifo_size; + } + + //Parse all the FIFOs DA wise + for (int fifo_no = 0; fifo_no < MAX_NUM_FIFOS; fifo_no++) { + if (event_fifo[fifo_no].event_fifo_da == poffsets->data_area) { + __u64 fifo_offset = + (event_fifo[fifo_no].event_fifo_start * SIZE_OF_DWORD); + __u64 fifo_size = + (event_fifo[fifo_no].event_fifo_size * SIZE_OF_DWORD); + __u8 *pfifo_start = NULL; + + if (event_fifo[fifo_no].event_fifo_da == 1) + pfifo_start = pda1_header_offset + fifo_offset; + else if (event_fifo[fifo_no].event_fifo_da == 2) + pfifo_start = pda2_offset + fifo_offset; + else { + nvme_show_error("Unsupported Data Area:[%d]", poffsets->data_area); + return -1; + } + + int status = parse_event_fifo(fifo_no, pfifo_start, pevent_fifos_object, + pstring_buffer, poffsets, fifo_size, fp); + + if (status != 0) { + nvme_show_error("Failed to parse Event FIFO. status:%d\n", status); + return -1; + } + } + } + + if (pevent_fifos_object != NULL && root != NULL) { + const char *data_area = (poffsets->data_area == 1 ? STR_DA_1_EVENT_FIFO_INFO : + STR_DA_2_EVENT_FIFO_INFO); + + json_object_add_value_array(root, data_area, pevent_fifos_object); + } + + return 0; +} + +int parse_statistic(struct nvme_ocp_telemetry_statistic_descriptor *pstatistic_entry, + struct json_object *pstats_array, FILE *fp) +{ + if (pstatistic_entry == NULL) { + nvme_show_error("Input buffer was NULL"); + return -1; + } + + unsigned int data_size = pstatistic_entry->statistic_data_size * SIZE_OF_DWORD; + __u8 *pdata = (__u8 *)pstatistic_entry + + sizeof(struct nvme_ocp_telemetry_statistic_descriptor); + char description_str[256] = ""; + + parse_ocp_telemetry_string_log(0, pstatistic_entry->statistic_id, 0, + STATISTICS_IDENTIFIER_STRING, description_str); + + if (pstats_array != NULL) { + struct json_object *pstatistics_object = json_create_object(); + + json_add_formatted_u32_str(pstatistics_object, STR_STATISTICS_IDENTIFIER, + pstatistic_entry->statistic_id); + json_object_add_value_string(pstatistics_object, STR_STATISTICS_IDENTIFIER_STR, + description_str); + json_add_formatted_u32_str(pstatistics_object, + STR_STATISTICS_INFO_BEHAVIOUR_TYPE, + pstatistic_entry->statistic_info_behaviour_type); + json_add_formatted_u32_str(pstatistics_object, STR_STATISTICS_INFO_RESERVED, + pstatistic_entry->statistic_info_reserved); + json_add_formatted_u32_str(pstatistics_object, STR_NAMESPACE_IDENTIFIER, + pstatistic_entry->ns_info_nsid); + json_add_formatted_u32_str(pstatistics_object, STR_NAMESPACE_INFO_VALID, + pstatistic_entry->ns_info_ns_info_valid); + json_add_formatted_u32_str(pstatistics_object, STR_STATISTICS_DATA_SIZE, + pstatistic_entry->statistic_data_size); + json_add_formatted_u32_str(pstatistics_object, STR_RESERVED, + pstatistic_entry->reserved); + json_add_formatted_var_size_str(pstatistics_object, STR_STATISTICS_SPECIFIC_DATA, + pdata, data_size); + + if (pstatistics_object != NULL) + json_array_add_value_object(pstats_array, pstatistics_object); + } else { + if (fp) { + fprintf(fp, "%s: 0x%x\n", STR_STATISTICS_IDENTIFIER, + pstatistic_entry->statistic_id); + fprintf(fp, "%s: %s\n", STR_STATISTICS_IDENTIFIER_STR, description_str); + fprintf(fp, "%s: 0x%x\n", STR_STATISTICS_INFO_BEHAVIOUR_TYPE, + pstatistic_entry->statistic_info_behaviour_type); + fprintf(fp, "%s: 0x%x\n", STR_STATISTICS_INFO_RESERVED, + pstatistic_entry->statistic_info_reserved); + fprintf(fp, "%s: 0x%x\n", STR_NAMESPACE_IDENTIFIER, + pstatistic_entry->ns_info_nsid); + fprintf(fp, "%s: 0x%x\n", STR_NAMESPACE_INFO_VALID, + pstatistic_entry->ns_info_ns_info_valid); + fprintf(fp, "%s: 0x%x\n", STR_STATISTICS_DATA_SIZE, + pstatistic_entry->statistic_data_size); + fprintf(fp, "%s: 0x%x\n", STR_RESERVED, pstatistic_entry->reserved); + print_formatted_var_size_str(STR_STATISTICS_SPECIFIC_DATA, pdata, + data_size, fp); + fprintf(fp, STR_LINE2); + } else { + printf("%s: 0x%x\n", STR_STATISTICS_IDENTIFIER, + pstatistic_entry->statistic_id); + printf("%s: %s\n", STR_STATISTICS_IDENTIFIER_STR, description_str); + printf("%s: 0x%x\n", STR_STATISTICS_INFO_BEHAVIOUR_TYPE, + pstatistic_entry->statistic_info_behaviour_type); + printf("%s: 0x%x\n", STR_STATISTICS_INFO_RESERVED, + pstatistic_entry->statistic_info_reserved); + printf("%s: 0x%x\n", STR_NAMESPACE_IDENTIFIER, + pstatistic_entry->ns_info_nsid); + printf("%s: 0x%x\n", STR_NAMESPACE_INFO_VALID, + pstatistic_entry->ns_info_ns_info_valid); + printf("%s: 0x%x\n", STR_STATISTICS_DATA_SIZE, + pstatistic_entry->statistic_data_size); + printf("%s: 0x%x\n", STR_RESERVED, pstatistic_entry->reserved); + print_formatted_var_size_str(STR_STATISTICS_SPECIFIC_DATA, pdata, + data_size, fp); + printf(STR_LINE2); + } + } + + return 0; +} + +int parse_statistics(struct json_object *root, struct nvme_ocp_telemetry_offsets *poffsets, + FILE *fp) +{ + if (poffsets == NULL) { + nvme_show_error("Input buffer was NULL"); + return -1; + } + + __u8 *pda1_ocp_header_offset = ptelemetry_buffer + poffsets->header_size;//512 + __u32 statistics_size = 0; + __u32 stats_da_1_start_dw = 0, stats_da_1_size_dw = 0; + __u32 stats_da_2_start_dw = 0, stats_da_2_size_dw = 0; + __u8 *pstats_offset = NULL; + + if (poffsets->data_area == 1) { + __u32 stats_da_1_start = *(__u32 *)(pda1_ocp_header_offset + + offsetof(struct nvme_ocp_header_in_da1, da1_statistic_start)); + __u32 stats_da_1_size = *(__u32 *)(pda1_ocp_header_offset + + offsetof(struct nvme_ocp_header_in_da1, da1_statistic_size)); + + //Data is present in the form of DWORDS, So multiplying with sizeof(DWORD) + stats_da_1_start_dw = (stats_da_1_start * SIZE_OF_DWORD); + stats_da_1_size_dw = (stats_da_1_size * SIZE_OF_DWORD); + + pstats_offset = pda1_ocp_header_offset + stats_da_1_start_dw; + statistics_size = stats_da_1_size_dw; + } else if (poffsets->data_area == 2) { + __u32 stats_da_2_start = *(__u32 *)(pda1_ocp_header_offset + + offsetof(struct nvme_ocp_header_in_da1, da2_statistic_start)); + __u32 stats_da_2_size = *(__u32 *)(pda1_ocp_header_offset + + offsetof(struct nvme_ocp_header_in_da1, da2_statistic_size)); + + stats_da_2_start_dw = (stats_da_2_start * SIZE_OF_DWORD); + stats_da_2_size_dw = (stats_da_2_size * SIZE_OF_DWORD); + + pstats_offset = pda1_ocp_header_offset + poffsets->da1_size + stats_da_2_start_dw; + statistics_size = stats_da_2_size_dw; + } else { + nvme_show_error("Unsupported Data Area:[%d]", poffsets->data_area); + return -1; + } + + struct json_object *pstats_array = ((root != NULL) ? json_create_array() : NULL); + + __u32 stat_des_size = sizeof(struct nvme_ocp_telemetry_statistic_descriptor);//8 + __u32 offset_to_move = 0; + + while (((statistics_size > 0) && (offset_to_move < statistics_size))) { + struct nvme_ocp_telemetry_statistic_descriptor *pstatistic_entry = + (struct nvme_ocp_telemetry_statistic_descriptor *) + (pstats_offset + offset_to_move); + + parse_statistic(pstatistic_entry, pstats_array, fp); + offset_to_move += (pstatistic_entry->statistic_data_size * SIZE_OF_DWORD + + stat_des_size); + } + + if (root != NULL && pstats_array != NULL) { + const char *pdata_area = + (poffsets->data_area == 1 ? STR_DA_1_STATS : STR_DA_2_STATS); + + json_object_add_value_array(root, pdata_area, pstats_array); + } + + return 0; +} + +int print_ocp_telemetry_normal(struct ocp_telemetry_parse_options *options) +{ + int status = 0; + + if (options->output_file != NULL) { + FILE *fp = fopen(options->output_file, "w"); + + if (fp) { + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_LOG_PAGE_HEADER); + fprintf(fp, STR_LINE); + if (!strcmp(options->telemetry_type, "host")) + generic_structure_parser(ptelemetry_buffer, host_log_page_header, + ARRAY_SIZE(host_log_page_header), NULL, 0, fp); + else if (!strcmp(options->telemetry_type, "controller")) + generic_structure_parser(ptelemetry_buffer, + controller_log_page_header, + ARRAY_SIZE(controller_log_page_header), NULL, 0, fp); + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_REASON_IDENTIFIER); + fprintf(fp, STR_LINE); + __u8 *preason_identifier_offset = ptelemetry_buffer + + offsetof(struct nvme_ocp_telemetry_host_initiated_header, + reason_id); + + generic_structure_parser(preason_identifier_offset, reason_identifier, + ARRAY_SIZE(reason_identifier), NULL, 0, fp); + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_TELEMETRY_HOST_DATA_BLOCK_1); + fprintf(fp, STR_LINE); + + //Set DA to 1 and get offsets + struct nvme_ocp_telemetry_offsets offsets = { 0 }; + + offsets.data_area = 1;// Default DA - DA1 + + struct nvme_ocp_telemetry_common_header *ptelemetry_common_header = + (struct nvme_ocp_telemetry_common_header *) ptelemetry_buffer; + + get_telemetry_das_offset_and_size(ptelemetry_common_header, &offsets); + + __u8 *pda1_header_offset = ptelemetry_buffer + + offsets.da1_start_offset;//512 + + generic_structure_parser(pda1_header_offset, ocp_header_in_da1, + ARRAY_SIZE(ocp_header_in_da1), NULL, 0, fp); + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_SMART_HEALTH_INFO); + fprintf(fp, STR_LINE); + __u8 *pda1_smart_offset = pda1_header_offset + + offsetof(struct nvme_ocp_header_in_da1, smart_health_info); + //512+512 =1024 + + generic_structure_parser(pda1_smart_offset, smart, ARRAY_SIZE(smart), + NULL, 0, fp); + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_SMART_HEALTH_INTO_EXTENDED); + fprintf(fp, STR_LINE); + __u8 *pda1_smart_ext_offset = pda1_header_offset + + offsetof(struct nvme_ocp_header_in_da1, + smart_health_info_extended); + + generic_structure_parser(pda1_smart_ext_offset, smart_extended, + ARRAY_SIZE(smart_extended), NULL, 0, fp); + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_DA_1_STATS); + fprintf(fp, STR_LINE); + + status = parse_statistics(NULL, &offsets, fp); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_DA_1_EVENT_FIFO_INFO); + fprintf(fp, STR_LINE); + status = parse_event_fifos(NULL, &offsets, fp); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + //Set the DA to 2 + if (options->data_area == 2) { + offsets.data_area = 2; + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_DA_2_STATS); + fprintf(fp, STR_LINE); + status = parse_statistics(NULL, &offsets, fp); + + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + fprintf(fp, STR_LINE); + fprintf(fp, "%s\n", STR_DA_2_EVENT_FIFO_INFO); + fprintf(fp, STR_LINE); + status = parse_event_fifos(NULL, &offsets, fp); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + } + + fprintf(fp, STR_LINE); + fclose(fp); + } else { + nvme_show_error("Failed to open %s file.\n", options->output_file); + return -1; + } + } else { + printf(STR_LINE); + printf("%s\n", STR_LOG_PAGE_HEADER); + printf(STR_LINE); + if (!strcmp(options->telemetry_type, "host")) + generic_structure_parser(ptelemetry_buffer, host_log_page_header, + ARRAY_SIZE(host_log_page_header), NULL, 0, NULL); + else if (!strcmp(options->telemetry_type, "controller")) + generic_structure_parser(ptelemetry_buffer, controller_log_page_header, + ARRAY_SIZE(controller_log_page_header), NULL, 0, NULL); + + printf(STR_LINE); + printf("%s\n", STR_REASON_IDENTIFIER); + printf(STR_LINE); + __u8 *preason_identifier_offset = ptelemetry_buffer + + offsetof(struct nvme_ocp_telemetry_host_initiated_header, reason_id); + generic_structure_parser(preason_identifier_offset, reason_identifier, + ARRAY_SIZE(reason_identifier), NULL, 0, NULL); + + printf(STR_LINE); + printf("%s\n", STR_TELEMETRY_HOST_DATA_BLOCK_1); + printf(STR_LINE); + + //Set DA to 1 and get offsets + struct nvme_ocp_telemetry_offsets offsets = { 0 }; + + offsets.data_area = 1; + + struct nvme_ocp_telemetry_common_header *ptelemetry_common_header = + (struct nvme_ocp_telemetry_common_header *) ptelemetry_buffer; + + get_telemetry_das_offset_and_size(ptelemetry_common_header, &offsets); + + __u8 *pda1_header_offset = ptelemetry_buffer + offsets.da1_start_offset;//512 + + generic_structure_parser(pda1_header_offset, ocp_header_in_da1, + ARRAY_SIZE(ocp_header_in_da1), NULL, 0, NULL); + + printf(STR_LINE); + printf("%s\n", STR_SMART_HEALTH_INFO); + printf(STR_LINE); + __u8 *pda1_smart_offset = pda1_header_offset + + offsetof(struct nvme_ocp_header_in_da1, smart_health_info); + + generic_structure_parser(pda1_smart_offset, smart, ARRAY_SIZE(smart), NULL, 0, + NULL); + + printf(STR_LINE); + printf("%s\n", STR_SMART_HEALTH_INTO_EXTENDED); + printf(STR_LINE); + __u8 *pda1_smart_ext_offset = pda1_header_offset + + offsetof(struct nvme_ocp_header_in_da1, smart_health_info_extended); + + generic_structure_parser(pda1_smart_ext_offset, smart_extended, + ARRAY_SIZE(smart_extended), NULL, 0, NULL); + + printf(STR_LINE); + printf("%s\n", STR_DA_1_STATS); + printf(STR_LINE); + status = parse_statistics(NULL, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + printf(STR_LINE); + printf("%s\n", STR_DA_1_EVENT_FIFO_INFO); + printf(STR_LINE); + status = parse_event_fifos(NULL, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + //Set the DA to 2 + if (options->data_area == 2) { + offsets.data_area = 2; + printf(STR_LINE); + printf("%s\n", STR_DA_2_STATS); + printf(STR_LINE); + status = parse_statistics(NULL, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + printf(STR_LINE); + printf("%s\n", STR_DA_2_EVENT_FIFO_INFO); + printf(STR_LINE); + status = parse_event_fifos(NULL, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + } + + printf(STR_LINE); + } + + return status; +} + +int print_ocp_telemetry_json(struct ocp_telemetry_parse_options *options) +{ + int status = 0; + + //create json objects + struct json_object *root, *pheader, *preason_identifier, *da1_header, *smart_obj, + *ext_smart_obj; + + root = json_create_object(); + + //Add data to root json object + + //"Log Page Header" + pheader = json_create_object(); + + generic_structure_parser(ptelemetry_buffer, host_log_page_header, + ARRAY_SIZE(host_log_page_header), pheader, 0, NULL); + json_object_add_value_object(root, STR_LOG_PAGE_HEADER, pheader); + + //"Reason Identifier" + preason_identifier = json_create_object(); + + __u8 *preason_identifier_offset = ptelemetry_buffer + + offsetof(struct nvme_ocp_telemetry_host_initiated_header, reason_id); + + generic_structure_parser(preason_identifier_offset, reason_identifier, + ARRAY_SIZE(reason_identifier), preason_identifier, 0, NULL); + json_object_add_value_object(pheader, STR_REASON_IDENTIFIER, preason_identifier); + + struct nvme_ocp_telemetry_offsets offsets = { 0 }; + + //Set DA to 1 and get offsets + offsets.data_area = 1; + struct nvme_ocp_telemetry_common_header *ptelemetry_common_header = + (struct nvme_ocp_telemetry_common_header *) ptelemetry_buffer; + + get_telemetry_das_offset_and_size(ptelemetry_common_header, &offsets); + + //"Telemetry Host-Initiated Data Block 1" + __u8 *pda1_header_offset = ptelemetry_buffer + offsets.da1_start_offset;//512 + + da1_header = json_create_object(); + + generic_structure_parser(pda1_header_offset, ocp_header_in_da1, + ARRAY_SIZE(ocp_header_in_da1), da1_header, 0, NULL); + json_object_add_value_object(root, STR_TELEMETRY_HOST_DATA_BLOCK_1, da1_header); + + //"SMART / Health Information Log(LID-02h)" + __u8 *pda1_smart_offset = pda1_header_offset + offsetof(struct nvme_ocp_header_in_da1, + smart_health_info); + smart_obj = json_create_object(); + + generic_structure_parser(pda1_smart_offset, smart, ARRAY_SIZE(smart), smart_obj, 0, NULL); + json_object_add_value_object(da1_header, STR_SMART_HEALTH_INFO, smart_obj); + + //"SMART / Health Information Extended(LID-C0h)" + __u8 *pda1_smart_ext_offset = pda1_header_offset + offsetof(struct nvme_ocp_header_in_da1, + smart_health_info_extended); + ext_smart_obj = json_create_object(); + + generic_structure_parser(pda1_smart_ext_offset, smart_extended, ARRAY_SIZE(smart_extended), + ext_smart_obj, 0, NULL); + json_object_add_value_object(da1_header, STR_SMART_HEALTH_INTO_EXTENDED, ext_smart_obj); + + //Data Area 1 Statistics + status = parse_statistics(root, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + //Data Area 1 Event FIFOs + status = parse_event_fifos(root, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status, NULL); + return -1; + } + + if (options->data_area == 2) { + //Set the DA to 2 + offsets.data_area = 2; + //Data Area 2 Statistics + status = parse_statistics(root, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + + //Data Area 2 Event FIFOs + status = parse_event_fifos(root, &offsets, NULL); + if (status != 0) { + nvme_show_error("status: %d\n", status); + return -1; + } + } + + if (options->output_file != NULL) { + const char *json_string = json_object_to_json_string(root); + FILE *fp = fopen(options->output_file, "w"); + + if (fp) { + fputs(json_string, fp); + fclose(fp); + } else { + nvme_show_error("Failed to open %s file.\n", options->output_file); + return -1; + } + } else { + //Print root json object + json_print_object(root, NULL); + nvme_show_result("\n"); + json_free_object(root); + } + + return status; +} diff --git a/plugins/ocp/ocp-telemetry-decode.h b/plugins/ocp/ocp-telemetry-decode.h new file mode 100644 index 0000000..ed31a6c --- /dev/null +++ b/plugins/ocp/ocp-telemetry-decode.h @@ -0,0 +1,1228 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (c) 2024 Western Digital Corporation or its affiliates. + * + * Authors: Jeff Lien <jeff.lien@wdc.com>, + */ + +#include "nvme.h" +#include "nvme-print.h" +#include "util/utils.h" +#include "common.h" + +extern __u8 *ptelemetry_buffer; +extern __u8 *pstring_buffer; + +/***************************************************************************** + * Telemetry Statistics ID's and Strings + *****************************************************************************/ +enum TELEMETRY_STATISTIC_ID { + TELEMETRY_STAT_ID_OAC = 0x1, /* Outstanding Admin Commands */ + TELEMETRY_STAT_ID_HWB = 0x2, /* Host Write Bandwidth */ + TELEMETRY_STAT_ID_GCWB = 0x3, /* Garbage Collection Write Bandwidth */ + TELEMETRY_STAT_ID_AN = 0x4, /* Active Namespaces */ + TELEMETRY_STAT_ID_IWW = 0x5, /* Internal Write Workload */ + TELEMETRY_STAT_ID_IRW = 0x6, /* Internal Read Workload */ + TELEMETRY_STAT_ID_IWQD = 0x7, /* Internal Write Queue Depth */ + TELEMETRY_STAT_ID_IRQD = 0x8, /* Internal Read Queue Depth */ + TELEMETRY_STAT_ID_PTC = 0x9, /* Pending Trim LBA Count */ + TELEMETRY_STAT_ID_HTRC = 0xA, /* Host Trim LBA Request Count */ + TELEMETRY_STAT_ID_CNPS = 0xB, /* Current NVMe Power State */ + TELEMETRY_STAT_ID_CDPS = 0xC, /* Current DSSD Power State */ + TELEMETRY_STAT_ID_PFC = 0xD, /* Program Fail Count */ + TELEMETRY_STAT_ID_EFC = 0xE, /* Erase Fail Count */ + TELEMETRY_STAT_ID_RDW = 0xF, /* Read Disturb Write */ + TELEMETRY_STAT_ID_RW = 0x10, /* Retention Writes */ + TELEMETRY_STAT_ID_WLW = 0x11, /* Wear Leveling Writes */ + TELEMETRY_STAT_ID_RRW = 0x12, /* Read Recovery Writes */ + TELEMETRY_STAT_ID_GCW = 0x13, /* Garbage Collection Writes */ + TELEMETRY_STAT_ID_SCC = 0x14, /* SRAM Correctable Count */ + TELEMETRY_STAT_ID_DCC = 0x15, /* DRAM Uncorrectable Count */ + TELEMETRY_STAT_ID_SUC = 0x16, /* SRAM Correctable Count */ + TELEMETRY_STAT_ID_DUC = 0x17, /* DRAM Uncorrectable Count */ + TELEMETRY_STAT_ID_DIEC = 0x18, /* Data Integrity Error Count */ + TELEMETRY_STAT_ID_RREC = 0x19, /* Read Retry Error Count */ + TELEMETRY_STAT_ID_PEC = 0x1A, /* PERST Events Count */ + TELEMETRY_STAT_ID_MAXDBB = 0x1B, /* Max Die Bad Block */ + TELEMETRY_STAT_ID_MAXCBB = 0x1C, /* Max NAND Channel Bad Block */ + TELEMETRY_STAT_ID_MINCBB = 0x1D, /* Min NAND Channel Bad Block */ +}; + +static const char * const telemetry_stat_id_str[] = { + [TELEMETRY_STAT_ID_OAC] = "Outstanding Admin Commands", + [TELEMETRY_STAT_ID_HWB] = "Host Write Bandwidth", + [TELEMETRY_STAT_ID_GCWB] = "Garbage Collection Write Bandwidth", + [TELEMETRY_STAT_ID_AN] = "Active Namespaces", + [TELEMETRY_STAT_ID_IWW] = "Internal Write Workload", + [TELEMETRY_STAT_ID_IRW] = "Internal Read Workload", + [TELEMETRY_STAT_ID_IWQD] = "Internal Write Queue Depth", + [TELEMETRY_STAT_ID_IRQD] = "Internal Read Queue Depth", + [TELEMETRY_STAT_ID_PTC] = "Pending Trim LBA Count", + [TELEMETRY_STAT_ID_HTRC] = "Host Trim LBA Request Count", + [TELEMETRY_STAT_ID_CNPS] = "Current NVMe Power State", + [TELEMETRY_STAT_ID_CDPS] = "Current DSSD Power State", + [TELEMETRY_STAT_ID_PFC] = "Program Fail Count", + [TELEMETRY_STAT_ID_EFC] = "Erase Fail Count", + [TELEMETRY_STAT_ID_RDW] = "Read Disturb Write", + [TELEMETRY_STAT_ID_RW] = "Retention Writes", + [TELEMETRY_STAT_ID_WLW] = "Wear Leveling Writes", + [TELEMETRY_STAT_ID_RRW] = "Read Recovery Writes", + [TELEMETRY_STAT_ID_GCW] = "Garbage Collection Writes", + [TELEMETRY_STAT_ID_SCC] = "SRAM Correctable Count", + [TELEMETRY_STAT_ID_DCC] = "DRAM Correctable Count", + [TELEMETRY_STAT_ID_SUC] = "SRAM Uncorrectable Count", + [TELEMETRY_STAT_ID_DUC] = "DRAM Uncorrectable Count", + [TELEMETRY_STAT_ID_DIEC] = "Data Integrity Error Count", + [TELEMETRY_STAT_ID_RREC] = "Read Retry Error Count", + [TELEMETRY_STAT_ID_PEC] = "PERST Events Count", + [TELEMETRY_STAT_ID_MAXDBB] = "Max Die Bad Block", + [TELEMETRY_STAT_ID_MAXCBB] = "Max NAND Channel Bad Block", + [TELEMETRY_STAT_ID_MINCBB] = "Min NAND Channel Bad Block", +}; + +/***************************************************************************** + * Telemetry FIFO Event Class ID's and Strings + *****************************************************************************/ +enum TELEMETRY_EVENT_CLASS_TYPE { + TELEMETRY_TIMESTAMP_CLASS = 0x1, + TELEMETRY_PCIE_CLASS = 0x2, + TELEMETRY_NVME_CLASS = 0x3, + TELEMETRY_RESET_CLASS = 0x4, + TELEMETRY_BOOT_SEQ_CLASS = 0x5, + TELEMETRY_FW_ASSERT_CLASS = 0x6, + TELEMETRY_TEMPERATURE_CLASS = 0x7, + TELEMETRY_MEDIA_DBG_CLASS = 0x8, + TELEMETRY_MEDIA_WEAR_CLASS = 0x9, + TELEMETRY_STAT_SNAPSHOT_CLASS = 0xA, +}; + +static const char * const telemetry_event_class_str[] = { + [TELEMETRY_TIMESTAMP_CLASS] = "Timestamp Class", + [TELEMETRY_PCIE_CLASS] = "PCIe Class", + [TELEMETRY_NVME_CLASS] = "NVMe Class", + [TELEMETRY_RESET_CLASS] = "Reset Class", + [TELEMETRY_BOOT_SEQ_CLASS] = "Boot Sequence Class", + [TELEMETRY_FW_ASSERT_CLASS] = "FW Assert Class", + [TELEMETRY_TEMPERATURE_CLASS] = "Temperature Class", + [TELEMETRY_MEDIA_DBG_CLASS] = "Media Debug Class", + [TELEMETRY_MEDIA_WEAR_CLASS] = "Media Wear Class", + [TELEMETRY_STAT_SNAPSHOT_CLASS] = "Statistic Snapshot Class", +}; + +/***************************************************************************** + * Telemetry Timestamp Class (01h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_TIMESTAMP_EVENT_ID { + TIMESTAMP_HOST_CMD_ISSUED = 0x0000, + TIMESTAMP_SNAPSHOT = 0x0001, + TIMESTAMP_POWER_ON_HOURS = 0x0002, +}; + +static const char * const telemetry_timestamp_event_id_str[] = { + [TIMESTAMP_HOST_CMD_ISSUED] = "Timestamp Host Cmd Issued", + [TIMESTAMP_SNAPSHOT] = "Timestamp Snapshot", + [TIMESTAMP_POWER_ON_HOURS] = "Timestamp Power on Hours", +}; + +/***************************************************************************** + * Telemetry PCIE Class (02h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_PCIE_EVENT_ID { + PCIE_LINK_UP = 0x0000, + PCIE_LINK_DOWN = 0x0001, + PCIE_ERROR_DETECTED = 0x0002, + PCIE_PERST_ASSERTED = 0x0003, + PCIE_PERST_DEASSERTED = 0x0004, + PCIE_REFCLK_STABLE = 0x0005, + PCIE_VMAIN_STABLE = 0x0006, + PCIE_LINK_NEGOTIATED = 0x0007, +}; + +static const char * const telemetry_pcie_event_id_str[] = { + [PCIE_LINK_UP] = "PCIe Link Up", + [PCIE_LINK_DOWN] = "PCIe Link Down", + [PCIE_ERROR_DETECTED] = "PCIe Error Detected", + [PCIE_PERST_ASSERTED] = "PCIe PERST Asserted", + [PCIE_PERST_DEASSERTED] = "PCIe PERST Deasserted", + [PCIE_REFCLK_STABLE] = "PCIe Refclk Stable", + [PCIE_VMAIN_STABLE] = "PCIe Vmain Stable", + [PCIE_LINK_NEGOTIATED] = "PCIe Link Negotiated", +}; + +enum TELEMETRY_PCIE_STATE_DATA { + PCIE_STATE_UNCHANGED = 0x00, + PCIE_SPEED_CHANGED = 0x01, + PCIE_WIDTH_CHANGED = 0x02, +}; + +static const char * const telemetry_pcie_state_data_str[] = { + [PCIE_STATE_UNCHANGED] = "PCIe State Unchained", + [PCIE_SPEED_CHANGED] = "PCIe Speed Changed", + [PCIE_WIDTH_CHANGED] = "PCIe Width Changed", +}; + +enum TELEMETRY_PCIE_SPEED_DATA { + PCIE_LINK_GEN1 = 0x01, + PCIE_LINK_GEN2 = 0x02, + PCIE_LINK_GEN3 = 0x03, + PCIE_LINK_GEN4 = 0x04, + PCIE_LINK_GEN5 = 0x05, + PCIE_LINK_GEN6 = 0x06, + PCIE_LINK_GEN7 = 0x07, +}; + +static const char * const telemetry_pcie_speed_data_str[] = { + [PCIE_LINK_GEN1] = "PCIe Link Speed Gen1", + [PCIE_LINK_GEN2] = "PCIe Link Speed Gen2", + [PCIE_LINK_GEN3] = "PCIe Link Speed Gen3", + [PCIE_LINK_GEN4] = "PCIe Link Speed Gen4", + [PCIE_LINK_GEN5] = "PCIe Link Speed Gen5", + [PCIE_LINK_GEN6] = "PCIe Link Speed Gen6", + [PCIE_LINK_GEN7] = "PCIe Link Speed Gen7", +}; + +enum TELEMETRY_PCIE_WIDTH_DATA { + PCIE_LINK_X1 = 0x01, + PCIE_LINK_X2 = 0x02, + PCIE_LINK_X4 = 0x03, + PCIE_LINK_X8 = 0x04, + PCIE_LINK_X16 = 0x05, +}; + +static const char * const telemetry_pcie_width_data_str[] = { + [PCIE_LINK_X1] = "PCIe Link Width x1", + [PCIE_LINK_X2] = "PCIe Link Width x2", + [PCIE_LINK_X4] = "PCIe Link Width x4", + [PCIE_LINK_X8] = "PCIe Link Width x8", + [PCIE_LINK_X16] = "PCIe Link Width x16", +}; + +/***************************************************************************** + * Telemetry NVMe Class (03h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_NVME_EVENT_ID { + CC_EN_0_TO_1 = 0x0000, + CC_EN_1_TO_0 = 0x0001, + CSTS_RDY_0_TO_1 = 0x0002, + CSTS_RDY_1_TO_0 = 0x0003, + NVME_EVENT_ID_RESERVED = 0x0004, + CREATE_IO_QUEUE_PROCESSED = 0x0005, + ADMIN_QUEUE_CMD_PROCESSED = 0x0006, + ADMIN_QUEUE_NONZERO_STATUS = 0x0007, + IO_QUEUE_NONZERO_STATUS = 0x0008, + CSTS_CFS_0_TO_1 = 0x0009, + ADMIN_QUEUE_BASE_WRITTEN = 0x000A, + CC_REGISTER_CHANGED = 0x000B, + CSTS_REGISTER_CHANGED = 0x000C, + DELETE_IO_QUEUE_PROCESSED = 0x000D, +}; + +static const char * const telemetry_nvme_event_id_str[] = { + [CC_EN_0_TO_1] = "CC.EN Transitions from 0 to 1", + [CC_EN_1_TO_0] = "CC.EN Transitions from 1 to 0", + [CSTS_RDY_0_TO_1] = "CSTS.RDY Transitions from 0 to 1", + [CSTS_RDY_1_TO_0] = "CSTS.RDY Transitions from 1 to 0", + [NVME_EVENT_ID_RESERVED] = "Reserved NVMe Event ID", + [CREATE_IO_QUEUE_PROCESSED] = "Create IO SQ or CQ Command Processed", + [ADMIN_QUEUE_CMD_PROCESSED] = "Other Admin Queue Command Processed", + [ADMIN_QUEUE_NONZERO_STATUS] = "Admin Command Returned Non-zero Status", + [IO_QUEUE_NONZERO_STATUS] = "IO Command Returned Non-zero Status", + [CSTS_CFS_0_TO_1] = "CSTS.CFS Transitions from 0 to 1", + [ADMIN_QUEUE_BASE_WRITTEN] = "Admin SQ or CQ Base Address Written", + [CC_REGISTER_CHANGED] = "CC Register Changed", + [CSTS_REGISTER_CHANGED] = "CTS Register Changed", + [DELETE_IO_QUEUE_PROCESSED] = "Delete IO SQ or CQ Command Processed", +}; + +/***************************************************************************** + * Telemetry Reset Class (04h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_RESET_EVENT_ID { + PCIE_CONVENTIONAL_HOT_RESET = 0x0000, + MAIN_POWER_CYCLE = 0x0001, + PERST = 0x0002, + PCIE_FUNCTION_LEVEL_RESET = 0x0003, + NVME_SUBSYSTEM_RESET = 0x0004, +}; + +static const char * const telemetry_reset_event_id_str[] = { + [PCIE_CONVENTIONAL_HOT_RESET] = "PCIE Conventional Hot Reset", + [MAIN_POWER_CYCLE] = "Main Power_Cycle", + [PERST] = "PERST", + [PCIE_FUNCTION_LEVEL_RESET] = "PCIE Function Level Reset", + [NVME_SUBSYSTEM_RESET] = "NVMe Subsytem Reset", +}; + +/***************************************************************************** + * Telemetry Boot Sequence Class (05h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_BOOT_SEQ_EVENT_ID { + MAIN_FW_BOOT_COMPLETE = 0x0000, + FTL_LOAD_FROM_NVM_COMPLETE = 0x0001, + FTL_REBUILD_STARTED = 0x0002, + FTL_REBUILD_COMPLETE = 0x0003, +}; + +static const char * const telemetry_boot_seq_event_id_str[] = { + [MAIN_FW_BOOT_COMPLETE] = "Main Firmware Boot Complete", + [FTL_LOAD_FROM_NVM_COMPLETE] = "FTL Load from NVM Complete", + [FTL_REBUILD_STARTED] = "FTL Rebuild Started", + [FTL_REBUILD_COMPLETE] = "FTL Rebuild Complete", +}; + +/***************************************************************************** + * Telemetry Firmware Assert Class (06h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_FW_ASSERT_EVENT_ID { + ASSERT_NVME_CODE = 0x0000, + ASSERT_MEDIA_CODE = 0x0001, + ASSERT_SECURITY_CODE = 0x0002, + ASSERT_BACKGROUND_CODE = 0x0003, + FTL_REBUILD_FAILED = 0x0004, + FTL_DATA_MISMATCH = 0x0005, + ASSERT_OTHER_CODE = 0x0006, +}; + +static const char * const telemetry_fw_assert_event_id_str[] = { + [ASSERT_NVME_CODE] = "Assert in NVMe Processing Code", + [ASSERT_MEDIA_CODE] = "Assert in Media Code", + [ASSERT_SECURITY_CODE] = "Assert in Security Code", + [ASSERT_BACKGROUND_CODE] = "Assert in Background Services Code", + [FTL_REBUILD_FAILED] = "FTL Rebuild Failed", + [FTL_DATA_MISMATCH] = "FTL Data Mismatch", + [ASSERT_OTHER_CODE] = "FTL Other Code", +}; + +/***************************************************************************** + * Telemetry Temperature Class (07h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_TEMPERATURE_EVENT_ID { + COMPOSITE_TEMP_DECREASE = 0x0000, + COMPOSITE_TEMP_INCREASE_WCTEMP = 0x0001, + COMPOSITE_TEMP_INCREASE_CCTEMP = 0x0002, +}; + +static const char * const telemetry_temperature_event_id_str[] = { + [COMPOSITE_TEMP_DECREASE] = "Composite Temp Decreases to (WCTEMP-2)", + [COMPOSITE_TEMP_INCREASE_WCTEMP] = "Composite Temp Increases to WCTEMP", + [COMPOSITE_TEMP_INCREASE_CCTEMP] = "Composite Temp Increases to CCTEMP", +}; + +/***************************************************************************** + * Telemetry Media Debug Class (08h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_MEDIA_DEBUG_EVENT_ID { + XOR_RECOVERY_INVOKED = 0x0000, + UNCORRECTABLE_MEDIA_ERROR = 0x0001, + BAD_BLOCK_PROGRAM_ERROR = 0x0002, + BAD_BLOCK_ERASE_ERROR = 0x0003, + BAD_BLOCK_READ_ERROR = 0x0004, + PLANE_FAILURE_EVENT = 0x0005, +}; + +static const char * const telemetry_media_debug_event_id_str[] = { + [XOR_RECOVERY_INVOKED] = "XOR Recovery Invoked", + [UNCORRECTABLE_MEDIA_ERROR] = "Uncorrectable Media Error", + [BAD_BLOCK_PROGRAM_ERROR] = "Block Marked Bad Due to Program Error", + [BAD_BLOCK_ERASE_ERROR] = "Block Marked Bad Due to Erase Error", + [BAD_BLOCK_READ_ERROR] = "Block Marked Bad Due to Read Error", + [PLANE_FAILURE_EVENT] = "Plane Failure Event", +}; + +/***************************************************************************** + * Telemetry Media Wear Class (09h) Event ID's and Strings + *****************************************************************************/ +enum TELEMETRY_MEDIA_WEAR_EVENT_ID { + MEDIA_WEAR = 0x0000, +}; + +static const char * const telemetry_media_wear_event_id_str[] = { + [MEDIA_WEAR] = "Media Wear", +}; + + +/***************************************************************************** + * Telemetry Data Structures + *****************************************************************************/ +#define TELEMETRY_HEADER_SIZE 512 +#define TELEMETRY_DATA_SIZE 1536 +#define TELEMETRY_BYTE_PER_BLOCK 512 +#define TELEMETRY_TRANSFER_SIZE 1024 +#define FILE_NAME_SIZE 2048 + +enum TELEMETRY_TYPE { + TELEMETRY_TYPE_NONE = 0, + TELEMETRY_TYPE_HOST = 7, + TELEMETRY_TYPE_CONTROLLER = 8, + TELEMETRY_TYPE_HOST_0 = 9, + TELEMETRY_TYPE_HOST_1 = 10, +}; + +struct telemetry_initiated_log { + __u8 LogIdentifier; + __u8 Reserved1[4]; + __u8 IEEE[3]; + __le16 DataArea1LastBlock; + __le16 DataArea2LastBlock; + __le16 DataArea3LastBlock; + __u8 Reserved2[2]; + __le32 DataArea4LastBlock; + __u8 Reserved3[361]; + __u8 DataHostGenerationNumber; + __u8 CtlrDataAvailable; + __u8 DataCtlrGenerationNumber; + __u8 ReasonIdentifier[128]; +}; + +struct telemetry_stats_desc { + __le16 id; + __u8 info; + __u8 ns_info; + __le16 size; + __le16 rsvd1; + __u8 data[]; +}; + +struct telemetry_event_desc { + __u8 class; + __le16 id; + __u8 size; + __u8 data[]; +}; + +struct event_fifo { + __le64 start; + __le64 size; +}; + +struct telemetry_data_area_1 { + __le16 major_version; + __le16 minor_version; + __u8 reserved1[4]; + __le64 timestamp; + __u8 log_page_guid[16]; + __u8 no_of_tps_supp; + __u8 tps; + __u8 reserved2[6]; + __le64 sls; + __u8 reserved3[8]; + __u8 fw_revision[8]; + __u8 reserved4[32]; + __le64 da1_stat_start; + __le64 da1_stat_size; + __le64 da2_stat_start; + __le64 da2_stat_size; + __u8 reserved5[32]; + __u8 event_fifo_da[16]; + struct event_fifo event_fifos[16]; + __u8 reserved6[80]; + __u8 smart_health_info[512]; + __u8 smart_health_info_extended[512]; +}; + +#define DATA_SIZE_12 12 +#define DATA_SIZE_8 8 +#define DATA_SIZE_4 4 +#define MAX_BUFFER_32_KB 0x8000 +#define OCP_TELEMETRY_DATA_BLOCK_SIZE 512 +#define SIZE_OF_DWORD 4 +#define MAX_NUM_FIFOS 16 +#define DA1_OFFSET 512 +#define DEFAULT_ASCII_STRING_SIZE 16 + +#define DEFAULT_TELEMETRY_BIN "telemetry.bin" +#define DEFAULT_STRING_BIN "string.bin" +#define DEFAULT_OUTPUT_FORMAT_JSON "json" + +/* C9 Telemetry String Log Format Log Page */ +#define C9_GUID_LENGTH 16 +#define C9_TELEMETRY_STRING_LOG_ENABLE_OPCODE 0xC9 +#define C9_TELEMETRY_STR_LOG_LEN 432 +#define C9_TELEMETRY_STR_LOG_SIST_OFST 431 + +#define STR_LOG_PAGE_HEADER "Log Page Header" +#define STR_REASON_IDENTIFIER "Reason Identifier" +#define STR_TELEMETRY_HOST_DATA_BLOCK_1 "Telemetry Host-Initiated Data Block 1" +#define STR_SMART_HEALTH_INFO "SMART / Health Information Log(LID-02h)" +#define STR_SMART_HEALTH_INTO_EXTENDED "SMART / Health Information Extended(LID-C0h)" +#define STR_DA_1_STATS "Data Area 1 Statistics" +#define STR_DA_2_STATS "Data Area 2 Statistics" +#define STR_DA_1_EVENT_FIFO_INFO "Data Area 1 Event FIFO info" +#define STR_DA_2_EVENT_FIFO_INFO "Data Area 2 Event FIFO info" +#define STR_STATISTICS_IDENTIFIER "Statistics Identifier" +#define STR_STATISTICS_IDENTIFIER_STR "Statistic Identifier String" +#define STR_STATISTICS_INFO_BEHAVIOUR_TYPE "Statistics Info Behavior Type" +#define STR_STATISTICS_INFO_RESERVED "Statistics Info Reserved" +#define STR_NAMESPACE_IDENTIFIER "Namespace Identifier" +#define STR_NAMESPACE_INFO_VALID "Namespace Information Valid" +#define STR_STATISTICS_DATA_SIZE "Statistic Data Size" +#define STR_RESERVED "Reserved" +#define STR_STATISTICS_SPECIFIC_DATA "Statistic Specific Data" +#define STR_CLASS_SPECIFIC_DATA "Class Specific Data" +#define STR_DBG_EVENT_CLASS_TYPE "Debug Event Class type" +#define STR_EVENT_IDENTIFIER "Event Identifier" +#define STR_EVENT_STRING "Event String" +#define STR_EVENT_DATA_SIZE "Event Data Size" +#define STR_VU_EVENT_STRING "VU Event String" +#define STR_VU_EVENT_ID_STRING "VU Event Identifier" +#define STR_VU_DATA "VU Data" +#define STR_LINE "==============================================================================\n" +#define STR_LINE2 "-----------------------------------------------------------------------------\n" + +/** + * enum ocp_telemetry_data_area - Telemetry Data Areas + * @DATA_AREA_1: Data Area 1 + * @DATA_AREA_2: Data Area 2 + * @DATA_AREA_3: Data Area 3 + * @DATA_AREA_4: Data Area 4 + */ +enum ocp_telemetry_data_area { + DATA_AREA_1 = 0x01, + DATA_AREA_2 = 0x02, + DATA_AREA_3 = 0x03, + DATA_AREA_4 = 0x04, +}; + +/** + * enum ocp_telemetry_string_tables - OCP telemetry string tables + * @STATISTICS_IDENTIFIER_STRING: Statistic Identifier string + * @EVENT_STRING: Event String + * @VU_EVENT_STRING: VU Event String + */ +enum ocp_telemetry_string_tables { + STATISTICS_IDENTIFIER_STRING = 0, + EVENT_STRING, + VU_EVENT_STRING +}; + +/** + * enum ocp_telemetry_debug_event_class_types - OCP Debug Event Class types + * @RESERVED_CLASS_TYPE: Reserved class + * @TIME_STAMP_CLASS_TYPE: Time stamp class + * @PCIE_CLASS_TYPE: PCIe class + * @NVME_CLASS_TYPE: NVME class + * @RESET_CLASS_TYPE: Reset class + * @BOOT_SEQUENCE_CLASS_TYPE: Boot Sequence class + * @FIRMWARE_ASSERT_CLASS_TYPE: Firmware Assert class + * @TEMPERATURE_CLASS_TYPE: Temperature class + * @MEDIA_CLASS_TYPE: Media class + * @MEDIA_WEAR_CLASS_TYPE: Media wear class + * @STATISTIC_SNAPSHOT_CLASS_TYPE: Statistic snapshot class + * @RESERVED: Reserved class + * @VENDOR_UNIQUE_CLASS_TYPE: Vendor Unique class + */ +enum ocp_telemetry_debug_event_class_types { + RESERVED_CLASS_TYPE = 0x00, + TIME_STAMP_CLASS_TYPE = 0x01, + PCIE_CLASS_TYPE = 0x02, + NVME_CLASS_TYPE = 0x03, + RESET_CLASS_TYPE = 0x04, + BOOT_SEQUENCE_CLASS_TYPE = 0x05, + FIRMWARE_ASSERT_CLASS_TYPE = 0x06, + TEMPERATURE_CLASS_TYPE = 0x07, + MEDIA_CLASS_TYPE = 0x08, + MEDIA_WEAR_CLASS_TYPE = 0x09, + STATISTIC_SNAPSHOT_CLASS_TYPE = 0x0A, + //RESERVED = 7Fh-0Bh, + //VENDOR_UNIQUE_CLASS_TYPE = FFh-80h, +}; + +/** + * struct telemetry_str_log_format - Telemetry String Log Format + * @log_page_version: indicates the version of the mapping this log page uses + * Shall be set to 01h. + * @reserved1: Reserved. + * @log_page_guid: Shall be set to B13A83691A8F408B9EA495940057AA44h. + * @sls: Shall be set to the number of DWORDS in the String Log. + * @reserved2: reserved. + * @sits: shall be set to the number of DWORDS in the Statistics + * Identifier String Table + * @ests: Shall be set to the number of DWORDS from byte 0 of this + * log page to the start of the Event String Table + * @estsz: shall be set to the number of DWORDS in the Event String Table + * @vu_eve_sts: Shall be set to the number of DWORDS from byte 0 of this + * log page to the start of the VU Event String Table + * @vu_eve_st_sz: shall be set to the number of DWORDS in the VU Event String Table + * @ascts: the number of DWORDS from byte 0 of this log page until the + * ASCII Table Starts. + * @asctsz: the number of DWORDS in the ASCII Table + * @fifo1: FIFO 0 ASCII String + * @fifo2: FIFO 1 ASCII String + * @fifo3: FIFO 2 ASCII String + * @fifo4: FIFO 3 ASCII String + * @fif05: FIFO 4 ASCII String + * @fifo6: FIFO 5 ASCII String + * @fifo7: FIFO 6 ASCII String + * @fifo8: FIFO 7 ASCII String + * @fifo9: FIFO 8 ASCII String + * @fifo10: FIFO 9 ASCII String + * @fif011: FIFO 10 ASCII String + * @fif012: FIFO 11 ASCII String + * @fifo13: FIFO 12 ASCII String + * @fif014: FIFO 13 ASCII String + * @fif015: FIFO 14 ASCII String + * @fif016: FIFO 15 ASCII String + * @reserved3: reserved + */ +struct __packed telemetry_str_log_format { + __u8 log_page_version; + __u8 reserved1[15]; + __u8 log_page_guid[C9_GUID_LENGTH]; + __le64 sls; + __u8 reserved2[24]; + __le64 sits; + __le64 sitsz; + __le64 ests; + __le64 estsz; + __le64 vu_eve_sts; + __le64 vu_eve_st_sz; + __le64 ascts; + __le64 asctsz; + __u8 fifo1[16]; + __u8 fifo2[16]; + __u8 fifo3[16]; + __u8 fifo4[16]; + __u8 fifo5[16]; + __u8 fifo6[16]; + __u8 fifo7[16]; + __u8 fifo8[16]; + __u8 fifo9[16]; + __u8 fifo10[16]; + __u8 fifo11[16]; + __u8 fifo12[16]; + __u8 fifo13[16]; + __u8 fifo14[16]; + __u8 fifo15[16]; + __u8 fifo16[16]; + __u8 reserved3[48]; +}; + +/* + * struct statistics_id_str_table_entry - Statistics Identifier String Table Entry + * @vs_si: Shall be set the Vendor Unique Statistic Identifier number. + * @reserved1: Reserved + * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. + * @ascii_id_ofst: Shall be set to the offset from DWORD 0/Byte 0 of the Start + * of the ASCII Table to the first character of the string for + * this Statistic Identifier string.. + * @reserved2 reserved + */ +struct __packed statistics_id_str_table_entry { + __le16 vs_si; + __u8 reserved1; + __u8 ascii_id_len; + __le64 ascii_id_ofst; + __le32 reserved2; +}; + +/* + * struct event_id_str_table_entry - Event Identifier String Table Entry + * @deb_eve_class: Shall be set the Debug Class. + * @ei: Shall be set to the Event Identifier + * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. + * @ascii_id_ofst: This is the offset from DWORD 0/ Byte 0 of the start of the + * ASCII table to the ASCII data for this identifier + * @reserved2 reserved + */ +struct __packed event_id_str_table_entry { + __u8 deb_eve_class; + __le16 ei; + __u8 ascii_id_len; + __le64 ascii_id_ofst; + __le32 reserved2; +}; + +/* + * struct vu_event_id_str_table_entry - VU Event Identifier String Table Entry + * @deb_eve_class: Shall be set the Debug Class. + * @vu_ei: Shall be set to the VU Event Identifier + * @ascii_id_len: Shall be set the number of ASCII Characters that are valid. + * @ascii_id_ofst: This is the offset from DWORD 0/ Byte 0 of the start of the + * ASCII table to the ASCII data for this identifier + * @reserved reserved + */ +struct __packed vu_event_id_str_table_entry { + __u8 deb_eve_class; + __le16 vu_ei; + __u8 ascii_id_len; + __le64 ascii_id_ofst; + __le32 reserved; +}; + + +struct __packed ocp_telemetry_parse_options { + char *telemetry_log; + char *string_log; + char *output_file; + char *output_format; + int data_area; + char *telemetry_type; +}; + +struct __packed nvme_ocp_telemetry_reason_id +{ + __u8 error_id[64]; // Bytes 63:00 + __u8 file_id[8]; // Bytes 71:64 + __le16 line_number; // Bytes 73:72 + __u8 valid_flags; // Bytes 74 + __u8 reserved[21]; // Bytes 95:75 + __u8 vu_reason_ext[32]; // Bytes 127:96 +}; + +struct __packed nvme_ocp_telemetry_common_header +{ + __u8 log_id; // Byte 00 + __le32 reserved1; // Bytes 04:01 + __u8 ieee_oui_id[3]; // Bytes 07:05 + __le16 da1_last_block; // Bytes 09:08 + __le16 da2_last_block; // Bytes 11:10 + __le16 da3_last_block; // Bytes 13:12 + __le16 reserved2; // Bytes 15:14 + __le32 da4_last_block; // Bytes 19:16 +}; + +struct __packed nvme_ocp_telemetry_host_initiated_header +{ + struct nvme_ocp_telemetry_common_header commonHeader; // Bytes 19:00 + __u8 reserved3[360]; // Bytes 379:20 + __u8 host_initiated_scope; // Byte 380 + __u8 host_initiated_gen_number; // Byte 381 + __u8 host_initiated_data_available; // Byte 382 + __u8 ctrl_initiated_gen_number; // Byte 383 + struct nvme_ocp_telemetry_reason_id reason_id; // Bytes 511:384 +}; + +struct __packed nvme_ocp_telemetry_controller_initiated_header +{ + struct nvme_ocp_telemetry_common_header commonHeader; // Bytes 19:00 + __u8 reserved3[361]; // Bytes 380:20 + __u8 ctrl_initiated_scope; // Byte 381 + __u8 ctrl_initiated_data_available; // Byte 382 + __u8 ctrl_initiated_gen_number; // Byte 383 + struct nvme_ocp_telemetry_reason_id reason_id; // Bytes 511:384 +}; + +struct __packed nvme_ocp_telemetry_smart +{ + __u8 critical_warning; // Byte 0 + __le16 composite_temperature; // Bytes 2:1 + __u8 available_spare; // Bytes 3 + __u8 available_spare_threshold; // Bytes 4 + __u8 percentage_used; // Bytes 5 + __u8 reserved1[26]; // Bytes 31:6 + __u8 data_units_read[16]; // Bytes 47:32 + __u8 data_units_written[16]; // Bytes 63:48 + __u8 host_read_commands[16]; // Byte 79:64 + __u8 host_write_commands[16]; // Bytes 95:80 + __u8 controller_busy_time[16]; // Bytes 111:96 + __u8 power_cycles[16]; // Bytes 127:112 + __u8 power_on_hours[16]; // Bytes 143:128 + __u8 unsafe_shutdowns[16]; // Bytes 159:144 + __u8 media_and_data_integrity_errors[16]; // Bytes 175:160 + __u8 number_of_error_information_log_entries[16]; // Bytes 191:176 + __le32 warning_composite_temperature_time; // Byte 195:192 + __le32 critical_composite_temperature_time; // Bytes 199:196 + __le16 temperature_sensor1; // Bytes 201:200 + __le16 temperature_sensor2; // Byte 203:202 + __le16 temperature_sensor3; // Byte 205:204 + __le16 temperature_sensor4; // Bytes 207:206 + __le16 temperature_sensor5; // Bytes 209:208 + __le16 temperature_sensor6; // Bytes 211:210 + __le16 temperature_sensor7; // Bytes 213:212 + __le16 temperature_sensor8; // Bytes 215:214 + __le32 thermal_management_temperature1_transition_count; // Bytes 219:216 + __le32 thermal_management_temperature2_transition_count; // Bytes 223:220 + __le32 total_time_for_thermal_management_temperature1; // Bytes 227:224 + __le32 total_time_for_thermal_management_temperature2; // Bytes 231:228 + __u8 reserved2[280]; // Bytes 511:232 +}; + +struct __packed nvme_ocp_telemetry_smart_extended +{ + __u8 physical_media_units_written[16]; // Bytes 15:0 + __u8 physical_media_units_read[16]; // Bytes 31:16 + __u8 bad_user_nand_blocks_raw_count[6]; // Bytes 37:32 + __le16 bad_user_nand_blocks_normalized_value; // Bytes 39:38 + __u8 bad_system_nand_blocks_raw_count[6]; // Bytes 45:40 + __le16 bad_system_nand_blocks_normalized_value; // Bytes 47:46 + __le64 xor_recovery_count; // Bytes 55:48 + __le64 uncorrectable_read_error_count; // Bytes 63:56 + __le64 soft_ecc_error_count; // Bytes 71:64 + __le32 end_to_end_correction_counts_detected_errors; // Bytes 75:72 + __le32 end_to_end_correction_counts_corrected_errors; // Bytes 79:76 + __u8 system_data_percent_used; // Byte 80 + __u8 refresh_counts[7]; // Bytes 87:81 + __le32 max_user_data_erase_count; // Bytes 91:88 + __le32 min_user_data_erase_count; // Bytes 95:92 + __u8 num_thermal_throttling_events; // Bytes 96 + __u8 current_throttling_status; // Bytes 97 + __u8 errata_version_field; // Byte 98 + __le16 point_version_field; // Byte 100:99 + __le16 minor_version_field; // Byte 102:101 + __u8 major_version_field; // Byte 103 + __le64 pcie_correctable_error_count; // Bytes 111:104 + __le32 incomplete_shutdowns; // Bytes 115:112 + __le32 reserved1; // Bytes 119:116 + __u8 percent_free_blocks; // Byte 120 + __u8 reserved2[7]; // Bytes 127:121 + __le16 capacitor_health; // Bytes 129:128 + __u8 nvme_base_errata_version; // Byte 130 + __u8 nvme_command_set_errata_version; // Byte 131 + __le32 reserved3; // Bytes 135:132 + __le64 unaligned_io; // Bytes 143:136 + __le64 security_version_number; // Bytes 151:144 + __le64 total_nuse; // Bytes 159:152 + __u8 plp_start_count[16]; // Bytes 175:160 + __u8 endurance_estimate[16]; // Bytes 191:176 + __le64 pcie_link_retraining_count; // Bytes 199:192 + __le64 power_state_change_count; // Bytes 207:200 + __le64 lowest_permitted_firmware_revision; // Bytes 215:208 + __u8 reserved4[278]; // Bytes 493:216 + __le16 log_page_version; // Bytes 495:494 + __u8 log_page_guid[16]; // Bytes 511:496 +}; + +struct __packed nvme_ocp_event_fifo_data +{ + __le32 event_fifo_num; + __u8 event_fifo_da; + __le64 event_fifo_start; + __le64 event_fifo_size; +}; + +struct __packed nvme_ocp_telemetry_offsets +{ + __le32 data_area; + __le32 header_size; + __le32 da1_start_offset; + __le32 da1_size; + __le32 da2_start_offset; + __le32 da2_size; + __le32 da3_start_offset; + __le32 da3_size; + __le32 da4_start_offset; + __le32 da4_size; +}; + +struct __packed nvme_ocp_event_fifo_offsets +{ + __le64 event_fifo_start; + __le64 event_fifo_size; +}; + +struct __packed nvme_ocp_header_in_da1 +{ + __le16 major_version; // Bytes 1:0 + __le16 minor_version; // Bytes 3:2 + __le32 reserved1; // Bytes 7:4 + __le64 time_stamp; // Bytes 15:8 + __u8 log_page_guid[16]; // Bytes 31:16 + __u8 num_telemetry_profiles_supported; // Byte 32 + __u8 telemetry_profile_selected; // Byte 33 + __u8 reserved2[6]; // Bytes 39:34 + __le64 string_log_size; // Bytes 47:40 + __le64 reserved3; // Bytes 55:48 + __le64 firmware_revision; // Bytes 63:56 + __u8 reserved4[32]; // Bytes 95:64 + __le64 da1_statistic_start; // Bytes 103:96 + __le64 da1_statistic_size; // Bytes 111:104 + __le64 da2_statistic_start; // Bytes 119:112 + __le64 da2_statistic_size; // Bytes 127:120 + __u8 reserved5[32]; // Bytes 159:128 + __u8 event_fifo_da[16]; // Bytes 175:160 + struct nvme_ocp_event_fifo_offsets fifo_offsets[16]; // Bytes 431:176 + __u8 reserved6[80]; // Bytes 511:432 + struct nvme_ocp_telemetry_smart smart_health_info; // Bytes 1023:512 + struct nvme_ocp_telemetry_smart_extended smart_health_info_extended; // Bytes 1535:1024 +}; + +struct __packed nvme_ocp_telemetry_statistic_descriptor +{ + __le16 statistic_id; // Bytes 1:0 + __u8 statistic_info_behaviour_type : 4; // Byte 2(3:0) + __u8 statistic_info_reserved : 4; // Byte 2(7:4) + __u8 ns_info_nsid : 7; // Bytes 3(6:0) + __u8 ns_info_ns_info_valid : 1; // Bytes 3(7) + __le16 statistic_data_size; // Bytes 5:4 + __le16 reserved; // Bytes 7:6 +}; + +struct __packed nvme_ocp_telemetry_event_descriptor +{ + __u8 debug_event_class_type; // Byte 0 + __le16 event_id; // Bytes 2:1 + __u8 event_data_size; // Byte 3 +}; + +struct __packed nvme_ocp_time_stamp_dbg_evt_class_format +{ + __u8 time_stamp[DATA_SIZE_8]; // Bytes 11:4 + __le16 vu_event_identifier; // Bytes 13:12 +}; + +struct __packed nvme_ocp_pcie_dbg_evt_class_format +{ + __u8 pCIeDebugEventData[DATA_SIZE_4]; // Bytes 7:4 + __le16 vu_event_identifier; // Bytes 9:8 +}; + +struct __packed nvme_ocp_nvme_dbg_evt_class_format +{ + __u8 nvmeDebugEventData[DATA_SIZE_8]; // Bytes 11:4 + __le16 vu_event_identifier; // Bytes 13:12 +}; + +struct __packed nvme_ocp_common_dbg_evt_class_format +{ + __le16 vu_event_identifier; // Bytes 5:4 +}; + +struct __packed nvme_ocp_media_wear_dbg_evt_class_format +{ + __u8 currentMediaWear[DATA_SIZE_12]; // Bytes 15:4 + __le16 vu_event_identifier; // Bytes 17:16 +}; + +struct __packed nvme_ocp_statistic_snapshot_evt_class_format +{ + struct nvme_ocp_telemetry_statistic_descriptor statisticDescriptorData; // Bytes 11:10 +}; + +struct __packed nvme_ocp_statistics_identifier_string_table +{ + __le16 vs_statistic_identifier; //1:0 + __u8 reserved1; //2 + __u8 ascii_id_length; //3 + __le64 ascii_id_offset; //11:4 + __le32 reserved2; //15:12 +}; + +struct __packed nvme_ocp_event_string_table +{ + __u8 debug_event_class; //0 + __le16 event_identifier; //2:1 + __u8 ascii_id_length; //3 + __le64 ascii_id_offset; //11:4 + __le32 reserved; //15:12 +}; + +struct __packed nvme_ocp_vu_event_string_table +{ + __u8 debug_event_class; //0 + __le16 vu_event_identifier; //2:1 + __u8 ascii_id_length; //3 + __le64 ascii_id_offset; //11:4 + __le32 reserved; //15:12 +}; + +struct __packed nvme_ocp_telemetry_string_header +{ + __u8 version; //0:0 + __u8 reserved1[15]; //15:1 + __u8 guid[16]; //32:16 + __le64 string_log_size; //39:32 + __u8 reserved2[24]; //63:40 + __le64 sits; //71:64 Statistics Identifier String Table Start(SITS) + __le64 sitsz; //79:72 Statistics Identifier String Table Size (SITSZ) + __le64 ests; //87:80 Event String Table Start(ESTS) + __le64 estsz; //95:88 Event String Table Size(ESTSZ) + __le64 vu_ests; //103:96 VU Event String Table Start + __le64 vu_estsz; //111:104 VU Event String Table Size + __le64 ascts; //119:112 ASCII Table start + __le64 asctsz; //127:120 ASCII Table Size + __u8 fifo_ascii_string[16][16]; //383:128 + __u8 reserved3[48]; //431:384 +}; + +struct __packed statistic_entry { + int identifier; + char *description; +}; + +/************************************************************ + * Telemetry Parsing Function Prototypes + ************************************************************/ +void print_vu_event_data(__u32 size, __u8 *data); +void print_stats_desc(struct telemetry_stats_desc *stat_desc); +void print_telemetry_fifo_event(__u8 class_type, + __u16 id, __u8 size, __u8 *data); + + +/************************************************************ + * Telemetry ID to String Conversion Functions + ************************************************************/ +static inline const char *arg_str(const char * const *strings, + size_t array_size, size_t idx) +{ + if (idx < array_size && strings[idx]) + return strings[idx]; + return "unrecognized"; +} + +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +#define ARGSTR(s, i) arg_str(s, ARRAY_SIZE(s), i) + +static inline const char *telemetry_stat_id_to_string(int stat_id) +{ + return ARGSTR(telemetry_stat_id_str, stat_id); +} +static inline const char *telemetry_event_class_to_string(int class) +{ + return ARGSTR(telemetry_event_class_str, class); +} +static inline const char *telemetry_ts_event_to_string(int event_id) +{ + return ARGSTR(telemetry_timestamp_event_id_str, event_id); +} +static inline const char *telemetry_pcie_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_pcie_event_id_str, event_id); +} +static inline const char *telemetry_pcie_state_data_to_string(int pcie_state) +{ + return ARGSTR(telemetry_pcie_state_data_str, pcie_state); +} +static inline const char *telemetry_pcie_speed_data_to_string(int pcie_speed) +{ + return ARGSTR(telemetry_pcie_speed_data_str, pcie_speed); +} +static inline const char *telemetry_pcie_width_data_to_string(int pcie_width) +{ + return ARGSTR(telemetry_pcie_width_data_str, pcie_width); +} +static inline const char *telemetry_nvme_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_nvme_event_id_str, event_id); +} +static inline const char *telemetry_reset_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_reset_event_id_str, event_id); +} +static inline const char *telemetry_boot_seq_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_boot_seq_event_id_str, event_id); +} +static inline const char *telemetry_fw_assert_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_fw_assert_event_id_str, event_id); +} +static inline const char *telemetry_temperature_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_temperature_event_id_str, event_id); +} +static inline const char *telemetry_media_debug_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_media_debug_event_id_str, event_id); +} +static inline const char *telemetry_media_wear_event_id_to_string(int event_id) +{ + return ARGSTR(telemetry_media_wear_event_id_str, event_id); +} + +/** + * @brief parse the ocp telemetry host or controller log binary file + * into json or text + * + * @param options, input pointer for inputs like telemetry log bin file, + * string log bin file and output file etc. + * + * @return 0 success + */ +int parse_ocp_telemetry_log(struct ocp_telemetry_parse_options *options); + +/** + * @brief parse the ocp telemetry string log binary file to json or text + * + * @param event_fifo_num, input event FIFO number + * @param debug_event_class, input debug event class id + * @param string_table, input string table + * @param description, input description string + * + * @return 0 success + */ +int parse_ocp_telemetry_string_log(int event_fifo_num, int identifier, int debug_event_class, + enum ocp_telemetry_string_tables string_table, char *description); + +/** + * @brief gets the telemetry datas areas, offsets and sizes information + * + * @param ptelemetry_common_header, input telemetry common header pointer + * @param ptelemetry_das_offset, input telemetry offsets pointer + * + * @return 0 success + */ +int get_telemetry_das_offset_and_size( + struct nvme_ocp_telemetry_common_header *ptelemetry_common_header, + struct nvme_ocp_telemetry_offsets *ptelemetry_das_offset); + +/** + * @brief parses statistics data to text or json formats + * + * @param root, input time json root object pointer + * @param ptelemetry_das_offset, input telemetry offsets pointer + * @param fp, input file pointer + * + * @return 0 success + */ +int parse_statistics(struct json_object *root, struct nvme_ocp_telemetry_offsets *pOffsets, + FILE *fp); + +/** + * @brief parses a single statistic data to text or json formats + * + * @param pstatistic_entry, statistic entry pointer + * @param pstats_array, stats array pointer + * @param fp, input file pointer + * + * @return 0 success + */ +int parse_statistic(struct nvme_ocp_telemetry_statistic_descriptor *pstatistic_entry, + struct json_object *pstats_array, FILE *fp); + +/** + * @brief parses event fifos data to text or json formats + * + * @param root, input time json root object pointer + * @param poffsets, input telemetry offsets pointer + * @param fp, input file pointer + * + * @return 0 success + */ +int parse_event_fifos(struct json_object *root, struct nvme_ocp_telemetry_offsets *poffsets, + FILE *fp); + +/** + * @brief parses a single event fifo data to text or json formats + * + * @param fifo_num, input event fifo number + * @param pfifo_start, event fifo start pointer + * @param pevent_fifos_object, event fifos json object pointer + * @param ptelemetry_das_offset, input telemetry offsets pointer + * @param fifo_size, input event fifo size + * @param fp, input file pointer + * + * @return 0 success + */ +int parse_event_fifo(unsigned int fifo_num, unsigned char *pfifo_start, + struct json_object *pevent_fifos_object, unsigned char *pstring_buffer, + struct nvme_ocp_telemetry_offsets *poffsets, __u64 fifo_size, FILE *fp); + +/** + * @brief parses event fifos data to text or json formats + * + * @return 0 success + */ +int print_ocp_telemetry_normal(struct ocp_telemetry_parse_options *options); + +/** + * @brief parses event fifos data to text or json formats + * + * @return 0 success + */ +int print_ocp_telemetry_json(struct ocp_telemetry_parse_options *options); + +/** + * @brief gets statistic id ascii string + * + * @param identifier, string id + * @param description, string description + * + * @return 0 success + */ +int get_static_id_ascii_string(int identifier, char *description); + +/** + * @brief gets event id ascii string + * + * @param identifier, string id + * @param debug_event_class, debug event class + * @param description, string description + * + * @return 0 success + */ +int get_event_id_ascii_string(int identifier, int debug_event_class, char *description); + +/** + * @brief gets vu event id ascii string + * + * @param identifier, string id + * @param debug_event_class, debug event class + * @param description, string description + * + * @return 0 success + */ +int get_vu_event_id_ascii_string(int identifier, int debug_event_class, char *description); + +/** + * @brief parses a time-stamp event fifo data to text or json formats + * + * @param pevent_descriptor, input event descriptor data + * @param pevent_descriptor_obj, event descriptor json object pointer + * @param pevent_specific_data, input event specific data + * @param pevent_fifos_object, event fifos json object pointer + * @param fp, input file pointer + * + * @return + */ +void parse_time_stamp_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp); + +/** + * @brief parses a pcie event fifo data to text or json formats + * + * @param pevent_descriptor, input event descriptor data + * @param pevent_descriptor_obj, event descriptor json object pointer + * @param pevent_specific_data, input event specific data + * @param pevent_fifos_object, event fifos json object pointer + * @param fp, input file pointer + * + * @return + */ +void parse_pcie_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp); + +/** + * @brief parses a nvme event fifo data to text or json formats + * + * @param pevent_descriptor, input event descriptor data + * @param pevent_descriptor_obj, event descriptor json object pointer + * @param pevent_specific_data, input event specific data + * @param pevent_fifos_object, event fifos json object pointer + * @param fp, input file pointer + * + * @return + */ +void parse_nvme_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp); + +/** + * @brief parses common event fifo data to text or json formats + * + * @param pevent_descriptor, input event descriptor data + * @param pevent_descriptor_obj, event descriptor json object pointer + * @param pevent_specific_data, input event specific data + * @param pevent_fifos_object, event fifos json object pointer + * @param fp, input file pointer + * + * @return + */ +void parse_common_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp); + +/** + * @brief parses a media-wear event fifo data to text or json formats + * + * @param pevent_descriptor, input event descriptor data + * @param pevent_descriptor_obj, event descriptor json object pointer + * @param pevent_specific_data, input event specific data + * @param pevent_fifos_object, event fifos json object pointer + * @param fp, input file pointer + * + * @return + */ +void parse_media_wear_event(struct nvme_ocp_telemetry_event_descriptor *pevent_descriptor, + struct json_object *pevent_descriptor_obj, __u8 *pevent_specific_data, + struct json_object *pevent_fifos_object, FILE *fp); diff --git a/plugins/sed/sedopal_cmd.c b/plugins/sed/sedopal_cmd.c index 21ebd36..d9a789c 100644 --- a/plugins/sed/sedopal_cmd.c +++ b/plugins/sed/sedopal_cmd.c @@ -251,8 +251,21 @@ int sedopal_cmd_lock(int fd) */ int sedopal_cmd_unlock(int fd) { + int rc; + + rc = sedopal_lock_unlock(fd, OPAL_RW); - return sedopal_lock_unlock(fd, OPAL_RW); + /* + * If the unlock was successful, force a re-read of the + * partition table. Return rc of unlock operation. + */ + if (rc == 0) { + if (ioctl(fd, BLKRRPART, 0) != 0) + fprintf(stderr, + "Warning: failed re-reading partition\n"); + } + + return rc; } /* @@ -275,18 +288,6 @@ int sedopal_lock_unlock(int fd, int lock_state) if (rc != 0) fprintf(stderr, "Error: failed locking or unlocking - %d\n", rc); - - /* - * If the unlock was successful, force a re-read of the - * partition table. - */ - if (rc == 0) { - rc = ioctl(fd, BLKRRPART, 0); - if (rc != 0) - fprintf(stderr, - "Error: failed re-reading partition\n"); - } - return rc; } @@ -397,6 +398,14 @@ int sedopal_cmd_revert(int fd) revert_lsp.__pad = 0; rc = ioctl(fd, IOC_OPAL_REVERT_LSP, &revert_lsp); + if (rc == 0) { + /* + * TPER must also be reverted. + */ + rc = ioctl(fd, IOC_OPAL_REVERT_TPR, &revert_lsp.key); + if (rc != 0) + fprintf(stderr, "Error: revert TPR - %d\n", rc); + } #else rc = -EOPNOTSUPP; #endif @@ -465,7 +474,7 @@ void sedopal_print_locking_features(uint8_t features) int sedopal_cmd_discover(int fd) { #ifdef IOC_OPAL_DISCOVERY - int rc; + int rc, feat_length; bool sedopal_locking_supported = false; struct opal_discovery discover; struct level_0_discovery_header *dh; @@ -500,6 +509,7 @@ int sedopal_cmd_discover(int fd) */ while (feat < feat_end) { code = be16toh(feat->code); + feat_length = feat->length + 4 /* hdr */; switch (code) { case OPAL_FEATURE_CODE_LOCKING: locking_flags = feat->feature; @@ -511,7 +521,7 @@ int sedopal_cmd_discover(int fd) break; } - feat++; + feat = (struct level_0_discovery_features *)((char *)feat + feat_length); } rc = 0; diff --git a/plugins/solidigm/meson.build b/plugins/solidigm/meson.build index 052afa1..df2dc57 100644 --- a/plugins/solidigm/meson.build +++ b/plugins/solidigm/meson.build @@ -11,6 +11,7 @@ sources += [ 'plugins/solidigm/solidigm-temp-stats.c', 'plugins/solidigm/solidigm-get-drive-info.c', 'plugins/solidigm/solidigm-ocp-version.c', + 'plugins/solidigm/solidigm-workload-tracker.c', ] subdir('solidigm-telemetry') diff --git a/plugins/solidigm/solidigm-garbage-collection.c b/plugins/solidigm/solidigm-garbage-collection.c index 002b187..3c046b0 100644 --- a/plugins/solidigm/solidigm-garbage-collection.c +++ b/plugins/solidigm/solidigm-garbage-collection.c @@ -68,7 +68,7 @@ static void vu_gc_log_show(struct garbage_control_collection_log *payload, const int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *cmd, struct plugin *plugin) { const char *desc = "Get and parse Solidigm vendor specific garbage collection event log."; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; int err; __u8 uuid_index; diff --git a/plugins/solidigm/solidigm-get-drive-info.c b/plugins/solidigm/solidigm-get-drive-info.c index 21f59bb..c783fa8 100644 --- a/plugins/solidigm/solidigm-get-drive-info.c +++ b/plugins/solidigm/solidigm-get-drive-info.c @@ -16,7 +16,7 @@ int sldgm_get_drive_info(int argc, char **argv, struct command *cmd, struct plug const char *desc = "Get drive HW information"; const char *FTL_unit_size_str = "FTL_unit_size"; char *output_format = "normal"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; nvme_root_t r; nvme_ctrl_t c; nvme_ns_t n; diff --git a/plugins/solidigm/solidigm-id-ctrl.c b/plugins/solidigm/solidigm-id-ctrl.c index f45e758..67dc7b7 100644 --- a/plugins/solidigm/solidigm-id-ctrl.c +++ b/plugins/solidigm/solidigm-id-ctrl.c @@ -9,7 +9,7 @@ #include "common.h" #include "solidigm-id-ctrl.h" -struct __packed nvme_vu_id_ctrl_field { /* CDR MR5 */ +struct __packed nvme_vu_id_ctrl_field { // CPC __u8 rsvd1[3]; __u8 ss; char health[20]; @@ -22,6 +22,26 @@ struct __packed nvme_vu_id_ctrl_field { /* CDR MR5 */ __le64 ww; char mic_bl[4]; char mic_fw[4]; + __u8 rsvd3[678]; + __u32 signature; + __u8 version; + __u8 product_type; + __u8 nand_type; + __u8 form_factor; + __u32 fw_status; + __u32 p4_revision; // git hash first 8 characters + __u32 customer_id; + __u32 usage_model; + struct{ + __u32 zns_nvme : 1; // bit 0 + __u32 mfnd_nvme : 1; // bit 1 + __u32 cdw1413 : 1; // bit 2: CDW14 remapping into CDW13 + __u32 vpd_avail : 1; // bit 3: VPD EEPROM is available + //at moment of id-ctrl response + __u32 rsvd : 28; // bit 4..31 are unused + } + command_set; + }; void sldgm_id_ctrl(uint8_t *vs, struct json_object *root) @@ -37,6 +57,19 @@ void sldgm_id_ctrl(uint8_t *vs, struct json_object *root) const char *str_ww = "wwid"; const char *str_mic_bl = "bwLimGran"; const char *str_mic_fw = "ioLimGran"; + const char *str_signature = "signature"; + const char *str_version = "version"; + const char *str_product_type = "prodType"; + const char *str_nand_type = "nandType"; + const char *str_form_factor = "formFactor"; + const char *str_fw_status = "fwStatus"; + const char *str_p4_revision = "P4Revision"; + const char *str_customer_id = "customerID"; + const char *str_usage_model = "usageModel"; + const char *str_zns_nvme = "znsNVMe"; + const char *str_mfnd_nvme = "mfndNVMe"; + const char *str_cdw14_cdw13 = "cdw14map13"; + const char *str_vpd_avail = "vpdAvail"; struct nvme_vu_id_ctrl_field *id = (struct nvme_vu_id_ctrl_field *)vs; @@ -54,12 +87,25 @@ void sldgm_id_ctrl(uint8_t *vs, struct json_object *root) printf("%-10s: 0x%016"PRIx64"\n", str_ww, le64_to_cpu(id->ww)); printf("%-10s: %.*s\n", str_mic_bl, (int)sizeof(id->mic_bl), id->mic_bl); printf("%-10s: %.*s\n", str_mic_fw, (int)sizeof(id->mic_fw), id->mic_fw); + printf("%-10s: 0x%08X\n", str_signature, id->signature); + printf("%-10s: 0x%02X\n", str_version, id->version); + printf("%-10s: %u\n", str_product_type, id->product_type); + printf("%-10s: %u\n", str_nand_type, id->nand_type); + printf("%-10s: %u\n", str_form_factor, id->form_factor); + printf("%-10s: %u\n", str_fw_status, id->fw_status); + printf("%-10s: 0x%08X\n", str_p4_revision, id->p4_revision); + printf("%-10s: 0x%08X\n", str_customer_id, id->customer_id); + printf("%-10s: %u\n", str_usage_model, id->usage_model); + printf("%-10s: %u\n", str_zns_nvme, id->command_set.zns_nvme); + printf("%-10s: %u\n", str_mfnd_nvme, id->command_set.mfnd_nvme); + printf("%-10s: %u\n", str_cdw14_cdw13, id->command_set.cdw1413); + printf("%-10s: %u\n", str_vpd_avail, id->command_set.vpd_avail); return; } json_object_add_value_uint(root, str_ss, id->ss); json_object_object_add(root, str_health, - json_object_new_string_len(health, sizeof(id->health))); + json_object_new_string_len(health, sizeof(id->health))); json_object_add_value_uint(root, str_cls, id->cls); json_object_add_value_uint(root, str_nlw, id->nlw); json_object_add_value_uint(root, str_scap, id->scap); @@ -67,7 +113,20 @@ void sldgm_id_ctrl(uint8_t *vs, struct json_object *root) json_object_object_add(root, str_bl, json_object_new_string_len(id->bl, sizeof(id->bl))); json_object_add_value_uint64(root, str_ww, le64_to_cpu(id->ww)); json_object_object_add(root, str_mic_bl, - json_object_new_string_len(id->mic_bl, sizeof(id->mic_bl))); + json_object_new_string_len(id->mic_bl, sizeof(id->mic_bl))); json_object_object_add(root, str_mic_fw, - json_object_new_string_len(id->mic_fw, sizeof(id->mic_fw))); + json_object_new_string_len(id->mic_fw, sizeof(id->mic_fw))); + json_object_add_value_uint(root, str_signature, id->signature); + json_object_add_value_uint(root, str_version, id->version); + json_object_add_value_uint(root, str_product_type, id->product_type); + json_object_add_value_uint(root, str_nand_type, id->nand_type); + json_object_add_value_uint(root, str_form_factor, id->form_factor); + json_object_add_value_uint(root, str_fw_status, id->fw_status); + json_object_add_value_uint(root, str_p4_revision, id->p4_revision); + json_object_add_value_uint(root, str_customer_id, id->customer_id); + json_object_add_value_uint(root, str_usage_model, id->usage_model); + json_object_add_value_uint(root, str_zns_nvme, id->command_set.zns_nvme); + json_object_add_value_uint(root, str_mfnd_nvme, id->command_set.mfnd_nvme); + json_object_add_value_uint(root, str_cdw14_cdw13, id->command_set.cdw1413); + json_object_add_value_uint(root, str_vpd_avail, id->command_set.vpd_avail); } diff --git a/plugins/solidigm/solidigm-internal-logs.c b/plugins/solidigm/solidigm-internal-logs.c index c604761..f5b57f3 100644 --- a/plugins/solidigm/solidigm-internal-logs.c +++ b/plugins/solidigm/solidigm-internal-logs.c @@ -12,7 +12,6 @@ #include <stdlib.h> #include <unistd.h> #include <inttypes.h> -#include <linux/limits.h> #include <time.h> #include "common.h" @@ -23,11 +22,15 @@ #include "solidigm-util.h" #define DWORD_SIZE 4 +#define LOG_FILE_PERMISSION 0644 enum log_type { NLOG = 0, EVENTLOG = 1, ASSERTLOG = 2, + HIT, + CIT, + ALL }; #pragma pack(push, internal_logs, 1) @@ -122,12 +125,20 @@ struct nlog_dump_header4_1 { #pragma pack(pop, internal_logs) struct config { - __u32 namespace_id; - char *dir_prefix; + char *out_dir; char *type; bool verbose; }; +struct ilog { + struct nvme_dev *dev; + struct config *cfg; + int count; + struct nvme_id_ctrl id_ctrl; + enum nvme_telemetry_da max_da; + __u32 max_tx; +}; + static void print_nlog_header(__u8 *buffer) { struct nlog_dump_header_common *nlog_header = (struct nlog_dump_header_common *) buffer; @@ -218,29 +229,29 @@ static int get_serial_number(char *str, int fd) return err; } -static int dump_assert_logs(struct nvme_dev *dev, struct config cfg) +static int ilog_dump_assert_logs(struct ilog *ilog) { __u8 buf[INTERNAL_LOG_MAX_BYTE_TRANSFER]; __u8 head_buf[INTERNAL_LOG_MAX_BYTE_TRANSFER]; - char file_path[PATH_MAX]; + char file_path[PATH_MAX] = {0}; char file_name[] = "AssertLog.bin"; struct assert_dump_header *ad = (struct assert_dump_header *) head_buf; struct nvme_passthru_cmd cmd = { .opcode = 0xd2, - .nsid = cfg.namespace_id, + .nsid = NVME_NSID_ALL, .addr = (unsigned long)(void *)head_buf, .cdw12 = ASSERTLOG, .cdw13 = 0, }; int output, err; - err = read_header(&cmd, dev_fd(dev)); + err = read_header(&cmd, dev_fd(ilog->dev)); if (err) return err; snprintf(file_path, sizeof(file_path), "%.*s/%s", - (int) (sizeof(file_path) - sizeof(file_name) - 1), cfg.dir_prefix, file_name); - output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + (int) (sizeof(file_path) - sizeof(file_name) - 1), ilog->cfg->out_dir, file_name); + output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, LOG_FILE_PERMISSION); if (output < 0) return -errno; err = write_header((__u8 *)ad, output, ad->header.header_size * DWORD_SIZE); @@ -251,7 +262,7 @@ static int dump_assert_logs(struct nvme_dev *dev, struct config cfg) } cmd.addr = (unsigned long)(void *)buf; - if (cfg.verbose) { + if (ilog->cfg->verbose) { printf("Assert Log, cores: %d log size: %d header size: %d\n", ad->header.numcores, ad->header.log_size * DWORD_SIZE, ad->header.header_size * DWORD_SIZE); for (__u32 i = 0; i < ad->header.numcores; i++) @@ -262,28 +273,27 @@ static int dump_assert_logs(struct nvme_dev *dev, struct config cfg) if (!ad->core[i].assertvalid) continue; cmd.cdw13 = ad->core[i].coreoffset; - err = cmd_dump_repeat(&cmd, ad->core[i].assertsize, - output, - dev_fd(dev), false); + err = cmd_dump_repeat(&cmd, ad->core[i].assertsize, output, + dev_fd(ilog->dev), false); if (err) { close(output); return err; } } close(output); - printf("Successfully wrote log to %s\n", file_path); + printf("Successfully wrote Assert to %s\n", file_path); return err; } -static int dump_event_logs(struct nvme_dev *dev, struct config cfg) +static int ilog_dump_event_logs(struct ilog *ilog) { __u8 buf[INTERNAL_LOG_MAX_BYTE_TRANSFER]; __u8 head_buf[INTERNAL_LOG_MAX_BYTE_TRANSFER]; - char file_path[PATH_MAX]; + char file_path[PATH_MAX] = {0}; struct event_dump_header *ehdr = (struct event_dump_header *) head_buf; struct nvme_passthru_cmd cmd = { .opcode = 0xd2, - .nsid = cfg.namespace_id, + .nsid = NVME_NSID_ALL, .addr = (unsigned long)(void *)head_buf, .cdw12 = EVENTLOG, .cdw13 = 0, @@ -291,11 +301,11 @@ static int dump_event_logs(struct nvme_dev *dev, struct config cfg) int output; int core_num, err; - err = read_header(&cmd, dev_fd(dev)); + err = read_header(&cmd, dev_fd(ilog->dev)); if (err) return err; - snprintf(file_path, sizeof(file_path), "%s/EventLog.bin", cfg.dir_prefix); - output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + snprintf(file_path, sizeof(file_path) - 1, "%s/EventLog.bin", ilog->cfg->out_dir); + output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, LOG_FILE_PERMISSION); if (output < 0) return -errno; err = write_header(head_buf, output, INTERNAL_LOG_MAX_BYTE_TRANSFER); @@ -308,11 +318,11 @@ static int dump_event_logs(struct nvme_dev *dev, struct config cfg) } cmd.addr = (unsigned long)(void *)buf; - if (cfg.verbose) + if (ilog->cfg->verbose) printf("Event Log, cores: %d log size: %d\n", core_num, ehdr->header.log_size * 4); for (__u32 j = 0; j < core_num; j++) { - if (cfg.verbose) { + if (ilog->cfg->verbose) { for (int k = 0 ; k < 16; k++) { printf("core: %d event: %d ", j, k); printf("validity: %d ", ehdr->edumps[j].eventIdValidity[k]); @@ -321,14 +331,14 @@ static int dump_event_logs(struct nvme_dev *dev, struct config cfg) } cmd.cdw13 = ehdr->edumps[j].coreoffset; err = cmd_dump_repeat(&cmd, ehdr->edumps[j].coresize, - output, dev_fd(dev), false); + output, dev_fd(ilog->dev), false); if (err) { close(output); return err; } } close(output); - printf("Successfully wrote log to %s\n", file_path); + printf("Successfully wrote Events to %s\n", file_path); return err; } @@ -348,16 +358,16 @@ static size_t get_nlog_header_size(struct nlog_dump_header_common *nlog_header) } /* dumps nlogs from specified core or all cores when core = -1 */ -static int dump_nlogs(struct nvme_dev *dev, struct config cfg, int core) +static int ilog_dump_nlogs(struct ilog *ilog, int core) { int err = 0; __u32 count, core_num; __u8 buf[INTERNAL_LOG_MAX_BYTE_TRANSFER]; - char file_path[PATH_MAX]; + char file_path[PATH_MAX] = {0}; struct nlog_dump_header_common *nlog_header = (struct nlog_dump_header_common *)buf; struct nvme_passthru_cmd cmd = { .opcode = 0xd2, - .nsid = cfg.namespace_id, + .nsid = NVME_NSID_ALL, .addr = (unsigned long)(void *)buf }; @@ -381,7 +391,7 @@ static int dump_nlogs(struct nvme_dev *dev, struct config cfg, int core) do { cmd.cdw13 = 0; cmd.cdw12 = log_select.raw; - err = read_header(&cmd, dev_fd(dev)); + err = read_header(&cmd, dev_fd(ilog->dev)); if (err) { if (is_open) close(output); @@ -390,9 +400,10 @@ static int dump_nlogs(struct nvme_dev *dev, struct config cfg, int core) count = nlog_header->totalnlogs; core_num = core < 0 ? nlog_header->corecount : 0; if (!header_size) { - snprintf(file_path, sizeof(file_path), "%s/NLog.bin", - cfg.dir_prefix); - output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + snprintf(file_path, sizeof(file_path) - 1, "%s/NLog.bin", + ilog->cfg->out_dir); + output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, + LOG_FILE_PERMISSION); if (output < 0) return -errno; header_size = get_nlog_header_size(nlog_header); @@ -401,11 +412,11 @@ static int dump_nlogs(struct nvme_dev *dev, struct config cfg, int core) err = write_header(buf, output, header_size); if (err) break; - if (cfg.verbose) + if (ilog->cfg->verbose) print_nlog_header(buf); cmd.cdw13 = 0x400; err = cmd_dump_repeat(&cmd, nlog_header->nlogbytesize / 4, - output, dev_fd(dev), true); + output, dev_fd(ilog->dev), true); if (err) break; } while (++log_select.selectNlog < count); @@ -414,244 +425,552 @@ static int dump_nlogs(struct nvme_dev *dev, struct config cfg, int core) } while (++log_select.selectCore < core_num); if (is_open) { close(output); - printf("Successfully wrote log to %s\n", file_path); + printf("Successfully wrote Nlog to %s\n", file_path); } return err; } -enum telemetry_type { - HOSTGENOLD, - HOSTGENNEW, - CONTROLLER +int ensure_dir(const char *parent_dir_name, const char *name) +{ + char file_path[PATH_MAX] = {0}; + struct stat sb; + + snprintf(file_path, sizeof(file_path) - 1, "%s/%s", parent_dir_name, name); + if (!(stat(file_path, &sb) == 0 && S_ISDIR(sb.st_mode))) { + if (mkdir(file_path, 777) != 0) { + perror(file_path); + return -errno; + } + } + return 0; +} + +struct log { + __u8 id; + const char *desc; + size_t buffer_size; + __u8 *buffer; }; -static int dump_telemetry(struct nvme_dev *dev, struct config cfg, enum telemetry_type ttype) +static int log_save(struct log *log, const char *parent_dir_name, const char *subdir_name, + const char *file_name, __u8 *buffer, size_t buf_size) { - _cleanup_free_ struct nvme_telemetry_log *log = NULL; - size_t log_size = 0; - int err = 0; - __u8 *buffer = NULL; + _cleanup_fd_ int output = -1; + char file_path[PATH_MAX] = {0}; size_t bytes_remaining = 0; + int err = 0; + + ensure_dir(parent_dir_name, subdir_name); + + snprintf(file_path, sizeof(file_path) - 1, "%s/%s/%s", parent_dir_name, subdir_name, + file_name); + output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, LOG_FILE_PERMISSION); + if (output < 0) + return -errno; + + bytes_remaining = buf_size; + + while (bytes_remaining) { + ssize_t bytes_written = write(output, buffer, bytes_remaining); + + if (bytes_written < 0) { + err = -errno; + goto log_save_close_output; + } + + bytes_remaining -= bytes_written; + buffer += bytes_written; + } + printf("Successfully wrote %s to %s\n", log->desc, file_path); + +log_save_close_output: + close(output); + return err; +} + +static int ilog_dump_identify_page(struct ilog *ilog, struct log *cns, __u32 nsid) +{ + __u8 data[NVME_IDENTIFY_DATA_SIZE]; + __u8 *buff = cns->buffer ? cns->buffer : data; + char filename[sizeof( + "cntid_XXXXX_cns_XXX_nsid_XXXXXXXXXX_nvmsetid_XXXXX_csi_XXX.bin")] = {0}; + int err = nvme_identify_cns_nsid(dev_fd(ilog->dev), cns->id, nsid, buff); + + if (err) + return err; + + snprintf(filename, sizeof(filename) - 1, "cntid_0_cns_%d_nsid_%d_nvmsetid_0_csi_0.bin", + cns->id, nsid); + return log_save(cns, ilog->cfg->out_dir, "identify", filename, buff, sizeof(data)); +} + +static int ilog_ensure_dump_id_ctrl(struct ilog *ilog) +{ + static bool first = true; + static int err; + struct log idctrl = {NVME_IDENTIFY_CNS_CTRL, "Id Controller Data", sizeof(ilog->id_ctrl), + (__u8 *) &ilog->id_ctrl}; + + if (!first) + return err; + + first = false; + err = ilog_dump_identify_page(ilog, &idctrl, 0); + + if (err) + return err; + + ilog->count++; + + if (ilog->id_ctrl.lpa & 0x8) + ilog->max_da = NVME_TELEMETRY_DA_3; + if (ilog->id_ctrl.lpa & 0x40) + ilog->max_da = NVME_TELEMETRY_DA_4; + + /* assuming CAP.MPSMIN is zero minimum Memory Page Size is at least 4096 bytes */ + ilog->max_tx = (1 << ilog->id_ctrl.mdts) * NVME_LOG_PAGE_PDU_SIZE; + if (ilog->max_tx > DRIVER_MAX_TX_256K) + ilog->max_tx = DRIVER_MAX_TX_256K; + + return err; +} + +static int ilog_dump_telemetry(struct ilog *ilog, enum log_type ttype) +{ + int err = 0; enum nvme_telemetry_da da; size_t max_data_tx; - char file_path[PATH_MAX]; - char *file_name; - char *log_descr; - struct stat sb; + const char *file_name; + struct nvme_feat_host_behavior prev = {0}; + bool host_behavior_changed = false; + struct log log = {0}; + + err = ilog_ensure_dump_id_ctrl(ilog); + if (err) + return err; - _cleanup_file_ int output = -1; + da = ilog->max_da; + max_data_tx = ilog->max_tx; + + if (da == 4) { + __u32 result; + int err = nvme_get_features_host_behavior(dev_fd(ilog->dev), 0, &prev, &result); + + if (!err && !prev.etdas) { + struct nvme_feat_host_behavior da4_enable = prev; + + da4_enable.etdas = 1; + nvme_set_features_host_behavior(dev_fd(ilog->dev), 0, &da4_enable); + host_behavior_changed = true; + } + } switch (ttype) { - case HOSTGENNEW: + case HIT: file_name = "lid_0x07_lsp_0x01_lsi_0x0000.bin"; - log_descr = "Generated Host Initiated"; - break; - case HOSTGENOLD: - file_name = "lid_0x07_lsp_0x00_lsi_0x0000.bin"; - log_descr = "Existing Host Initiated"; + log.desc = "Host Initiated Telemetry"; + err = nvme_get_telemetry_log(dev_fd(ilog->dev), true, false, false, max_data_tx, da, + (struct nvme_telemetry_log **) &log.buffer, + &log.buffer_size); break; - case CONTROLLER: + case CIT: file_name = "lid_0x08_lsp_0x00_lsi_0x0000.bin"; - log_descr = "Controller Initiated"; + log.desc = "Controller Initiated Telemetry"; + err = nvme_get_telemetry_log(dev_fd(ilog->dev), false, true, true, max_data_tx, da, + (struct nvme_telemetry_log **) &log.buffer, + &log.buffer_size); break; default: return -EINVAL; } - err = nvme_get_telemetry_max(dev_fd(dev), &da, &max_data_tx); + + if (host_behavior_changed) + nvme_set_features_host_behavior(dev_fd(ilog->dev), 0, &prev); + if (err) return err; - if (max_data_tx > DRIVER_MAX_TX_256K) - max_data_tx = DRIVER_MAX_TX_256K; + err = log_save(&log, ilog->cfg->out_dir, "log_pages", file_name, log.buffer, + log.buffer_size); + return err; +} - switch (ttype) { - case HOSTGENNEW: - err = nvme_get_telemetry_log(dev_fd(dev), true, false, false, max_data_tx, da, - &log, &log_size); - break; - case HOSTGENOLD: - err = nvme_get_telemetry_log(dev_fd(dev), false, false, false, max_data_tx, da, - &log, &log_size); - break; - case CONTROLLER: - err = nvme_get_telemetry_log(dev_fd(dev), false, true, true, max_data_tx, da, &log, - &log_size); - break; +static int ilog_dump_identify_pages(struct ilog *ilog) +{ + struct nvme_ns_list ns_list; + __u32 j = 0; + struct log identify_base_list[] = { + {NVME_IDENTIFY_CNS_NS_ACTIVE_LIST, "Id Active Namespace ID list", + sizeof(ns_list), (__u8 *) &ns_list}, + {NVME_IDENTIFY_CNS_NVMSET_LIST, "Id NVM Set List"}, + {NVME_IDENTIFY_CNS_CSI_CTRL, "Id I/O Command Set specific"}, + {NVME_IDENTIFY_CNS_ALLOCATED_NS_LIST, "Id Allocated Namespace ID list"}, + {NVME_IDENTIFY_CNS_CTRL_LIST, "Id Controller List"} + }; + struct log identify_ns_required_list[] = { + {NVME_IDENTIFY_CNS_NS, "Id Namespace data"}, + {NVME_IDENTIFY_CNS_NS_DESC_LIST, "Id Namespace Id Descriptor list"}, + {NVME_IDENTIFY_CNS_CSI_NS, "Id Namespace ID I/O Command Set specific"}, + {NVME_IDENTIFY_CNS_CSI_INDEPENDENT_ID_NS, + "I/O Command Set Independent Identify Namespace Data"}, + {NVME_IDENTIFY_CNS_ALLOCATED_NS, "Id Namespace data "}, + {NVME_IDENTIFY_CNS_NS_CTRL_LIST, "Id Namespace Id Controller List"}, + }; + + ilog_ensure_dump_id_ctrl(ilog); + + for (int i = 0; i < ARRAY_SIZE(identify_base_list); i++) { + int err = ilog_dump_identify_page(ilog, &identify_base_list[i], 0); + + if (err == 0) + ilog->count++; } - if (err) - return err; + while (ns_list.ns[j]) { + for (int i = 0; i < ARRAY_SIZE(identify_ns_required_list); i++) { + int err = ilog_dump_identify_page(ilog, &identify_ns_required_list[i], + ns_list.ns[j]); - snprintf(file_path, sizeof(file_path), "%s/log_pages", cfg.dir_prefix); - if (!(stat(file_path, &sb) == 0 && S_ISDIR(sb.st_mode))) { - if (mkdir(file_path, 777) != 0) { - perror(file_path); - return -errno; + if (err == 0) + ilog->count++; } + j++; } - snprintf(file_path, sizeof(file_path), "%s/log_pages/%s", cfg.dir_prefix, file_name); - output = open(file_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (output < 0) - return -errno; + return 0; +} - bytes_remaining = log_size; - buffer = (__u8 *)log; +static int ilog_dump_log_page(struct ilog *ilog, struct log *lp, __u32 nsid) +{ + __u8 *buff = lp->buffer; + char filename[sizeof("lid_0xXX_lsp_0xXX_lsi_0xXXXX.bin")] = {0}; + int err; - while (bytes_remaining) { - ssize_t bytes_written = write(output, buffer, bytes_remaining); + if (!lp->buffer_size) + return -EINVAL; + if (!buff) { + buff = nvme_alloc(lp->buffer_size); + if (!buff) + return -ENOMEM; + } + err = nvme_get_nsid_log(dev_fd(ilog->dev), 0, lp->id, 0, lp->buffer_size, buff); + if (err) + return err; - if (bytes_written < 0) { - err = -errno; - goto tele_close_output; - } + snprintf(filename, sizeof(filename), "lid_0x%02x_lsp_0x00_lsi_0x0000.bin", + lp->id); + return log_save(lp, ilog->cfg->out_dir, "log_pages", filename, buff, lp->buffer_size); +} - bytes_remaining -= bytes_written; - buffer += bytes_written; +static int ilog_dump_no_lsp_log_pages(struct ilog *ilog) +{ + struct lba_status_info { + __u32 lslplen; + __u32 nlslne; + __u32 estulb; + __u16 rsvd; + __u16 lsgc; + } lba_status = {}; + __u64 num_entries = 0; + struct log log_page_dependent_list[] = { + {NVME_LOG_LID_LBA_STATUS}, + {NVME_LOG_LID_ENDURANCE_GRP_EVT}, + }; + struct log log_page_base_list[] = { + {NVME_LOG_LID_SUPPORTED_LOG_PAGES, NULL, sizeof(struct nvme_supported_log_pages)}, + {NVME_LOG_LID_ERROR, NULL, + (ilog->id_ctrl.elpe + 1) * sizeof(struct nvme_error_log_page)}, + {NVME_LOG_LID_SMART, NULL, sizeof(struct nvme_smart_log)}, + {NVME_LOG_LID_FW_SLOT, NULL, sizeof(struct nvme_firmware_slot)}, + {NVME_LOG_LID_CHANGED_NS, NULL, sizeof(struct nvme_ns_list)}, + {NVME_LOG_LID_CMD_EFFECTS, NULL, sizeof(struct nvme_cmd_effects_log)}, + {NVME_LOG_LID_DEVICE_SELF_TEST, NULL, sizeof(struct nvme_self_test_log)}, + {NVME_LOG_LID_LBA_STATUS, NULL, sizeof(lba_status), (__u8 *) &lba_status}, + {NVME_LOG_LID_ENDURANCE_GRP_EVT, NULL, sizeof(num_entries), (__u8 *) &num_entries}, + {NVME_LOG_LID_FID_SUPPORTED_EFFECTS, NULL, + sizeof(struct nvme_fid_supported_effects_log)}, + {NVME_LOG_LID_MI_CMD_SUPPORTED_EFFECTS, NULL, + sizeof(struct nvme_mi_cmd_supported_effects_log)}, + {NVME_LOG_LID_CMD_AND_FEAT_LOCKDOWN, NULL, 512}, + {NVME_LOG_LID_PHY_RX_EOM, NULL, 512}, + {NVME_LOG_LID_SANITIZE, NULL, sizeof(struct nvme_sanitize_log_page)}, + {0xC0, "OCP or VU SMART / Health Information Extended", 512}, + {0xC1, "OCP Error Recovery or VU Latency Reads", 512}, + {0xC2, "OCP Firmware Activation History or VU Latency Writes", 4096}, + {0xC3, "OCP Latency Monitor", 512}, + {0xC4, "OCP Device Capabilities or VU Endurance Manager Statistics", 4096}, + {0xC5, "OCP Unsupported Requirements or VU Tempeture Statistics", 4096}, + {0xC7, "OCP TCG Configuration", 512}, + {0xCA, "SMART Attributes", 512}, + {0xd5, "Tempeture Statistics", 512}, + {0xfe, "Latency Outlier", 8192}, + }; + + for (int i = 0; i < ARRAY_SIZE(log_page_base_list); i++) { + log_page_base_list[i].desc = log_page_base_list[i].desc ? + log_page_base_list[i].desc : + nvme_log_to_string(log_page_base_list[i].id); + if (!ilog_dump_log_page(ilog, &log_page_base_list[i], 0)) + ilog->count++; } - printf("Successfully wrote %s Telemetry log to %s\n", log_descr, file_path); -tele_close_output: - close(output); + /* if needed, patch logs based on retrieved log size */ + if (lba_status.lslplen > sizeof(lba_status)) + log_page_dependent_list[0].buffer_size = lba_status.lslplen; + if (num_entries) + log_page_dependent_list[1].buffer_size = sizeof(num_entries) + + (num_entries * sizeof(__u16)); + + for (int i = 0; i < ARRAY_SIZE(log_page_dependent_list); i++) { + log_page_dependent_list[i].desc = log_page_dependent_list[i].desc ? + log_page_dependent_list[i].desc : + nvme_log_to_string(log_page_dependent_list[i].id); + ilog_dump_log_page(ilog, &log_page_dependent_list[i], 0); + } + + return 0; +} + +static int ilog_dump_pel(struct ilog *ilog) +{ + struct log lp = { + NVME_LOG_LID_PERSISTENT_EVENT, + nvme_log_to_string(NVME_LOG_LID_PERSISTENT_EVENT) + }; + void *pevent_log_full; + int err; + struct nvme_get_log_args args; + + _cleanup_free_ struct nvme_persistent_event_log *pevent = NULL; + + _cleanup_huge_ struct nvme_mem_huge mh = {0}; + + err = nvme_get_log_persistent_event(dev_fd(ilog->dev), NVME_PEVENT_LOG_RELEASE_CTX, + sizeof(*pevent), pevent); + if (err) + return err; + + + pevent = nvme_alloc(sizeof(*pevent)); + if (!pevent) + return -ENOMEM; + + err = nvme_get_log_persistent_event(dev_fd(ilog->dev), NVME_PEVENT_LOG_EST_CTX_AND_READ, + sizeof(*pevent), pevent); + if (err) + return err; + + lp.buffer_size = le64_to_cpu(pevent->tll); + + pevent_log_full = nvme_alloc_huge(lp.buffer_size, &mh); + if (!pevent_log_full) + return -ENOMEM; + + err = nvme_get_log_persistent_event(dev_fd(ilog->dev), NVME_PEVENT_LOG_READ, + lp.buffer_size, pevent_log_full); + args = (struct nvme_get_log_args) { + .lpo = 0, + .result = NULL, + .log = pevent_log_full, + .args_size = sizeof(args), + .fd = dev_fd(ilog->dev), + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .lid = NVME_LOG_LID_PERSISTENT_EVENT, + .len = lp.buffer_size, + .nsid = NVME_NSID_ALL, + .csi = NVME_CSI_NVM, + .lsi = NVME_LOG_LSI_NONE, + .lsp = NVME_PEVENT_LOG_READ, + .uuidx = NVME_UUID_NONE, + .rae = false, + .ot = false, + }; + err = nvme_get_log_page(dev_fd(ilog->dev), ilog->max_tx, &args); + if (err) + return err; + + err = log_save(&lp, ilog->cfg->out_dir, "log_pages", "lid_0x0d_lsp_0x00_lsi_0x0000.bin", + pevent_log_full, lp.buffer_size); + + nvme_get_log_persistent_event(dev_fd(ilog->dev), NVME_PEVENT_LOG_RELEASE_CTX, + sizeof(*pevent), pevent); + return err; } int solidigm_get_internal_log(int argc, char **argv, struct command *command, struct plugin *plugin) { - char folder[PATH_MAX]; - char zip_name[PATH_MAX]; - char *output_path; char sn_prefix[sizeof(((struct nvme_id_ctrl *)0)->sn)+1]; - int log_count = 0; + char date_str[sizeof("-YYYYMMDDHHMMSS")]; + char full_folder[PATH_MAX] = {0}; + char unique_folder[sizeof(sn_prefix)+sizeof(date_str)-1] = {0}; + char *initial_folder; + char zip_name[PATH_MAX] = {0}; + char *output_path; + struct ilog ilog = {0}; int err; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - bool all = false; - time_t t; - struct tm tm; + enum log_type log_type = ALL; + char type_ALL[] = "ALL"; + time_t current_time; + DIR *dir; const char *desc = "Get Debug Firmware Logs and save them."; - const char *type = - "Log type: ALL, CONTROLLERINITTELEMETRY, HOSTINITTELEMETRY, HOSTINITTELEMETRYNOGEN, NLOG, ASSERT, EVENT. Defaults to ALL."; - const char *prefix = "Output dir prefix; defaults to device serial number."; + const char *type = "Log type; Defaults to ALL."; + const char *out_dir = "Output directory; defaults to current working directory."; const char *verbose = "To print out verbose info."; - const char *namespace_id = "Namespace to get logs from."; - struct config cfg = { - .namespace_id = NVME_NSID_ALL, - .dir_prefix = NULL, - .type = NULL, + .out_dir = ".", + .type = type_ALL, }; OPT_ARGS(opts) = { - OPT_STR("type", 't', &cfg.type, type), - OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id), - OPT_FILE("dir-prefix", 'p', &cfg.dir_prefix, prefix), - OPT_FLAG("verbose", 'v', &cfg.verbose, verbose), + OPT_STRING("type", 't', "ALL|CIT|HIT|NLOG|ASSERT|EVENT", &cfg.type, type), + OPT_STRING("dir-name", 'd', "DIRECTORY", &cfg.out_dir, out_dir), + OPT_FLAG("verbose", 'v', &cfg.verbose, verbose), OPT_END() }; err = parse_and_open(&dev, argc, argv, desc, opts); if (err) return err; - - if (!cfg.dir_prefix) { - err = get_serial_number(sn_prefix, dev_fd(dev)); - if (err) - return err; - cfg.dir_prefix = sn_prefix; + ilog.dev = dev; + ilog.cfg = &cfg; + + for (char *p = cfg.type; *p; ++p) + *p = toupper(*p); + + if (!strcmp(cfg.type, "ALL")) + log_type = ALL; + else if (!strcmp(cfg.type, "HIT")) + log_type = HIT; + else if (!strcmp(cfg.type, "CIT")) + log_type = CIT; + else if (!strcmp(cfg.type, "NLOG")) + log_type = NLOG; + else if (!strcmp(cfg.type, "ASSERT")) + log_type = ASSERTLOG; + else if (!strcmp(cfg.type, "EVENT")) + log_type = EVENTLOG; + else { + fprintf(stderr, "Invalid log type: %s\n", cfg.type); + return -EINVAL; } - t = time(NULL); - tm = *localtime(&t); - snprintf(folder, sizeof(folder), "%s-%d%02d%02d%02d%02d%02d", cfg.dir_prefix, - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - if (mkdir(folder, 0777) != 0) { - perror("mkdir"); + + dir = opendir(cfg.out_dir); + if (dir) + closedir(dir); + else { + perror(cfg.out_dir); return -errno; } - cfg.dir_prefix = folder; - output_path = folder; - if (!cfg.type) - cfg.type = "ALL"; - else { - for (char *p = cfg.type; *p; ++p) - *p = toupper(*p); - } + initial_folder = cfg.out_dir; - if (!strcmp(cfg.type, "ALL")) { - all = true; - } - if (all || !strcmp(cfg.type, "ASSERT")) { - err = dump_assert_logs(dev, cfg); - if (err == 0) - log_count++; - else if (err < 0) - perror("Error retrieving Assert log"); + err = get_serial_number(sn_prefix, dev_fd(dev)); + if (err) + return err; + + current_time = time(NULL); + strftime(date_str, sizeof(date_str), "-%Y%m%d%H%M%S", localtime(¤t_time)); + snprintf(unique_folder, sizeof(unique_folder), "%s%s", sn_prefix, date_str); + snprintf(full_folder, sizeof(full_folder) - 1, "%s/%s", cfg.out_dir, unique_folder); + if (mkdir(full_folder, 0755) != 0) { + perror("mkdir"); + return -errno; } - if (all || !strcmp(cfg.type, "EVENT")) { - err = dump_event_logs(dev, cfg); + cfg.out_dir = full_folder; + output_path = full_folder; + + /* Retrieve first logs that records actions to retrieve other logs */ + if (log_type == ALL || log_type == HIT) { + err = ilog_dump_telemetry(&ilog, HIT); if (err == 0) - log_count++; + ilog.count++; else if (err < 0) - perror("Error retrieving Event log"); + perror("Error retrieving Host Initiated Telemetry"); } - if (all || !strcmp(cfg.type, "NLOG")) { - err = dump_nlogs(dev, cfg, -1); + if (log_type == ALL || log_type == NLOG) { + err = ilog_dump_nlogs(&ilog, -1); if (err == 0) - log_count++; + ilog.count++; else if (err < 0) perror("Error retrieving Nlog"); } - if (all || !strcmp(cfg.type, "CONTROLLERINITTELEMETRY")) { - err = dump_telemetry(dev, cfg, CONTROLLER); + if (log_type == ALL || log_type == CIT) { + err = ilog_dump_telemetry(&ilog, CIT); if (err == 0) - log_count++; + ilog.count++; else if (err < 0) - perror("Error retrieving Telemetry Controller Initiated"); + perror("Error retrieving Controller Initiated Telemetry"); } - if (all || !strcmp(cfg.type, "HOSTINITTELEMETRYNOGEN")) { - err = dump_telemetry(dev, cfg, HOSTGENOLD); + if (log_type == ALL || log_type == ASSERTLOG) { + err = ilog_dump_assert_logs(&ilog); if (err == 0) - log_count++; + ilog.count++; else if (err < 0) - perror("Error retrieving previously existing Telemetry Host Initiated"); + perror("Error retrieving Assert log"); } - if (all || !strcmp(cfg.type, "HOSTINITTELEMETRY")) { - err = dump_telemetry(dev, cfg, HOSTGENNEW); + if (log_type == ALL || log_type == EVENTLOG) { + err = ilog_dump_event_logs(&ilog); if (err == 0) - log_count++; + ilog.count++; else if (err < 0) - perror("Error retrieving Telemetry Host Initiated"); + perror("Error retrieving Event log"); + } + if (log_type == ALL) { + err = ilog_dump_identify_pages(&ilog); + if (err < 0) + perror("Error retrieving Identify pages"); + + err = ilog_dump_pel(&ilog); + if (err < 0) + perror("Error retrieving Persistent Event Log page"); + + err = ilog_dump_no_lsp_log_pages(&ilog); + if (err < 0) + perror("Error retrieving no LSP Log pages"); } - if (log_count > 0) { + if (ilog.count > 0) { int ret_cmd; - char cmd[ARG_MAX]; - char *where_err = cfg.verbose ? "" : ">/dev/null 2>&1"; - - snprintf(zip_name, sizeof(zip_name), "%s.zip", cfg.dir_prefix); - snprintf(cmd, sizeof(cmd), "cd \"%s\" && zip -r \"../%s\" ./* %s", cfg.dir_prefix, - zip_name, where_err); + char *cmd; + char *quiet = cfg.verbose ? "" : " -q"; + + snprintf(zip_name, sizeof(zip_name) - 1, "%s.zip", unique_folder); + if (asprintf(&cmd, "cd \"%s\" && zip -MM -r \"../%s\" ./* %s", cfg.out_dir, + zip_name, quiet) < 0) { + err = errno; + perror("Can't allocate string for zip command"); + goto out; + } printf("Compressing logs to %s\n", zip_name); ret_cmd = system(cmd); - if (ret_cmd == -1) + if (ret_cmd) perror(cmd); else { output_path = zip_name; - snprintf(cmd, sizeof(cmd), "rm -rf %s", cfg.dir_prefix); - printf("Removing %s\n", cfg.dir_prefix); + free(cmd); + if (asprintf(&cmd, "rm -rf %s", cfg.out_dir) < 0) { + err = errno; + perror("Can't allocate string for cleanup"); + goto out; + } if (system(cmd) != 0) perror("Failed removing logs folder"); } + free(cmd); } - if (log_count == 0) { +out: + if (ilog.count == 0) { if (err > 0) nvme_show_status(err); - } else if ((log_count > 1) || cfg.verbose) - printf("Total: %d log files in %s\n", log_count, output_path); + + } else if ((ilog.count > 1) || cfg.verbose) + printf("Total: %d log files in %s/%s\n", ilog.count, initial_folder, output_path); return err; } diff --git a/plugins/solidigm/solidigm-latency-tracking.c b/plugins/solidigm/solidigm-latency-tracking.c index c6c3315..899075d 100644 --- a/plugins/solidigm/solidigm-latency-tracking.c +++ b/plugins/solidigm/solidigm-latency-tracking.c @@ -45,7 +45,7 @@ struct latency_tracker { int fd; __u8 uuid_index; struct config cfg; - enum nvme_print_flags print_flags; + nvme_print_flags_t print_flags; struct latency_statistics stats; struct json_object *bucket_list; __u32 bucket_list_size; diff --git a/plugins/solidigm/solidigm-log-page-dir.c b/plugins/solidigm/solidigm-log-page-dir.c index 7d7c027..f8d1974 100644 --- a/plugins/solidigm/solidigm-log-page-dir.c +++ b/plugins/solidigm/solidigm-log-page-dir.c @@ -241,7 +241,7 @@ int solidigm_get_log_page_directory_log(int argc, char **argv, struct command *c } if (!err) { - enum nvme_print_flags print_flag; + nvme_print_flags_t print_flag; err = validate_output_format(format, &print_flag); if (err < 0) { diff --git a/plugins/solidigm/solidigm-market-log.c b/plugins/solidigm/solidigm-market-log.c index d7d38da..e7e8728 100644 --- a/plugins/solidigm/solidigm-market-log.c +++ b/plugins/solidigm/solidigm-market-log.c @@ -12,7 +12,6 @@ #include <stdlib.h> #include <unistd.h> #include <inttypes.h> -#include <linux/limits.h> #include "common.h" #include "nvme.h" diff --git a/plugins/solidigm/solidigm-nvme.c b/plugins/solidigm/solidigm-nvme.c index 3fb86f5..8a7db07 100644 --- a/plugins/solidigm/solidigm-nvme.c +++ b/plugins/solidigm/solidigm-nvme.c @@ -21,6 +21,7 @@ #include "solidigm-temp-stats.h" #include "solidigm-get-drive-info.h" #include "solidigm-ocp-version.h" +#include "solidigm-workload-tracker.h" #include "plugins/ocp/ocp-clear-features.h" #include "plugins/ocp/ocp-smart-extended-log.h" @@ -107,3 +108,9 @@ static int get_cloud_SSDplugin_version(int argc, char **argv, struct command *cm { return sldgm_ocp_version(argc, argv, cmd, plugin); } + +static int get_workload_tracker(int argc, char **argv, struct command *cmd, + struct plugin *plugin) +{ + return sldgm_get_workload_tracker(argc, argv, cmd, plugin); +} diff --git a/plugins/solidigm/solidigm-nvme.h b/plugins/solidigm/solidigm-nvme.h index a639fd2..2b74a02 100644 --- a/plugins/solidigm/solidigm-nvme.h +++ b/plugins/solidigm/solidigm-nvme.h @@ -13,7 +13,7 @@ #include "cmd.h" -#define SOLIDIGM_PLUGIN_VERSION "1.2" +#define SOLIDIGM_PLUGIN_VERSION "1.6" PLUGIN(NAME("solidigm", "Solidigm vendor specific extensions", SOLIDIGM_PLUGIN_VERSION), COMMAND_LIST( @@ -32,6 +32,8 @@ PLUGIN(NAME("solidigm", "Solidigm vendor specific extensions", SOLIDIGM_PLUGIN_V ENTRY("temp-stats", "Retrieve Temperature Statistics log", get_temp_stats_log) ENTRY("vs-drive-info", "Retrieve drive information", get_drive_info) ENTRY("cloud-SSDplugin-version", "Prints plug-in OCP version", get_cloud_SSDplugin_version) + ENTRY("workload-tracker", "Real Time capture Workload Tracker samples", + get_workload_tracker) ) ); diff --git a/plugins/solidigm/solidigm-smart.c b/plugins/solidigm/solidigm-smart.c index a97abe2..002753a 100644 --- a/plugins/solidigm/solidigm-smart.c +++ b/plugins/solidigm/solidigm-smart.c @@ -197,7 +197,7 @@ int solidigm_get_additional_smart_log(int argc, char **argv, struct command *cmd "Get Solidigm vendor specific smart log (optionally, for the specified namespace), and show it."; const int solidigm_vu_smart_log_id = 0xCA; struct vu_smart_log smart_log_payload; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; int err; __u8 uuid_index; diff --git a/plugins/solidigm/solidigm-workload-tracker.c b/plugins/solidigm/solidigm-workload-tracker.c new file mode 100644 index 0000000..73bb3c3 --- /dev/null +++ b/plugins/solidigm/solidigm-workload-tracker.c @@ -0,0 +1,536 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2024 Solidigm. + * + * Authors: leonardo.da.cunha@solidigm.com + */ + +#include "common.h" +#include "nvme-print.h" +#include <errno.h> +#include <time.h> + +#define LID 0xf9 +#define FID 0xf1 +#define WLT2MS 25000 +#define MAX_WORKLOAD_LOG_ENTRIES 126 +#define MAX_WORKLOAD_LOG_ENTRY_SIZE 32 +#define MAX_FIELDS 15 + +char const *samplet[] = { + "default", + "1ms", + "5ms", + "10ms", + "50ms", + "100ms", + "500ms", + "1s", + "5s", + "10s", + "30s", + "1m", + "5m", + "10m", + "30m", + "1h" +}; + +char const *trk_types[] = { + "Base", + "CmdQ", + "Pattern", + "RandSeq", + "Throttle", + "Power", + "Defrag" +}; + +struct field { + __u8 size; + char *name; + char *desc; +}; + +struct field group_fields[][MAX_FIELDS] = { +{ // Base, group 0 + {4, "hostReads", "Host Read Count in Sectors"}, + {4, "hostWrites", "Host Write Count in Sectors"}, + {4, "nandWrites", "Nand Write Count in Sectors"}, + {1, "misalignment%", "% of Misaligned Sectors"}, + {1, "collision%", "% of Colliding Sectors"}, + {1, "randomWrite%", "% of Random Write Sectors vs. Sequential"}, + {1, "randomRead%", "% of Random Read Sectors vs. Sequential"}, + {4, "xorInvokedCount", "Count of XOR Operations Invoked"}, + {4, "hostSoftReadSuccess", "Count of Soft Reads Completed Successfully."}, + {4, "bandDefragRelocation", "Count of BDRs"}, + {1, "pwrThrottle%", "% of Throttle Period due to Power Regulation"}, + {1, "thmThrottle%", "% of Throttle Period due to Thermal Levels"}, + {1, "tbufBg%", "% of Background TBUF Work vs. All Available Work"}, + {1, "tbufHost%", "% of Host Requested TBUF Work vs. All Available Work"}, + {0} +}, +{ //CmdQ stats, group 1 + {4, "CmdQ_InternalReadQDepth", "Snapshot of the Internal Read Queue Depth"}, + {4, "CmdQ_DetectedWriteQDepth", "Snapshot of the Internal Write Queue Depth"}, + {4, "CmdQ_ReadCmdsPending", "Snapshot of the Internal Read Commands Pending"}, + {1, "misalignment%", "% of Misaligned Sectors"}, + {1, "collision%", "% of Colliding Sectors"}, + {1, "randomWrite%", "% of Random Write Sectors vs. Sequential"}, + {1, "randomRead%", "% of Random Read Sectors vs. Sequential"}, + {4, "CmdQ_WriteCmdsPending", "Snapshot of the Internal Write Commands Pending"}, + {4, "CmdQ_ReadCmdsOutstanding", "Snapshot of the Internal Read Commands Outstanding"}, + {4, "CmdQ_WriteCmdsOutstanding", "Snapshot of the Internal Read Commands Outstanding"}, + {1, "pwrThrottle%", "% of Throttle Period due to Power Regulation"}, + {1, "thmThrottle%", "% of Throttle Period due to Thermal Levels"}, + {1, "tbufBg%", "% of Background TBUF Work vs. All Available Work"}, + {1, "tbufHost%", "% of Host Requested TBUF Work vs. All Available Work"}, + {0} +}, +{ // test pattern, group 2 + {4, "x11223300"}, + {4, "x44556600_"}, + {4, "x77889900_"}, + {4, "xAABBCC00_"}, + {2, "xDD00"}, + {2, "xEE00"}, + {2, "xFF00"}, + {2, "x0_"}, + {1, "x00"}, + {1, "x80"}, + {1, "x__"}, + {1, "x8_"}, + {4, "x33322100"}, + {0} +}, +{ // Random vs. Sequential Data, group 3 + {4, "hostReads", "Host Read Count in Sectors"}, + {4, "hostWrites", "Host Write Count in Sectors"}, + {4, "nandWrites", "Nand Write Count in Sectors"}, + {4, "randomReadCmd", "Count of Random Read Commands (vs. Sequential)"}, + {4, "randomWriteCmd", "Count of Random Write Commands (vs. Sequential)"}, + {4, "hostReadCmd", "Count of Total Host Read Commands (vs. Sequential)"}, + {4, "hostWriteCmd", "Count of Total Host Read Commands (vs. Sequential)"}, + {1, NULL}, + {1, NULL}, + {1, "randomWrite%", "% of Random Write Sectors vs. Sequential"}, + {1, "randomThrottleRead%", "% of Random Read Sectors vs. Sequential"}, + {0} +}, +{ //Detailed Throttle Data, group 4 + {4, "pwrThrottleOn_ms", "Duration of Power Throttling in mS."}, + {4, "thmThrottleOn_ms", "Duration of Thermal Throttling in mS."}, + {4, "powerOn_us", "Duration of Power-on in uS."}, + {4, NULL}, + {4, NULL}, + {4, NULL}, + {4, NULL}, + {1, "pwrThrottle%", "% of Throttle Period due to Power Regulation"}, + {1, "thmThrottle%", "% of Throttle Period due to Thermal Levels"}, + {0} +}, +{ // Detailed Power Data, group 5 + // PMIC and/or Input Voltage Power + {4, "vin1Power", "in uW"}, + {4, "vin2Power"}, + // NAND Workload + {4, "nandWrites", "Nand Write Count in Sectors"}, + {4, "nandReads", "Nand Read Count in Sectors"}, + // Power Governor (if not enabled, all-0s) + {4, "lastNandAvgPwr"}, + {4, "lastDriveAvgPwr"}, + {4, "NscPwgSysCreditCnt"}, + {4, "burstPowerBudget"}, + {0} +}, +{ // Defrag, group 6 + {4, "hostReads", "Host Read Count in Sectors"}, + {4, "hostWrites", "Host Write Count in Sectors"}, + {4, "nandWrites", "Nand Write Count in Sectors"}, + {4, "defragSlots", "Current defragSlots"}, + {4, "hostSlots", "hostSlots"}, + {4, "totalSlots", "Total slots"}, + {1, "hostBufferUse%", "% of WCM_GetHostBuffersInUse to WCM_GetDesiredHostBuffer"}, + {1, "defragBufferUse%", "% of defragBuffer to Desired defrag buffer %"}, + {1, "defragSlotsUse%", "defragSlots to Total defrag slots %"}, + {1, "hostSlotsUse%", "hostSlots to Total defrag slots %"}, + {1, "aiuUse%", "% of AvailableIndirectionUnits to Start Setpoint IU"}, + {1, "isImminentFRorWL", "defrag/Wear leveling is imminent"}, + {1, "defragType", "defrag type"}, + {0} +}}; + +#pragma pack(push, 1) +union WorkloadLogEnable { + struct { + __u32 trackerEnable : 1; + __u32 triggerEnable : 1; + __u32 triggerSynchronous : 1; // trigger mode, 1=Synchronous,0=ASynchronous(Latency) + __u32 triggerDelta : 1; // trigger value mode, 1=delta, 0=current value + __u32 triggerDwordIndex : 3; // trigger dword index, 0~7 of a log entry + __u32 triggerByteWordIndex : 2; // trigger byte or word index,byte=0~3, word=0~1 + __u32 triggerSize : 2; // trigger size, 1=byte, 2=word, 3=dword as a trigger + __u32 sampleTime : 4; // trigger sample time + __u32 contentGroup : 4; // content group select + __u32 stopCount : 12;// event limit,if<>0,stop tracker after stopCount events + __u32 eventDumpEnable : 1; // trigger event dump enable + } field; + __u32 dword; +}; + +struct workloadLogHeader { + __u16 majorVersion; // Major Version + __u16 minorVersion; // Minor Version + __u32 workloadLogCount; // Number of Entries in the Workload Log + __u32 reserved; // reserve for future + __u32 triggeredEvents; // Count of events triggered + __u32 samplePeriodInMilliseconds; // Sample Period In Milliseconds + __u64 timestamp_lastEntry; // Timestamp for the last full entry + __u64 timestamp_triggered; // Timestamp at the point of trigger + __u32 trackerEnable; // Workload trigger and enable settings + __u32 triggerthreshold; // Trigger threshold + __u32 triggeredValue; // Actual value fired the trigger +}; + + +struct workloadLog { // Full WL Log Structure + struct workloadLogHeader header; + __u8 entry[MAX_WORKLOAD_LOG_ENTRIES][MAX_WORKLOAD_LOG_ENTRY_SIZE]; +}; +#pragma pack(pop) + +struct wltracker { + int fd; + struct workloadLog workload_log; + size_t entry_count; + unsigned int verbose; +}; + +static void wltracker_print_field_names(struct wltracker *wlt) +{ + struct workloadLog *log = &wlt->workload_log; + __u8 cnt = log->header.workloadLogCount; + union WorkloadLogEnable workloadEnable = (union WorkloadLogEnable)log->header.trackerEnable; + __u8 content_group = workloadEnable.field.contentGroup; + + if (cnt == 0) + return; + + printf("%-16s", "timestamp"); + + for (int i = 0 ; i < MAX_FIELDS; i++) { + struct field f = group_fields[content_group][i]; + + if (f.size == 0) + break; + if (f.name == NULL) + continue; + printf("%s ", f.name); + } + + if (wlt->verbose > 1) + printf("%s", "entry#"); + + printf("\n"); +} + +static void wltracker_print_header(struct wltracker *wlt) +{ + struct workloadLog *log = &wlt->workload_log; + __u8 cnt = log->header.workloadLogCount; + union WorkloadLogEnable workloadEnable = (union WorkloadLogEnable)log->header.trackerEnable; + __u8 content_group = workloadEnable.field.contentGroup; + + printf("%-20s %u.%u\n", "Log page version:", le16_to_cpu(log->header.majorVersion), + le16_to_cpu(log->header.minorVersion)); + printf("%-20s %u\n", "Sample period(ms):", + le32_to_cpu(log->header.samplePeriodInMilliseconds)); + printf("%-20s %lu\n", "timestamp_lastEntry:", + le64_to_cpu(log->header.timestamp_lastEntry) / WLT2MS); + printf("%-20s %lu\n", "timestamp_triggered:", + le64_to_cpu(log->header.timestamp_triggered/1000)); + printf("%-20s 0x%x\n", "trackerEnable:", le32_to_cpu(log->header.trackerEnable)); + printf("%-20s %u\n", "Triggerthreshold:", + le32_to_cpu(log->header.triggerthreshold)); + printf("%-20s %u\n", "ValueTriggered:", le32_to_cpu(log->header.triggeredValue)); + printf("%-20s %s\n", "Tracker Type:", trk_types[content_group]); + printf("%-30s %u\n", "Total workload log entries:", le16_to_cpu(cnt)); + printf("%-20s %ld\n\n", "Sample count:", wlt->entry_count); + if (wlt->entry_count != 0) + wltracker_print_field_names(wlt); +} + +static int wltracker_show_newer_entries(struct wltracker *wlt) +{ + struct workloadLog *log = &wlt->workload_log; + __u8 cnt; + __u8 content_group; + static __u64 last_timestamp_ms; + __u64 timestamp = 0; + union WorkloadLogEnable workloadEnable; + + int err = nvme_get_log_simple(wlt->fd, LID, sizeof(struct workloadLog), log); + + if (err > 0) { + nvme_show_status(err); + return err; + } + if (err < 0) + return err; + + if (wlt->verbose) + wltracker_print_header(wlt); + + cnt = log->header.workloadLogCount; + workloadEnable = (union WorkloadLogEnable)log->header.trackerEnable; + content_group = workloadEnable.field.contentGroup; + + if (cnt == 0) { + nvme_show_error("Warning : No valid workload log data\n"); + return 0; + } + + timestamp = (le64_to_cpu(log->header.timestamp_lastEntry) / WLT2MS) - + (log->header.samplePeriodInMilliseconds * (cnt - 1)); + + + if (wlt->entry_count == 0) + wltracker_print_field_names(wlt); + + for (int i = cnt - 1; i >= 0; i--) { + int offset = 0; + __u8 *entry = (__u8 *) &log->entry[i]; + bool is_old = timestamp <= last_timestamp_ms; + + if (is_old) { + timestamp += log->header.samplePeriodInMilliseconds; + continue; + } + printf("%-16llu", timestamp); + for (int j = 0; j < MAX_FIELDS; j++) { + __u32 val = 0; + struct field f = group_fields[content_group][j]; + + if (f.size == 0) { + if (wlt->verbose > 1) + printf("%-*i", (int)sizeof("entry#"), i); + printf("\n"); + break; + } + if (f.name == NULL) + continue; + + switch (f.size) { + case 1: + val = *(entry+offset); + break; + case 2: + val = *(__u16 *)(entry + offset); + break; + case 4: + val = *(__u32 *)(entry + offset); + break; + default: + nvme_show_error("Bad field size"); + } + offset += f.size; + + printf("%-*u ", (int)strlen(f.name), val); + } + wlt->entry_count++; + timestamp += log->header.samplePeriodInMilliseconds; + } + last_timestamp_ms = log->header.timestamp_lastEntry / WLT2MS; + return 0; +} + +int wltracker_config(struct wltracker *wlt, union WorkloadLogEnable *we) +{ + struct nvme_set_features_args args = { + .args_size = sizeof(args), + .fd = wlt->fd, + .fid = FID, + .cdw11 = we->dword, + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + }; + + return nvme_set_features(&args); +} + +static int stricmp(char const *a, char const *b) +{ + for (; *a || *b; a++, b++) + if (tolower((unsigned char)*a) != tolower((unsigned char)*b)) + return 1; + return 0; +} + +static int find_option(char const *list[], int size, const char *val) +{ + for (int i = 0; i < size; i++) { + if (!stricmp(val, list[i])) + return i; + } + return -EINVAL; +} + +static void join(char *dest, char const *list[], size_t list_size) +{ + strcat(dest, list[0]); + for (int i = 1; i < list_size; i++) { + strcat(dest, "|"); + strcat(dest, list[i]); + } +} + +__u64 micros(void) +{ + struct timespec ts; + __u64 us; + + clock_gettime(CLOCK_MONOTONIC_RAW, &ts); + us = (((__u64)ts.tv_sec)*1000000) + (((__u64)ts.tv_nsec)/1000); + return us; +} + +int sldgm_get_workload_tracker(int argc, char **argv, struct command *cmd, struct plugin *plugin) +{ + struct wltracker wlt = {0}; + union WorkloadLogEnable we = {0}; + + _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; + const char *desc = "Real Time capture Workload Tracker samples"; + const char *sample_interval = "Sample interval"; + const char *run_time = "Limit runtime capture time in seconds"; + const char *flush_frequency = + "Samples (1 to 126) to wait for extracting data. Default 100 samples"; + char type_options[80] = {0}; + char sample_options[80] = {0}; + __u64 us_start; + __u64 run_time_us; + __u64 elapsed_run_time_us = 0; + __u64 next_sample_us = 0; + int opt; + int err; + + struct config { + bool enable; + bool disable; + const char *tracker_type; + const char *sample_time; + int run_time_s; + int flush_frequency; + }; + + struct config cfg = { + .sample_time = samplet[0], + .flush_frequency = 100, + .tracker_type = trk_types[0], + }; + + join(type_options, trk_types, ARRAY_SIZE(trk_types)); + join(sample_options, samplet, ARRAY_SIZE(samplet)); + + OPT_ARGS(opts) = { + OPT_FLAG("enable", 'e', &cfg.enable, "tracker enable"), + OPT_FLAG("disable", 'd', &cfg.disable, "tracker disable"), + OPT_STRING("sample-time", 's', sample_options, &cfg.sample_time, sample_interval), + OPT_STRING("type", 't', type_options, &cfg.tracker_type, "Tracker type"), + OPT_INT("run-time", 'r', &cfg.run_time_s, run_time), + OPT_INT("flush-freq", 'f', &cfg.flush_frequency, flush_frequency), + OPT_INCR("verbose", 'v', &wlt.verbose, "Increase logging verbosity"), + OPT_END() + }; + + err = parse_and_open(&dev, argc, argv, desc, opts); + if (err) + return err; + + wlt.fd = dev_fd(dev); + + if ((cfg.flush_frequency < 1) || (cfg.flush_frequency > MAX_WORKLOAD_LOG_ENTRIES)) { + nvme_show_error("Invalid number of samples: %s. Valid values: 1-%d", + cfg.flush_frequency, MAX_WORKLOAD_LOG_ENTRIES); + return -EINVAL; + } + + opt = find_option(samplet, ARRAY_SIZE(samplet), cfg.sample_time); + if (opt < 0) { + nvme_show_error("invalid Sample interval: %s. Valid values: %s", + cfg.sample_time, sample_options); + return -EINVAL; + } + we.field.sampleTime = opt; + + opt = find_option(trk_types, ARRAY_SIZE(trk_types), cfg.tracker_type); + if (opt < 0) { + nvme_show_error("Invalid tracker type: %s. Valid types: %s", + cfg.tracker_type, type_options); + return -EINVAL; + } + we.field.contentGroup = opt; + + if (cfg.enable && cfg.disable) { + nvme_show_error("Can't enable disable simultaneously"); + return -EINVAL; + } + + if (cfg.enable || cfg.disable) { + we.field.trackerEnable = cfg.enable; + err = wltracker_config(&wlt, &we); + if (err < 0) { + nvme_show_error("tracker set-feature: %s", nvme_strerror(errno)); + return err; + } else if (err > 0) { + nvme_show_status(err); + return err; + } + } + + if (cfg.disable && !cfg.enable) { + printf("Tracker disabled\n"); + return 0; + } + + us_start = micros(); + run_time_us = cfg.run_time_s * 1000000; + while (elapsed_run_time_us < run_time_us) { + __u64 interval; + __u64 elapsed; + __u64 prev_elapsed_run_time_us = elapsed_run_time_us; + + err = wltracker_show_newer_entries(&wlt); + + if (err > 0) { + nvme_show_status(err); + return err; + } + interval = ((__u64)wlt.workload_log.header.samplePeriodInMilliseconds) * 1000 * + cfg.flush_frequency; + next_sample_us += interval; + elapsed_run_time_us = micros() - us_start; + elapsed = elapsed_run_time_us - prev_elapsed_run_time_us; + if (wlt.verbose > 1) + printf("elapsed_run_time: %lluus\n", elapsed_run_time_us); + if (interval > elapsed) { + __u64 period_us = min(next_sample_us - elapsed_run_time_us, + run_time_us - elapsed_run_time_us); + if (wlt.verbose > 1) + printf("Sleeping %lluus..\n", period_us); + usleep(period_us); + } + elapsed_run_time_us = micros() - us_start; + } + + err = wltracker_show_newer_entries(&wlt); + + elapsed_run_time_us = micros() - us_start; + if (wlt.verbose > 0) + printf("elapsed_run_time: %lluus\n", elapsed_run_time_us); + + if (err > 0) { + nvme_show_status(err); + return err; + } + return err; +} diff --git a/plugins/solidigm/solidigm-workload-tracker.h b/plugins/solidigm/solidigm-workload-tracker.h new file mode 100644 index 0000000..d3ecc16 --- /dev/null +++ b/plugins/solidigm/solidigm-workload-tracker.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (c) 2024 Solidigm. + * + * Author: leonardo.da.cunha@solidigm.com + */ + +int sldgm_get_workload_tracker(int argc, char **argv, struct command *cmd, struct plugin *plugin); diff --git a/plugins/ssstc/ssstc-nvme.c b/plugins/ssstc/ssstc-nvme.c index 03e4fe3..302df98 100644 --- a/plugins/ssstc/ssstc-nvme.c +++ b/plugins/ssstc/ssstc-nvme.c @@ -64,9 +64,9 @@ void show_ssstc_add_smart_log_jsn(struct nvme_additional_smart_log *smart, unsigned int nsid, const char *devname) { struct json_object *root, *entry_stats, *dev_stats, *multi; - __uint16_t wear_level_min = 0; - __uint16_t wear_level_max = 0; - __uint16_t wear_level_avg = 0; + uint16_t wear_level_min = 0; + uint16_t wear_level_max = 0; + uint16_t wear_level_avg = 0; uint64_t raw_val = 0; root = json_create_object(); diff --git a/plugins/virtium/virtium-nvme.c b/plugins/virtium/virtium-nvme.c index 0ba4b15..ad9938d 100644 --- a/plugins/virtium/virtium-nvme.c +++ b/plugins/virtium/virtium-nvme.c @@ -32,14 +32,14 @@ static char vt_default_log_file_name[256]; struct vtview_log_header { char path[256]; char test_name[256]; - long time_stamp; + time_t time_stamp; struct nvme_id_ctrl raw_ctrl; struct nvme_firmware_slot raw_fw; }; struct vtview_smart_log_entry { char path[256]; - long time_stamp; + time_t time_stamp; struct nvme_id_ns raw_ns; struct nvme_id_ctrl raw_ctrl; struct nvme_smart_log raw_smart; diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c index 7525055..fa4157d 100644 --- a/plugins/wdc/wdc-nvme.c +++ b/plugins/wdc/wdc-nvme.c @@ -681,44 +681,6 @@ struct __packed wdc_nvme_ext_smart_log { __u8 ext_smart_lpg[16]; /* 496 Log page GUID */ }; -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_PSCC = 200, /* Power State Change Count */ - SCAO_LPV = 494, /* Log page version */ - SCAO_LPG = 496, /* Log page GUID */ -}; - struct ocp_bad_nand_block_count { __u64 raw : 48; __u16 normalized : 16; @@ -766,8 +728,9 @@ struct ocp_cloud_smart_log { __u8 percent_free_blocks; __u8 rsvd121[7]; __u16 capacitor_health; - __u8 nvme_errata_ver; - __u8 rsvd131[5]; + __u8 nvme_base_errata_ver; + __u8 nvme_cmd_set_errata_ver; + __u8 rsvd132[4]; __u64 unaligned_io; __u64 security_version_number; __u64 total_nuse; @@ -775,7 +738,8 @@ struct ocp_cloud_smart_log { __u8 endurance_estimate[16]; __u64 pcie_link_retraining_cnt; __u64 power_state_change_cnt; - __u8 rsvd208[286]; + char lowest_permitted_fw_rev[8]; + __u8 rsvd216[278]; __u16 log_page_version; __u8 log_page_guid[16]; }; @@ -1004,6 +968,13 @@ static int wdc_enc_submit_move_data(struct nvme_dev *dev, char *cmd, int len, in static bool get_dev_mgment_cbs_data(nvme_root_t r, struct nvme_dev *dev, __u8 log_id, void **cbs_data); static __u32 wdc_get_fw_cust_id(nvme_root_t r, struct nvme_dev *dev); +static int wdc_print_c0_cloud_attr_log(void *data, + int fmt, + struct nvme_dev *dev); +static int wdc_print_c0_eol_log(void *data, int fmt); +static void wdc_show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, + struct nvme_dev *dev); +static void wdc_show_cloud_smart_log_json(struct ocp_cloud_smart_log *log); /* Drive log data size */ struct wdc_log_size { @@ -1148,14 +1119,14 @@ struct __packed wdc_bd_ca_log_format { __u8 raw_value[8]; }; -#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 WDC_LATENCY_LOG_BUCKET_READ 3 +#define WDC_LATENCY_LOG_BUCKET_WRITE 2 +#define WDC_LATENCY_LOG_BUCKET_TRIM 1 +#define WDC_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 +#define WDC_LATENCY_LOG_MEASURED_LAT_READ 2 +#define WDC_LATENCY_LOG_MEASURED_LAT_WRITE 1 +#define WDC_LATENCY_LOG_MEASURED_LAT_TRIM 0 struct __packed wdc_ssd_latency_monitor_log { __u8 feature_status; /* 0x00 */ @@ -1180,8 +1151,9 @@ struct __packed wdc_ssd_latency_monitor_log { __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 */ + __u8 rsvd4[10]; /* 0x1AA */ + __u8 debug_telemetry_log_size[12]; /* 0x1B4 */ __le16 debug_log_trigger_enable; /* 0x1C0 */ __le16 debug_log_measured_latency; /* 0x1C2 */ __le64 debug_log_latency_stamp; /* 0x1C4 */ @@ -1249,25 +1221,29 @@ struct __packed wdc_ssd_d0_smart_log { #define WDC_OCP_C1_GUID_LENGTH 16 #define WDC_ERROR_REC_LOG_BUF_LEN 512 #define WDC_ERROR_REC_LOG_ID 0xC1 -#define WDC_ERROR_REC_LOG_VERSION1 0001 -#define WDC_ERROR_REC_LOG_VERSION2 0002 struct __packed wdc_ocp_c1_error_recovery_log { - __le16 panic_reset_wait_time; /* 000 - Panic Reset Wait Time */ - __u8 panic_reset_action; /* 002 - Panic Reset Action */ - __u8 dev_recovery_action1; /* 003 - Device Recovery Action 1 */ - __le64 panic_id; /* 004 - Panic ID */ - __le32 dev_capabilities; /* 012 - Device Capabilities */ - __u8 vs_recovery_opc; /* 016 - Vendor Specific Recovery Opcode */ - __u8 rsvd1[3]; /* 017 - 3 Reserved Bytes */ - __le32 vs_cmd_cdw12; /* 020 - Vendor Specific Command CDW12 */ - __le32 vs_cmd_cdw13; /* 024 - Vendor Specific Command CDW13 */ - __u8 vs_cmd_to; /* 028 - Vendor Specific Command Timeout V2 */ - __u8 dev_recovery_action2; /* 029 - Device Recovery Action 2 V2 */ - __u8 dev_recovery_action2_to; /* 030 - Device Recovery Action 2 Timeout V2 */ - __u8 rsvd2[463]; /* 031 - 463 Reserved Bytes */ - __le16 log_page_version; /* 494 - Log Page Version */ - __u8 log_page_guid[WDC_OCP_C1_GUID_LENGTH]; /* 496 - Log Page GUID */ + __le16 panic_reset_wait_time; /* 000 - Panic Reset Wait Time */ + __u8 panic_reset_action; /* 002 - Panic Reset Action */ + __u8 dev_recovery_action1; /* 003 - Device Recovery Action 1 */ + __le64 panic_id; /* 004 - Panic ID */ + __le32 dev_capabilities; /* 012 - Device Capabilities */ + __u8 vs_recovery_opc; /* 016 - Vendor Specific Recovery Opcode */ + __u8 rsvd1[3]; /* 017 - 3 Reserved Bytes */ + __le32 vs_cmd_cdw12; /* 020 - Vendor Specific Command CDW12 */ + __le32 vs_cmd_cdw13; /* 024 - Vendor Specific Command CDW13 */ + __u8 vs_cmd_to; /* 028 - Vendor Specific Command Timeout V2 */ + __u8 dev_recovery_action2; /* 029 - Device Recovery Action 2 V2 */ + __u8 dev_recovery_action2_to; /* 030 - Device Recovery Action 2 Timeout V2 */ + __u8 panic_count; /* 031 - Number of panics encountered */ + __le64 prev_panic_ids[4]; /* 032 - 063 Previous Panic ID's */ + __u8 rsvd2[430]; /* 064 - 493 Reserved Bytes */ + /* 430 reserved bytes aligns with the rest */ + /* of the data structure. The size of 463 */ + /* bytes mentioned in the OCP spec */ + /* (version 2.5) would not fit here. */ + __le16 log_page_version; /* 494 - Log Page Version */ + __u8 log_page_guid[WDC_OCP_C1_GUID_LENGTH]; /* 496 - Log Page GUID */ }; static __u8 wdc_ocp_c1_guid[WDC_OCP_C1_GUID_LENGTH] = { 0x44, 0xD9, 0x31, 0x21, 0xFE, 0x30, 0x34, 0xAE, @@ -3711,7 +3687,7 @@ free_buf: static int dump_internal_logs(struct nvme_dev *dev, char *dir_name, int verbose) { - char file_path[128]; + char file_path[PATH_MAX]; void *telemetry_log; const size_t bs = 512; struct nvme_telemetry_log *hdr; @@ -4681,20 +4657,30 @@ static int wdc_print_latency_monitor_log_normal(struct nvme_dev *dev, printf(" Active Latency Minimum Window %d ms\n", 100*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)); + if (le16_to_cpu(log_data->log_page_version) >= 4) + printf(" Debug Telemetry Log Size %"PRIu64"\n", + le64_to_cpu(*(uint64_t *)log_data->debug_telemetry_log_size)); + printf(" Debug Log Trigger Enable %d\n", + le16_to_cpu(log_data->debug_log_trigger_enable)); + printf(" Log Page Version %d\n", + le16_to_cpu(log_data->log_page_version)); + printf(" Log page GUID 0x"); + for (j = 0; j < WDC_C3_GUID_LENGTH; j++) + printf("%x", log_data->log_page_guid[j]); + printf("\n"); 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][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])); + i, le32_to_cpu(log_data->active_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_READ]), + le32_to_cpu(log_data->active_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_WRITE]), + le32_to_cpu(log_data->active_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_TRIM])); for (i = 3; i >= 0; i--) printf(" Active Measured Latency: Bucket %d %27d ms %27d ms %27d ms\n", - 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])); + 3-i, le16_to_cpu(log_data->active_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_READ]), + le16_to_cpu(log_data->active_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_WRITE]), + le16_to_cpu(log_data->active_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_TRIM])); for (i = 3; i >= 0; i--) { printf(" Active Latency Time Stamp: Bucket %d ", 3-i); @@ -4711,15 +4697,15 @@ 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][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])); + i, le32_to_cpu(log_data->static_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_READ]), + le32_to_cpu(log_data->static_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_WRITE]), + le32_to_cpu(log_data->static_bucket_counter[i][WDC_LATENCY_LOG_BUCKET_TRIM])); for (i = 3; i >= 0; i--) printf(" Static Measured Latency: Bucket %d %27d ms %27d ms %27d ms\n", - 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])); + 3-i, le16_to_cpu(log_data->static_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_READ]), + le16_to_cpu(log_data->static_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_WRITE]), + le16_to_cpu(log_data->static_measured_latency[i][WDC_LATENCY_LOG_MEASURED_LAT_TRIM])); for (i = 3; i >= 0; i--) { printf(" Static Latency Time Stamp: Bucket %d ", 3-i); @@ -4755,7 +4741,22 @@ static void wdc_print_latency_monitor_log_json(struct wdc_ssd_latency_monitor_lo json_object_add_value_int(root, "Active Lantency Minimum Window", 100*log_data->active_latency_min_window); json_object_add_value_int(root, "Active Latency Stamp Units", le16_to_cpu(log_data->active_latency_stamp_units)); json_object_add_value_int(root, "Static Latency Stamp Units", le16_to_cpu(log_data->static_latency_stamp_units)); - json_object_add_value_int(root, "Debug Log Trigger Enable", le16_to_cpu(log_data->debug_log_trigger_enable)); + if (le16_to_cpu(log_data->log_page_version) >= 4) { + json_object_add_value_int(root, "Debug Telemetry Log Size", + le64_to_cpu(*(uint64_t *)log_data->debug_telemetry_log_size)); + } + json_object_add_value_int(root, "Debug Log Trigger Enable", + le16_to_cpu(log_data->debug_log_trigger_enable)); + json_object_add_value_int(root, "Log Page Version", + le16_to_cpu(log_data->log_page_version)); + + char guid[40]; + + memset((void *)guid, 0, 40); + sprintf((char *)guid, "0x%"PRIx64"%"PRIx64"", + (uint64_t)le64_to_cpu(*(uint64_t *)&log_data->log_page_guid[8]), + (uint64_t)le64_to_cpu(*(uint64_t *)&log_data->log_page_guid[0])); + json_object_add_value_string(root, "Log page GUID", guid); for (i = 0; i <= 3; i++) { for (j = 2; j >= 0; j--) { @@ -4814,13 +4815,20 @@ static void wdc_print_error_rec_log_normal(struct wdc_ocp_c1_error_recovery_log printf(" Vendor Specific Recovery Opcode : 0x%x\n", log_data->vs_recovery_opc); printf(" Vendor Specific Command CDW12 : 0x%x\n", le32_to_cpu(log_data->vs_cmd_cdw12)); printf(" Vendor Specific Command CDW13 : 0x%x\n", le32_to_cpu(log_data->vs_cmd_cdw13)); - if (le16_to_cpu(log_data->log_page_version) == WDC_ERROR_REC_LOG_VERSION2) { + if (le16_to_cpu(log_data->log_page_version) >= 2) { printf(" Vendor Specific Command Timeout : 0x%x\n", log_data->vs_cmd_to); printf(" Device Recovery Action 2 : 0x%x\n", log_data->dev_recovery_action2); printf(" Device Recovery Action 2 Timeout : 0x%x\n", log_data->dev_recovery_action2_to); } - printf(" Log Page Version : 0x%x\n", le16_to_cpu(log_data->log_page_version)); - printf(" Log page GUID : 0x"); + if (le16_to_cpu(log_data->log_page_version) >= 3) { + printf(" Panic Count : 0x%x\n", log_data->panic_count); + for (j = 0; j < 4; j++) + printf(" Previous Panic ID N-%d : 0x%"PRIx64"\n", + j+1, le64_to_cpu(log_data->prev_panic_ids[j])); + } + printf(" Log Page Version : 0x%x\n", + le16_to_cpu(log_data->log_page_version)); + printf(" Log page GUID : 0x"); for (j = 0; j < WDC_OCP_C1_GUID_LENGTH; j++) printf("%x", log_data->log_page_guid[j]); printf("\n"); @@ -4828,6 +4836,8 @@ static void wdc_print_error_rec_log_normal(struct wdc_ocp_c1_error_recovery_log static void wdc_print_error_rec_log_json(struct wdc_ocp_c1_error_recovery_log *log_data) { + int j; + char buf[128]; struct json_object *root = json_create_object(); json_object_add_value_int(root, "Panic Reset Wait Time", le16_to_cpu(log_data->panic_reset_wait_time)); @@ -4838,12 +4848,21 @@ static void wdc_print_error_rec_log_json(struct wdc_ocp_c1_error_recovery_log *l json_object_add_value_int(root, "Vendor Specific Recovery Opcode", log_data->vs_recovery_opc); json_object_add_value_int(root, "Vendor Specific Command CDW12", le32_to_cpu(log_data->vs_cmd_cdw12)); json_object_add_value_int(root, "Vendor Specific Command CDW13", le32_to_cpu(log_data->vs_cmd_cdw13)); - if (le16_to_cpu(log_data->log_page_version) == WDC_ERROR_REC_LOG_VERSION2) { + if (le16_to_cpu(log_data->log_page_version) >= 2) { json_object_add_value_int(root, "Vendor Specific Command Timeout", log_data->vs_cmd_to); json_object_add_value_int(root, "Device Recovery Action 2", log_data->dev_recovery_action2); json_object_add_value_int(root, "Device Recovery Action 2 Timeout", log_data->dev_recovery_action2_to); } - json_object_add_value_int(root, "Log Page Version", le16_to_cpu(log_data->log_page_version)); + if (le16_to_cpu(log_data->log_page_version) >= 3) { + json_object_add_value_int(root, "Panic Count", log_data->panic_count); + for (j = 0; j < 4; j++) { + sprintf(buf, "Previous Panic ID N-%d", j+1); + json_object_add_value_int(root, buf, + le64_to_cpu(log_data->prev_panic_ids[j])); + } + } + json_object_add_value_int(root, "Log Page Version", + le16_to_cpu(log_data->log_page_version)); char guid[40]; @@ -5875,6 +5894,141 @@ static void wdc_print_fw_act_history_log_json(__u8 *data, int num_entries, json_free_object(root); } +static int nvme_get_print_ocp_cloud_smart_log(struct nvme_dev *dev, + int uuid_index, + __u32 namespace_id, + int fmt) +{ + struct ocp_cloud_smart_log *log_ptr = NULL; + int ret, i; + __u32 length = WDC_NVME_SMART_CLOUD_ATTR_LEN; + int fd = dev_fd(dev); + + log_ptr = (struct ocp_cloud_smart_log *)malloc(sizeof(__u8) * length); + if (!log_ptr) { + fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); + return -1; + } + + if (namespace_id == NVME_NSID_ALL) { + ret = nvme_get_nsid(fd, &namespace_id); + if (ret < 0) + namespace_id = NVME_NSID_ALL; + } + + /* Get the 0xC0 log data */ + struct nvme_get_log_args args = { + .args_size = sizeof(args), + .fd = fd, + .lid = WDC_NVME_GET_SMART_CLOUD_ATTR_LOG_ID, + .nsid = namespace_id, + .lpo = 0, + .lsp = NVME_LOG_LSP_NONE, + .lsi = 0, + .rae = false, + .uuidx = uuid_index, + .csi = NVME_CSI_NVM, + .ot = false, + .len = length, + .log = log_ptr, + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .result = NULL, + }; + ret = nvme_get_log(&args); + + if (fmt == JSON) + nvme_show_status(ret); + + if (!ret) { + /* Verify GUID matches */ + for (i = 0; i < 16; i++) { + if (scao_guid[i] != log_ptr->log_page_guid[i]) { + fprintf(stderr, "ERROR: WDC: Unknown GUID in C0 Log Page data\n"); + int j; + + fprintf(stderr, "ERROR: WDC: Expected GUID: 0x"); + for (j = 0; j < 16; j++) + fprintf(stderr, "%x", scao_guid[j]); + fprintf(stderr, "\nERROR: WDC: Actual GUID: 0x"); + for (j = 0; j < 16; j++) + fprintf(stderr, "%x", log_ptr->log_page_guid[j]); + fprintf(stderr, "\n"); + + ret = -1; + break; + } + } + + if (!ret) + /* parse the data */ + wdc_print_c0_cloud_attr_log(log_ptr, fmt, dev); + } else { + fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data\n"); + ret = -1; + } + + free(log_ptr); + return ret; +} + +static int nvme_get_print_c0_eol_log(struct nvme_dev *dev, + int uuid_index, + __u32 namespace_id, + int fmt) +{ + void *log_ptr = NULL; + int ret; + __u32 length = WDC_NVME_EOL_STATUS_LOG_LEN; + int fd = dev_fd(dev); + + log_ptr = (void *)malloc(sizeof(__u8) * length); + if (!log_ptr) { + fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); + return -1; + } + + if (namespace_id == NVME_NSID_ALL) { + ret = nvme_get_nsid(fd, &namespace_id); + if (ret < 0) + namespace_id = NVME_NSID_ALL; + } + + /* Get the 0xC0 log data */ + struct nvme_get_log_args args = { + .args_size = sizeof(args), + .fd = fd, + .lid = WDC_NVME_GET_EOL_STATUS_LOG_OPCODE, + .nsid = namespace_id, + .lpo = 0, + .lsp = NVME_LOG_LSP_NONE, + .lsi = 0, + .rae = false, + .uuidx = uuid_index, + .csi = NVME_CSI_NVM, + .ot = false, + .len = length, + .log = log_ptr, + .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, + .result = NULL, + }; + ret = nvme_get_log(&args); + + if (fmt == JSON) + nvme_show_status(ret); + + if (!ret) { + /* parse the data */ + wdc_print_c0_eol_log(log_ptr, fmt); + } else { + fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data "); + fprintf(stderr, "with uuid index %d\n", uuid_index); + ret = -1; + } + + free(log_ptr); + return ret; +} + static int nvme_get_ext_smart_cloud_log(int fd, __u8 **data, int uuid_index, __u32 namespace_id) { int ret, i; @@ -6556,177 +6710,6 @@ static void wdc_print_ext_smart_cloud_log_json(void *data, int mask) json_free_object(root); } -static void wdc_print_smart_cloud_attr_C0_normal(void *data) -{ - __u8 *log_data = (__u8 *)data; - uint16_t smart_log_ver = 0; - - printf(" SMART Cloud Attributes :-\n"); - - printf(" Physical media units written : %s\n", - uint128_t_to_string(le128_to_cpu(&log_data[SCAO_PMUW]))); - printf(" Physical media units read : %s\n", - uint128_t_to_string(le128_to_cpu(&log_data[SCAO_PMUR]))); - 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])); - } - if (smart_log_ver > 3) { - printf(" Power State Change Count : %"PRIu64"\n", - (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PSCC])); - } - printf("\n"); -} - -static void wdc_print_smart_cloud_attr_C0_json(void *data) -{ - __u8 *log_data = (__u8 *)data; - struct json_object *root = json_create_object(); - uint16_t smart_log_ver = 0; - - json_object_add_value_uint128(root, "Physical media units written", - le128_to_cpu(&log_data[SCAO_PMUW])); - json_object_add_value_uint128(root, "Physical media units read", - le128_to_cpu(&log_data[SCAO_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_uint64(root, "PCIe Link Retraining Count", - (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PLRC])); - } - if (smart_log_ver > 3) { - json_object_add_value_uint64(root, "Power State Change Count", - (uint64_t)le64_to_cpu(*(uint64_t *)&log_data[SCAO_PSCC])); - } - json_print_object(root, NULL); - printf("\n"); - json_free_object(root); -} static void wdc_print_eol_c0_normal(void *data) { @@ -6794,18 +6777,26 @@ static int wdc_print_ext_smart_cloud_log(void *data, int fmt) return 0; } -static int wdc_print_c0_cloud_attr_log(void *data, int fmt) +static int wdc_print_c0_cloud_attr_log(void *data, + int fmt, + struct nvme_dev *dev) { + struct ocp_cloud_smart_log *log = (struct ocp_cloud_smart_log *)data; + if (!data) { fprintf(stderr, "ERROR: WDC: Invalid buffer to read 0xC0 log\n"); return -1; } + switch (fmt) { + case BINARY: + d_raw((unsigned char *)log, sizeof(struct ocp_cloud_smart_log)); + break; case NORMAL: - wdc_print_smart_cloud_attr_C0_normal(data); + wdc_show_cloud_smart_log_normal(log, dev); break; case JSON: - wdc_print_smart_cloud_attr_C0_json(data); + wdc_show_cloud_smart_log_json(log); break; } return 0; @@ -6818,6 +6809,9 @@ static int wdc_print_c0_eol_log(void *data, int fmt) return -1; } switch (fmt) { + case BINARY: + d_raw((unsigned char *)data, WDC_NVME_EOL_STATUS_LOG_LEN); + break; case NORMAL: wdc_print_eol_c0_normal(data); break; @@ -6832,113 +6826,17 @@ static int wdc_get_c0_log_page_sn_customer_id_0x100X(struct nvme_dev *dev, int u char *format, __u32 namespace_id, int fmt) { int ret; - __u8 *data; - int i; if (!uuid_index) { - data = (__u8 *)malloc(sizeof(__u8) * WDC_NVME_SMART_CLOUD_ATTR_LEN); - if (!data) { - fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); - return -1; - } - - if (namespace_id == NVME_NSID_ALL) { - ret = nvme_get_nsid(dev_fd(dev), &namespace_id); - if (ret < 0) - namespace_id = NVME_NSID_ALL; - } - - /* Get the 0xC0 log data */ - struct nvme_get_log_args args = { - .args_size = sizeof(args), - .fd = dev_fd(dev), - .lid = WDC_NVME_GET_SMART_CLOUD_ATTR_LOG_ID, - .nsid = namespace_id, - .lpo = 0, - .lsp = NVME_LOG_LSP_NONE, - .lsi = 0, - .rae = false, - .uuidx = uuid_index, - .csi = NVME_CSI_NVM, - .ot = false, - .len = WDC_NVME_SMART_CLOUD_ATTR_LEN, - .log = data, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, - .result = NULL, - }; - ret = nvme_get_log(&args); - - if (strcmp(format, "json")) - nvme_show_status(ret); - - if (!ret) { - /* Verify GUID matches */ - for (i = 0; i < 16; i++) { - if (scao_guid[i] != data[SCAO_LPG + i]) { - fprintf(stderr, "ERROR: WDC: Unknown GUID in C0 Log Page data\n"); - int j; - - fprintf(stderr, "ERROR: WDC: Expected GUID: 0x"); - for (j = 0; j < 16; j++) - fprintf(stderr, "%x", scao_guid[j]); - fprintf(stderr, "\nERROR: WDC: Actual GUID: 0x"); - for (j = 0; j < 16; j++) - fprintf(stderr, "%x", data[SCAO_LPG + j]); - fprintf(stderr, "\n"); - - ret = -1; - break; - } - } - - if (!ret) - /* parse the data */ - wdc_print_c0_cloud_attr_log(data, fmt); - } else { - fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data\n"); - ret = -1; - } - - free(data); + ret = nvme_get_print_ocp_cloud_smart_log(dev, + uuid_index, + namespace_id, + fmt); } else if (uuid_index == 1) { - data = (__u8 *)malloc(sizeof(__u8) * WDC_NVME_EOL_STATUS_LOG_LEN); - if (!data) { - fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); - return -1; - } - - /* Get the 0xC0 log data */ - struct nvme_get_log_args args = { - .args_size = sizeof(args), - .fd = dev_fd(dev), - .lid = WDC_NVME_GET_EOL_STATUS_LOG_OPCODE, - .nsid = NVME_NSID_ALL, - .lpo = 0, - .lsp = NVME_LOG_LSP_NONE, - .lsi = 0, - .rae = false, - .uuidx = uuid_index, - .csi = NVME_CSI_NVM, - .ot = false, - .len = WDC_NVME_EOL_STATUS_LOG_LEN, - .log = data, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, - .result = NULL, - }; - ret = nvme_get_log(&args); - - if (strcmp(format, "json")) - nvme_show_status(ret); - - if (!ret) { - /* parse the data */ - wdc_print_c0_eol_log(data, fmt); - } else { - fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data\n"); - ret = -1; - } - - free(data); + ret = nvme_get_print_c0_eol_log(dev, + uuid_index, + namespace_id, + fmt); } else { fprintf(stderr, "ERROR: WDC: Unknown uuid index\n"); ret = -1; @@ -6952,7 +6850,6 @@ static int wdc_get_c0_log_page_sn(nvme_root_t r, struct nvme_dev *dev, int uuid_ { int ret = 0; __u32 cust_id; - __u8 *data; cust_id = wdc_get_fw_cust_id(r, dev); if (cust_id == WDC_INVALID_CUSTOMER_ID) { @@ -6965,30 +6862,10 @@ static int wdc_get_c0_log_page_sn(nvme_root_t r, struct nvme_dev *dev, int uuid_ ret = wdc_get_c0_log_page_sn_customer_id_0x100X(dev, uuid_index, format, namespace_id, fmt); } else { - data = (__u8 *)malloc(sizeof(__u8) * WDC_NVME_EOL_STATUS_LOG_LEN); - if (!data) { - fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); - return -1; - } - - /* Get the 0xC0 log data */ - ret = nvme_get_log_simple(dev_fd(dev), - WDC_NVME_GET_EOL_STATUS_LOG_OPCODE, - WDC_NVME_EOL_STATUS_LOG_LEN, - data); - - if (strcmp(format, "json")) - nvme_show_status(ret); - - if (!ret) { - /* parse the data */ - wdc_print_c0_eol_log(data, fmt); - } else { - fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data\n"); - ret = -1; - } - - free(data); + ret = nvme_get_print_c0_eol_log(dev, + 0, + namespace_id, + fmt); } return ret; @@ -6998,11 +6875,9 @@ static int wdc_get_c0_log_page(nvme_root_t r, struct nvme_dev *dev, char *format __u32 namespace_id) { uint32_t device_id, read_vendor_id; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; - __u8 log_id; - __u32 length; if (!wdc_check_device(r, dev)) return -1; @@ -7035,86 +6910,23 @@ static int wdc_get_c0_log_page(nvme_root_t r, struct nvme_dev *dev, char *format case WDC_NVME_SN650_DEV_ID_4: case WDC_NVME_SN655_DEV_ID: if (uuid_index == 0) { - log_id = WDC_NVME_GET_SMART_CLOUD_ATTR_LOG_ID; - length = WDC_NVME_SMART_CLOUD_ATTR_LEN; - } else { - log_id = WDC_NVME_GET_EOL_STATUS_LOG_OPCODE; - length = WDC_NVME_EOL_STATUS_LOG_LEN; - } - - data = (__u8 *)malloc(sizeof(__u8) * length); - if (!data) { - fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); - return -1; - } - - if (namespace_id == NVME_NSID_ALL) { - ret = nvme_get_nsid(dev_fd(dev), &namespace_id); - if (ret < 0) - namespace_id = NVME_NSID_ALL; - } - - /* Get the 0xC0 log data */ - struct nvme_get_log_args args = { - .args_size = sizeof(args), - .fd = dev_fd(dev), - .lid = log_id, - .nsid = namespace_id, - .lpo = 0, - .lsp = NVME_LOG_LSP_NONE, - .lsi = 0, - .rae = false, - .uuidx = uuid_index, - .csi = NVME_CSI_NVM, - .ot = false, - .len = length, - .log = data, - .timeout = NVME_DEFAULT_IOCTL_TIMEOUT, - .result = NULL, - }; - ret = nvme_get_log(&args); - - if (strcmp(format, "json")) - nvme_show_status(ret); - - if (!ret) { - /* parse the data */ - if (uuid_index == 0) - wdc_print_c0_cloud_attr_log(data, fmt); - else - wdc_print_c0_eol_log(data, fmt); + ret = nvme_get_print_ocp_cloud_smart_log(dev, + uuid_index, + namespace_id, + fmt); } else { - fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data "); - fprintf(stderr, "with uuid index %d\n", uuid_index); - ret = -1; + ret = nvme_get_print_c0_eol_log(dev, + uuid_index, + namespace_id, + fmt); } - free(data); break; case WDC_NVME_ZN350_DEV_ID: case WDC_NVME_ZN350_DEV_ID_1: - data = (__u8 *)malloc(sizeof(__u8) * WDC_NVME_SMART_CLOUD_ATTR_LEN); - if (!data) { - fprintf(stderr, "ERROR: WDC: malloc: %s\n", strerror(errno)); - return -1; - } - - /* Get the 0xC0 log data */ - ret = nvme_get_log_simple(dev_fd(dev), - WDC_NVME_GET_SMART_CLOUD_ATTR_LOG_ID, - WDC_NVME_SMART_CLOUD_ATTR_LEN, data); - - if (strcmp(format, "json")) - nvme_show_status(ret); - - if (!ret) { - /* parse the data */ - wdc_print_c0_cloud_attr_log(data, fmt); - } else { - fprintf(stderr, "ERROR: WDC: Unable to read C0 Log Page data\n"); - ret = -1; - } - - free(data); + ret = nvme_get_print_ocp_cloud_smart_log(dev, + 0, + NVME_NSID_ALL, + fmt); break; case WDC_NVME_SN820CL_DEV_ID: /* Get the 0xC0 Extended Smart Cloud Attribute log data */ @@ -7296,7 +7108,7 @@ static int wdc_get_ca_log_page(nvme_root_t r, struct nvme_dev *dev, char *format { uint32_t read_device_id, read_vendor_id; struct wdc_ssd_ca_perf_stats *perf; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u32 cust_id; __u8 *data; int ret; @@ -7427,7 +7239,7 @@ static int wdc_get_c1_log_page(nvme_root_t r, struct nvme_dev *dev, struct wdc_log_page_subpage_header *sph; struct wdc_ssd_perf_stats *perf; struct wdc_log_page_header *l; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int total_subpages; int skip_cnt = 4; __u8 *data; @@ -7484,7 +7296,7 @@ static int wdc_get_c1_log_page(nvme_root_t r, struct nvme_dev *dev, static int wdc_get_c3_log_page(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_ssd_latency_monitor_log *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u8 *data; int ret; int i; @@ -7556,7 +7368,7 @@ out: static int wdc_get_ocp_c1_log_page(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_ocp_c1_error_recovery_log *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u8 *data; int ret; int i; @@ -7587,9 +7399,10 @@ static int wdc_get_ocp_c1_log_page(nvme_root_t r, struct nvme_dev *dev, char *fo log_data = (struct wdc_ocp_c1_error_recovery_log *)data; /* check log page version */ - if ((log_data->log_page_version != WDC_ERROR_REC_LOG_VERSION1) && - (log_data->log_page_version != WDC_ERROR_REC_LOG_VERSION2)) { - fprintf(stderr, "ERROR: WDC: invalid error recovery log version - %d\n", log_data->log_page_version); + if ((log_data->log_page_version < 1) || + (log_data->log_page_version > 3)) { + fprintf(stderr, "ERROR: WDC: invalid error recovery log version - %d\n", + log_data->log_page_version); ret = -1; goto out; } @@ -7627,7 +7440,7 @@ out: static int wdc_get_ocp_c4_log_page(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_ocp_C4_dev_cap_log *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u8 *data; int ret; int i; @@ -7697,7 +7510,7 @@ out: static int wdc_get_ocp_c5_log_page(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_ocp_C5_unsupported_reqs *log_data; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; int i; @@ -7767,7 +7580,7 @@ out: static int wdc_get_d0_log_page(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_ssd_d0_smart_log *perf; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret = 0; __u8 *data; @@ -7852,7 +7665,7 @@ static const char *stringify_cloud_smart_log_thermal_status(__u8 status) return "unrecognized"; } -static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) +static void wdc_show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) { struct json_object *root; struct json_object *bad_user_nand_blocks; @@ -7862,6 +7675,8 @@ static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) struct json_object *thermal_status; struct json_object *dssd_specific_ver; char buf[2 * sizeof(log->log_page_guid) + 3]; + char lowest_fr[sizeof(log->lowest_permitted_fw_rev) + 1]; + uint16_t smart_log_ver = (uint16_t)le16_to_cpu(log->log_page_version); bad_user_nand_blocks = json_create_object(); json_object_add_value_uint(bad_user_nand_blocks, "normalized", @@ -7927,7 +7742,8 @@ static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) json_object_add_value_object(root, "user_data_erase_counts", user_data_erase_counts); json_object_add_value_object(root, "thermal_status", thermal_status); - json_object_add_value_object(root, "dssd_specific_ver", + if (smart_log_ver >= 3) + json_object_add_value_object(root, "dssd_specific_ver", dssd_specific_ver); json_object_add_value_uint(root, "pcie_correctable_error_count", le64_to_cpu(log->pcie_correctable_error_count)); @@ -7937,8 +7753,18 @@ static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) log->percent_free_blocks); json_object_add_value_uint(root, "capacitor_health", le16_to_cpu(log->capacitor_health)); - sprintf(buf, "%c", log->nvme_errata_ver); - json_object_add_value_string(root, "nvme_errata_version", buf); + if (smart_log_ver >= 3) { + if (smart_log_ver >= 4) { + sprintf(buf, "%c", log->nvme_base_errata_ver); + json_object_add_value_string(root, "nvme_base_errata_version", buf); + sprintf(buf, "%c", log->nvme_cmd_set_errata_ver); + json_object_add_value_string(root, "nvme_cmd_set_errata_version", buf); + } else { + sprintf(buf, "%c", log->nvme_base_errata_ver); + json_object_add_value_string(root, "nvme_errata_version", buf); + } + } + json_object_add_value_uint(root, "unaligned_io", le64_to_cpu(log->unaligned_io)); json_object_add_value_uint(root, "security_version_number", @@ -7949,12 +7775,22 @@ static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) le_to_float(log->plp_start_count, 16)); json_object_add_value_uint64(root, "endurance_estimate", le_to_float(log->endurance_estimate, 16)); - json_object_add_value_uint(root, "pcie_link_retraining_count", - le64_to_cpu(log->pcie_link_retraining_cnt)); - json_object_add_value_uint(root, "power_state_change_count", - le64_to_cpu(log->power_state_change_cnt)); + if (smart_log_ver >= 3) { + json_object_add_value_uint(root, "pcie_link_retraining_count", + le64_to_cpu(log->pcie_link_retraining_cnt)); + json_object_add_value_uint(root, "power_state_change_count", + le64_to_cpu(log->power_state_change_cnt)); + if (smart_log_ver >= 4) { + snprintf(lowest_fr, sizeof(lowest_fr), "%-.*s", + (int)sizeof(log->lowest_permitted_fw_rev), + log->lowest_permitted_fw_rev); + json_object_add_value_string(root, "lowest_permitted_fw_rev", lowest_fr); + } else + json_object_add_value_uint128(root, "hardware_revision", + le128_to_cpu((__u8 *)&log->lowest_permitted_fw_rev[0])); + } json_object_add_value_uint(root, "log_page_version", - le16_to_cpu(log->log_page_version)); + smart_log_ver); stringify_log_page_guid(log->log_page_guid, buf); json_object_add_value_string(root, "log_page_guid", buf); @@ -7963,11 +7799,13 @@ static void show_cloud_smart_log_json(struct ocp_cloud_smart_log *log) json_free_object(root); } -static void show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, struct nvme_dev *dev) +static void wdc_show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, + struct nvme_dev *dev) { char buf[2 * sizeof(log->log_page_guid) + 3]; + uint16_t smart_log_ver = (uint16_t)le16_to_cpu(log->log_page_version); - printf("Smart Extended Log for NVME device:%s\n", dev->name); + printf("SMART Cloud Attributes for NVMe device : %s\n", dev->name); printf("Physical Media Units Written : %'.0Lf\n", le_to_float(log->physical_media_units_written, 16)); printf("Physical Media Units Read : %'.0Lf\n", @@ -8002,14 +7840,16 @@ static void show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, struct stringify_cloud_smart_log_thermal_status(log->thermal_status.current_status)); printf("Thermal Throttling Status (Number of Events) : %" PRIu8 "\n", log->thermal_status.num_events); - printf("NVMe Major Version : %" PRIu8 "\n", - log->dssd_specific_ver.major_ver); - printf(" Minor Version : %" PRIu16 "\n", - le16_to_cpu(log->dssd_specific_ver.minor_ver)); - printf(" Point Version : %" PRIu16 "\n", - le16_to_cpu(log->dssd_specific_ver.point_ver)); - printf(" Errata Version : %" PRIu8 "\n", - log->dssd_specific_ver.errata_ver); + if (smart_log_ver >= 3) { + printf("NVMe Major Version : %" PRIu8 "\n", + log->dssd_specific_ver.major_ver); + printf(" Minor Version : %" PRIu16 "\n", + le16_to_cpu(log->dssd_specific_ver.minor_ver)); + printf(" Point Version : %" PRIu16 "\n", + le16_to_cpu(log->dssd_specific_ver.point_ver)); + printf(" Errata Version : %" PRIu8 "\n", + log->dssd_specific_ver.errata_ver); + } printf("PCIe Correctable Error Count : %" PRIu64 "\n", le64_to_cpu(log->pcie_correctable_error_count)); printf("Incomplete Shutdowns : %" PRIu32 "\n", @@ -8018,8 +7858,17 @@ static void show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, struct log->percent_free_blocks); printf("Capacitor Health : %" PRIu16 "%%\n", le16_to_cpu(log->capacitor_health)); - printf("NVMe Errata Version : %c\n", - log->nvme_errata_ver); + if (smart_log_ver >= 3) { + if (smart_log_ver >= 4) { + printf("NVMe Base Errata Version : %c\n", + log->nvme_base_errata_ver); + printf("NVMe Command Set Errata Version : %c\n", + log->nvme_cmd_set_errata_ver); + } else { + printf("NVMe Errata Version : %c\n", + log->nvme_base_errata_ver); + } + } printf("Unaligned IO : %" PRIu64 "\n", le64_to_cpu(log->unaligned_io)); printf("Security Version Number : %" PRIu64 "\n", @@ -8030,12 +7879,22 @@ static void show_cloud_smart_log_normal(struct ocp_cloud_smart_log *log, struct le_to_float(log->plp_start_count, 16)); printf("Endurance Estimate : %'.0Lf\n", le_to_float(log->endurance_estimate, 16)); - printf("PCIe Link Retraining Count : %" PRIu64 "\n", - le64_to_cpu(log->pcie_link_retraining_cnt)); - printf("Power State Change Count : %" PRIu64 "\n", - le64_to_cpu(log->power_state_change_cnt)); + if (smart_log_ver >= 3) { + printf("PCIe Link Retraining Count : %" PRIu64 "\n", + le64_to_cpu(log->pcie_link_retraining_cnt)); + printf("Power State Change Count : %" PRIu64 "\n", + le64_to_cpu(log->power_state_change_cnt)); + if (smart_log_ver >= 4) + printf("Lowest Permitted FW Revision : %-.*s\n", + (int)sizeof(log->lowest_permitted_fw_rev), + log->lowest_permitted_fw_rev); + else + printf("Hardware Revision : %s\n", + uint128_t_to_string(le128_to_cpu( + (__u8 *)&log->lowest_permitted_fw_rev[0]))); + } printf("Log Page Version : %" PRIu16 "\n", - le16_to_cpu(log->log_page_version)); + smart_log_ver); stringify_log_page_guid(log->log_page_guid, buf); printf("Log Page GUID : %s\n", buf); printf("\n\n"); @@ -8049,7 +7908,7 @@ static int wdc_vs_smart_add_log(int argc, char **argv, struct command *command, const char *log_page_version = "Log Page Version: 0 = vendor, 1 = WDC"; const char *log_page_mask = "Log Page Mask, comma separated list: 0xC0, 0xC1, 0xCA, 0xD0"; const char *namespace_id = "desired namespace id"; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; struct nvme_dev *dev; nvme_root_t r; int ret = 0; @@ -8145,43 +8004,16 @@ static int wdc_vs_smart_add_log(int argc, char **argv, struct command *command, "ERROR: WDC: Failure reading the C0 Log Page, ret = %d\n", ret); } else { - struct ocp_cloud_smart_log log; - char buf[2 * sizeof(log.log_page_guid) + 3]; - ret = validate_output_format(cfg.output_format, &fmt); if (ret < 0) { fprintf(stderr, "Invalid output format: %s\n", cfg.output_format); goto out; } - ret = nvme_get_log_simple(dev_fd(dev), - WDC_NVME_GET_SMART_CLOUD_ATTR_LOG_ID, - sizeof(log), &log); - if (!ret) { - char *ptr = buf; - int i; - __u8 *guid = log.log_page_guid; - - memset(buf, 0, sizeof(char) * 19); - - ptr += sprintf(ptr, "0x"); - for (i = 0; i < 16; i++) - ptr += sprintf(ptr, "%x", guid[15 - i]); - if (strcmp(buf, "0xafd514c97c6f4f9ca4f2bfea2810afc5")) - fprintf(stderr, "Invalid GUID: %s\n", buf); - else { - if (fmt == BINARY) - d_raw((unsigned char *)&log, sizeof(log)); - else if (fmt == JSON) - show_cloud_smart_log_json(&log); - else - show_cloud_smart_log_normal(&log, dev); - } - } else if (ret > 0) { - nvme_show_status(ret); - } else { - perror("vs-smart-add-log"); - } + ret = nvme_get_print_ocp_cloud_smart_log(dev, + 0, + NVME_NSID_ALL, + fmt); } } if (((capabilities & (WDC_DRIVE_CAP_CA_LOG_PAGE)) == (WDC_DRIVE_CAP_CA_LOG_PAGE)) && @@ -8219,7 +8051,7 @@ static int wdc_vs_cloud_log(int argc, char **argv, struct command *command, { const char *desc = "Retrieve Cloud Log Smart/Health Information"; const char *namespace_id = "desired namespace id"; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u64 capabilities = 0; struct nvme_dev *dev; nvme_root_t r; @@ -8290,7 +8122,7 @@ static int wdc_vs_hw_rev_log(int argc, char **argv, struct command *command, { const char *desc = "Retrieve Hardware Revision Log Information"; const char *namespace_id = "desired namespace id"; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u64 capabilities = 0; struct nvme_dev *dev; int ret; @@ -8375,7 +8207,7 @@ static int wdc_vs_device_waf(int argc, char **argv, struct command *command, const char *desc = "Retrieve Device Write Amplication Factor"; const char *namespace_id = "desired namespace id"; struct nvme_smart_log smart_log; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; struct nvme_dev *dev; __u8 *data; nvme_root_t r; @@ -8932,7 +8764,7 @@ static int wdc_get_fw_act_history(nvme_root_t r, struct nvme_dev *dev, char *format) { struct wdc_fw_act_history_log_hdr *fw_act_history_hdr; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; int ret; __u8 *data; @@ -9016,7 +8848,7 @@ static int wdc_get_fw_act_history_C2(nvme_root_t r, struct nvme_dev *dev, __u32 tot_entries = 0, num_entries = 0; __u32 vendor_id = 0, device_id = 0; __u32 cust_id = 0; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; __u8 *data; int ret; bool c2GuidMatch = false; @@ -10498,7 +10330,7 @@ static int wdc_log_page_directory(int argc, char **argv, struct command *command struct plugin *plugin) { const char *desc = "Retrieve Log Page Directory."; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; struct nvme_dev *dev; int ret = 0; nvme_root_t r; @@ -11158,7 +10990,7 @@ static void wdc_print_pcie_stats_json(struct wdc_vs_pcie_stats *pcie_stats) static int wdc_do_vs_nand_stats_sn810_2(struct nvme_dev *dev, char *format) { - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; uint8_t *data = NULL; int ret; @@ -11197,7 +11029,7 @@ out: static int wdc_do_vs_nand_stats(struct nvme_dev *dev, char *format) { - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; uint8_t *output = NULL; __u16 version = 0; int ret; @@ -11321,7 +11153,7 @@ static int wdc_vs_pcie_stats(int argc, char **argv, struct command *command, struct plugin *plugin) { const char *desc = "Retrieve PCIE statistics."; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; struct nvme_dev *dev; nvme_root_t r; int ret; @@ -11396,7 +11228,7 @@ static int wdc_vs_drive_info(int argc, char **argv, struct command *command, struct plugin *plugin) { const char *desc = "Send a vs-drive-info command."; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; nvme_root_t r; uint64_t capabilities = 0; struct nvme_dev *dev; @@ -11663,7 +11495,7 @@ static int wdc_vs_temperature_stats(int argc, char **argv, const char *desc = "Send a vs-temperature-stats command."; struct nvme_smart_log smart_log; struct nvme_id_ctrl id_ctrl; - enum nvme_print_flags fmt; + nvme_print_flags_t fmt; struct nvme_dev *dev; nvme_root_t r; uint64_t capabilities = 0; diff --git a/plugins/wdc/wdc-nvme.h b/plugins/wdc/wdc-nvme.h index 65d2de3..a18da16 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.8.1" +#define WDC_PLUGIN_VERSION "2.9.1" #include "cmd.h" PLUGIN(NAME("wdc", "Western Digital vendor specific extensions", WDC_PLUGIN_VERSION), diff --git a/plugins/zns/zns.c b/plugins/zns/zns.c index a7a3766..94336d7 100644 --- a/plugins/zns/zns.c +++ b/plugins/zns/zns.c @@ -114,7 +114,7 @@ static int id_ctrl(int argc, char **argv, struct command *cmd, struct plugin *pl "the given device and report information about the specified\n" "controller in various formats."; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_zns_id_ctrl ctrl; struct nvme_dev *dev; int err = -1; @@ -160,7 +160,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug const char *vendor_specific = "dump binary vendor fields"; const char *human_readable = "show identify in readable format"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_zns_id_ns ns; struct nvme_id_ns id_ns; struct nvme_dev *dev; @@ -732,7 +732,7 @@ static int zone_mgmt_recv(int argc, char **argv, struct command *cmd, struct plu const char *partial = "Zone Receive Action Specific Features(Partial Report)"; const char *data_len = "length of data in bytes"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; void *data = NULL; int err = -1; @@ -830,7 +830,7 @@ static int report_zones(int argc, char **argv, struct command *cmd, struct plugi const char *part = "set to use the partial report"; const char *verbose = "show report zones verbosity"; - enum nvme_print_flags flags; + nvme_print_flags_t flags; int zdes = 0, err = -1; struct nvme_dev *dev; __u32 report_size; @@ -1222,7 +1222,7 @@ static int changed_zone_list(int argc, char **argv, struct command *cmd, struct const char *rae = "retain an asynchronous event"; struct nvme_zns_changed_zone_log log; - enum nvme_print_flags flags; + nvme_print_flags_t flags; struct nvme_dev *dev; int err = -1; diff --git a/scripts/build.sh b/scripts/build.sh index 470f39a..a88336f 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -21,6 +21,9 @@ usage() { echo " cross use cross toolchain to build" echo " coverage build coverage report" echo " appimage build AppImage target" + echo " distro build libnvme and nvme-cli separately" + echo " docs build documentation" + echo " static build a static binary" echo "" echo "configs with muon:" echo " [default] minimal static build" @@ -115,6 +118,25 @@ config_meson_appimage() { "${BUILDDIR}" } +config_meson_docs() { + CC="${CC}" "${MESON}" setup \ + -Ddocs=all \ + -Ddocs-build=true \ + --force-fallback-for=libnvme \ + -Dlibnvme:werror=false \ + "${BUILDDIR}" +} + +config_meson_static() { + CC="${CC}" "${MESON}" setup \ + --buildtype=release \ + --default-library=static \ + --wrap-mode=forcefallback \ + -Dc_link_args="-static" \ + -Dlibnvme:keyutils=disabled \ + "${BUILDDIR}" +} + build_meson() { "${MESON}" compile \ -C "${BUILDDIR}" @@ -205,6 +227,51 @@ test_muon() { ldd "${BUILDDIR}/nvme" 2>&1 | grep 'not a dynamic executable' || exit 1 } +_install_libnvme() { + local libnvme_ref=$(sed -n "s/revision = \([0-9a-z]\+\)/\1/p" subprojects/libnvme.wrap) + local LBUILDDIR="${BUILDDIR}/.build-libnvme" + + mkdir -p "${BUILDDIR}/libnvme" + + pushd "${BUILDDIR}/libnvme" + git init + git remote add origin https://github.com/linux-nvme/libnvme.git + git fetch origin ${libnvme_ref} + git reset --hard FETCH_HEAD + + CC="${CC}" "${MESON}" setup \ + --prefix="${BUILDDIR}/usr" \ + --buildtype="${BUILDTYPE}" \ + "${LBUILDDIR}" + + "${MESON}" compile \ + -C "${LBUILDDIR}" + + "${MESON}" install \ + -C "${LBUILDDIR}" + + popd || exit 1 +} + +config_meson_distro() { + _install_libnvme + + PKG_CONFIG_PATH="${BUILDDIR}/usr/lib64/pkgconfig" \ + CC="${CC}" ${MESON} setup \ + --prefix="${BUILDDIR}/usr" \ + --werror \ + --buildtype="${BUILDTYPE}" \ + "${BUILDDIR}" +} + +build_meson_distro() { + build_meson +} + +test_meson_distro() { + test_meson +} + if [[ "${BUILDTOOL}" == "muon" ]]; then SAMU="$(which samu 2> /dev/null)" || true if [[ -z "${SAMU}" ]]; then diff --git a/scripts/release.sh b/scripts/release.sh index d2cbb08..eb6eced 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -6,7 +6,8 @@ usage() { echo "The script does all necessary steps to create a new release." echo "" echo " -d: no documentation update" - echo " -n: dry run" + echo " -f: disable all sanity checks and just do the release" + echo " -l: do not update library dependency" echo "" echo "Note: The version number needs to be exactly" echo " '^v[\d]+.[\d]+(.[\d\]+(-rc[0-9]+)?$'" @@ -17,15 +18,19 @@ usage() { } build_doc=true -dry_run=false +update_lib_dep=true +force=false -while getopts "dn" o; do +while getopts "dfl" o; do case "${o}" in d) build_doc=false ;; - n) - dry_run=true + f) + force=true + ;; + l) + update_lib_dep=false ;; *) usage @@ -41,6 +46,26 @@ if [ -z "$VERSION" ] ; then exit 1 fi +cleanup() { + if [ -z "${OLD_HEAD}" ] ; then + exit + fi + git tag -d "Release $VERSION" "$VERSION" + git reset --hard "${OLD_HEAD}" +} + +register_cleanup() { + OLD_HEAD="$(git rev-parse HEAD)" +} + +unregister_cleanup() { + OLD_HEAD="" +} + +trap cleanup EXIT + +register_cleanup + # expected version regex re='^v([0-9]+\.[0-9]+(\.[0-9]+)?)(-rc[0-9]+)?$' @@ -57,7 +82,7 @@ fi cd "$(git rev-parse --show-toplevel)" || exit 1 -if [[ -f subprojects/libnvme.wrap ]]; then +if [ "$update_lib_dep" = true ] && [[ -f subprojects/libnvme.wrap ]]; then git -C subprojects/libnvme fetch --all # extract the version string from libnvme by using the ref @@ -75,16 +100,18 @@ if [[ -f subprojects/libnvme.wrap ]]; then fi fi -if [[ -n $(git status -s) ]]; then - echo "tree is dirty." - if [[ "${dry_run}" = false ]]; then - exit 1 +if [ "$force" = false ] ; then + if [[ -n $(git status -s) ]]; then + echo "tree is dirty." + if [[ "${dry_run}" = false ]]; then + exit 1 + fi fi -fi -if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ] ; then - echo "currently not on master branch. abort." - exit 1 + if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ] ; then + echo "currently not on master branch. abort." + exit 1 + fi fi # update all docs @@ -98,30 +125,22 @@ else exit 1 fi -# update meson.build -sed -i -e "0,/[ \t]version: /s/\([ \t]version: \).*/\1\'$ver\',/" meson.build -if [[ -f subprojects/libnvme.wrap ]]; then - sed -i -e "s/\(dependency('libnvme', version: '>=\)\([\.1-9]\+\)/\1$libnvme_ver/" meson.build -fi - -if [[ "${dry_run}" = false ]]; then - git add meson.build - git commit -s -m "build: Update version to $VERSION" -fi - if [ "$build_doc" = true ]; then # update documentation ./scripts/update-docs.sh - if [[ "${dry_run}" = false ]]; then - git add $doc_dir - git commit -s -m "doc: Regenerate all docs for $VERSION" - fi + git add $doc_dir + git commit -s -m "doc: Regenerate all docs for $VERSION" fi -if [[ "${dry_run}" = true ]]; then - exit 0 +# update meson.build +sed -i -e "0,/[ \t]version: /s/\([ \t]version: \).*/\1\'$ver\',/" meson.build +if [[ -n "$libnvme_VERSION" ]] && [[ -f subprojects/libnvme.wrap ]]; then + sed -i -e "s/\(dependency('libnvme', version: '>=\)\([\.1-9]\+\)/\1$libnvme_ver/" meson.build fi +git add meson.build +git commit -s -m "Release $VERSION" + git tag -s -m "Release $VERSION" "$VERSION" git push --dry-run origin "$VERSION"^{}:master tag "$VERSION" @@ -129,4 +148,5 @@ read -p "All good? Ready to push changes to remote? [Yy]" -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then git push origin "$VERSION"^{}:master tag "$VERSION" + unregister_cleanup fi diff --git a/subprojects/libnvme.wrap b/subprojects/libnvme.wrap index 271bc75..76f1ebc 100644 --- a/subprojects/libnvme.wrap +++ b/subprojects/libnvme.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/linux-nvme/libnvme.git -revision = 80c5cf2aa45f4afc7571dc48850fae3fd62828af +revision = dd51fa8550564c93436423a4d8ed4be92ae50290 [provide] libnvme = libnvme_dep diff --git a/unit/test-argconfig-parse.c b/unit/test-argconfig-parse.c index 23c8d4f..d861d69 100644 --- a/unit/test-argconfig-parse.c +++ b/unit/test-argconfig-parse.c @@ -7,7 +7,7 @@ #include <locale.h> #include "../util/argconfig.h" -#include "nvme/types.h" +#include "../util/cleanup.h" #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) @@ -28,6 +28,7 @@ union val { char *file; char *list; char *str; + __u8 val; }; struct toval_test { @@ -73,6 +74,7 @@ struct cfg { char *file; char *list; char *str; + __u8 val; }; static struct cfg cfg; @@ -105,6 +107,17 @@ static struct toval_test toval_tests[] = { VAL_TEST("--file=file", file, "file", false, 0), VAL_TEST("--list=list", list, "list", false, 0), VAL_TEST("--str=str", str, "str", false, 0), + VAL_TEST("--val=", val, 0, true, -EINVAL), + VAL_TEST("--val=o", val, 1, true, 0), + VAL_TEST("--val=t", val, 0, true, -EINVAL), + VAL_TEST("--val=tw", val, 2, true, 0), + VAL_TEST("--val=two", val, 2, true, 0), + VAL_TEST("--val=twoo", val, 0, true, -EINVAL), + VAL_TEST("--val=th", val, 3, true, 0), + VAL_TEST("--val=three", val, 3, true, 0), + VAL_TEST("--val=threed", val, 0, true, -EINVAL), + VAL_TEST("--val=123", val, 123, true, 0), + VAL_TEST("--val=1234", val, 0, true, -EINVAL), }; void toval_test(struct toval_test *test) @@ -113,6 +126,13 @@ void toval_test(struct toval_test *test) int ret; char *argv[] = { "test-argconfig", test->arg }; + OPT_VALS(opt_vals) = { + VAL_BYTE("one", 1), + VAL_BYTE("two", 2), + VAL_BYTE("three", 3), + VAL_END() + }; + OPT_ARGS(opts) = { OPT_FLAG("flag",'f', &cfg.flag, "flag"), OPT_SUFFIX("suffix", 's', &cfg.suffix, "suffix"), @@ -128,6 +148,7 @@ void toval_test(struct toval_test *test) OPT_FILE("file", 'L', &cfg.file, "file"), OPT_LIST("list", 'T', &cfg.list, "list"), OPT_STR("str", 'r', &cfg.str, "str"), + OPT_BYTE("val", 'v', &cfg.val, "val", opt_vals), OPT_END() }; @@ -143,6 +164,52 @@ void toval_test(struct toval_test *test) check_val(test->arg, &test->exp, test->val, test->size); } +#define COMMA_SEP_ARRAY_MAX_VALUES 4 + +struct comma_sep_array_test { + const char *input; + int ret; + __u32 values[COMMA_SEP_ARRAY_MAX_VALUES]; +}; + +const struct comma_sep_array_test comma_sep_array_tests[] = { + {"", 0}, + {",,,", 0}, + {" ", -1}, + {"abc", -1}, + {"0xFFFFFFFF", 1, {0xFFFFFFFF}}, + {"0x100000000", -1}, + {"123,0x456", 2, {123, 0x456}}, + {",1,,2,", 2, {1, 2}}, + {"1,22,333,4444", 4, {1, 22, 333, 4444}}, + {"1,2,3,4,5", -1}, +}; + +void comma_sep_array_test(const struct comma_sep_array_test *test) +{ + _cleanup_free_ char *input = strdup(test->input); + __u32 values[COMMA_SEP_ARRAY_MAX_VALUES] = {}; + int ret = argconfig_parse_comma_sep_array_u32( + input, values, COMMA_SEP_ARRAY_MAX_VALUES); + int i; + + if (ret != test->ret) { + printf("ERROR: input '%s' return value %d != %d\n", + test->input, ret, test->ret); + test_rc = 1; + return; + } + + for (i = 0; i < ret; i++) { + if (values[i] != test->values[i]) { + printf("ERROR: input '%s' values[%d] = %u != %u\n", + test->input, i, values[i], test->values[i]); + test_rc = 1; + return; + } + } +} + int main(void) { unsigned int i; @@ -157,6 +224,9 @@ int main(void) for (i = 0; i < ARRAY_SIZE(toval_tests); i++) toval_test(&toval_tests[i]); + for (i = 0; i < ARRAY_SIZE(comma_sep_array_tests); i++) + comma_sep_array_test(&comma_sep_array_tests[i]); + if (f) fclose(f); diff --git a/util/argconfig.c b/util/argconfig.c index 5ec3d6f..3460720 100644 --- a/util/argconfig.c +++ b/util/argconfig.c @@ -30,6 +30,7 @@ */ #include "argconfig.h" +#include "cleanup.h" #include "suffix.h" #include <errno.h> @@ -43,10 +44,12 @@ #include <stdbool.h> #include <locale.h> -static const char *append_usage_str = ""; +static bool is_null_or_empty(const char *s) +{ + return !s || !*s; +} -static int argconfig_parse_val(struct argconfig_commandline_options *s, struct option *option, - int index); +static const char *append_usage_str = ""; void argconfig_append_usage(const char *str) { @@ -134,7 +137,7 @@ void argconfig_print_help(const char *program_desc, return; fprintf(stderr, "\n\033[1mOptions:\033[0m\n"); - for (; s && s->option; s++) + for (; s->option; s++) show_option(s); } @@ -144,23 +147,9 @@ static int argconfig_error(char *type, const char *opt, const char *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) - 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) +static int argconfig_parse_type(struct argconfig_commandline_options *s) { - void *value = (void *)(char *)s->default_value; + void *value = s->default_value; char *endptr; int ret = 0; @@ -168,87 +157,67 @@ static int argconfig_parse_type(struct argconfig_commandline_options *s, struct 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); + *(char **)value = optarg; break; case CFG_INT: - *((int *)value) = strtol(optarg, &endptr, 0); + *(int *)value = strtol(optarg, &endptr, 0); if (errno || optarg == endptr) - ret = argconfig_error("integer", option[index].name, optarg); + ret = argconfig_error("integer", s->option, optarg); break; - case CFG_BYTE: - ret = argconfig_parse_byte(option[index].name, optarg, (uint8_t *)value); + case CFG_BYTE: { + unsigned long tmp = strtoul(optarg, &endptr, 0); + + if (errno || tmp >= 1 << 8 || optarg == endptr) + ret = argconfig_error("byte", s->option, optarg); + else + *(uint8_t *)value = tmp; 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); + ret = argconfig_error("short", s->option, optarg); else - *((uint16_t *)value) = tmp; + *(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); + ret = argconfig_error("word", s->option, optarg); else - *((uint32_t *)value) = tmp; + *(uint32_t *)value = tmp; break; } case CFG_INCREMENT: - *((int *)value) += 1; + *(int *)value += 1; break; case CFG_LONG: - *((unsigned long *)value) = strtoul(optarg, &endptr, 0); + *(unsigned long *)value = strtoul(optarg, &endptr, 0); if (errno || optarg == endptr) - ret = argconfig_error("long integer", option[index].name, optarg); + ret = argconfig_error("long integer", s->option, 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); + argconfig_error("long suffixed integer", s->option, optarg); break; case CFG_DOUBLE: - *((double *)value) = strtod(optarg, &endptr); + *(double *)value = strtod(optarg, &endptr); if (errno || optarg == endptr) - ret = argconfig_error("float", option[index].name, optarg); + ret = argconfig_error("float", s->option, optarg); break; case CFG_FLAG: - *((bool *)value) = true; - break; - default: + *(bool *)value = true; break; } return ret; } -static int argconfig_get_val_len(struct argconfig_opt_val *opt_val, const char *str) -{ - struct argconfig_opt_val *v; - int len; - int match; - - for (len = 1; len <= strlen(str); len++) { - match = 0; - for (v = opt_val; v && v->str; v++) { - if (!strncasecmp(str, v->str, len)) - match++; - } - if (match == 1) - break; - } - - return len; -} - -static int argconfig_set_opt_val(enum argconfig_types type, union argconfig_val *opt_val, void *val) +static void argconfig_set_opt_val(enum argconfig_types type, union argconfig_val *opt_val, void *val) { switch (type) { case CFG_FLAG: @@ -281,30 +250,39 @@ static int argconfig_set_opt_val(enum argconfig_types type, union argconfig_val case CFG_STRING: *(char **)val = opt_val->string; break; - default: - break; } - - return 0; } -static int argconfig_parse_val(struct argconfig_commandline_options *s, struct option *option, - int index) +static struct argconfig_opt_val * +argconfig_match_val(struct argconfig_opt_val *v, const char *str) { - const char *str = optarg; - void *val = s->default_value; - int len = strlen(optarg); - struct argconfig_opt_val *v; - int val_len; - - for (v = s->opt_val; v && v->str; v++) { - val_len = argconfig_get_val_len(s->opt_val, v->str); - if (strncasecmp(str, v->str, len > val_len ? len : val_len)) + size_t len = strlen(str); + struct argconfig_opt_val *match = NULL; + + for (; v->str; v++) { + if (strncasecmp(str, v->str, len)) continue; - return argconfig_set_opt_val(v->type, &v->val, val); + + if (match) + return NULL; /* multiple matches; input is ambiguous */ + + match = v; } - return argconfig_parse_type(s, option, index); + return match; +} + +static int argconfig_parse_val(struct argconfig_commandline_options *s) +{ + struct argconfig_opt_val *v = s->opt_val; + + if (v) + v = argconfig_match_val(v, optarg); + if (!v) + return argconfig_parse_type(s); + + argconfig_set_opt_val(v->type, &v->val, s->default_value); + return 0; } static bool argconfig_check_human_readable(struct argconfig_commandline_options *s) @@ -320,8 +298,8 @@ static bool argconfig_check_human_readable(struct argconfig_commandline_options int argconfig_parse(int argc, char *argv[], const char *program_desc, struct argconfig_commandline_options *options) { - char *short_opts; - struct option *long_opts; + _cleanup_free_ char *short_opts = NULL; + _cleanup_free_ struct option *long_opts = NULL; struct argconfig_commandline_options *s; int c, option_index = 0, short_index = 0, options_count = 0; int ret = 0; @@ -330,16 +308,15 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, for (s = options; s->option; s++) options_count++; - long_opts = calloc(1, sizeof(struct option) * (options_count + 3)); - short_opts = calloc(1, sizeof(*short_opts) * (options_count * 3 + 5)); + long_opts = calloc(options_count + 2, sizeof(struct option)); + short_opts = calloc(options_count * 3 + 3, sizeof(*short_opts)); if (!long_opts || !short_opts) { fprintf(stderr, "failed to allocate memory for opts: %s\n", strerror(errno)); - ret = -errno; - goto out; + return -errno; } - for (s = options; s->option && option_index < options_count; s++) { + for (s = options; s->option; s++) { if (s->short_option) { short_opts[short_index++] = s->short_option; if (s->argument_type == required_argument || @@ -348,7 +325,7 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, if (s->argument_type == optional_argument) short_opts[short_index++] = ':'; } - if (s->option && strlen(s->option)) { + if (!is_null_or_empty(s->option)) { long_opts[option_index].name = s->option; long_opts[option_index].has_arg = s->argument_type; } @@ -384,10 +361,7 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, if (!s->default_value) continue; - if (s->opt_val) - ret = argconfig_parse_val(s, long_opts, option_index); - else - ret = argconfig_parse_type(s, long_opts, option_index); + ret = argconfig_parse_val(s); if (ret) break; } @@ -395,139 +369,12 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, if (!argconfig_check_human_readable(options)) setlocale(LC_ALL, "C"); -out: - free(short_opts); - free(long_opts); return ret; } -int argconfig_parse_comma_sep_array(char *string, int *val, unsigned int max_length) -{ - int ret = 0; - unsigned long v; - char *tmp; - char *p; - - if (!string || !strlen(string)) - return 0; - - tmp = strtok(string, ","); - if (!tmp) - return 0; - - v = strtoul(tmp, &p, 0); - if (*p != 0) - return -1; - if (v > UINT_MAX) { - fprintf(stderr, "%s out of range\n", tmp); - return -1; - } - val[ret] = v; - - ret++; - while (1) { - tmp = strtok(NULL, ","); - - if (tmp == NULL) - return ret; - - if (ret >= max_length) - return -1; - - v = strtoul(tmp, &p, 0); - if (*p != 0) - return -1; - if (v > UINT_MAX) { - fprintf(stderr, "%s out of range\n", tmp); - return -1; - } - val[ret] = v; - ret++; - } -} - -int argconfig_parse_comma_sep_array_short(char *string, unsigned short *val, - unsigned int max_length) -{ - int ret = 0; - unsigned long v; - char *tmp; - char *p; - - if (!string || !strlen(string)) - return 0; - - tmp = strtok(string, ","); - if (!tmp) - return 0; - - v = strtoul(tmp, &p, 0); - if (*p != 0) - return -1; - if (v > UINT16_MAX) { - fprintf(stderr, "%s out of range\n", tmp); - return -1; - } - val[ret] = v; - ret++; - - while (1) { - tmp = strtok(NULL, ","); - if (tmp == NULL) - return ret; - - if (ret >= max_length) - return -1; - - v = strtoul(tmp, &p, 0); - if (*p != 0) - return -1; - if (v > UINT16_MAX) { - fprintf(stderr, "%s out of range\n", tmp); - return -1; - } - val[ret] = v; - ret++; - } -} - -int argconfig_parse_comma_sep_array_long(char *string, unsigned long long *val, - unsigned int max_length) -{ - int ret = 0; - char *tmp; - char *p; - - if (!string || !strlen(string)) - return 0; - - tmp = strtok(string, ","); - if (tmp == NULL) - return 0; - - val[ret] = strtoll(tmp, &p, 0); - if (*p != 0) - return -1; - ret++; - while (1) { - tmp = strtok(NULL, ","); - - if (tmp == NULL) - return ret; - - if (ret >= max_length) - return -1; - - val[ret] = strtoll(tmp, &p, 0); - if (*p != 0) - return -1; - ret++; - } -} - -#define DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_UINT_FUNC(size) \ -int argconfig_parse_comma_sep_array_u##size(char *string, \ - __u##size *val, \ +#define DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_FUNC(name, ret_t, ret_max) \ +int argconfig_parse_comma_sep_array ## name(char *string, \ + ret_t *val, \ unsigned int max_length) \ { \ int ret = 0; \ @@ -535,44 +382,39 @@ int argconfig_parse_comma_sep_array_u##size(char *string, \ char *tmp; \ char *p; \ \ - if (!string || !strlen(string)) \ + if (is_null_or_empty(string)) \ return 0; \ \ tmp = strtok(string, ","); \ - if (!tmp) \ - return 0; \ - \ - v = strtoumax(tmp, &p, 0); \ - if (*p != 0) \ - return -1; \ - if (v > UINT##size##_MAX) { \ - fprintf(stderr, "%s out of range\n", tmp); \ - return -1; \ - } \ - val[ret] = v; \ - \ - ret++; \ - while (1) { \ - tmp = strtok(NULL, ","); \ - \ - if (tmp == NULL) \ - return ret; \ \ + while (tmp) { \ if (ret >= max_length) \ return -1; \ \ v = strtoumax(tmp, &p, 0); \ if (*p != 0) \ return -1; \ - if (v > UINT##size##_MAX) { \ + if (v > ret_max) { \ fprintf(stderr, "%s out of range\n", tmp); \ return -1; \ } \ val[ret] = v; \ ret++; \ + \ + tmp = strtok(NULL, ","); \ } \ + \ + return ret; \ } +DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_FUNC(, int, UINT_MAX) +DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_FUNC(_short, unsigned short, UINT16_MAX) +DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_FUNC(_long, unsigned long long, ULLONG_MAX) + +#define DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_UINT_FUNC(size) \ + DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_FUNC(_u ## size, __u ## size, \ + UINT ## size ## _MAX) + DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_UINT_FUNC(16); DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_UINT_FUNC(32); DEFINE_ARGCONFIG_PARSE_COMMA_SEP_ARRAY_UINT_FUNC(64); diff --git a/util/argconfig.h b/util/argconfig.h index 2a04a32..3dff25a 100644 --- a/util/argconfig.h +++ b/util/argconfig.h @@ -47,7 +47,6 @@ enum argconfig_types { CFG_FLAG, CFG_STRING, CFG_INT, - CFG_SIZE, CFG_LONG, CFG_LONG_SUFFIX, CFG_DOUBLE, @@ -181,7 +180,6 @@ int argconfig_parse_comma_sep_array_u32(char *string, __u32 *val, unsigned int max_length); int argconfig_parse_comma_sep_array_u64(char *string, __u64 *val, unsigned int max_length); -int argconfig_parse_byte(const char *opt, const char *str, unsigned char *val); void print_word_wrapped(const char *s, int indent, int start, FILE *stream); bool argconfig_parse_seen(struct argconfig_commandline_options *options, diff --git a/util/base64.c b/util/base64.c index 7f47cda..0e89f2e 100644 --- a/util/base64.c +++ b/util/base64.c @@ -20,6 +20,7 @@ * MA 02110-1301, USA. */ +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <errno.h> @@ -42,7 +43,7 @@ static const char base64_table[65] = int base64_encode(const unsigned char *src, int srclen, char *dst) { int i, bits = 0; - u_int32_t ac = 0; + uint32_t ac = 0; char *cp = dst; for (i = 0; i < srclen; i++) { @@ -77,7 +78,7 @@ int base64_encode(const unsigned char *src, int srclen, char *dst) */ int base64_decode(const char *src, int srclen, unsigned char *dst) { - u_int32_t ac = 0; + uint32_t ac = 0; int i, bits = 0; unsigned char *bp = dst; diff --git a/util/cleanup.h b/util/cleanup.h index ee9b120..ff26cda 100644 --- a/util/cleanup.h +++ b/util/cleanup.h @@ -5,6 +5,8 @@ #include <unistd.h> #include <stdlib.h> +#include <libnvme.h> + #include "util/mem.h" #define __cleanup__(fn) __attribute__((cleanup(fn))) @@ -21,17 +23,36 @@ DECLARE_CLEANUP_FUNC(name, type) \ static inline void freep(void *p) { - free(*(void**) p); + free(*(void **)p); } #define _cleanup_free_ __cleanup__(freep) #define _cleanup_huge_ __cleanup__(nvme_free_huge) -static inline void close_file(int *f) +static inline void cleanup_fd(int *fd) { - if (*f > STDERR_FILENO) - close(*f); + if (*fd > STDERR_FILENO) + close(*fd); } -#define _cleanup_file_ __cleanup__(close_file) +#define _cleanup_fd_ __cleanup__(cleanup_fd) + +static inline void cleanup_nvme_root(nvme_root_t *r) +{ + nvme_free_tree(*r); +} +#define _cleanup_nvme_root_ __cleanup__(cleanup_nvme_root) + +static inline DEFINE_CLEANUP_FUNC(cleanup_nvme_ctrl, nvme_ctrl_t, nvme_free_ctrl) +#define _cleanup_nvme_ctrl_ __cleanup__(cleanup_nvme_ctrl) + +static inline void free_uri(struct nvme_fabrics_uri **uri) +{ + if (*uri) + nvme_free_uri(*uri); +} +#define _cleanup_uri_ __cleanup__(free_uri) + +static inline DEFINE_CLEANUP_FUNC(cleanup_file, FILE *, fclose) +#define _cleanup_file_ __cleanup__(cleanup_file) -#endif +#endif /* __CLEANUP_H */ diff --git a/util/json.h b/util/json.h index 54e33e3..3dd5b52 100644 --- a/util/json.h +++ b/util/json.h @@ -56,6 +56,8 @@ uint64_t util_json_object_get_uint64(struct json_object *obj); struct json_object; +#define json_object_add_value_string(o, k, v) + #endif #endif diff --git a/util/logging.c b/util/logging.c index c26d9e2..8e59948 100644 --- a/util/logging.c +++ b/util/logging.c @@ -92,15 +92,14 @@ int nvme_submit_passthru(int fd, unsigned long ioctl_cmd, struct timeval end; int err; - if (log_level >= LOG_INFO) + if (log_level >= LOG_DEBUG) gettimeofday(&start, NULL); err = ioctl(fd, ioctl_cmd, cmd); - if (log_level >= LOG_INFO) { + if (log_level >= LOG_DEBUG) { gettimeofday(&end, NULL); - if (log_level >= LOG_DEBUG) - nvme_show_command(cmd, err); + nvme_show_command(cmd, err); nvme_show_latency(start, end); } @@ -118,16 +117,15 @@ int nvme_submit_passthru64(int fd, unsigned long ioctl_cmd, struct timeval end; int err; - if (log_level >= LOG_INFO) + if (log_level >= LOG_DEBUG) gettimeofday(&start, NULL); err = ioctl(fd, ioctl_cmd, cmd); - if (log_level >= LOG_INFO) { + if (log_level >= LOG_DEBUG) { gettimeofday(&end, NULL); - if (log_level >= LOG_DEBUG) - nvme_show_command64(cmd, err); + nvme_show_command64(cmd, err); nvme_show_latency(start, end); } diff --git a/util/meson.build b/util/meson.build index 0065b86..f5474cd 100644 --- a/util/meson.build +++ b/util/meson.build @@ -8,6 +8,7 @@ sources += [ 'util/mem.c', 'util/suffix.c', 'util/types.c', + 'util/utils.c' ] if json_c_dep.found() diff --git a/util/types.h b/util/types.h index 595958b..9e0806c 100644 --- a/util/types.h +++ b/util/types.h @@ -16,6 +16,16 @@ static inline long kelvin_to_celsius(long t) return t + ABSOLUTE_ZERO_CELSIUS; } +static inline long celsius_to_fahrenheit(long t) +{ + return t * 9 / 5 + 32; +} + +static inline long kelvin_to_fahrenheit(long t) +{ + return celsius_to_fahrenheit(kelvin_to_celsius(t)); +} + /* uint128_t is not always available, define our own. */ union nvme_uint128 { __u8 bytes[16]; diff --git a/util/utils.c b/util/utils.c new file mode 100644 index 0000000..5d77652 --- /dev/null +++ b/util/utils.c @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) Micron, Inc 2024. + * + * @file: micron-utils.h + * @brief: This module contains all the utilities needed for other modules. + * @author: Chaithanya Shoba <ashoba@micron.com> + */ + +#include "utils.h" +#include "types.h" +#include "json.h" + +int hex_to_int(char c) +{ + if (c >= '0' && c <= '9') + return c - '0'; + else if (c >= 'A' && c <= 'F') + return 10 + (c - 'A'); + else if (c >= 'a' && c <= 'f') + return 10 + (c - 'a'); + else + return -1; // Invalid character +} + +char *hex_to_ascii(const char *hex) +{ + int hex_length = strlen(hex); + + char *text = NULL; + + if (hex_length > 0) { + int symbol_count; + int odd_hex_count = hex_length % 2 == 1; + + if (odd_hex_count) + symbol_count = (hex_length / 2) + 1; + else + symbol_count = hex_length / 2; + + text = (char *)malloc(symbol_count + 1); // Allocate memory for the result + + int last_index = hex_length - 1; + + for (int i = last_index; i >= 0; --i) { + if ((last_index - i) % 2 != 0) { + int dec = 16 * hex_to_int(hex[i]) + hex_to_int(hex[i + 1]); + + if (odd_hex_count) + text[i / 2 + 1] = dec; + else + text[i / 2] = dec; + } else if (i == 0) { + int dec = hex_to_int(hex[0]); + + text[0] = dec; + } + } + + text[symbol_count] = '\0'; // Terminate the string + } + + return text; +} + +unsigned char *read_binary_file(char *data_dir_path, const char *bin_path, + long *buffer_size, int retry_count) +{ + char *file_path = NULL; + FILE *bin_file = NULL; + size_t n_data = 0; + unsigned char *buffer = NULL; + + /* set path */ + if (data_dir_path == NULL) { + file_path = (char *)bin_path; + } else { + /* +2 for the / and null terminator */ + file_path = (char *) calloc(1, strlen(data_dir_path) + strlen(bin_path) + 2); + if (!file_path) + return NULL; + + if (strlen(bin_path) != 0) + sprintf(file_path, "%s/%s", data_dir_path, bin_path); + else + sprintf(file_path, "%s", data_dir_path); + } + + /* open file */ + for (int i = 0; i < retry_count; i++) { + bin_file = fopen(file_path, "rb"); + if (bin_file != NULL) + break; + sleep((unsigned int)(retry_count > 1)); + } + + if (!bin_file) { + nvme_show_error("\nFailed to open %s", file_path); + if (file_path != bin_path) + free(file_path); + return NULL; + } + + /* get size */ + fseek(bin_file, 0, SEEK_END); + *buffer_size = ftell(bin_file); + fseek(bin_file, 0, SEEK_SET); + if (*buffer_size <= 0) { + fclose(bin_file); + return NULL; + } + + /* allocate buffer */ + buffer = (unsigned char *)malloc(*buffer_size); + if (!buffer) { + nvme_show_result("\nFailed to allocate %ld bytes!", *buffer_size); + fclose(bin_file); + return NULL; + } + memset(buffer, 0, *buffer_size); + + /* Read data */ + n_data = fread(buffer, 1, *buffer_size, bin_file); + + /* Close file */ + fclose(bin_file); + + /* Validate we read data */ + if (n_data != (size_t)*buffer_size) { + nvme_show_result("\nFailed to read %ld bytes from %s", *buffer_size, file_path); + return NULL; + } + + if (file_path != bin_path) + free(file_path); + return buffer; +} + +void print_formatted_var_size_str(const char *msg, const __u8 *pdata, size_t data_size, FILE *fp) +{ + char description_str[256] = ""; + char temp_buffer[3] = { 0 }; + + for (size_t i = 0; i < data_size; ++i) { + sprintf(temp_buffer, "%02X", pdata[i]); + strcat(description_str, temp_buffer); + } + + if (fp) + fprintf(fp, "%s: %s\n", msg, description_str); + else + printf("%s: %s\n", msg, description_str); +} + +void process_field_size_16(int offset, char *sfield, __u8 *buf, char *datastr) +{ + __u64 lval_lo, lval_hi; + + if (strstr(sfield, "GUID")) { + sprintf(datastr, "0x%"PRIx64"%"PRIx64"", + le64_to_cpu(*(__u64 *)(&buf[offset + 8])), + le64_to_cpu(*(__u64 *)(&buf[offset]))); + } else { + lval_lo = *((__u64 *)(&buf[offset])); + lval_hi = *((__u64 *)(&buf[offset + 8])); + + if (lval_hi) + sprintf(datastr, "0x%"PRIx64"%016"PRIx64"", + le64_to_cpu(lval_hi), le64_to_cpu(lval_lo)); + else + sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); + } +} + +void process_field_size_8(int offset, char *sfield, __u8 *buf, char *datastr) +{ + __u64 lval_lo; + + if (strstr(sfield, "Boot SSD Spec Version")) { + sprintf(datastr, "%x.%x.%x.%x", + le16_to_cpu(*((__u16 *)(&buf[300]))), + le16_to_cpu(*((__u16 *)(&buf[302]))), + le16_to_cpu(*((__u16 *)(&buf[304]))), + le16_to_cpu(*((__u16 *)(&buf[306])))); + } else if (strstr(sfield, "Firmware Revision")) { + char buffer[30] = {'\0'}; + + lval_lo = *((__u64 *)(&buf[offset])); + + sprintf(buffer, "%"PRIx64, __builtin_bswap64(lval_lo)); + sprintf(datastr, "%s", hex_to_ascii(buffer)); + } else if (strstr(sfield, "Timestamp")) { + char ts_buf[128]; + + lval_lo = *((__u64 *)(&buf[offset])); + + convert_ts(le64_to_cpu(lval_lo), ts_buf); + sprintf(datastr, "%s", ts_buf); + } else { + lval_lo = *((__u64 *)(&buf[offset])); + + sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); + } +} + +void process_field_size_7(int offset, char *sfield, __u8 *buf, char *datastr) +{ + __u8 lval[8] = { 0 }; + __u64 lval_lo; + + /* 7 bytes will be in little-endian format, with last byte as MSB */ + memcpy(&lval[0], &buf[offset], 7); + memcpy((void *)&lval_lo, lval, 8); + sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); +} + +void process_field_size_6(int offset, char *sfield, __u8 *buf, char *datastr) +{ + __u32 ival; + __u16 sval; + __u64 lval_lo; + + if (strstr(sfield, "DSSD Spec Version")) { + sprintf(datastr, "%x.%x.%x.%x", buf[103], + le16_to_cpu(*((__u16 *)(&buf[101]))), + le16_to_cpu(*((__u16 *)(&buf[99]))), buf[98]); + } else { + ival = *((__u32 *)(&buf[offset])); + sval = *((__u16 *)(&buf[offset + 4])); + lval_lo = (((__u64)sval << 32) | ival); + + sprintf(datastr, "0x%"PRIx64"", le64_to_cpu(lval_lo)); + } +} + +void process_field_size_default(int offset, char *sfield, __u8 *buf, int size, char *datastr) +{ + __u8 cval; + char description_str[256] = "0x"; + char temp_buffer[3] = { 0 }; + + for (unsigned char i = 0; i < (unsigned char)size; i++) { + cval = (buf[offset + i]); + + sprintf(temp_buffer, "%02X", cval); + strcat(description_str, temp_buffer); + } + sprintf(datastr, "%s", description_str); +} + +void generic_structure_parser(__u8 *buf, struct request_data *req_data, int field_count, + struct json_object *stats, __u8 spec, FILE *fp) +{ + int offset = 0; + + for (int field = 0; field < field_count; field++) { + char datastr[1024] = { 0 }; + char *sfield = req_data[field].field; + int size = !spec ? req_data[field].size : req_data[field].size2; + + if (!size || sfield == NULL) + continue; + + switch (size) { + case FIELD_SIZE_16: + process_field_size_16(offset, sfield, buf, datastr); + break; + case FIELD_SIZE_8: + process_field_size_8(offset, sfield, buf, datastr); + break; + case FIELD_SIZE_7: + process_field_size_7(offset, sfield, buf, datastr); + break; + case FIELD_SIZE_6: + process_field_size_6(offset, sfield, buf, datastr); + break; + case FIELD_SIZE_4: + sprintf(datastr, "0x%x", le32_to_cpu(*((__u32 *)(&buf[offset])))); + break; + case FIELD_SIZE_3: + sprintf(datastr, "0x%02X%02X%02X", + buf[offset + 0], buf[offset + 1], buf[offset + 2]); + break; + case FIELD_SIZE_2: + sprintf(datastr, "0x%04x", le16_to_cpu(*((__u16 *)(&buf[offset])))); + break; + case FIELD_SIZE_1: + sprintf(datastr, "0x%02x", buf[offset]); + break; + default: + process_field_size_default(offset, sfield, buf, size, datastr); + break; + } + offset += size; + /* do not print reserved values */ + if (strstr(sfield, "Reserved")) + continue; + if (stats) + json_object_add_value_string(stats, sfield, datastr); + else if (fp) + fprintf(fp, "%-40s : %-4s\n", sfield, datastr); + else + printf("%-40s : %-4s\n", sfield, datastr); + } +} diff --git a/util/utils.h b/util/utils.h new file mode 100644 index 0000000..35ba550 --- /dev/null +++ b/util/utils.h @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) Micron, Inc 2024. + * + * @file: utils.h + * @brief: This module contains all the utilities needed for other modules. + * @author: Chaithanya Shoba <ashoba@micron.com> + */ + +#include "common.h" +#include "nvme-print.h" + +/*Request data format*/ +struct __packed request_data { + char *field; + int size; + int size2; +}; + +enum field_size { + FIELD_SIZE_16 = 16, + FIELD_SIZE_8 = 8, + FIELD_SIZE_7 = 7, + FIELD_SIZE_6 = 6, + FIELD_SIZE_4 = 4, + FIELD_SIZE_3 = 3, + FIELD_SIZE_2 = 2, + FIELD_SIZE_1 = 1 +}; + +/** + * @brief converts a single hexadecimal character to its integer value. + * + * @param hex_char, input hex char + * @param ts_buf, output time string + * + * @return integer value of hexadecimal + */ +int hex_to_int(char c); + +/** + * @brief convert time_t format time to a human readable string + * + * @param hex_string, input hex string pointer + * @param ascii_buffer, output ascii buffer pointer + * + * @return nothing + */ +char *hex_to_ascii(const char *hex); + +/** + * @brief convert time_t format time to a human readable string + * + * @param data_dir_path, input data directory path pointer + * @param bin_path, input binary file path pointer + * @param buffer_size, input buffer size pointer + * @param retry_count, input retry count + * + * @return pointer to binary data buffer + */ +unsigned char *read_binary_file(char *data_dir_path, const char *bin_path, long *buffer_size, + int retry_count); + +/** + * @brief prints generic structure parser + * + * @param buf, input raw log data + * @param log_page, input format of the data + * @param field_count, intput log field count + * @param stats, input json object to add fields + * @param spec, input ocp spec index + * @param fp, input file pointer + * + * @return 0 success + */ +void generic_structure_parser(__u8 *buf, struct request_data *req_data, int field_count, + struct json_object *stats, __u8 spec, FILE *fp); + +/** + * @brief prints raw data to the buffer + * + * @param msg, intput buffer to write data + * @param pdata, input raw data + * @param data_size, input size of the data + * @param fp, input file pointer + * + * @return 0 success + */ +void print_formatted_var_size_str(const char *msg, const __u8 *pdata, size_t data_size, FILE *fp); + +/** + * @brief prints raw data to the buffer + * + * @param offset, intput offset of the param + * @param sfield, intput field + * @param buf, input raw data + * @param datastr, output data buffer + * + * @return 0 success + */ +void process_field_size_16(int offset, char *sfield, __u8 *buf, char *datastr); + +/** + * @brief prints raw data to the buffer + * + * @param offset, intput offset of the param + * @param sfield, intput field + * @param buf, input raw data + * @param datastr, output data buffer + * + * @return 0 success + */ +void process_field_size_8(int offset, char *sfield, __u8 *buf, char *datastr); + +/** + * @brief prints raw data to the buffer + * + * @param offset, intput offset of the param + * @param sfield, intput field + * @param buf, input raw data + * @param datastr, output data buffer + * + * @return 0 success + */ +void process_field_size_7(int offset, char *sfield, __u8 *buf, char *datastr); + +/** + * @brief prints raw data to the buffer + * + * @param offset, intput offset of the param + * @param sfield, intput field + * @param buf, input raw data + * @param datastr, output data buffer + * + * @return 0 success + */ +void process_field_size_6(int offset, char *sfield, __u8 *buf, char *datastr); + +/** + * @brief prints raw data to the buffer + * + * @param offset, intput offset of the param + * @param sfield, intput field + * @param buf, input raw data + * @param size, input data size + * @param datastr, output data buffer + * + * @return 0 success + */ +void process_field_size_default(int offset, char *sfield, __u8 *buf, int size, char *datastr); |