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.
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.
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.
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>
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>
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>
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>
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.
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.
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.
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>
Greg Joyce [Fri, 16 Aug 2024 17:29:16 +0000 (12:29 -0500)]
plugins/sed: add sid password change
The existing ioctl to change password only updated the admin1 password.
Add using a new ioctl IOC_OPAL_SET_SID_PW to also update the sid password
so that sid and admin1 passwords are kept in sync.
Steven Seungcheol Lee [Mon, 7 Oct 2024 11:17:48 +0000 (20:17 +0900)]
ocp-nvme: Add LMDATA-37 for Latency Monitor Log
Datacenter NVMe SSD Specification v2.5
Log Identifier C3h
[447:436] Latency Monitor Debug Telemetry Log Size
This is the number of Dwords in the Latency Monitor Debug Log.
This value is in Dwords.
little endian order print
Signed-off-by: Hyuntae Kim <h1219.kim@samsung.com> Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
jeff-lien-wdc [Mon, 7 Oct 2024 17:27:53 +0000 (12:27 -0500)]
wdc: Fix for Reading WDC C2 Vendor Unique Log Page
In cases where nvme drives are connected via a PCIe
switch, the pci vendor and device id are unable to
be read. This causes a failure when reading values
in the WDC C2 log page needed for the get-drive-status
wdc plugin command.
jeff-lien-wdc [Mon, 12 Aug 2024 17:24:48 +0000 (12:24 -0500)]
ocp: Fixes for OCP 2.5 Telemetry DA1 FIFO Event Parsing
This commit fixes several issues related to parsing
the Telemetry DA 1 and 2 Event FIFO's.
Fixes parsing of VU Event Data.
Added checking for VU data.
Removed the vu_event_identifier field from the debug
event class structs since it's not guaranteed to be there.
Added nvme_ocp_common_dbg_evt_class_vu_data to be used
to access the VU data.
Added checking for NULL pointers
Added a check for the end of the Event FIFO entries that will
break from the while loop when detected.
Fixed lines longer then 100 columns.
Fixed other miscellaneous errors flagged
by checkpatch.pl.
Fixed "Suspicious sizeof offset in a pointer
arithmetic expression." errors flagged by Code
scanning.
Fixed loop index size error
Fixed LE variable declarations and conversion issues
Fixed vu data size errors
Make variable names more descriptive
Minsik Jeon [Wed, 2 Oct 2024 08:18:59 +0000 (17:18 +0900)]
nvme: Support show-regs for nvmeof
Get properties only at offsets that support nvme fabric registers.
Since crto was not found in the nvmeof spec, it is removed.
Also, NSSR is only optional register. If the device is not supported by
the optional register, the error is ignored.
Reviewed-by: Steven Seungcheol <sc108.lee@samsung.com> Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
When the noraml format is specified without -t option to
ocp internal-log command, the command ends abnormally with
segmentation fault.
This commit fixes the option handling.
The changed-ns-list-log command currently prints nothing for
scenarios where there are no changed ns in the log data. Print a
meaningful message for the same.