]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
7 months agonetapp-smdev: add verbose output
Martin George [Tue, 3 Dec 2024 18:54:48 +0000 (00:24 +0530)]
netapp-smdev: add verbose output

Add a verbose option to display additional information of smdevices
on the host. And while at it, make a few corrections/modifications
to the JSON output as well.

Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
7 months agonetapp-smdev-doc: add verbose details
Martin George [Tue, 3 Dec 2024 07:56:56 +0000 (13:26 +0530)]
netapp-smdev-doc: add verbose details

Add verbose option details to the smdevices documentation.

Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
7 months agonetapp-smdev: remove redundant code
Martin George [Tue, 3 Dec 2024 07:46:17 +0000 (13:16 +0530)]
netapp-smdev: remove redundant code

Remove redundant code in regular and JSON functions, which is
already invoked in a separate function.

Signed-off-by: Martin George <marting@netapp.com>
7 months agonvme-print: fix Arbitration Mechanism Supported
Xiaoyuan Zhang [Tue, 3 Dec 2024 08:11:16 +0000 (16:11 +0800)]
nvme-print: fix Arbitration Mechanism Supported

Fix the error of the "Arbitration Mechanism Supported"
in the Controller Capabilities field of Controller Properties

Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
7 months agonvme: telemetry ctrl-init need to clear RAE
Steven Seungcheol Lee [Thu, 28 Nov 2024 07:50:09 +0000 (16:50 +0900)]
nvme: telemetry ctrl-init need to clear RAE

if rae default is true, it's always true
so it was not possible to issue with RAE=0

If the host is reading the Telemetry Controller-Initiated log page,
then the host reads any portion of that log page with the Retain
Asynchronous Event bit cleared to ‘0’ to indicate to the controller
that the host has completed reading the Telemetry Controller-Initiated
log page

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agonvme-netapp: update err messages
Martin George [Fri, 29 Nov 2024 05:45:23 +0000 (11:15 +0530)]
nvme-netapp: update err messages

Trivial fix to update a few error messages.

Signed-off-by: Martin George <marting@netapp.com>
7 months agonetapp-ontapdev: fix JSON output for nsze & nuse
Martin George [Fri, 29 Nov 2024 05:40:16 +0000 (11:10 +0530)]
netapp-ontapdev: fix JSON output for nsze & nuse

The namespace size & utilization values printed in the JSON
output was incorrect. Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
7 months agonetapp-ontapdev: fix fw version handling
Martin George [Fri, 29 Nov 2024 05:34:34 +0000 (11:04 +0530)]
netapp-ontapdev: fix fw version handling

The string used to capture the fw version was not handled
properly. Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
7 months agoprint: Supported Log lidsp print updated NVMe v2.1
Steven Seungcheol Lee [Fri, 29 Nov 2024 07:34:04 +0000 (16:34 +0900)]
print: Supported Log lidsp print updated NVMe v2.1

LIDSP : LID Specific Parameter using upper 16bits
so fix wrong bit shift (0x16 = 22bit shift)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agonvme-print-stdout: add nvm-id-ctrl command VER and LBAMQF fields
Tokunori Ikegami [Sun, 24 Nov 2024 13:38:50 +0000 (22:38 +0900)]
nvme-print-stdout: add nvm-id-ctrl command VER and LBAMQF fields

The fields added by NVM command set specification 1.1.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agobuild: bump libnvme wrap
Daniel Wagner [Mon, 2 Dec 2024 11:55:17 +0000 (12:55 +0100)]
build: bump libnvme wrap

Fetch dad5a9805a38 ("types: add NVME_ID_CTRL_NVM_LBAMQF definitions")

Signed-off-by: Daniel Wagner <wagi@kernel.org>
7 months agowdc: rework log retrieval and parsing
Brandon Paupore [Mon, 25 Nov 2024 17:11:31 +0000 (11:11 -0600)]
wdc: rework log retrieval and parsing

We should only need to retrieve the log page once, rather than once per
field to be parsed. This also fixes some endianness issues when handling
the parsed data entries.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
7 months agobuild: change muon setup command and parameter
Tokunori Ikegami [Sat, 30 Nov 2024 13:56:12 +0000 (22:56 +0900)]
build: change muon setup command and parameter

The command and parameter changed by the muon commits below.
  eec469bb ("bootstrap.sh - use muon-bootstrap as exe name")
  5a64dfd3 ("disable bestline by default")

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoocp: set UUID index to get hwcomp log
Tokunori Ikegami [Sun, 24 Nov 2024 05:21:55 +0000 (14:21 +0900)]
ocp: set UUID index to get hwcomp log

The index is required by the OCP specification.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agotype: Using enums of ANSAN and RGCNS bit for OAES
Arbaz Khan [Wed, 13 Nov 2024 15:55:38 +0000 (21:25 +0530)]
type: Using enums of ANSAN and RGCNS bit for OAES

Using enums of ANSAN and RGCNS bit for OAES field based on NVM Express
Base Specification 2.1

Signed-off-by: Arbaz Khan <arbaz.khan@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Reviewed-by: Francis Pravin <francis.p@samsung.com>
7 months agonvme-print: print the new fields added in Sanitize log - TP4152
Francis Pravin [Thu, 14 Nov 2024 05:46:21 +0000 (11:16 +0530)]
nvme-print: print the new fields added in Sanitize log - TP4152

Print the new fields added in Sanitize log as part of TP4152.
TP4152 - Post-Sanitize Media Verification 2024.04.01 Ratified.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agobuild: bump libnvme wrap
Steven Seungcheol Lee [Wed, 13 Nov 2024 09:40:27 +0000 (18:40 +0900)]
build: bump libnvme wrap

To use enum for idctrl CTRATT.RHII

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agonvme-print: Add id-ctrl CTRATT.RHII, using enum
Steven Seungcheol Lee [Wed, 13 Nov 2024 08:14:04 +0000 (17:14 +0900)]
nvme-print: Add id-ctrl CTRATT.RHII, using enum

use enum nvme_id_ctrl_ctratt to parse values
reorder variable define
rename variables with abbreviation from nvme spec 2.1

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
8 months agofabrics: update return values for dim
Martin George [Fri, 15 Nov 2024 11:04:05 +0000 (16:34 +0530)]
fabrics: update return values for dim

The nvme dim command returns a zero even for failure scenarios
as shown below:

nvme0 DIM register command error. Status:0xffffffff -
Operation not supported

echo $?
0

Fix this by ensuring appropriate values are returned for success
and failure scenarios. And while at it, remove a couple of
superfluous braces too here.

Signed-off-by: Martin George <marting@netapp.com>
8 months agoocp-nvme: Add Error Injection type from ocp2.6
Steven Seungcheol Lee [Wed, 20 Nov 2024 04:55:21 +0000 (13:55 +0900)]
ocp-nvme: Add Error Injection type from ocp2.6

4.15.3.1 Error Injection Entry Data Structure
ERRIE-3 Error Injection Type

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
8 months agoocp-nvme: Update ocp v2.6 Hardware Component
Steven Seungcheol Lee [Tue, 19 Nov 2024 03:58:46 +0000 (12:58 +0900)]
ocp-nvme: Update ocp v2.6 Hardware Component

Log Identifier C6h
Hardware Component Log Size (bytes)
Component Identifier added
0x000C Born on Date. The date on which the device was manufactured.
ASCII string format is MMDDYYYY.

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
8 months agobuild(deps): bump codecov/codecov-action from 4 to 5
dependabot[bot] [Mon, 18 Nov 2024 18:34:30 +0000 (18:34 +0000)]
build(deps): bump codecov/codecov-action from 4 to 5

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agonvme: update messages for few misc functions
Martin George [Sun, 17 Nov 2024 08:40:13 +0000 (14:10 +0530)]
nvme: update messages for few misc functions

Print a helpful success message (under verbose option) for few
functions like subsystem_reset(), reset() and ns_rescan().

Signed-off-by: Martin George <marting@netapp.com>
8 months agoocp-nvme: fix the error display of Hardware Component Log
liuzhen [Wed, 13 Nov 2024 17:25:01 +0000 (01:25 +0800)]
ocp-nvme: fix the error display of Hardware Component Log

The display of Hardware Component (Log Identifier C6h) failures to
comply with protocol OCP2.5

Issue: https://github.com/linux-nvme/nvme-cli/issues/2566

Signed-off-by: liuzhen <liuzhen@dapustor.com>
8 months agoopc: fix hardware component descriptions bytes number
Tokunori Ikegami [Wed, 13 Nov 2024 13:34:48 +0000 (22:34 +0900)]
opc: fix hardware component descriptions bytes number

Subtract offset bytes number 64 from the hardware component log size.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
8 months agoocp-nvme: Recommit removed patch
Steven Seungcheol Lee [Tue, 12 Nov 2024 07:04:55 +0000 (16:04 +0900)]
ocp-nvme: Recommit removed patch

commit a5f155c9740b ("ocp-nvme: Add LMDATA-37 for Latency Monitor Log")

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
8 months agonetapp-ontapdev-doc: add verbose details
Martin George [Tue, 12 Nov 2024 18:44:07 +0000 (00:14 +0530)]
netapp-ontapdev-doc: add verbose details

Add verbose option details to the ontapdevices documentation.

Signed-off-by: Martin George <marting@netapp.com>
8 months agonetapp-ontapdev: add verbose output
Martin George [Mon, 11 Nov 2024 16:38:39 +0000 (22:08 +0530)]
netapp-ontapdev: add verbose output

Add a vebose output option to display additional information of
ONTAP devices on the host.

Signed-off-by: Martin George <marting@netapp.com>
8 months agoplugins/netapp: add include of libgen.h for basename(3) prototype
Daniel Néri [Mon, 11 Nov 2024 21:34:57 +0000 (22:34 +0100)]
plugins/netapp: add include of libgen.h for basename(3) prototype

Fixes build with musl libc.

Signed-off-by: Daniel Néri <dne+commits@rb67.eu>
8 months agonvme-print: add fallback for non-standard locale category
Daniel Néri [Mon, 11 Nov 2024 22:06:03 +0000 (23:06 +0100)]
nvme-print: add fallback for non-standard locale category

LC_MEASUREMENT is a GNU (libc) extension - fall back to LC_ALL if it's
not defined.

Fixes build with musl libc

Signed-off-by: Daniel Néri <dne+commits@rb67.eu>
8 months agodocs: add howto to setup TLS connections
Daniel Wagner [Wed, 30 Oct 2024 16:13:53 +0000 (17:13 +0100)]
docs: add howto to setup TLS connections

There are couple of step necessary to get TLS working nicely. Document
it how this is done.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agoplugins/amzn: add stats support
Swapnil Dinkar [Thu, 7 Nov 2024 03:32:30 +0000 (03:32 +0000)]
plugins/amzn: add stats support

this patch adds support to pull stats from amzn ebs nvme devices.

Signed-off-by: Swapnil Dinkar <sddinkar@amazon.com>
8 months agonvme-print: use NVME_GET in sanitize log
Francis Pravin [Thu, 7 Nov 2024 09:29:04 +0000 (14:59 +0530)]
nvme-print: use NVME_GET in sanitize log

Used NVME_GET macro in sanitize log. Also, updated the print statement
as per NVM Express Base Specification Revision 2.1.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
8 months agowdc: Fixes for SNTMP Capabilities
jeff-lien-wdc [Tue, 5 Nov 2024 20:13:53 +0000 (14:13 -0600)]
wdc:  Fixes for SNTMP Capabilities

This change will allow the correct debug log data to be
collected for the SNTMP drive.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
8 months agobuild: Add token for coverage test
Dennis Maisenbacher [Thu, 31 Oct 2024 14:28:03 +0000 (14:28 +0000)]
build: Add token for coverage test

The code coverage action is silently failing partly because the required
Codecov token is missing.
Reading the token from the GitHub secrets.

The missing gpg package must be fixed in
https://github.com/linux-nvme/ci-containers.

Furthermore, fail the coverage workflow if the codecov-action errors out.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agoRelease v2.11
Daniel Wagner [Thu, 31 Oct 2024 09:39:11 +0000 (10:39 +0100)]
Release v2.11

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agodoc: Regenerate all docs for v2.11
Daniel Wagner [Thu, 31 Oct 2024 09:39:11 +0000 (10:39 +0100)]
doc: Regenerate all docs for v2.11

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agoscripts: handle libnvme version update correctly
Daniel Wagner [Thu, 31 Oct 2024 09:33:40 +0000 (10:33 +0100)]
scripts: handle libnvme version update correctly

The pattern \([\.1-9]\+\) captures strings like .1, .9, or other
partial version numbers starting from 1. For full version formats, we
can update the pattern to capture more comprehensive version styles,
including major, minor, and patch levels (e.g., 1.0, 1.2.3, 10.3, etc.).

Exchange the match with:

\([0-9]\+\) matches the major version, consisting of one or more digits.

\(\.[0-9]\+\)* matches any additional minor or patch versions, capturing
optional segments starting with a dot and followed by one or more
digits.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agobuild: bump libnvme wrap
Daniel Wagner [Thu, 31 Oct 2024 09:14:46 +0000 (10:14 +0100)]
build: bump libnvme wrap

Fetch libnvme v1.11 release.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agodocs: update check-tls-key arguments
Daniel Wagner [Wed, 30 Oct 2024 12:05:45 +0000 (13:05 +0100)]
docs: update check-tls-key arguments

Add the newly added --keyfile command line option.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agonvme: add support to append TLS PSK to keyfile for check-tls-key
Daniel Wagner [Wed, 30 Oct 2024 12:04:03 +0000 (13:04 +0100)]
nvme: add support to append TLS PSK to keyfile for check-tls-key

When checking a key and it is inserted into keystore, support to
append it to a keyfile too.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agonvme: return correct error code in append_keyfile
Daniel Wagner [Wed, 30 Oct 2024 12:02:05 +0000 (13:02 +0100)]
nvme: return correct error code in append_keyfile

On success fprintf returns the number of bytes written, thus we need to
set the err variable to 0 to return success.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
8 months agodocs: nvme-id-doman: dom{ia => ai}n
наб [Tue, 29 Oct 2024 01:11:34 +0000 (02:11 +0100)]
docs: nvme-id-doman: dom{ia => ai}n

$ sed -i 's/domian/domain/g' $(git grep -l domian)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
8 months agoocp: fix latency monitoring data structure entry endian
Tokunori Ikegami [Mon, 28 Oct 2024 13:41:19 +0000 (22:41 +0900)]
ocp: fix latency monitoring data structure entry endian

Fix the entry data to little endian format.
Also delete to fill the data to 0 since already initialized by 0.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
8 months agoocp: fix TCG configuration log endian
Tokunori Ikegami [Mon, 28 Oct 2024 15:34:43 +0000 (00:34 +0900)]
ocp: fix TCG configuration log endian

Fix the entry data fields to little endian format.
Basically print functions convert the fields data to cpu format.
But still some errors then fixed the print json functions also.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
8 months agoocp: fix firmware activation history entry endian
Tokunori Ikegami [Mon, 28 Oct 2024 14:55:28 +0000 (23:55 +0900)]
ocp: fix firmware activation history entry endian

Fix the entry data fields to little endian format.
Basically print functions convert the fields data to cpu format.
But still some errors then fixed the print functions also.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
8 months agoCI: Add workflow for running tests on real nvme device
Dennis Maisenbacher [Wed, 25 Sep 2024 14:39:34 +0000 (14:39 +0000)]
CI: Add workflow for running tests on real nvme device

Introducing a GitHub workflow which runs all test cases under the
`tests` directory on real hardware through a self-hosted runner.
This workflow is triggered nightly or on demand as the tests run about an
hour.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Create default ns on tearDown
Dennis Maisenbacher [Fri, 25 Oct 2024 06:27:28 +0000 (06:27 +0000)]
tests: Create default ns on tearDown

After a test was run, the `tearDown` function is called and then creates
and attaches a single ns with the full NVM capacity.
This is done so the caller or the next test case receives a reasonably
formated drive.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Fix nvme_get_lba_status_test and nvme_lba_status_log_test
Dennis Maisenbacher [Thu, 17 Oct 2024 14:18:45 +0000 (14:18 +0000)]
tests: Fix nvme_get_lba_status_test and nvme_lba_status_log_test

Look up if the drive supports the `Get LBA Status` optional admin
command before executing a `nvme get-lba-status` or `nvme
lba-status-log` command.

Furthermore use the correct action value on `get-lba-status`.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Add feature check to nvme_compare_test
Dennis Maisenbacher [Thu, 17 Oct 2024 12:02:11 +0000 (12:02 +0000)]
tests: Add feature check to nvme_compare_test

Check if the NVM 'compare' command is supported before running the
nvme_compare_test which whould then fail with an 'Invalid Command
Opcode'

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Fix nvme_smart_log_test
Dennis Maisenbacher [Thu, 17 Oct 2024 08:41:08 +0000 (08:41 +0000)]
tests: Fix nvme_smart_log_test

Don't parse the smart log output to then print the (unsuccessfuly) parsed
values. Instead we print out the whole smart log output.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Use correct flag in vendor specific id-ctrl
Dennis Maisenbacher [Thu, 17 Oct 2024 07:34:16 +0000 (07:34 +0000)]
tests: Use correct flag in vendor specific id-ctrl

Use the long option for a vendor specific id-ctrl instead of the verbose
flag 'v'.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Fix nvme_get_features_test
Dennis Maisenbacher [Wed, 16 Oct 2024 14:20:52 +0000 (14:20 +0000)]
tests: Fix nvme_get_features_test

Specify mandatory namespace for Error Recovery (Feature Identifier 05h)
get features command.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Adjust ncap and nsze for nvme_format_test
Dennis Maisenbacher [Wed, 16 Oct 2024 12:56:12 +0000 (12:56 +0000)]
tests: Adjust ncap and nsze for nvme_format_test

Set ncap and nsze to the lowest possible value, such that this test can
be run on different device capacities.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Improve nvme_ctrl_reset_test
Dennis Maisenbacher [Wed, 16 Oct 2024 09:47:07 +0000 (09:47 +0000)]
tests: Improve nvme_ctrl_reset_test

Run I/O after a successful ctrl reset.
This tests if the sqs and cqs are constructed after reset.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Fixup nvme_create_max_ns_test
Dennis Maisenbacher [Tue, 15 Oct 2024 13:04:33 +0000 (13:04 +0000)]
tests: Fixup nvme_create_max_ns_test

Fix off by one errors and capacity allocation.

Small speedup for nvme_create_max_ns_test by reducing the io done by
`run_ns_io`. For this we introduce a new count parameter which can
overwrite the default value of 10.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Fix nvme_copy_test python traceback fails
Dennis Maisenbacher [Tue, 15 Oct 2024 12:08:37 +0000 (12:08 +0000)]
tests: Fix nvme_copy_test python traceback fails

Reworking the `get_ocfs` function to correctly parse the ocfs field.
At the same time refactor `nvme id-ctrl` that extracts the ocfs
field into separate functions. This is in preparation for following
commits that reuse the same functionality.

Furthermore nvme_copy_test fails on devices that do not support any
copy formats. For this to pass we need to declare
`self.host_behavior_data` in any case.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: fix nvme_attach_detach_ns_test
Dennis Maisenbacher [Fri, 11 Oct 2024 14:17:02 +0000 (14:17 +0000)]
tests: fix nvme_attach_detach_ns_test

Calculate ncap with configured flbas instead of setting a hard coded
value that might be to big for the test device.

Also, for this test to not fail the `nvme list-ctrl` outputs a summary
of ctrls present which must be skipped when parsing for the ctrl-id.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agotests: Use raw string for compiling regex
Dennis Maisenbacher [Thu, 10 Oct 2024 14:45:58 +0000 (16:45 +0200)]
tests: Use raw string for compiling regex

This fixes "SyntaxWarning: invalid escape sequence" when `get_error_log`
is being called.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
8 months agodocs: update gen-tls-key arguments
Daniel Wagner [Fri, 25 Oct 2024 07:26:20 +0000 (09:26 +0200)]
docs: update gen-tls-key arguments

Add the newly added --keyfile command line option.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme: add support to add derive TLS PSK to keyfile
Daniel Wagner [Thu, 24 Oct 2024 14:43:09 +0000 (16:43 +0200)]
nvme: add support to add derive TLS PSK to keyfile

When creating a new key and it is inserted into keystore also support to
append it to a keyfile.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme: rename identity to version
Daniel Wagner [Thu, 24 Oct 2024 14:39:40 +0000 (16:39 +0200)]
nvme: rename identity to version

Use the variable name consistently. The rest of the code base names this
variable as version.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme: set file permission for keyfile to owner only
Daniel Wagner [Thu, 24 Oct 2024 13:23:33 +0000 (15:23 +0200)]
nvme: set file permission for keyfile to owner only

Since this file contains secret enforce the read/write permission
limited to the owner only.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme: export tls keys honoring version and hmac
Daniel Wagner [Thu, 24 Oct 2024 13:21:42 +0000 (15:21 +0200)]
nvme: export tls keys honoring version and hmac

Export the keys with the correct encoding scheme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvmf-keys: add udev rule to import tls keys
Daniel Wagner [Thu, 24 Oct 2024 13:07:54 +0000 (15:07 +0200)]
nvmf-keys: add udev rule to import tls keys

Load keys to the keyring when the nvme-tcp module is loaded.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agodocs: update TLS options
Daniel Wagner [Wed, 23 Oct 2024 09:39:32 +0000 (11:39 +0200)]
docs: update TLS options

With the added support to also accept the key via the command line
update the documentation accordingly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agofabrics: add support to connect to accept a PSK command line
Daniel Wagner [Thu, 10 Oct 2024 07:04:51 +0000 (09:04 +0200)]
fabrics: add support to connect to accept a PSK command line

Extend the connect command also to accept the pre-shared key via command
line. Obviously, this is not recommended to use for a production system
but for testing this is a simple way to get a setup working.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agofabrics: add support to connect to accept a configuration
Daniel Wagner [Wed, 23 Oct 2024 08:45:54 +0000 (10:45 +0200)]
fabrics: add support to connect to accept a configuration

The connect-all command accepts JSON configuration but not
the connect command. connect-all will try to connect to all
possible resources, which includes creating discovery controllers.
This might not always needed or wanted.

The connect command will only connect to the controllers
listed in the configuration file and doesn't to any
additional discovery at all.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme: use unsigned char for hmac and identity
Daniel Wagner [Thu, 10 Oct 2024 07:02:16 +0000 (09:02 +0200)]
nvme: use unsigned char for hmac and identity

The spec is limiting the size of both variables to one byte, thus there
is no need to use wider types.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agobuild: bump libnvme wrap
Daniel Wagner [Thu, 24 Oct 2024 09:36:11 +0000 (11:36 +0200)]
build: bump libnvme wrap

Fetch TLS API changes.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
8 months agonvme-print: Add Sanitize Media Verification Event in PEL log
Francis Pravin [Mon, 28 Oct 2024 06:27:13 +0000 (11:57 +0530)]
nvme-print: Add Sanitize Media Verification Event in PEL log

Add Sanitize Media Verification Event in Persistent Event Log.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
8 months agonetapp-ontapdev: add err msg for no ontapdevices
Martin George [Sun, 27 Oct 2024 17:40:19 +0000 (23:10 +0530)]
netapp-ontapdev: add err msg for no ontapdevices

Print an error message if no ontapdevices on the host.

Signed-off-by: Martin George <marting@netapp.com>
8 months agonetapp-smdev: add err msg for no smdevices
Martin George [Sun, 27 Oct 2024 17:36:10 +0000 (23:06 +0530)]
netapp-smdev: add err msg for no smdevices

Print an error message if no smdevices on the host.

Signed-off-by: Martin George <marting@netapp.com>
9 months agodoc: Add sanitize command emvs option
Francis Pravin [Fri, 25 Oct 2024 10:02:20 +0000 (15:32 +0530)]
doc: Add sanitize command emvs option

Add Enter Media Verification State (EVMS) option of Sanitize command.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
9 months agoocp: combine to use GUID length definitions
Tokunori Ikegami [Fri, 25 Oct 2024 01:57:45 +0000 (10:57 +0900)]
ocp: combine to use GUID length definitions

This reduces the duplicated GUID length 16 bytes definitions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agonvme: update tls_key() handling
Martin George [Wed, 16 Oct 2024 07:56:55 +0000 (13:26 +0530)]
nvme: update tls_key() handling

Few misc issues in current tls_key() implementation:

1) Additional blank line printed in err message if the keyfile
cannot be opened.

2) For export, nvme_scan_tls_keys() can return positive values too
for successful scenarios. So this currently leads to erroneous return
value handling.

3) For import, no return value checking for import_key() failure
scenarios.

4) For revoke, return appropriate error immediately when
nvme_revoke_tls_key() fails.

5) No helpful success message printed for all the options.

Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
9 months agonvme-print-stdout: print VERS bit of SANICAP field
Francis Pravin [Wed, 9 Oct 2024 13:37:57 +0000 (19:07 +0530)]
nvme-print-stdout: print VERS bit of SANICAP field

Print the newly added VERS bit of SANICAP field in Identify Controller
Data Structure. Also, changed the variable names as per spec.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
9 months agonvme: add EMVS support to sanitize command
Francis Pravin [Thu, 24 Oct 2024 05:07:19 +0000 (10:37 +0530)]
nvme: add EMVS support to sanitize command

Add Enter Media Verification State (EMVS) support to sanitize
command.
TP4152 - Post-Sanitize Media Verification 2024.04.01 Ratified.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
9 months agobuild: update libnvme wrap
Francis Pravin [Thu, 24 Oct 2024 04:18:47 +0000 (09:48 +0530)]
build: update libnvme wrap

Get EMVS support of sanitize command and SMVES enum.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
9 months agoocp: remove callback function cast
Tokunori Ikegami [Thu, 24 Oct 2024 01:39:49 +0000 (10:39 +0900)]
ocp: remove callback function cast

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agodoc: added commit conventions to contribution guidelines
paumr [Mon, 21 Oct 2024 16:27:22 +0000 (18:27 +0200)]
doc: added commit conventions to contribution guidelines

Show new contributors the project's commit guidelines

Signed-off-by: paumr <paum@bdisk.eu>
9 months agoocp: fix ocp-print-stdout.c indentation error
Tokunori Ikegami [Mon, 7 Oct 2024 15:43:47 +0000 (00:43 +0900)]
ocp: fix ocp-print-stdout.c indentation error

Fix also some build warnings.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: fix ocp-nvme.c indentation errors
Tokunori Ikegami [Mon, 7 Oct 2024 14:36:21 +0000 (23:36 +0900)]
ocp: fix ocp-nvme.c indentation errors

Also fix to use cpu_to_le64 to output __le64 values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: build ocp-nvme.c and ocp-telemetry-decode.c without json
Tokunori Ikegami [Sun, 6 Oct 2024 06:59:35 +0000 (15:59 +0900)]
ocp: build ocp-nvme.c and ocp-telemetry-decode.c without json

Still ocp-telemetry-decode.c includes json code so check CONFIG_JSON.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split TCG configuration log print codes
Tokunori Ikegami [Sun, 6 Oct 2024 12:13:15 +0000 (21:13 +0900)]
ocp: split TCG configuration log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split telemetry string log print codes
Tokunori Ikegami [Sun, 6 Oct 2024 12:11:54 +0000 (21:11 +0900)]
ocp: split telemetry string log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split device capabilities log print codes
Tokunori Ikegami [Sun, 20 Oct 2024 16:36:03 +0000 (01:36 +0900)]
ocp: split device capabilities log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split error recovery log print codes
Tokunori Ikegami [Sun, 20 Oct 2024 16:35:02 +0000 (01:35 +0900)]
ocp: split error recovery log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split unsupported requirement log print codes
Tokunori Ikegami [Sun, 20 Oct 2024 16:33:41 +0000 (01:33 +0900)]
ocp: split unsupported requirement log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split latency monitor log print codes
Tokunori Ikegami [Sun, 20 Oct 2024 16:32:07 +0000 (01:32 +0900)]
ocp: split latency monitor log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: move ocp telemetry log print function into ocp-print
Tokunori Ikegami [Sun, 6 Oct 2024 01:22:10 +0000 (10:22 +0900)]
ocp: move ocp telemetry log print function into ocp-print

Still the ocp-telemetry-decode used by print functions combined json code.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split smart extended log print codes
Tokunori Ikegami [Sun, 29 Sep 2024 14:19:10 +0000 (23:19 +0900)]
ocp: split smart extended log print codes

Move into ocp-print-stdout.c and ocp-print-json.c.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp: split ocp-fw-activation-history print codes
Tokunori Ikegami [Fri, 27 Sep 2024 16:22:57 +0000 (01:22 +0900)]
ocp: split ocp-fw-activation-history print codes

Moved into print stdout and json files.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoplugins: update meson.build file to always build ocp plugin
Tokunori Ikegami [Fri, 20 Sep 2024 13:15:49 +0000 (22:15 +0900)]
plugins: update meson.build file to always build ocp plugin

Still ocp-nvme.c and some other ocp commands files depended on json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agoocp-print: move json code into separate files
Tokunori Ikegami [Thu, 19 Sep 2024 16:10:10 +0000 (01:10 +0900)]
ocp-print: move json code into separate files

At first only hwcomp print code moved.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
9 months agonvme-print-json: display only verbose output
Martin George [Thu, 17 Oct 2024 11:57:18 +0000 (17:27 +0530)]
nvme-print-json: display only verbose output

Having separate regular & verbose outputs makes more sense for the
stdout outputs, and not necessarily for the JSON outputs. So let's
make things simpler by having the JSON output everything, and
nothing short.

Suggested-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin George <marting@netapp.com>
9 months agoocp-nvme: ocp plugin version update
Steven Seungcheol Lee [Tue, 15 Oct 2024 05:57:14 +0000 (14:57 +0900)]
ocp-nvme: ocp plugin version update

Add missing version update after adding changes for ocp spec 2.5

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
9 months agonvme-print: print KV command set page header
rick [Fri, 23 Aug 2024 12:45:55 +0000 (14:45 +0200)]
nvme-print: print KV command set page header

Let stdout_effects_log_page handle NVME_CSI_KV as well.

Signed-off-by: laiaferrer <laiaferrermoser@gmail.com>
9 months agodoc: show where self-test results can be found
paumr [Fri, 4 Oct 2024 09:29:13 +0000 (11:29 +0200)]
doc: show where self-test results can be found

Point the reader of the device-self-test documentation to
the command used for querying the test results.

Signed-off-by: paumr <paum@bdisk.eu>
9 months agoplugins/memblaze: fix a wrong id on smart-log-add
jinhua.huang [Tue, 15 Oct 2024 10:22:29 +0000 (18:22 +0800)]
plugins/memblaze: fix a wrong id on smart-log-add

Modify 0xB8 to 0xDF

Signed-off-by: jinhua.huang <jinhua.huang@memblaze.com>