]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
6 months agoutil: introduce int56_to_long() type conversion helper
Tokunori Ikegami [Fri, 3 Jan 2025 13:15:54 +0000 (22:15 +0900)]
util: introduce int56_to_long() type conversion helper

This is to remove unnecessary mask with 0x00FFFFFFFFFFFFFF.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoocp-print: use int48_to_long() to print 48 bits values
Tokunori Ikegami [Fri, 3 Jan 2025 13:14:10 +0000 (22:14 +0900)]
ocp-print: use int48_to_long() to print 48 bits values

This is to reduce unnecessary mask with 0x0000FFFFFFFFFFFF.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoocp: remove unnecessary 64 bits mask
Tokunori Ikegami [Fri, 3 Jan 2025 11:12:20 +0000 (20:12 +0900)]
ocp: remove unnecessary 64 bits mask

Since the 64 bits variables not necessary to mask by 64 bits.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoocp: use struct nvme_timestamp type for FAHE-5 timestamp field
Tokunori Ikegami [Fri, 3 Jan 2025 11:07:44 +0000 (20:07 +0900)]
ocp: use struct nvme_timestamp type for FAHE-5 timestamp field

Since the field defined by the NVMe timestamp feature.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agonvme-print: move obj_add_* definitions into util/json.h
Tokunori Ikegami [Fri, 3 Jan 2025 12:04:43 +0000 (21:04 +0900)]
nvme-print: move obj_add_* definitions into util/json.h

Also use the same prefix json_object_add_*.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agonvme: fix to use NVME_VAL() for CQ entry status field filter
Tokunori Ikegami [Thu, 2 Jan 2025 13:41:41 +0000 (22:41 +0900)]
nvme: fix to use NVME_VAL() for CQ entry status field filter

Previously used incorrectly NVME_GET() but not shifted the masked values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agonvme-print-json: update id-ctrl print code to use libnvme definition
Tokunori Ikegami [Tue, 31 Dec 2024 15:16:44 +0000 (00:16 +0900)]
nvme-print-json: update id-ctrl print code to use libnvme definition

Use libnvme register definitions instead of the shift operator.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agonvme-print-json: update register print code to use libnvme definition
Tokunori Ikegami [Tue, 31 Dec 2024 13:18:32 +0000 (22:18 +0900)]
nvme-print-json: update register print code to use libnvme definition

Use libnvme register definitions instead of the shift operator.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoutil: clean up json.h file
Tokunori Ikegami [Sat, 21 Dec 2024 14:13:41 +0000 (23:13 +0900)]
util: clean up json.h file

Since some json macros can be used without json as common.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agodapustor: avoid sprinkling ifdefs
Tokunori Ikegami [Sat, 21 Dec 2024 13:19:40 +0000 (22:19 +0900)]
dapustor: avoid sprinkling ifdefs

Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agonetapp: avoid sprinkling ifdefs
Tokunori Ikegami [Sat, 21 Dec 2024 13:16:34 +0000 (22:16 +0900)]
netapp: avoid sprinkling ifdefs

Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agointel: avoid sprinkling ifdefs
Tokunori Ikegami [Sat, 21 Dec 2024 13:11:34 +0000 (22:11 +0900)]
intel: avoid sprinkling ifdefs

Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agomicron: avoid sprinkling ifdefs
Tokunori Ikegami [Sat, 21 Dec 2024 12:53:00 +0000 (21:53 +0900)]
micron: avoid sprinkling ifdefs

Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoutil: cast to use empty function json_object_array_add parameter k
Tokunori Ikegami [Sat, 21 Dec 2024 12:07:51 +0000 (21:07 +0900)]
util: cast to use empty function json_object_array_add parameter k

This is to prevent the build warning without json.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agowdc: enable wdc-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Sat, 21 Dec 2024 11:07:54 +0000 (20:07 +0900)]
wdc: enable wdc-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agossstc: build plugin not depended on json without json
Tokunori Ikegami [Sat, 21 Dec 2024 07:58:35 +0000 (16:58 +0900)]
ssstc: build plugin not depended on json without json

ssstc plugin does not use json so no need to check the build dependency.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoseagate: enable seagate-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Sat, 21 Dec 2024 07:49:12 +0000 (16:49 +0900)]
seagate: enable seagate-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoscaleflux: enable sfx-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Fri, 20 Dec 2024 17:10:28 +0000 (02:10 +0900)]
scaleflux: enable sfx-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
6 months agoscaleflux: use PRIu64 printf format string instead of llu
Tokunori Ikegami [Fri, 20 Dec 2024 17:46:18 +0000 (02:46 +0900)]
scaleflux: use PRIu64 printf format string instead of llu

To fix the cross compiler build fails and some indentation errors also.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonvidia: build plugin not depended on json without json
Tokunori Ikegami [Fri, 20 Dec 2024 16:34:27 +0000 (01:34 +0900)]
nvidia: build plugin not depended on json without json

nvidia plugin does not use json so no need to check the build dependency.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonetapp: enable netapp-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Fri, 20 Dec 2024 16:25:35 +0000 (01:25 +0900)]
netapp: enable netapp-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonbft: enable nbft-plugin.c build without json-c dependencies checking
Tokunori Ikegami [Fri, 20 Dec 2024 15:46:44 +0000 (00:46 +0900)]
nbft: enable nbft-plugin.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoplugins: introduce OPT_FLAG_JSON for command option json
Tokunori Ikegami [Fri, 20 Dec 2024 15:23:08 +0000 (00:23 +0900)]
plugins: introduce OPT_FLAG_JSON for command option json

This is to not need ugly ifdefs everywhere.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoamzn: avoid sprinkling ifdefs and use flags
Tokunori Ikegami [Fri, 20 Dec 2024 14:51:11 +0000 (23:51 +0900)]
amzn: avoid sprinkling ifdefs and use flags

Use flags instead of cfg.output_format.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoFixed latency_monitor_feature_enable to be 01h as per OCP spec v2.0
mh2022-meta [Wed, 17 Jul 2024 02:08:34 +0000 (19:08 -0700)]
Fixed latency_monitor_feature_enable to be 01h as per OCP spec v2.0

7 months agoocp: add ocp_get_log_simple() to set UUID index
Tokunori Ikegami [Tue, 10 Dec 2024 15:32:26 +0000 (00:32 +0900)]
ocp: add ocp_get_log_simple() to set UUID index

The index is required by the OCP specification.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agobuild: bump wrap
Daniel Wagner [Fri, 20 Dec 2024 11:10:23 +0000 (12:10 +0100)]
build: bump wrap

Update build dependencies.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
7 months agoplugin/lm: Introduce Live Migration plugin
Nate Thornton [Fri, 8 Nov 2024 11:50:01 +0000 (03:50 -0800)]
plugin/lm: Introduce Live Migration plugin

Implementation of TP 4159 PCIe Infrastructure for Live Migration plugin.
Includes command support for Track Send, Migration Receive, Migration
Send, and Controller Data Queue; Identify Controller LM related fields;
Bash and ZSH completions.

Changes are isolated to the User Data Migration subset, with Track
Memory functionality deferred to a future commit.

Signed-off-by: Nate Thornton <n.thornton@samsung.com>
7 months agoocp-nvme: Add a different formatting for JSON output
Stephen Bates [Fri, 22 Nov 2024 20:49:35 +0000 (13:49 -0700)]
ocp-nvme: Add a different formatting for JSON output

The current OCP JSON format for the SMART extended log page is not
condusive to metric collection via tools like Prometheus. So we add a
new output mode that uses all lower case and underscores (instead of
spaces). This should help with metric collection. At the same time we
clean up some of the field names. We add a new argument
(--output-format-version) to allow us to select which output version
we want. Documentation updated to reflect this change and mark this as
experimental.

Fixes #2577.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
7 months agoPlugin: ScaleFlux Adding Status Command
Ben Reese [Tue, 17 Dec 2024 20:55:53 +0000 (15:55 -0500)]
Plugin: ScaleFlux Adding Status Command

Adding ScaleFlux status command, equivalent to vendor unique utility.

Signed-off-by: Ben Reese <5884008+benreese0@users.noreply.github.com>
7 months agoPlugin: ScaleFlux Use NVME_NSID_ALL
Jayden Stenfort [Mon, 16 Dec 2024 19:57:55 +0000 (14:57 -0500)]
Plugin: ScaleFlux Use NVME_NSID_ALL

Using NVME_NSID_ALL macro instead of 0xffffffff magic number

Signed-off-by: Jayden Stenfort <127808534+A-Fellow-Comrade@users.noreply.github.com>
7 months agoPlugin: ScaleFlux Spelling&Typo Fixes
Jayden Stenfort [Mon, 16 Dec 2024 19:53:57 +0000 (14:53 -0500)]
Plugin: ScaleFlux Spelling&Typo Fixes

Fixing spelling and typos

Signed-off-by: Jayden Stenfort <127808534+A-Fellow-Comrade@users.noreply.github.com>
7 months agoPlugin: ScaleFlux Seperating Types
Jayden Stenfort [Sat, 14 Dec 2024 01:04:15 +0000 (20:04 -0500)]
Plugin: ScaleFlux Seperating Types

Moving types associated with ScaleFlux into new file sfx-types.h

Signed-off-by: Jayden Stenfort <127808534+A-Fellow-Comrade@users.noreply.github.com>
7 months agomicron: enable micron-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Thu, 19 Dec 2024 16:54:00 +0000 (01:54 +0900)]
micron: enable micron-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agointel: enable intel-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Thu, 19 Dec 2024 15:37:59 +0000 (00:37 +0900)]
intel: enable intel-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agohuawei: enable huawei-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Thu, 19 Dec 2024 15:20:08 +0000 (00:20 +0900)]
huawei: enable huawei-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agofdp: build plugin not depended on json without json
Tokunori Ikegami [Thu, 19 Dec 2024 15:08:43 +0000 (00:08 +0900)]
fdp: build plugin not depended on json without json

fdp plugin does not use json so no need to check the build dependency.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agodell: build plugin not depended on json without json
Tokunori Ikegami [Thu, 19 Dec 2024 15:04:19 +0000 (00:04 +0900)]
dell: build plugin not depended on json without json

dell plugin does not use json so no need to check the build dependency.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agodapustor: enable dapustor-nvme.c build without json-c dependencies checkin
Tokunori Ikegami [Thu, 19 Dec 2024 14:57:52 +0000 (23:57 +0900)]
dapustor: enable dapustor-nvme.c build without json-c dependencies checkin

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoamzn: use PRIu64 printf format string instead of llu
Tokunori Ikegami [Wed, 18 Dec 2024 17:34:22 +0000 (02:34 +0900)]
amzn: use PRIu64 printf format string instead of llu

To fix the cross compiler build fails.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoamzn: enable amzn-nvme.c build without json-c dependencies checking
Tokunori Ikegami [Wed, 18 Dec 2024 15:51:07 +0000 (00:51 +0900)]
amzn: enable amzn-nvme.c build without json-c dependencies checking

Only build json print codes with CONFIG_JSONC build option instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonvme: disable output-format option json value without json-c
Tokunori Ikegami [Wed, 18 Dec 2024 16:11:10 +0000 (01:11 +0900)]
nvme: disable output-format option json value without json-c

Since only json print codes work with the json-c library.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agodoc: Add write zeroes command namespace-zeroes option
Francis Pravin [Wed, 18 Dec 2024 05:10:40 +0000 (10:40 +0530)]
doc: Add write zeroes command namespace-zeroes option

Add Namespace Zeroes (NSZ) option of Write Zeroes command.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
7 months agoocp: add set-enable-ieee1667-silo command
Tokunori Ikegami [Sun, 15 Dec 2024 14:22:55 +0000 (23:22 +0900)]
ocp: add set-enable-ieee1667-silo command

The command sets enable IEEE1667 silo.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoocp: add ocp-types.h file for OCP requirements definitions
Tokunori Ikegami [Sun, 15 Dec 2024 14:14:01 +0000 (23:14 +0900)]
ocp: add ocp-types.h file for OCP requirements definitions

This is for the OCP requirement fields and bits definitions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonvme-wrap: add nvme_cli_set_features() API function
Tokunori Ikegami [Sun, 15 Dec 2024 14:10:40 +0000 (23:10 +0900)]
nvme-wrap: add nvme_cli_set_features() API function

The wrap API supported for MI interface.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agodoc: remove TLS documentation
Daniel Wagner [Fri, 29 Nov 2024 13:14:49 +0000 (14:14 +0100)]
doc: remove TLS documentation

We started to collect these types of documetation in the associated
nvme-cli wiki. Thus remove this file.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
7 months agosed: add '--read-only' to 'sed initialize'
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.

Signed-off-by: Hannes Reinecke <hare@suse.de>
7 months agoplugins: build plugins not depended on json without json
Tokunori Ikegami [Sat, 14 Dec 2024 13:30:47 +0000 (22:30 +0900)]
plugins: build plugins not depended on json without json

Some plugins do not use json so no need to check the build dependency.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoocp: update internal-log command telemetry type description
Tokunori Ikegami [Fri, 13 Dec 2024 16:19:23 +0000 (01:19 +0900)]
ocp: update internal-log command telemetry type description

Add host0 and host1 help documentation description.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoocp: delete internal-log command telemetry type none value definition
Tokunori Ikegami [Fri, 13 Dec 2024 15:37:06 +0000 (00:37 +0900)]
ocp: delete internal-log command telemetry type none value definition

Since the type none value never set by the command handling.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agonvme: plugins/fdp, check endurance group identifier
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.

Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
7 months agoprint: OACS Host Managed Live Migration Support (HMLMS)
Nate Thornton [Thu, 12 Dec 2024 07:52:33 +0000 (23:52 -0800)]
print: OACS Host Managed Live Migration Support (HMLMS)

Additional HMLMS bit in OACS field (stdout)

Signed-off-by: Nate Thornton <n.thornton@samsung.com>
7 months agobuild: bump libnvme wrap
Nate Thornton [Thu, 12 Dec 2024 07:41:46 +0000 (23:41 -0800)]
build: bump libnvme wrap

Update libnvme wrap to latest to pick up Live Migration types & ioctls

Signed-off-by: Nate Thornton <n.thornton@samsung.com>
7 months agonbft: Report proper error codes from discover_from_nbft()
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.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
7 months agotests: Use container image to run nightly tests
Dennis Maisenbacher [Mon, 11 Nov 2024 09:59:08 +0000 (09:59 +0000)]
tests: Use container image to run nightly tests

Using the pre-build linux-nvme/debian.python container to avoid
installing dependencies every time which fails occasionally.

Also drop clean up steps as this is part of the self-hosted runner
now.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: Fix `subprosess.call` calls
Dennis Maisenbacher [Fri, 8 Nov 2024 09:29:17 +0000 (09:29 +0000)]
tests: Fix `subprosess.call` calls

Don't use stdout=PIPE with subprocess.call as noted in the documentation:
https://docs.python.org/3/library/subprocess.html#subprocess.call

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: Refactor prints
Dennis Maisenbacher [Fri, 8 Nov 2024 09:25:29 +0000 (09:25 +0000)]
tests: Refactor prints

Remove unused prints and add some informative prints.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: Remove unneeded sleep statements
Dennis Maisenbacher [Fri, 8 Nov 2024 08:10:26 +0000 (08:10 +0000)]
tests: Remove unneeded sleep statements

Removing sleep statements, which improves the test cases runtime.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: use current LBA format as I/O block size
Dennis Maisenbacher [Mon, 25 Nov 2024 12:42:02 +0000 (12:42 +0000)]
tests: use current LBA format as I/O block size

When running I/O use the current LBA format as default block size.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: Use json output for parsing
Dennis Maisenbacher [Fri, 8 Nov 2024 07:10:47 +0000 (07:10 +0000)]
tests: Use json output for parsing

To make the parsing of nvme cmd output easier use the json output when
possible.

Refactoring code snippets that needed to be touched when adjusing for
json output.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agotests: Introduce configurable nvme binary path
Dennis Maisenbacher [Wed, 6 Nov 2024 15:31:32 +0000 (15:31 +0000)]
tests: Introduce configurable nvme binary path

Introducing the `nvme_bin` config to point to a different nvme-cli
binary.

With this change all nvme cmd strings are reworked for uniformity.
This includes using f-strings and expanding short options into long
options.

Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
7 months agonvme: add Namespace Zeroes support to Write Zeroes command
Francis Pravin [Mon, 9 Dec 2024 04:46:53 +0000 (10:16 +0530)]
nvme: add Namespace Zeroes support to Write Zeroes command

Added the Namespace Zeroes (NSZ) support to Write Zeroes command.
Also, fixed the dtype limitation (bit 22:20).
TP4160 - WZSL Limit Modification

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agoprint: id-ctrl print updated based on NVMe v2.1
Steven Seungcheol Lee [Fri, 6 Dec 2024 11:01:37 +0000 (20:01 +0900)]
print: id-ctrl print updated based on NVMe v2.1

new fields, missing fields print added

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agoprint: Add missing fid to string
Steven Seungcheol Lee [Sat, 7 Dec 2024 05:09:04 +0000 (14:09 +0900)]
print: Add missing fid to string

NVME_FEAT_FID_CTRL_DATA_QUEUE : Controller Data Queue

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agobuild: bump libnvme wrap
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>
7 months agoocp: TCG Configuration Log field added ocp v2.6
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>
7 months agons_descs: prevent buffer overrun and memory corruption
Maurizio Lombardi [Fri, 6 Dec 2024 13:17:06 +0000 (14:17 +0100)]
ns_descs: prevent buffer overrun and memory corruption

nsdescs should point to an allocated memory of size
NVME_IDENTIFY_DATA_SIZE bytes, not "sizeof(*void)" bytes.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
7 months agoocp: set UUID index to get extended smart log
Tokunori Ikegami [Tue, 3 Dec 2024 15:59:35 +0000 (00:59 +0900)]
ocp: set UUID index to get extended smart log

The index is required by the OCP specification.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
7 months agoplugins/ocp: fixed crash in telemetry string log output format json
Karthik Balan karthik.b82@samsung.com [Wed, 4 Dec 2024 14:10:04 +0000 (19:40 +0530)]
plugins/ocp: fixed crash in telemetry string log output format json

Fixed the code to handle the json output crash
Disabled debug logs output when parsing telemetry-string-log data

Signed-off-by: Karthik Balan karthik.b82@samsung.com <karthik.b82@samsung.com>
Reviewed-by: Arunpandian J <arun.j@samsung.com>
7 months agonvme: Host-init telemetry log mcda field added
Steven Seungcheol Lee [Thu, 5 Dec 2024 00:20:31 +0000 (09:20 +0900)]
nvme: Host-init telemetry log mcda field added

Maximum Created Data Area for Telemetry Host-Initiated Log creation
This will ignored by contorller when MCDAS bit is 0 from supported log

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agobuild: bump libnvme wrap
Steven Seungcheol Lee [Thu, 5 Dec 2024 00:32:29 +0000 (09:32 +0900)]
build: bump libnvme wrap

mi: telemetry log update based NVMe v2.1

This update allow to call below APIs
  nvme_get_log_create_telemetry_host
  nvme_mi_admin_get_log_create_telemetry_host_mcda

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
7 months agonvme-print-stdout: print MAXWZD and NSZS bits of ONCS field
Francis Pravin [Wed, 4 Dec 2024 12:10:59 +0000 (17:40 +0530)]
nvme-print-stdout: print MAXWZD and NSZS bits of ONCS field

Print the newly added MAXWZD and NSZS bits of ONCS field in Identify
Controller Data Structure.
TP4160 - WZSL Limit Modification

Signed-off-by: Francis Pravin <francis.p@samsung.com>
7 months agobuild: bump libnvme wrap
Francis Pravin [Wed, 4 Dec 2024 12:03:58 +0000 (17:33 +0530)]
build: bump libnvme wrap

b50a076 - types: add enum for the fields added in TP4160

Signed-off-by: Francis Pravin <francis.p@samsung.com>
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>