Hannes Reinecke [Fri, 15 Nov 2024 07:25:34 +0000 (08:25 +0100)]
sed: add '--read-only' to 'sed initialize'
By default 'sed initialize' will set the entire disk to read/write
locked, ie no access is possible. That is all fine if the BIOS supports
TCG Opal, as then the BIOS can unlock the drive before access.
But for BIOS _not_ supporting TCG Opal this results in an inaccessible
drive, and requires the user to use a different drive to boot and
unlock the SED device.
This patch adds a flag '--read-only' to 'nvme sed initlialize' such
that the 'read-lock enable' flag is not set for the locking range,
and the device continues to be readable by the BIOS for booting.
Nitesh Shetty [Fri, 29 Nov 2024 06:07:16 +0000 (11:37 +0530)]
nvme: plugins/fdp, check endurance group identifier
For FDP options such as stats and events, default endurance identifier 0
is used which results in error.
This patch returns error for missing endurance group identifier from
user.
Tomas Bzatek [Tue, 3 Dec 2024 16:23:15 +0000 (17:23 +0100)]
nbft: Report proper error codes from discover_from_nbft()
In case of a connection failure of any SSNS records that are not
marked as 'unavailable', report proper error code so that nvme-cli
callers may retry the operation.
The semantics of most functions is to return 0 zero for success
and negative errno numbers in case of an error.
Steven Seungcheol Lee [Fri, 6 Dec 2024 10:39:41 +0000 (19:39 +0900)]
build: bump libnvme wrap
types: Update id-ctrl field based on NVMe 2.1 spec
new fields are added on id-ctrl structure
Boot Partition Capabilities (BPCAP)
NVM Subsystem Shutdown Latency (NSSL)
Power Loss Signaling Information (PLSI)
Controller Reachability Capabilities (CRCAP)
Key Per I/O Capabilities (KPIOC)
Maximum Processing Time for Firmware Activation Without Reset (MPTFAWR)
Command Quiesce Time (CQT)
Recommended Host-Initiated Refresh Interval (RHIRI)
Host-Initiated Refresh Time (HIRT)
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Steven Seungcheol Lee [Mon, 2 Dec 2024 02:47:43 +0000 (11:47 +0900)]
ocp: TCG Configuration Log field added ocp v2.6
Add Number of Namespace Provisioned Locking Objects Extended(TCGL-23)
remove reserved area prints (Shall be cleared to zero)
reserved area field name modified by byte address
remove 0x from rsvd area stdout print (aligned with json)
0x%d prints wrong way to print, so follow json print logic
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
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>
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>
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.
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")
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>
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.
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>
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.