]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
9 months agoplugins/dapustor: smart-log-add fix
Xiaoyuan Zhang [Wed, 9 Oct 2024 09:47:23 +0000 (17:47 +0800)]
plugins/dapustor: smart-log-add fix

Output Extended Additional SMART raw binary data if it exists.
Add the missing 'temp_since_bootup' field for json output.

Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
9 months agoplugins/sed: add sid password change
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.

Signed-off-by: Greg Joyce <gjoyce@linux.ibm.com>
9 months agoplugins/solidigm: Automatic retry smaller log chunk size.
Leonardo da Cunha [Tue, 1 Oct 2024 22:28:20 +0000 (15:28 -0700)]
plugins/solidigm: Automatic retry smaller log chunk size.

Retry to retrieve telemetry and PEL with smaller chunk size, because
some systems are failing to retrieve telemetry in 256KB chunks.

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
9 months agoocp-nvme: Add LMDATA-37 for Latency Monitor Log
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>
9 months agoocp-nvme: remove ocp log page version checking
Steven Seungcheol Lee [Mon, 7 Oct 2024 10:23:13 +0000 (19:23 +0900)]
ocp-nvme: remove ocp log page version checking

For supporting ocp 2.5 and legacy version
if we want to check the log version,
we need to get DSSD(OCP) Spec version from ocp smart.

example) Latency Monitor (Log Identifier C3h)
OCP 2.0 Log Page version : 0x1
OCP 2.5 Log Page version : 0x4

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
9 months agowdc: Fix for Reading WDC C2 Vendor Unique Log Page
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.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
9 months agoocp: Fixes for OCP 2.5 Telemetry DA1 FIFO Event Parsing
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

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
9 months agonvme-print-json: update JSON verbose output for nvm-id-ctrl
Martin George [Thu, 3 Oct 2024 17:20:24 +0000 (22:50 +0530)]
nvme-print-json: update JSON verbose output for nvm-id-ctrl

Update the nvme-id-ctrl JSON verbose output for parity with this
command's normal verbose output.

Signed-off-by: Martin George <marting@netapp.com>
9 months agowdc: Add Support for SN5100S
jeff-lien-wdc [Wed, 2 Oct 2024 18:48:50 +0000 (13:48 -0500)]
wdc: Add Support for SN5100S

This commit will add support for the SN51000S drive
which includes the following pci device ids:
0x5061, 0x5062, 0x5063.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
9 months agonvme: Support show-regs for nvmeof
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>
9 months agoocp: fix option handling in internal-log
Tetsuya TAKAHASHI [Fri, 27 Sep 2024 01:50:54 +0000 (10:50 +0900)]
ocp: fix option handling in internal-log

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.

Signed-off-by: Tetsuya TAKAHASHI <tetsuya20.takahashi@kioxia.com>
9 months agoDocumentation: Added solidigm plugin commands
Leonardo da Cunha [Wed, 18 Sep 2024 03:36:46 +0000 (20:36 -0700)]
Documentation: Added solidigm plugin commands

Added documentation to all current solidigm plugin commands

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
9 months agowdc: add support for SNTMP drive
Brandon Paupore [Mon, 30 Sep 2024 20:12:00 +0000 (15:12 -0500)]
wdc: add support for SNTMP drive

Adding an additional PCI Device ID (0x2761) to be recognized.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
9 months agobuild: use linux-nvme/ci-containers
Daniel Wagner [Tue, 1 Oct 2024 14:42:44 +0000 (16:42 +0200)]
build: use linux-nvme/ci-containers

Use the pre build containers from linux-nvme/ci-containers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
9 months agonvme-print: print NSSES field of CAP register
Francis Pravin [Mon, 30 Sep 2024 12:52:31 +0000 (18:22 +0530)]
nvme-print: print NSSES field of CAP register

Print the newly added NSSES field of CAP register.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
9 months agoocp: fix GUID output
Tetsuya TAKAHASHI [Fri, 27 Sep 2024 05:25:02 +0000 (14:25 +0900)]
ocp: fix GUID output

Some OCP commands are missing a high-order zero in each byte
of the output GUID.

This commit fixes the format specifier for the printf function.

Signed-off-by: Tetsuya TAKAHASHI <tetsuya20.takahashi@kioxia.com>
Signed-off-by: Koki Ueha <koki1.ueha@kioxia.com>
9 months agonvme-print-json: print controller register values in offset order
Francis Pravin [Wed, 25 Sep 2024 04:22:11 +0000 (09:52 +0530)]
nvme-print-json: print controller register values in offset order

Print the Controller Register valuse in order based on the offset.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
9 months agonvme-print-json: print CMBEBS and CMBSWTP in json format
Francis Pravin [Wed, 25 Sep 2024 04:17:31 +0000 (09:47 +0530)]
nvme-print-json: print CMBEBS and CMBSWTP in json format

Print the CMBEBS and CMBSWTP register in json forma

Signed-off-by: Francis Pravin <francis.p@samsung.com>
10 months agonvme-print-stdout: update changed-ns-list-log output
Martin George [Tue, 24 Sep 2024 10:51:48 +0000 (16:21 +0530)]
nvme-print-stdout: update changed-ns-list-log output

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.

Signed-off-by: Martin George <marting@netapp.com>
10 months agonvme: fix uninitialized value in error-log
Martin George [Sun, 22 Sep 2024 18:21:20 +0000 (23:51 +0530)]
nvme: fix uninitialized value in error-log

Valgrind complained about an "uninitialized value created by a
stack allocation" error while running the error-log command.
Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
10 months agonvme: fix to convert metadata size to native byte order
Tokunori Ikegami [Sun, 22 Sep 2024 01:47:40 +0000 (10:47 +0900)]
nvme: fix to convert metadata size to native byte order

The changes for create-ns, compare, read and write commands.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme-print: fix error information log page endianness error
Tokunori Ikegami [Sat, 21 Sep 2024 00:58:42 +0000 (09:58 +0900)]
nvme-print: fix error information log page endianness error

Convert the status and phase tag fields to native byte order at first.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agocompletions: add get-feature command changed option
Tokunori Ikegami [Fri, 20 Sep 2024 16:24:26 +0000 (01:24 +0900)]
completions: add get-feature command changed option

Separeted from the sel option changed value.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agodoc: add get-feature command changed option
Tokunori Ikegami [Fri, 20 Sep 2024 16:22:08 +0000 (01:22 +0900)]
doc: add get-feature command changed option

Separeted from the sel option changed value.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme: separate get NVME_GET_FEATURES_SEL_CHANGED definition
Tokunori Ikegami [Fri, 20 Sep 2024 16:12:12 +0000 (01:12 +0900)]
nvme: separate get NVME_GET_FEATURES_SEL_CHANGED definition

Since it is not defined in the NVMe specification.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme: use NVME_GET_FEATURES_SEL definitions
Tokunori Ikegami [Sun, 15 Sep 2024 06:07:58 +0000 (15:07 +0900)]
nvme: use NVME_GET_FEATURES_SEL definitions

These changes are to replace the hardcoded SEL values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme-print-stdout: use NVME_CTRL_OAES definitions
Tokunori Ikegami [Fri, 20 Sep 2024 14:54:02 +0000 (23:54 +0900)]
nvme-print-stdout: use NVME_CTRL_OAES definitions

This is to reduce the hard coded value usage.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agocompletion: add ocp set-telemetry-profile to zsh
Leonardo da Cunha [Fri, 20 Sep 2024 07:50:25 +0000 (09:50 +0200)]
completion: add ocp set-telemetry-profile to zsh

The zsh completion is missing the ocp set-telemetry-profile binding.

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
10 months agocompletion: add solidgm work-tracker binding
Leonardo da Cunha [Fri, 20 Sep 2024 07:51:09 +0000 (09:51 +0200)]
completion: add solidgm work-tracker binding

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
10 months agoplugins/solidigm: Added Workload Tracker Triggers and Wall Time
Leonardo da Cunha [Tue, 3 Sep 2024 23:11:47 +0000 (16:11 -0700)]
plugins/solidigm: Added Workload Tracker Triggers and Wall Time

Added Trigger configurations, Stopped converting timestamps to millisec,
added optional property to display wall clock column.

Signed-off-by: Leonardo da Cunha <leonardo.da.cunha@solidigm.com>
10 months agoocp: include util/types.h to use nvme_uint128_t
Tokunori Ikegami [Wed, 18 Sep 2024 15:28:49 +0000 (00:28 +0900)]
ocp: include util/types.h to use nvme_uint128_t

This is to fix nvme_uint128_t functions to work correctly.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: fix to set log data pointer allocated
Tokunori Ikegami [Wed, 18 Sep 2024 14:36:08 +0000 (23:36 +0900)]
ocp: fix to set log data pointer allocated

Previously the NULL pointer is set incorrectly.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme: use NVME_CHECK() to check get features select field value
Tokunori Ikegami [Sun, 15 Sep 2024 01:45:24 +0000 (10:45 +0900)]
nvme: use NVME_CHECK() to check get features select field value

Use the macro instead of comparing the long filed value definition.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agobuild: bump libnvme wrap
Tokunori Ikegami [Mon, 16 Sep 2024 12:10:29 +0000 (21:10 +0900)]
build: bump libnvme wrap

Include libnvme NVME_CHECK() definition addition.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: split ocp-hwcomp log
Tokunori Ikegami [Mon, 16 Sep 2024 11:59:30 +0000 (20:59 +0900)]
ocp: split ocp-hwcomp log

This is to reduce the ocp-nvme.c code size.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agocompletions: add ocp hardware-component-log command
Tokunori Ikegami [Sat, 7 Sep 2024 11:22:50 +0000 (20:22 +0900)]
completions: add ocp hardware-component-log command

The command lists component descriptions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agodoc: add ocp hardware-component-log command
Tokunori Ikegami [Sat, 7 Sep 2024 08:00:35 +0000 (17:00 +0900)]
doc: add ocp hardware-component-log command

The command lists component descriptions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add hwcomp log json output
Tokunori Ikegami [Sun, 1 Sep 2024 08:29:03 +0000 (17:29 +0900)]
ocp: add hwcomp log json output

Add struct hwcomp_desc_entry and fix id option value type error.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add hwcomp log command list option
Tokunori Ikegami [Sat, 31 Aug 2024 10:49:59 +0000 (19:49 +0900)]
ocp: add hwcomp log command list option

This is to list component descriptions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add hwcomp log command comp-id option
Tokunori Ikegami [Sat, 31 Aug 2024 07:46:37 +0000 (16:46 +0900)]
ocp: add hwcomp log command comp-id option

This is to filter the component descriptions.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add hwcomp dummy definition
Tokunori Ikegami [Sat, 31 Aug 2024 06:50:52 +0000 (15:50 +0900)]
ocp: add hwcomp dummy definition

This is for a debugging.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add support for hwcomp log page
Tokunori Ikegami [Mon, 16 Sep 2024 11:57:18 +0000 (20:57 +0900)]
ocp: add support for hwcomp log page

Note: Still json output not supported.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme: use NVME_CTRL_FNA definitions
Tokunori Ikegami [Mon, 16 Sep 2024 06:11:51 +0000 (15:11 +0900)]
nvme: use NVME_CTRL_FNA definitions

Replace the hardcoded values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonetapp-smdevices: print single device output too
Martin George [Fri, 13 Sep 2024 17:14:18 +0000 (22:44 +0530)]
netapp-smdevices: print single device output too

In addition to printing info of all smdevices on the host, provide
an option to print the output of the specified device alone.

Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
10 months agonetapp-smdevices: segregate print routines
Martin George [Fri, 13 Sep 2024 16:06:37 +0000 (21:36 +0530)]
netapp-smdevices: segregate print routines

Segregate printing the respective normal/column and json outputs
into separate routines for better readability.

Signed-off-by: Martin George <marting@netapp.com>
Tested-by: Clayton Skaggs <claytons@netapp.com>
10 months agoAdd Support for new SN655 PCI Device ID
jeff-lien-wdc [Thu, 12 Sep 2024 20:15:19 +0000 (15:15 -0500)]
Add Support for new SN655 PCI Device ID

Support was added for an additional PCI Device ID (0x2723)
for SN655 drives.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
10 months agonvme-print-json: extern json object add functions
Tokunori Ikegami [Mon, 9 Sep 2024 16:08:25 +0000 (01:08 +0900)]
nvme-print-json: extern json object add functions

Some additinal functions introduced and fix obj_add_uint_0nx error.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add SMART / health information extended log page version 4
Tokunori Ikegami [Tue, 3 Sep 2024 14:46:01 +0000 (23:46 +0900)]
ocp: add SMART / health information extended log page version 4

Add NVMe command set errata version and lowest permitted firmware revision.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add error recovery log page version 3
Tokunori Ikegami [Tue, 3 Sep 2024 17:55:17 +0000 (02:55 +0900)]
ocp: add error recovery log page version 3

Add panic count and previous panic IDs.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: add get-enable-ieee1667-silo command
Tokunori Ikegami [Sun, 8 Sep 2024 10:00:52 +0000 (19:00 +0900)]
ocp: add get-enable-ieee1667-silo command

The commands returns set of enable IEEE1667 silo.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agofabrics: fix incorrect access filename check
Martin George [Wed, 28 Aug 2024 08:33:55 +0000 (14:03 +0530)]
fabrics: fix incorrect access filename check

Config JSON file handling is currently broken due to an incorrect
access filename check. Fix it.

Signed-off-by: Martin George <marting@netapp.com>
10 months agonvme: use NVME_GET_FEATURES_SEL_SUPPORTED definition
Tokunori Ikegami [Sun, 8 Sep 2024 10:05:56 +0000 (19:05 +0900)]
nvme: use NVME_GET_FEATURES_SEL_SUPPORTED definition

This is to delete the hardcoded values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme-print-json: use _cleanup_free_
Tokunori Ikegami [Sat, 7 Sep 2024 13:25:59 +0000 (22:25 +0900)]
nvme-print-json: use _cleanup_free_

This is to delete the free function call.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoplugins/solidigm: fix use after free.
Maurizio Lombardi [Mon, 2 Sep 2024 15:43:03 +0000 (17:43 +0200)]
plugins/solidigm: fix use after free.

the "output" file descriptor is automatically closed when the function
returns; therefore we shouldn't explicitly call close() against it.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
10 months agoocp: fix ocp-nvme.c coding style errors
Tokunori Ikegami [Sun, 1 Sep 2024 14:16:13 +0000 (23:16 +0900)]
ocp: fix ocp-nvme.c coding style errors

Only fixed some errors found by the file changes.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: Change C9 function names to use c9 instead
Tokunori Ikegami [Sun, 1 Sep 2024 14:12:18 +0000 (23:12 +0900)]
ocp: Change C9 function names to use c9 instead

This is to unify c9 and C9 function names.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: fix to return c9 log page data error to open file
Tokunori Ikegami [Sun, 1 Sep 2024 14:02:58 +0000 (23:02 +0900)]
ocp: fix to return c9 log page data error to open file

Use _cleanup_fd_ function so delete close() call and goto statement.
Also fix some minor coding style errors around the code.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoocp: fix to set return value to get c9 log page data
Tokunori Ikegami [Sun, 1 Sep 2024 13:50:43 +0000 (22:50 +0900)]
ocp: fix to set return value to get c9 log page data

The value not set but checked the ret variable after the call.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme: update nvme_insert_tls_key_versioned() return handling
Martin George [Sun, 1 Sep 2024 11:51:47 +0000 (17:21 +0530)]
nvme: update nvme_insert_tls_key_versioned() return handling

Treat nvme_insert_tls_key_versioned() return value of zero as
errors too.

Signed-off-by: Martin George <marting@netapp.com>
10 months agonvme-print-stdout: add print_array function
Tokunori Ikegami [Sat, 31 Aug 2024 05:54:16 +0000 (14:54 +0900)]
nvme-print-stdout: add print_array function

To reduce the repeated print code for arrays.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agologging: add print_info function
Tokunori Ikegami [Sat, 31 Aug 2024 06:24:30 +0000 (15:24 +0900)]
logging: add print_info function

This is for debugging print.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agoutil: extern uint128_t_to_double() function
Tokunori Ikegami [Fri, 30 Aug 2024 18:49:45 +0000 (03:49 +0900)]
util: extern uint128_t_to_double() function

Use the function to calculate with the uint128_t value.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
10 months agonvme-print: sanitize error-log output
Martin George [Thu, 29 Aug 2024 06:01:13 +0000 (11:31 +0530)]
nvme-print: sanitize error-log output

Minor textual and formatting changes to the error-log output.

Signed-off-by: Martin George <marting@netapp.com>
10 months agoplugins/solidigm : Fixing vs-internal-log to generate identify per allocated namespace.
Haro Panosyan [Wed, 21 Aug 2024 23:38:03 +0000 (16:38 -0700)]
plugins/solidigm : Fixing vs-internal-log to generate identify per allocated namespace.

CNS 11h is for namespace data structures for allocated namespaces.
Earlier code was using attached namespaces. This fix is to generate
identify data structures per allocated namespace.

Signed-off-by: Haro Panosyan <haro.panosyan@solidigm.com>
11 months agonvme-print: added new fields for nvm_id_ns
Ankit Soni [Fri, 23 Aug 2024 10:43:46 +0000 (16:13 +0530)]
nvme-print: added new fields for nvm_id_ns

Added new fields from I/O Command Set Specific Identify Namespace
Data Structure CNS5 as per NVM Command Set Specification(Rev 1.1).

Signed-off-by: Ankit Soni <soni.ankit@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
11 months agobuild: update libnvme wrap
Ankit Soni [Fri, 23 Aug 2024 10:36:33 +0000 (16:06 +0530)]
build: update libnvme wrap

5585f06 - types: added new fields in nvme_nvme_id_ns

Signed-off-by: Ankit Soni <soni.ankit@samsung.com>
11 months agoplugins/fdp: bugfix error check to validate output format
Minsik Jeon [Wed, 21 Aug 2024 10:22:01 +0000 (19:22 +0900)]
plugins/fdp: bugfix error check to validate output format

The return value of validate_output_format functions is whether the
functions fails. So I fix to check the err variable.

Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
11 months agoplugins/wdc: fix json output for vs-nand-stats
Carl Moran [Fri, 16 Aug 2024 00:49:46 +0000 (17:49 -0700)]
plugins/wdc: fix json output for vs-nand-stats

Running nvme wdc vs-nand-stats will change the values of the user data fields
depending on output format used. In regular stdout, the ordering is TLC min,
TLC Max, SLC Min, SLC Max. However in json, the values get reassigned, what
was SLC Min in stdout will become TLC >

Regular format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# nvme wdc vs-nand-stats /dev/nvme0n1 | grep User\ Data
User Data Erase Counts - TLC Min 169
User Data Erase Counts - TLC Max 310
User Data Erase Counts - SLC Min 10719
User Data Erase Counts - SLC Max 11676

Json format (SLC Min, SLC Max, TLC Min, TLC Max)
[root@ /tmp/]# nvme wdc vs-nand-stats /dev/nvme0n1 -o json | grep User\ Data
"User Data Erase Counts - SLC Min" : 169,
"User Data Erase Counts - SLC Max" : 310,
"User Data Erase Counts - TLC Min" : 10719,
"User Data Erase Counts - TLC Max" : 11676,

The difference can be traced to how the array subscripts are being
used in the two output formats

stdout : https://t.ly/sRIDz

tlc_min == 0
tlc_max == 1
slc_min == 2
slc_max == 3

json : https://t.ly/pmU-m
slc_min = 0
slc_max = 1
tlc_min = 2
tlc_max = 3

With the patch, we rename the fields to be the same for both stdout & json.
Output comparison below

Regular format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# ./nvme wdc vs-nand-stats /dev/nvme0n1 | grep User\ Data
User Data Erase Counts - TLC Min 169
User Data Erase Counts - TLC Max 310
User Data Erase Counts - SLC Min 10719
User Data Erase Counts - SLC Max 11676

Json format (TLC Min, TLC Max, SLC Min, SLC Max)
[root@ /tmp/]# ./nvme wdc vs-nand-stats /dev/nvme0n1 -o json | grep User\ Data
"User Data Erase Counts - TLC Min":169,
"User Data Erase Counts - TLC Max":310,
"User Data Erase Counts - SLC Min":10719,
"User Data Erase Counts - SLC Max":11676,

Signed-off-by: Carl Moran<carl.moran1@meta.com>
11 months agonvme-print-stdout: use NVME_FEAT util definitions
Tokunori Ikegami [Mon, 19 Aug 2024 12:13:49 +0000 (21:13 +0900)]
nvme-print-stdout: use NVME_FEAT util definitions

Some NVME_FEAT definitions needed to add for FDP, etc.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
11 months agonvme-print: update subsys verbose outputs
Martin George [Sun, 18 Aug 2024 16:54:18 +0000 (22:24 +0530)]
nvme-print: update subsys verbose outputs

The current list-subsys & show-topology simple outputs are a
little crowded. Also the respective verbose options to both
these commands are a no-op at the moment. So move the iopolicy
and subsystype details to the respective verbose outputs instead
so that the simple outputs are restricted to displaying key subsys
details like subsys name & NQN alone.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonvme-print: add subsystype to the list-subsys output
Martin George [Sun, 18 Aug 2024 16:42:58 +0000 (22:12 +0530)]
nvme-print: add subsystype to the list-subsys output

The nvme list-subsys and show-topology outputs misses out on the
subsystype details. Add the same.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonetapp: print output for single device too
Martin George [Fri, 16 Aug 2024 13:35:13 +0000 (19:05 +0530)]
netapp: print output for single device too

In addition to printing info of all ontap devices on the host,
provide an option to print the output for the specified
device alone.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonetapp: segregate the print routines
Martin George [Fri, 16 Aug 2024 12:42:04 +0000 (18:12 +0530)]
netapp: segregate the print routines

Segregate printing the respective regular/normal and json outputs
into separate routines for better readability.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonetapp: fix uninitialized value from heap error
Martin George [Fri, 16 Aug 2024 11:42:44 +0000 (17:12 +0530)]
netapp: fix uninitialized value from heap error

Valgrind complained about an "uninitialized value created by a
heap allocation" error. Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonvme-print: print the new fields added in TP4142
Francis Pravin [Fri, 16 Aug 2024 06:42:36 +0000 (12:12 +0530)]
nvme-print: print the new fields added in TP4142

Print the new fields added in Identify Controller Data Structure.
Also, print the field added in Temperature Threshold feature.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
11 months agoplugins/innogrit: modify for project tacoma
innogritkenny [Wed, 14 Aug 2024 04:50:28 +0000 (12:50 +0800)]
plugins/innogrit: modify for project tacoma

modify get-eventlog and remove smart-log-add function

Signed-off-by: innogritkenny <kenny.chu@innogrit.com>
11 months agowdc: Add Support for new SN-861 PCI device id
jeff-lien-wdc [Thu, 8 Aug 2024 19:59:50 +0000 (14:59 -0500)]
wdc: Add Support for new SN-861 PCI device id

A new form factor (EDSFF E3.S) of the SN-861
drive was added to the wdc plugin code.

Signed-off-by: jeff-lien-wdc <jeff.lien@wdc.com>
11 months agonvme-print: use LC_MEASUREMENT to check fahrenheit temperature
Tokunori Ikegami [Sun, 11 Aug 2024 04:29:17 +0000 (13:29 +0900)]
nvme-print: use LC_MEASUREMENT to check fahrenheit temperature

Previously used LC_ALL so not checked correctly if LC_MEASUREMENT set.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
11 months agonvme-print: use Completion Condition enum
Francis Pravin [Fri, 9 Aug 2024 11:42:03 +0000 (17:12 +0530)]
nvme-print: use Completion Condition enum

Use the Completion Condition enum for LBA Status Descriptor.
Also, modified the print statement of Completion Condition.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
11 months agobuild: update libnvme wrap
Francis Pravin [Fri, 9 Aug 2024 10:43:43 +0000 (16:13 +0530)]
build: update libnvme wrap

9bee8e1 - types: add new fields added in TP4142
df12de6 - types: Add enum for Completion Condition of
Get LBA status command

Signed-off-by: Francis Pravin <francis.p@samsung.com>
11 months agocompletions: add the zsh completion of the dapustor plugin
Xiaoyuan Zhang [Thu, 8 Aug 2024 11:31:06 +0000 (19:31 +0800)]
completions: add the zsh completion of the dapustor plugin

add the zsh completion of the dapustor plugin

Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
11 months agonvme-print: print the new fields added in TP4165
Francis Pravin [Wed, 7 Aug 2024 12:38:05 +0000 (18:08 +0530)]
nvme-print: print the new fields added in TP4165

Print the new fields added in TP4165.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
11 months agoplugins/dapustor: dapustor smart-log-add update
Xiaoyuan Zhang [Wed, 7 Aug 2024 10:24:58 +0000 (18:24 +0800)]
plugins/dapustor: dapustor smart-log-add update

Extended Additional SMART log is optional.
If the collection fails, the command dose not stop.

Add the manual of dapustor plugin.
Update tab completion.

Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
11 months agonvme-print-stdout: Added print for new field CSER (TP4167)
Nitin Sao [Tue, 6 Aug 2024 05:45:11 +0000 (11:15 +0530)]
nvme-print-stdout: Added print for new field CSER (TP4167)

As per TP4167, added print for a new field CSER (Command Submission
and Execution Relaxations) [15:14] added in Commands Supported and
Effects Data Structure.

Signed-off-by: Nitin Sao <nitin.sao@samsung.com>
Reviewed-by: Mohit Kapoor <mohit.kap@samsung.com>
11 months agobuild: bump libnvme wrap
Nitin Sao [Tue, 6 Aug 2024 05:40:13 +0000 (11:10 +0530)]
build: bump libnvme wrap

fetch NVME_CMD_EFFECTS_CSER_MASK from enum nvme_cmd_effects

Signed-off-by: Nitin Sao <nitin.sao@samsung.com>
11 months agoplugins: Add a new DapuStor plugin and the smart-log-add command
Xiaoyuan Zhang [Tue, 6 Aug 2024 07:37:09 +0000 (15:37 +0800)]
plugins: Add a new DapuStor plugin and the smart-log-add command

Add the DapuStor plugin to support the retrieval and
display of the Vendor Specific SMART logs:
Additional SMART log page (0xCA)
Extended Additional SMART log page (0xCB)

Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
11 months agoRelease v2.10.2
Daniel Wagner [Mon, 5 Aug 2024 13:42:49 +0000 (15:42 +0200)]
Release v2.10.2

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agodoc: Regenerate all docs for v2.10.2
Daniel Wagner [Mon, 5 Aug 2024 13:42:49 +0000 (15:42 +0200)]
doc: Regenerate all docs for v2.10.2

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agobuild: fix libnvme dependency
Daniel Wagner [Mon, 5 Aug 2024 13:41:52 +0000 (15:41 +0200)]
build: fix libnvme dependency

Undo last libnvme dependency update which was done automatically
done by the release script.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agoRelease v2.10.1
Daniel Wagner [Mon, 5 Aug 2024 13:33:31 +0000 (15:33 +0200)]
Release v2.10.1

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agodoc: Regenerate all docs for v2.10.1
Daniel Wagner [Mon, 5 Aug 2024 13:33:31 +0000 (15:33 +0200)]
doc: Regenerate all docs for v2.10.1

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agobuild: add install step to doc CI build
Daniel Wagner [Fri, 2 Aug 2024 11:08:13 +0000 (13:08 +0200)]
build: add install step to doc CI build

We had some fallouts which were happened at the install step when the
documentation was build. Let's add this step, so we catch those errors
in future.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agodocs: rename ocp-unsupported-req-log file
Daniel Wagner [Fri, 2 Aug 2024 09:46:49 +0000 (11:46 +0200)]
docs: rename ocp-unsupported-req-log file

The filename has to match the command name, thus rename the filename.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agoRelease v2.10
Daniel Wagner [Fri, 2 Aug 2024 07:58:11 +0000 (09:58 +0200)]
Release v2.10

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agodoc: Regenerate all docs for v2.10
Daniel Wagner [Fri, 2 Aug 2024 07:58:11 +0000 (09:58 +0200)]
doc: Regenerate all docs for v2.10

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agobuild: bump libnvme wrap
Daniel Wagner [Fri, 2 Aug 2024 07:54:53 +0000 (09:54 +0200)]
build: bump libnvme wrap

Update to libnvme v1.10 release.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
11 months agosed: Fix parsing of Discovery0 features
Milan Broz [Thu, 1 Aug 2024 08:41:50 +0000 (10:41 +0200)]
sed: Fix parsing of Discovery0 features

TCG SED features have variable sizes, so the code needs to use
stored length to move the offset for the next feature.
Otherwise, it checks the code at the wrong offset.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
11 months agofabrics: avoid potential segfault in nvmf_dim()
Martin George [Thu, 1 Aug 2024 19:07:12 +0000 (00:37 +0530)]
fabrics: avoid potential segfault in nvmf_dim()

Eliminate the call to nvme_free_tree() in nvmf_dim() since the
cleanup helper is already available here.

Signed-off-by: Martin George <marting@netapp.com>
11 months agonvme: avoid segfault in show-topology
Martin George [Thu, 1 Aug 2024 19:02:27 +0000 (00:32 +0530)]
nvme: avoid segfault in show-topology

The show-topology command currently ends in a segfault for
ENOENT scenarios:

nvme show-topology
Failed to scan topology: No such file or directory
Segmentation fault (core dumped)

Fix this by eliminating the call to nvme_free_tree() since the
cleanup helper is already available here.

Signed-off-by: Martin George <marting@netapp.com>
11 months agofabrics: do not leak nvme_ctrl_t object on connect
Daniel Wagner [Thu, 1 Aug 2024 13:08:06 +0000 (15:08 +0200)]
fabrics: do not leak nvme_ctrl_t object on connect

valgrinds reports that the nvme_ctrl_t is leaked in the connect command.
Let's introduced a new cleanup helper for this.

Signed-off-by: Daniel Wagner <dwagner@suse.de>