diff --git a/.checkpatch.conf b/.checkpatch.conf new file mode 100644 index 0000000..aacb982 --- /dev/null +++ b/.checkpatch.conf @@ -0,0 +1,24 @@ +# Checkpatch options. +# REF: https://docs.kernel.org/dev-tools/checkpatch.html + +# This isn't actually a Linux kernel tree +--no-tree + +--max-line-length=100 + +--ignore EMAIL_SUBJECT + +# FILE_PATH_CHANGES reports this kind of message: +# "added, moved or deleted file(s), does MAINTAINERS need updating?" +--ignore FILE_PATH_CHANGES + + +# Commit messages might contain a Gerrit Change-Id. +--ignore GERRIT_CHANGE_ID + +# Do not check the format of commit messages, as Gerrit's merge commits do not +# preserve it. +--ignore GIT_COMMIT_ID + +# Avoid "Does not appear to be a unified-diff format patch" message +--ignore NOT_UNIFIED_DIFF diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 20c69fa..a743d03 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,6 +17,7 @@ jobs: - name: build run: | scripts/build.sh coverage - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: - fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.github/workflows/run-nightly-tests.yml b/.github/workflows/run-nightly-tests.yml index d525986..e8ac232 100644 --- a/.github/workflows/run-nightly-tests.yml +++ b/.github/workflows/run-nightly-tests.yml @@ -9,39 +9,25 @@ on: jobs: nightly-tests: runs-on: nvme-nvm + container: + image: ghcr.io/linux-nvme/debian.python:latest + #Expose all devices to the container through the `privileged` flag. + # + #BDEV0 is an environment variable of the self-hosted runner instance + #that contains a valid nvme ctrl name which is capable of the nvm + #command set. + options: '--privileged -v "/dev":"/dev":z -e BDEV0' steps: - name: Output kernel version run: | uname -a - - name: Clean up test device - run: | - #BDEV0 is an environment variable of the self-hosted runner instance - #that contains a valid nvme ctrl name which is capable of the nvm - #command set. - CONTROLLER=$(echo /dev/${BDEV0} | sed 's/n[0-9]*$//') - sudo nvme delete-ns $CONTROLLER -n 0xffffffff - sudo nvme format $CONTROLLER -n 0xffffffff -l 0 -f - SIZE=$(sudo nvme id-ctrl $CONTROLLER --output-format=json | jq -r '{tnvmcap} | .[]' | awk '{print $1/512}') - sudo nvme create-ns -s $SIZE -c $SIZE -f 0 -d 0 --csi=0 $CONTROLLER - sudo nvme attach-ns $CONTROLLER -n 1 -c 0 - uses: actions/checkout@v4 - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y \ - meson gcc pkg-config git libjson-c-dev libssl-dev libkeyutils-dev \ - libdbus-1-dev libpython3-dev pipx python3-dev swig xz-utils - pipx ensurepath - sudo PIPX_BIN_DIR=/usr/local/bin pipx install nose2 - sudo PIPX_BIN_DIR=/usr/local/bin pipx install flake8 - sudo PIPX_BIN_DIR=/usr/local/bin pipx install mypy - sudo PIPX_BIN_DIR=/usr/local/bin pipx install autopep8 - sudo PIPX_BIN_DIR=/usr/local/bin pipx install isort + PIPX_BIN_DIR=/usr/local/bin pipx install nose2 --force - name: Build and install nvme-cli run: | scripts/build.sh -b release -c gcc - sudo meson install -C .build-ci - sudo ldconfig /usr/local/lib64 - name: Overwrite test config run: | CONTROLLER=$(echo /dev/${BDEV0} | sed 's/n[0-9]*$//') @@ -49,12 +35,14 @@ jobs: { "controller" : "$CONTROLLER", "ns1": "/dev/${BDEV0}", - "log_dir": "tests/nvmetests/" + "log_dir": "tests/nvmetests/", + "nvme_bin": "$(pwd)/.build-ci/nvme" } EOF + cat tests/config.json - name: Run on device tests run: | - sudo nose2 --verbose --start-dir tests \ + nose2 --verbose --start-dir tests \ nvme_attach_detach_ns_test \ nvme_compare_test \ nvme_copy_test \ @@ -79,15 +67,6 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: logs files + name: nvme-cli-test-logs path: | ./tests/nvmetests/**/*.log - - name: Clean up test device - if: always() - run: | - CONTROLLER=$(echo /dev/${BDEV0} | sed 's/n[0-9]*$//') - sudo nvme delete-ns $CONTROLLER -n 0xffffffff - sudo nvme format $CONTROLLER -n 0xffffffff -l 0 -f - SIZE=$(sudo nvme id-ctrl $CONTROLLER --output-format=json | jq -r '{tnvmcap} | .[]' | awk '{print $1/512}') - sudo nvme create-ns -s $SIZE -c $SIZE -f 0 -d 0 --csi=0 $CONTROLLER - sudo nvme attach-ns $CONTROLLER -n 1 -c 0 diff --git a/Documentation/cmd-plugins.txt b/Documentation/cmd-plugins.txt index 2e80bfc..ee77408 100644 --- a/Documentation/cmd-plugins.txt +++ b/Documentation/cmd-plugins.txt @@ -207,3 +207,36 @@ linknvme:nvme-inspur-nvme-vendor-log[1]:: linknvme:nvme-dapustor-smart-log-add[1]:: NVMe DapuStor Additional SMART log page + +linknvme:nvme-solidigm-id-ctrl[1]:: + Solidigm - NVMe Identify Controller + +linknvme:nvme-solidigm-smart-log-add[1]:: + Retrieve Solidigm SMART Log + +linknvme:nvme-solidigm-vs-internal-log[1]:: + Retrieve Debug log binaries + +linknvme:nvme-solidigm-garbage-collect-log[1]:: + Retrieve Garbage Collection Log + +linknvme:nvme-solidigm-market-log[1]:: + Retrieve Market Log + +linknvme:nvme-solidigm-latency-tracking-log[1]:: + Enable/Retrieve Latency tracking Log + +linknvme:nvme-solidigm-parse-telemetry-log[1]:: + Parse Telemetry Log binary + +linknvme:nvme-solidigm-log-page-directory[1]:: + Retrieve log page directory + +linknvme:nvme-solidigm-temp-stats[1]:: + Retrieve Temperature Statistics log + +linknvme:nvme-solidigm-vs-drive-info[1]:: + Retrieve drive information + +linknvme:nvme-solidigm-workload-tracker[1]:: + Real Time capture Workload Tracker samples diff --git a/Documentation/meson.build b/Documentation/meson.build index 65495e3..e81db8c 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -32,6 +32,7 @@ adoc_sources = [ 'nvme-error-log', 'nvme-fdp-configs', 'nvme-fdp-events', + 'nvme-fdp-feature', 'nvme-fdp-set-events', 'nvme-fdp-stats', 'nvme-fdp-status', diff --git a/Documentation/nvme-admin-passthru.1 b/Documentation/nvme-admin-passthru.1 index 25576c9..075816d 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 -.\" Date: 10/31/2024 +.\" Date: 03/17/2025 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-ADMIN\-PASSTHR" "1" "10/31/2024" "NVMe" "NVMe Manual" +.TH "NVME\-ADMIN\-PASSTHR" "1" "03/17/2025" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-admin-passthru.html b/Documentation/nvme-admin-passthru.html index 1ae7d89..84eacca 100644 --- a/Documentation/nvme-admin-passthru.html +++ b/Documentation/nvme-admin-passthru.html @@ -4,7 +4,7 @@ - + nvme-admin-passthru(1) + + + + +
+
+

SYNOPSIS

+
+
+
nvme fdp <device> [--endgrp-id=<NUM> | -e <NUM>]
+                [--enable-conf-idx=<NUM> | -c <NUM>]
+                [--disable | -d]
+                [--verbose | -v]
+
+
+
+
+
+

DESCRIPTION

+
+

For the NVMe device given, configure and manage the Flexible Data Placement (FDP) feature.

+

This command can be used to either show the current FDP feature configuration or change it.

+
+
+
 If no `--enable-conf-idx` or `--disable` options are provided, the current configuration is
+displayed.
+
+

If the --enable-conf-idx or --disable options are provided, configuration is changed +accordingly. Device may refuse the change if there is a namespace.

+

The <device> parameter is mandatory and must be a NVMe character device (ex: /dev/nvme0)

+
+
+
+

OPTIONS

+
+
+
+-e <NUM> +
+
+--endgrp-id=<NUM> +
+
+

+ Specify the endurance group ID. This option is mandatory if device supports endurance groups. +

+
+
+-c <NUM> +
+
+--enable-conf-idx=<NUM> +
+
+

+ Enable FDP feature with the specified configuration. The configuration index matches position + listed by nvme-fdp-config(1). +

+
+
+-d +
+
+--disable +
+
+

+ Disable the current FDP feature configuration. +

+
+
+-v +
+
+--verbose +
+
+

+ Increase verbosity of the output. +

+
+
+
+
+
+

SEE ALSO

+
+

nvme-list-endgrp(1) +nvme-fdp-config(1)

+
+
+
+

NVME

+
+

Part of nvme-cli

+
+
+
+

+ + + diff --git a/Documentation/nvme-fdp-feature.txt b/Documentation/nvme-fdp-feature.txt new file mode 100644 index 0000000..543c788 --- /dev/null +++ b/Documentation/nvme-fdp-feature.txt @@ -0,0 +1,56 @@ +nvme-fdp-feature(1) +=================== + +NAME +---- +nvme-fdp-feature - Show or change Flexible Data Placement (FDP) Feature + +SYNOPSIS +-------- +[verse] +'nvme fdp' [--endgrp-id= | -e ] + [--enable-conf-idx= | -c ] + [--disable | -d] + [--verbose | -v] + +DESCRIPTION +----------- +For the NVMe device given, configure and manage the Flexible Data Placement (FDP) feature. + +This command can be used to either show the current FDP feature configuration or change it. + + If no `--enable-conf-idx` or `--disable` options are provided, the current configuration is +displayed. + +If the `--enable-conf-idx` or `--disable` options are provided, configuration is changed +accordingly. Device may refuse the change if there is a namespace. + +The parameter is mandatory and must be a NVMe character device (ex: /dev/nvme0) + +OPTIONS +------- +-e :: +--endgrp-id=:: + Specify the endurance group ID. This option is mandatory if device supports endurance groups. + +-c :: +--enable-conf-idx=:: + Enable FDP feature with the specified configuration. The configuration index matches position + listed by nvme-fdp-config(1). + +-d:: +--disable:: + Disable the current FDP feature configuration. + +-v:: +--verbose:: + Increase verbosity of the output. + +SEE ALSO +-------- +nvme-list-endgrp(1) +nvme-fdp-config(1) + +NVME +---- +Part of nvme-cli \ No newline at end of file diff --git a/Documentation/nvme-fdp-set-events.1 b/Documentation/nvme-fdp-set-events.1 index 1f0c9d9..6654b97 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 -.\" Date: 10/31/2024 +.\" Date: 03/17/2025 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-FDP\-SET\-EVEN" "1" "10/31/2024" "NVMe" "NVMe Manual" +.TH "NVME\-FDP\-SET\-EVEN" "1" "03/17/2025" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-fdp-set-events.html b/Documentation/nvme-fdp-set-events.html index afd77fc..4a3e648 100644 --- a/Documentation/nvme-fdp-set-events.html +++ b/Documentation/nvme-fdp-set-events.html @@ -4,7 +4,7 @@ - + nvme-fdp-set-events(1)