]> git.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
14 months agobuild: use latest container instead fixed version master
Daniel Wagner [Thu, 31 Aug 2023 14:26:11 +0000 (16:26 +0200)]
build: use latest container instead fixed version

We control the build containers so there is little risk
that these randomly break. So let's go with the latest
version and avoid updating the build files all the time.

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: run tests before coverage tool
Daniel Wagner [Thu, 31 Aug 2023 12:15:46 +0000 (14:15 +0200)]
build: run tests before coverage tool

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: fix generation of coverage report
Daniel Wagner [Thu, 31 Aug 2023 11:59:51 +0000 (13:59 +0200)]
build: fix generation of coverage report

We need to to build the binaries before running the coverage report
tool.

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: more style fixes for AppImage build
Daniel Wagner [Thu, 31 Aug 2023 11:39:40 +0000 (13:39 +0200)]
build: more style fixes for AppImage build

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: fix AppImage yaml file
Daniel Wagner [Thu, 31 Aug 2023 11:37:20 +0000 (13:37 +0200)]
build: fix AppImage yaml file

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: use prebuild containers for builds
Daniel Wagner [Thu, 31 Aug 2023 10:47:22 +0000 (12:47 +0200)]
build: use prebuild containers for builds

The builds keep failing because the install step fails. Use prebuild
containers which contain all the dependencies.

While at it, also add a coverage build.

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: avoid unused static inline function warning for clang
Daniel Wagner [Thu, 31 Aug 2023 11:07:11 +0000 (13:07 +0200)]
build: avoid unused static inline function warning for clang

clang reports unused static inline fuctions. Just disable this
warning.

Signed-off-by: Daniel Wagner <[email protected]>
14 months agonvme: Update list secondary command
Daniel Wagner [Sat, 19 Aug 2023 10:50:42 +0000 (12:50 +0200)]
nvme: Update list secondary command

The nsid argument of the  nvme_{mi_admin}_identify_secondary_ctrl_list
command has been removed. Update the call side accordingly.

Signed-off-by: Daniel Wagner <[email protected]>
14 months agobuild: Bump libnvme wrap
Daniel Wagner [Sat, 19 Aug 2023 10:48:42 +0000 (12:48 +0200)]
build: Bump libnvme wrap

Get the nvme_{mi_admin_}identify_secondary_ctrl_list changes

Signed-off-by: Daniel Wagner <[email protected]>
14 months agowdc: Add support for SN861 drive
Jeffrey Lien [Thu, 17 Aug 2023 15:57:36 +0000 (10:57 -0500)]
wdc: Add support for SN861 drive

Signed-off-by: Jeffrey Lien <[email protected]>
15 months agoutil: Set errno to 0 before strtol/stroul call
Daniel Wagner [Fri, 11 Aug 2023 12:24:04 +0000 (14:24 +0200)]
util: Set errno to 0 before strtol/stroul call

In order to be able to distinguish between success/failure case when
calling strtol/stroul we set errno explicitly to 0.

Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme: Revert passthru and submit_io to print status to stderr from stdout
Tokunori Ikegami [Sun, 6 Aug 2023 13:57:44 +0000 (22:57 +0900)]
nvme: Revert passthru and submit_io to print status to stderr from stdout

Signed-off-by: Tokunori Ikegami <[email protected]>
15 months agoplugins/zns: Fix offset in report zones
Mateusz Kozlowski [Thu, 3 Aug 2023 08:39:14 +0000 (10:39 +0200)]
plugins/zns: Fix offset in report zones

offset should be a 64b field

Signed-off-by: Mateusz Kozlowski <[email protected]>
15 months agonvme-rpmb: Fix nvme_show_id_ctrl_rpmbs() definition error
Tokunori Ikegami [Wed, 2 Aug 2023 15:21:06 +0000 (00:21 +0900)]
nvme-rpmb: Fix nvme_show_id_ctrl_rpmbs() definition error

Signed-off-by: Tokunori Ikegami <[email protected]>
15 months agofabrics: Use corresponding hostid when hostnqn is generated
Shin'ichiro Kawasaki [Thu, 3 Aug 2023 11:21:39 +0000 (20:21 +0900)]
fabrics: Use corresponding hostid when hostnqn is generated

After the kernel commit ae8bd606e09b ("nvme-fabrics: prevent overriding
of existing host"), kernel ensures hostid and hostnqn maintain 1:1
mapping and "non 1:1 mapping will be rejected". This makes 'nvme
discover' and 'nvme connect' commands fail when they generate hostnqn,
since it does not use corresponding hostid.

To avoid the failures, prepare and use corresponding hostid to the
generated hostnqn, taking the hostid from the hostnqn string. Also add
checks for prepared hostnqn and hostid. If the hostid taken from the
generated hostnqn is different from the hostid from file, print a
warning message. Also, if the prepared hostnqn are inconsistent with the
prepared hostid, print a warning.

Link: https://lore.kernel.org/linux-nvme/l7vk7fnzltpmvkwujsbf2btrzip6wh7ug62iwa3totqcda25l6@siqx7tj6lt3l/
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Signed-off-by: Daniel Wagner <[email protected]>
15 months agojson: fix seg. fault converting NULL to JSON string
Martin Belanger [Thu, 3 Aug 2023 17:15:28 +0000 (13:15 -0400)]
json: fix seg. fault converting NULL to JSON string

The function json_object_new_string() seg. faults when passed a
NULL pointer. This can happen, for example, when parameters retuned
by a controller (e.g. Firmware, Model Number, Serial Number, etc.)
are undefined and therefore NULL. This will cause the following
command to crash:

nvme list -v -o json

Signed-off-by: Martin Belanger <[email protected]>
15 months agonvme-cli: fix extended metadata size calculation
Keith Busch [Thu, 27 Jul 2023 08:14:37 +0000 (10:14 +0200)]
nvme-cli: fix extended metadata size calculation

With commit 8a2bfa5be4d3 ("nvme: fix block count and data size logic")
we are rounding the request size up. And later we are adding the
extended metadata on top. Thus first figure out if extended metadata is
used and then do the rounding.

Signed-off-by: Keith Busch <[email protected]>
[dwagner: added commit message]
Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme-print: Show subsystem iopolicy
Daniel Wagner [Wed, 26 Jul 2023 13:54:22 +0000 (15:54 +0200)]
nvme-print: Show subsystem iopolicy

Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme-print-stdout: Do not show non reachable ns in namespace topology
Daniel Wagner [Wed, 26 Jul 2023 13:46:55 +0000 (15:46 +0200)]
nvme-print-stdout: Do not show non reachable ns in namespace topology

If the host is connected to the target with two different hostnqn we can
have the situation where a namespace is only reachable via one ctrl and
a second namespace only by a different controller. Thus we should only
show a namespace in the topology if there is a path.

Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme-print: Fix show-topolocy for ctrls
Daniel Wagner [Wed, 26 Jul 2023 13:44:34 +0000 (15:44 +0200)]
nvme-print: Fix show-topolocy for ctrls

Depending on the ranking command line argument we are supposed to show the
topology order by namespaces or ctrls.

Fixes: 1d583b7856db ("nvme-print-stdout: Refactor stdout print code to use print_ops")
Signed-off-by: Daniel Wagner <[email protected]>
15 months agobuild: Bump libnvme wrap
Daniel Wagner [Wed, 26 Jul 2023 13:43:57 +0000 (15:43 +0200)]
build: Bump libnvme wrap

Fetch nvme_subsystem_get_iopolicy

Signed-off-by: Daniel Wagner <[email protected]>
15 months agodoc: Fix typo in documentation
Arunpandian J [Wed, 26 Jul 2023 06:39:28 +0000 (12:09 +0530)]
doc: Fix typo in documentation

Signed-off-by: Arunpandian J <[email protected]>
15 months agonvme-print-stdout: fix storage tag size label
Vincent Fu [Tue, 25 Jul 2023 18:17:17 +0000 (18:17 +0000)]
nvme-print-stdout: fix storage tag size label

The NVM Command Set Extended LBA Format Data Structure has Protection
Information Format (pif) and Storage Tag Size (sts) fields. The sts
field is incorrectly labeled in the non-verbose normal output.  Fix the
label.

Signed-off-by: Vincent Fu <[email protected]>
15 months agonvme-print-stdout: List only ctrls which are part of ns
Daniel Wagner [Fri, 21 Jul 2023 11:43:02 +0000 (13:43 +0200)]
nvme-print-stdout: List only ctrls which are part of ns

We should only list the controllers which are associated with the
current namespace. Previously we added all controllers of the subsystem
to the list.

Fixes: a660c506906d ("nvme-print-stdout: Support subsys reachable from several hosts")
Signed-off-by: Daniel Wagner <[email protected]>
15 months agobuild: Bump libnvme wrap
Daniel Wagner [Thu, 20 Jul 2023 09:25:09 +0000 (11:25 +0200)]
build: Bump libnvme wrap

Get latest bug fixes.

Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme-print-stdout: Support subsys reachable from several hosts
Daniel Wagner [Mon, 17 Jul 2023 13:35:01 +0000 (15:35 +0200)]
nvme-print-stdout: Support subsys reachable from several hosts

The host might be connected with several different hostnqn, and
this might result that the same subsystem is visible from several
hosts.

The current code assumes a each subsystem shows up only once. So
we need to iterate over all hosts/subsystem tuples and print
them accordingly.

Use hash tables to avoid triple loop iterations. Also using strset sorts
all the names alphabetically which is also nice to have.

Signed-off-by: Daniel Wagner <[email protected]>
15 months agoccan: Add htable, strset and dependencies
Daniel Wagner [Mon, 17 Jul 2023 13:33:18 +0000 (15:33 +0200)]
ccan: Add htable, strset and dependencies

strset code implements an ordered set of string.

Upstream repo: git://git.ozlabs.org/~ccan/ccan
Version: 3942778bb3f6 ("fdpass: avoid memory leak in example.")

Signed-off-by: Daniel Wagner <[email protected]>
15 months agoccan: Remove unused documentation
Daniel Wagner [Tue, 18 Jul 2023 14:47:46 +0000 (16:47 +0200)]
ccan: Remove unused documentation

No need to carry unused documentation how to use the API.

Signed-off-by: Daniel Wagner <[email protected]>
15 months agonvme-print: Split max power flags
Bao Tran [Wed, 28 Jun 2023 22:14:11 +0000 (15:14 -0700)]
nvme-print: Split max power flags

Split max power flags into max power scale and non-operational state
bits for clarity.

15 months agonvme-print: fix counter while looping through uuid_list
Martin George [Wed, 19 Jul 2023 06:55:54 +0000 (12:25 +0530)]
nvme-print: fix counter while looping through uuid_list

While iterating through the uuid_list in json_nvme_id_uuid_list()
as part of the 'id-uuid' json output, it always misses out
displaying the first uuid entry here due to wrongly initialized
counter value. Fix it.

And while we are at it, remove the respective comment in
stdout_id_uuid_list() as well where this counter is already
properly initiatlized.

Signed-off-by: Martin George <[email protected]>
15 months agofabrics: only look for matching ctrl on same host
Caleb Sander [Wed, 28 Jun 2023 20:35:24 +0000 (14:35 -0600)]
fabrics: only look for matching ctrl on same host

With the lookup_ctrl() check to prevent duplicate connections,
identical connections from different hosts are no longer possible.
Fix lookup_ctrl() to only look for matching controllers
on the same host that is being connected.
This restores the ability for multiple hosts on the same machine
to connect to the same transport addresses on the same subsystem.

Fixes: 07d6b91 ("fabrics: Do not attempt to reconnect to already
connected ctrls")
Signed-off-by: Caleb Sander <[email protected]>
15 months agoREADME: Correct hugetlbfs spelling error
Tokunori Ikegami [Sat, 15 Jul 2023 16:56:20 +0000 (01:56 +0900)]
README: Correct hugetlbfs spelling error

Signed-off-by: Tokunori Ikegami <[email protected]>
15 months agoutil: Delete unused CFG_BOOL argconfig type as duplicated with CFG_FLAG
Tokunori Ikegami [Sat, 15 Jul 2023 18:07:41 +0000 (03:07 +0900)]
util: Delete unused CFG_BOOL argconfig type as duplicated with CFG_FLAG

Signed-off-by: Tokunori Ikegami <[email protected]>
15 months agoutil: Set LC_ALL=C as default if -H option is not used
Tokunori Ikegami [Sat, 15 Jul 2023 18:00:53 +0000 (03:00 +0900)]
util: Set LC_ALL=C as default if -H option is not used

Signed-off-by: Tokunori Ikegami <[email protected]>
16 months agonvme: Add support for create-ns command endg-id option parameter
Tokunori Ikegami [Tue, 11 Jul 2023 14:50:22 +0000 (23:50 +0900)]
nvme: Add support for create-ns command endg-id option parameter

Signed-off-by: Tokunori Ikegami <[email protected]>
16 months agonvme-print: fix argument order for show functions
Caleb Sander [Thu, 6 Jul 2023 23:20:57 +0000 (17:20 -0600)]
nvme-print: fix argument order for show functions

nvme_show_ana_log() and nvme_show_boot_part_log() are being called
with their "length" and "flags" arguments swapped.
Fix this so their output is displayed correctly.

Fixes #1994

Fixes: 62a0ce1 ("nvme-print: Unify flag passing into functions")
Fixes: 079afcd ("nvme: add boot partition log support")
Signed-off-by: Caleb Sander <[email protected]>
16 months agodoc: Regenerate all docs for v2.5 v2.5
Daniel Wagner [Fri, 30 Jun 2023 13:20:48 +0000 (15:20 +0200)]
doc: Regenerate all docs for v2.5

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Update version to v2.5
Daniel Wagner [Fri, 30 Jun 2023 13:20:21 +0000 (15:20 +0200)]
build: Update version to v2.5

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Bump libnvme wrap
Daniel Wagner [Fri, 30 Jun 2023 13:19:06 +0000 (15:19 +0200)]
build: Bump libnvme wrap

Update to the libnvme v1.5 release

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoplugins/solidigm: Added Marketing Name Log support for Solidigm.
hsdhillo [Tue, 13 Jun 2023 20:52:34 +0000 (13:52 -0700)]
plugins/solidigm: Added Marketing Name Log support for Solidigm.

Signed-off-by: hsdhillo <[email protected]>
16 months agonvme-print: Remove left overs from refactoring
Daniel Wagner [Fri, 23 Jun 2023 06:45:26 +0000 (08:45 +0200)]
nvme-print: Remove left overs from refactoring

The refactoring of the printing code left some code in the original
place. Remove it now

Fixes: 1d583b7856db ("nvme-print-stdout: Refactor stdout print code to use print_ops")
Fixes: 73dfe8a2d227 ("nvme-print-binary: Refactor binary print code to use print_ops")
Signed-off-by: Daniel Wagner <[email protected]>
16 months agonvme-print: Move num argument parsing into callbacks
Daniel Wagner [Fri, 23 Jun 2023 06:40:59 +0000 (08:40 +0200)]
nvme-print: Move num argument parsing into callbacks

The goal for the libnvme type print function is only to use
the types from the library as argument. The num argument can be
parsed from the ctrl_list thus move it the callbacks directly.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agonvme-print: Fix typo in callback definition
Daniel Wagner [Fri, 23 Jun 2023 06:40:04 +0000 (08:40 +0200)]
nvme-print: Fix typo in callback definition

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Use containers with matrix build
Daniel Wagner [Wed, 28 Jun 2023 10:38:19 +0000 (12:38 +0200)]
build: Use containers with matrix build

Use a matrix build approach and a base container which already contains
all the libraries installed.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Bump libnvme wrap
Daniel Wagner [Wed, 28 Jun 2023 10:57:50 +0000 (12:57 +0200)]
build: Bump libnvme wrap

Fetch static build fix.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoscripts: Make release script project neutral
Daniel Wagner [Fri, 23 Jun 2023 09:10:04 +0000 (11:10 +0200)]
scripts: Make release script project neutral

The script is used also for libnvme, thus make the nvme-cli
specific parts optional.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoscripts: Update update-docs.sh scripts
Daniel Wagner [Fri, 23 Jun 2023 07:20:49 +0000 (09:20 +0200)]
scripts: Update update-docs.sh scripts

libnvme is not downloaded automatically anymore. Thus use
--force-fallback-for to fetch it when updating the documentation.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoscripts: Execute the scripts from toplevel directory
Daniel Wagner [Fri, 23 Jun 2023 07:05:53 +0000 (09:05 +0200)]
scripts: Execute the scripts from toplevel directory

These scripts expect to be run from the toplevel directory, so make sure
we are running from there.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoscripts: Move helper scripts to a central place
Daniel Wagner [Fri, 23 Jun 2023 07:01:45 +0000 (09:01 +0200)]
scripts: Move helper scripts to a central place

The helper scripts for maintaining are distributed over several
directories. Let's move them to the scripts directory.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agodocs: Update file modes
Daniel Wagner [Fri, 23 Jun 2023 07:03:03 +0000 (09:03 +0200)]
docs: Update file modes

These files are not executables, just plain text, thus remove the
execution mode flag.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agodoc: Add information on --context
Daniel Wagner [Fri, 16 Jun 2023 11:13:08 +0000 (13:13 +0200)]
doc: Add information on --context

Document the newly added --context argument and how to use it.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agonvmf-autoconnect: Annotate the context to autoconnect
Daniel Wagner [Fri, 16 Jun 2023 15:21:31 +0000 (17:21 +0200)]
nvmf-autoconnect: Annotate the context to autoconnect

By providing the execution context from the systemd service files,
nvme-cli can figure out if it is noop when looking at the configuration
files.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agofabrics: Add support for volatile configuration
Daniel Wagner [Wed, 14 Jun 2023 12:10:51 +0000 (14:10 +0200)]
fabrics: Add support for volatile configuration

The fabric resources are global resources and as such should only
modified by one component. So far nvme-cli was the only component
managing connections. With the introduction of nvme-stas we need to
coordinate the access to these resources.

Introduce access coordination feature which allows the external software
to drop volatile configurations files into the /var/nvme directory.

When nvme-cli ls executed(e.g. via the udev rules), the execution
context is evaluated and only resources which belong the application are
considered.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Reformat build_opionts.txt
Daniel Wagner [Mon, 12 Jun 2023 15:45:14 +0000 (17:45 +0200)]
build: Reformat build_opionts.txt

Reformat the file so that we don't have so long lines. While at it also
sort the options names by name.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agobuild: Bump libnvme wrap
Daniel Wagner [Wed, 21 Jun 2023 07:41:04 +0000 (09:41 +0200)]
build: Bump libnvme wrap

Fetch recent version of libnvme which includes the fixes for the
--context feature.

Signed-off-by: Daniel Wagner <[email protected]>
16 months agoplugins/solidigm: Formated log page directory table consistently with "nvme list...
da Cunha, Leonardo [Wed, 14 Jun 2023 18:39:02 +0000 (11:39 -0700)]
plugins/solidigm: Formated log page directory table consistently with "nvme list" format.

Signed-off-by: leonardo.da.cunha <[email protected]>
16 months agoplugins/solidigm: Added Identify controller VU extensions parsing.
leonardo.da.cunha [Tue, 6 Jun 2023 23:37:06 +0000 (16:37 -0700)]
plugins/solidigm: Added Identify controller VU extensions parsing.

Signed-off-by: leonardo.da.cunha <[email protected]>
17 months agonvme-print-json: Print PCI pysical slot number for controller
Umer Saleem [Tue, 13 Jun 2023 12:34:23 +0000 (17:34 +0500)]
nvme-print-json: Print PCI pysical slot number for controller

Print PCI physical slot information for controller for JSON if
verbose if specified.

Signed-off-by: Umer Saleem <[email protected]>
17 months agonvme-print-stdout: Print PCI physical slot number for controller
Umer Saleem [Tue, 13 Jun 2023 12:26:17 +0000 (17:26 +0500)]
nvme-print-stdout: Print PCI physical slot number for controller

Print the PCI physcial slot number for the controller. The slot
number is printed if versbose is specified.

Signed-off-by: Umer Saleem <[email protected]>
17 months agolibnvme.wrap: Bump to 42ac453
Umer Saleem [Wed, 14 Jun 2023 16:33:42 +0000 (21:33 +0500)]
libnvme.wrap: Bump to 42ac453

Support for PCI physical slot number for NVME controller.

Signed-off-by: Umer Saleem <[email protected]>
17 months agoplugins/nbft: Use common code to parse print flags
Daniel Wagner [Wed, 14 Jun 2023 12:08:50 +0000 (14:08 +0200)]
plugins/nbft: Use common code to parse print flags

Use validate_output_format instead open coding the print flag parsing.

Signed-off-by: Daniel Wagner <[email protected]>
17 months agofabrics: Do not print device on connect per default
Daniel Wagner [Wed, 14 Jun 2023 12:03:53 +0000 (14:03 +0200)]
fabrics: Do not print device on connect per default

During the print code refactoring, the show connect message was enabled
per default. To avoid any regressions in application restore the old
behavior and print only the result when the '-o' option is used.

Fixes: 0576d84bf4aa ("fabrics: Move printing functions to the print files")
Signed-off-by: Daniel Wagner <[email protected]>
17 months agofabrics: Revert 'fabrics: prevent 'nvme connect' to well-known discovery
Daniel Wagner [Wed, 14 Jun 2023 11:57:35 +0000 (13:57 +0200)]
fabrics: Revert 'fabrics: prevent 'nvme connect' to well-known discovery
NQN'

Unfortunately, blktests nvme/003 depends on this feature. To avoid
any regression in the testsuite revert the change. After this has
been address in blktests we can add it back.

Fixes: 9077d042c04a ("fabrics: prevent 'nvme connect' to well-known discovery NQN")
Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme-print: fix wrong list-subsys output when ns are attached to different ctrls
Sagi Grimberg [Mon, 12 Jun 2023 15:34:06 +0000 (18:34 +0300)]
nvme-print: fix wrong list-subsys output when ns are attached to different ctrls

If we list subsystem controllers not for a specific ns (user did not pass
a namespace device node), we cannot look at the first ns in the subsystem
to list because it may not be attached to all subsystem controllers.

We incorrectly assumes that subsystem namespaces (or at least the first of
them) are attached to all subsystem controllers.

Fix that by showing the multipath subsystem-list flavor only when the user
passed a specific namespace, and fallback to a simple controller list otherwise.

Fixes: cdeaab8fca6e ("nvme-print: Show ANA state only for one namespace")
Fixes: 7435ed9ae6a6 ("nvme-print: Show paths from the first namespace only")
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Daniel Wagner <[email protected]>
17 months agoplugins/micron: Correct NULL pointer checking error
Tokunori Ikegami [Tue, 6 Jun 2023 16:48:32 +0000 (01:48 +0900)]
plugins/micron: Correct NULL pointer checking error

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/innogrit: Add vendor command get-eventlog and get-cdump
innogritkenny [Tue, 30 May 2023 03:10:51 +0000 (11:10 +0800)]
plugins/innogrit: Add vendor command get-eventlog and get-cdump

cdw2 add signature
nsid modify to 0xffffffff
for support fw checking rule.

17 months agonvme: Use correct data buffer size
Daniel Wagner [Tue, 6 Jun 2023 15:21:55 +0000 (17:21 +0200)]
nvme: Use correct data buffer size

The submit_io command is using the buffer size provided by the
user. But this size argument might be updated and the correct length
for the buffer is buffer_size. Thus use this value and not the
initial length.

Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme: Fix quoted string split across lines to use quoted newline
Tokunori Ikegami [Mon, 5 Jun 2023 17:01:06 +0000 (02:01 +0900)]
nvme: Fix quoted string split across lines to use quoted newline

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/zns: Fix zns.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 12:45:40 +0000 (21:45 +0900)]
plugins/zns: Fix zns.c linux kernel check patch errors and warnings

Note: Still the remaining warning messages are not fixed as same with nvme.c.

WARNING: quoted string split across lines
+       const char *desc = "Send a ZNS specific Identify Controller command to "
+                          "the given device and report information about the specified "

WARNING: quoted string split across lines
+                          "the given device and report information about the specified "
+                          "controller in various formats.";

WARNING: quoted string split across lines
+       const char *desc = "Send a ZNS specific Identify Namespace command to "
+                          "the given device and report information about the specified "

WARNING: quoted string split across lines
+                          "the given device and report information about the specified "
+                          "namespace in varios formats.";

WARNING: quoted string split across lines
+       const char *desc = "The zone append command is used to write to a zone "
+                          "using the slba of the zone, and the write will be appended from the "

WARNING: quoted string split across lines
+                          "using the slba of the zone, and the write will be appended from the "
+                          "write pointer of the zone";

total: 0 errors, 6 warnings, 1278 lines checked

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/ymtc: Fix ymtc-nvme.c linux kernel check patch warning
Tokunori Ikegami [Sun, 4 Jun 2023 12:30:55 +0000 (21:30 +0900)]
plugins/ymtc: Fix ymtc-nvme.c linux kernel check patch warning

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/ymtc: Fix ymtc-nvme.c space indentation to tab indentation
Tokunori Ikegami [Sun, 4 Jun 2023 12:28:37 +0000 (21:28 +0900)]
plugins/ymtc: Fix ymtc-nvme.c space indentation to tab indentation

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/virtium: Fix virtium-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 12:13:56 +0000 (21:13 +0900)]
plugins/virtium: Fix virtium-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/transcend: Fix transcend-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 11:47:51 +0000 (20:47 +0900)]
plugins/transcend: Fix transcend-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/solidigm: Fix linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 10:21:26 +0000 (19:21 +0900)]
plugins/solidigm: Fix linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/shannon: Fix shannon-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 07:55:46 +0000 (16:55 +0900)]
plugins/shannon: Fix shannon-nvme.c linux kernel check patch errors and warnings

Note: Still the remaining warning messages are not fixed as same with nvme.c.

WARNING: quoted string split across lines
+       const char *desc = "Read operating parameters of the "
+               "specified controller. Operating parameters are grouped "

...

WARNING: quoted string split across lines
+               "are vendor-specific and not changeable. Use set-feature to "
+               "change saveable Features.\n\n"

WARNING: quoted string split across lines
+       const char *desc = "Modify the saveable or changeable "
+               "current operating parameters of the controller. Operating "

...

WARNING: quoted string split across lines
+               "Use get-feature to determine which Features are supported by "
+               "the controller and are saveable/changeable.\n\n"

total: 0 errors, 16 warnings, 381 lines checked

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/seagate: Fix seagate-nvme.c linux kernel check patch warnings
Tokunori Ikegami [Sun, 4 Jun 2023 07:26:47 +0000 (16:26 +0900)]
plugins/seagate: Fix seagate-nvme.c linux kernel check patch warnings

Note: Still the remaining warning messages are not fixed as same with nvme.c.

WARNING: quoted string split across lines
+       const char *log_specific = "1 - controller shall capture Data representing the internal "
+               "state of the controller at the time the command is processed. "

WARNING: quoted string split across lines
+               "state of the controller at the time the command is processed. "
+               "0 - controller shall not update the Telemetry Host Initiated Data.";

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/scaleflux: Fix sfx-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 01:30:29 +0000 (10:30 +0900)]
plugins/scaleflux: Fix sfx-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/netapp: Fix netapp-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sun, 4 Jun 2023 00:55:31 +0000 (09:55 +0900)]
plugins/netapp: Fix netapp-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/nbft: Fix nbft-plugin.c linux kernel check patch warnings
Tokunori Ikegami [Sun, 4 Jun 2023 00:47:06 +0000 (09:47 +0900)]
plugins/nbft: Fix nbft-plugin.c linux kernel check patch warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/micron: Fix micron-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 17:38:36 +0000 (02:38 +0900)]
plugins/micron: Fix micron-nvme.c linux kernel check patch errors and warnings

Note: Still the remaining warning messages are not fixed as same with nvme.c.

WARNING: quoted string split across lines
+               "This performs a selective firmware download, which allows the user to "
+               "select which firmware binary to update for 9200 devices. This requires "

WARNING: quoted string split across lines
+               "select which firmware binary to update for 9200 devices. This requires "
+               "a power cycle once the update completes. The options available are:\n\n"

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/micron: Fix micron-nvme.c space indentation to tab indentation
Tokunori Ikegami [Sat, 3 Jun 2023 13:22:39 +0000 (22:22 +0900)]
plugins/micron: Fix micron-nvme.c space indentation to tab indentation

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/memblaze: Fix memblaze-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 12:59:21 +0000 (21:59 +0900)]
plugins/memblaze: Fix memblaze-nvme.c linux kernel check patch errors and warnings

Note: Still the remaining warning messages are not fixed as same with nvme.c.

WARNING: quoted string split across lines
+               "This performs a selective firmware download, which allows the user to "
+               "select which firmware binary to update for 9200 devices. This requires a power cycle once the "

WARNING: quoted string split across lines
+               "select which firmware binary to update for 9200 devices. This requires a power cycle once the "
+               "update completes. The options available are:\n\n"

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/memblaze: Fix memblaze-utils.h space indentation to tab indentation
Tokunori Ikegami [Sat, 3 Jun 2023 12:52:38 +0000 (21:52 +0900)]
plugins/memblaze: Fix memblaze-utils.h space indentation to tab indentation

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/memblaze: Fix memblaze-nvme.c space indentation to tab indentation
Tokunori Ikegami [Sat, 3 Jun 2023 11:51:59 +0000 (20:51 +0900)]
plugins/memblaze: Fix memblaze-nvme.c space indentation to tab indentation

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/intel: Fix intel-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 11:33:58 +0000 (20:33 +0900)]
plugins/intel: Fix intel-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/inspur: Fix inspur-nvme.c linux kernel check patch warnings
Tokunori Ikegami [Sat, 3 Jun 2023 06:40:10 +0000 (15:40 +0900)]
plugins/inspur: Fix inspur-nvme.c linux kernel check patch warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/inspur: Fix inspur-nvme.c space indentation to tab indentation
Tokunori Ikegami [Sat, 3 Jun 2023 06:37:13 +0000 (15:37 +0900)]
plugins/inspur: Fix inspur-nvme.c space indentation to tab indentation

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/innogrit: Fix innogrit-nvme.c linux kernel check patch errors
Tokunori Ikegami [Sat, 3 Jun 2023 06:28:54 +0000 (15:28 +0900)]
plugins/innogrit: Fix innogrit-nvme.c linux kernel check patch errors

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/huawei: Fix huawei-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 06:20:21 +0000 (15:20 +0900)]
plugins/huawei: Fix huawei-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/fdb: Fix fdb.c linux kernel check patch warnings
Tokunori Ikegami [Sat, 3 Jun 2023 06:05:35 +0000 (15:05 +0900)]
plugins/fdb: Fix fdb.c linux kernel check patch warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/dera: Fix dera-nvme.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 06:02:39 +0000 (15:02 +0900)]
plugins/dera: Fix dera-nvme.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/amzn: Fix amzn-nvme.c linux kernel check patch error and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 05:52:46 +0000 (14:52 +0900)]
plugins/amzn: Fix amzn-nvme.c linux kernel check patch error and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/wdc: Fix wdc-utils.c linux kernel check patch errors and warnings
Tokunori Ikegami [Sat, 3 Jun 2023 03:23:59 +0000 (12:23 +0900)]
plugins/wdc: Fix wdc-utils.c linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoplugins/wdc: Refactor wdc-nvme.c for linux kernel check patch errors and warnings
Tokunori Ikegami [Fri, 2 Jun 2023 17:13:02 +0000 (02:13 +0900)]
plugins/wdc: Refactor wdc-nvme.c for linux kernel check patch errors and warnings

Signed-off-by: Tokunori Ikegami <[email protected]>
17 months agoutil: Move falltrhough feature check to meson.build
Tokunori Ikegami [Tue, 6 Jun 2023 08:45:43 +0000 (10:45 +0200)]
util: Move falltrhough feature check to meson.build

Instead cluttering the header file, let's add it to meson.build.

Signed-off-by: Tokunori Ikegami <[email protected]>
Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme: Use correct metadata buffer size
Daniel Wagner [Mon, 5 Jun 2023 15:13:29 +0000 (17:13 +0200)]
nvme: Use correct metadata buffer size

The submit_io command is using the metadata buffer size provided by the
user. But this size argument might be updated and the correct length
for the mbuffer is mbuffer_size. Thus use this value and not the
initial length.

Fixes: 18de3a6d61a7 ("Convert to libnvme")
Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme-print-binary: Refactor binary print code to use print_ops
Daniel Wagner [Fri, 2 Jun 2023 10:17:16 +0000 (12:17 +0200)]
nvme-print-binary: Refactor binary print code to use print_ops

Use the newly introduced print_ops infrastructure to for the binary
printing code.

Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme-print-stdout: Refactor stdout print code to use print_ops
Daniel Wagner [Wed, 31 May 2023 18:52:09 +0000 (20:52 +0200)]
nvme-print-stdout: Refactor stdout print code to use print_ops

Use the newly introduced print_ops infrastructure to for the stdout
printing code.

Signed-off-by: Daniel Wagner <[email protected]>
17 months agonvme-print-json: Refactor json print code to use nvme_print_ops
Daniel Wagner [Wed, 31 May 2023 18:38:12 +0000 (20:38 +0200)]
nvme-print-json: Refactor json print code to use nvme_print_ops

Use the newly introduced print_ops infrastructure to for the json
printing code.

Signed-off-by: Daniel Wagner <[email protected]>
17 months agoprint: Introduce print ops structure
Daniel Wagner [Fri, 19 May 2023 16:33:29 +0000 (18:33 +0200)]
print: Introduce print ops structure

Introduce callbacks for printing the nvme data structures. With this we
are able to split the two printing types (stdout and json) and just use
the ops the user selects ('-o json' for example).

Signed-off-by: Daniel Wagner <[email protected]>