]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
3 years agonvme: fix dsm, dspec wrong usage
Steven Seungcheol Lee [Fri, 11 Feb 2022 07:02:18 +0000 (16:02 +0900)]
nvme: fix dsm, dspec wrong usage

dsm is 8bits on Command Dword13 [07:00]
dspec should issued on nvme_io_args.dspec

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agosubproject: libnvme.wrap update
Steven Seungcheol Lee [Fri, 11 Feb 2022 11:10:06 +0000 (20:10 +0900)]
subproject: libnvme.wrap update

nvme_io_args.dspec changed as 16bits

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1371 from jeffreyalien/sn650-fix
Daniel Wagner [Fri, 11 Feb 2022 08:24:43 +0000 (09:24 +0100)]
Merge pull request #1371 from jeffreyalien/sn650-fix

[nvme-cli] Fix sn650 capabilities setting

3 years ago[nvme-cli] Fix sn650 capabilities setting
Jeff Lien [Thu, 10 Feb 2022 21:00:14 +0000 (15:00 -0600)]
[nvme-cli] Fix sn650 capabilities setting
  Change sn450 name to sn560
  Update wdc plugin version to 1.16.3

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1370 from igaw/fix-json-output-list-subsys
Daniel Wagner [Thu, 10 Feb 2022 18:03:35 +0000 (19:03 +0100)]
Merge pull request #1370 from igaw/fix-json-output-list-subsys

nvme-print: Fix json output for list-subsys

3 years agonvme-print: Fix json output for list-subsys
Daniel Wagner [Thu, 10 Feb 2022 17:49:47 +0000 (18:49 +0100)]
nvme-print: Fix json output for list-subsys

The root needs to be an array an not an object.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1369 from igaw/fix-verbose-flag
Daniel Wagner [Thu, 10 Feb 2022 18:00:10 +0000 (19:00 +0100)]
Merge pull request #1369 from igaw/fix-verbose-flag

argconfig: Increase the flag value

3 years agonvme: Allow --verbose flag to increase log level
Daniel Wagner [Thu, 10 Feb 2022 17:50:51 +0000 (18:50 +0100)]
nvme: Allow --verbose flag to increase log level

Mark the option as an increase option to increase the log level if
needed.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoargconfig: Increase the flag value
Daniel Wagner [Thu, 10 Feb 2022 16:57:01 +0000 (17:57 +0100)]
argconfig: Increase the flag value

If the flag is provided several time increase the flag value. This is
a pretty ugly fix for how getopt_long_only() handles '--verbose' vs
'-v'. getopt_long_only() returns 0 when --verbose is used and 'v' for
-v hence we will not usually not take the short option path for
--verbose.

Break out in the short option parsing when non flag options are used.

Another uglyliness here is that it sets up long options differently
depending on short or long version is used. For the short version we
have to use value_addr.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1368 from sc108-lee/remove/unused
Daniel Wagner [Thu, 10 Feb 2022 10:14:32 +0000 (11:14 +0100)]
Merge pull request #1368 from sc108-lee/remove/unused

common.h: remove unused macros

3 years agocommon.h: remove unused macros
Steven Seungcheol Lee [Thu, 10 Feb 2022 09:32:08 +0000 (18:32 +0900)]
common.h: remove unused macros

round_up is not used
__stringify is defined in define_cmd and used
__fallthrough__ not used, occur error from lower version of GCC

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1363 from igaw/cleanup-libuuid-dep
Daniel Wagner [Thu, 10 Feb 2022 08:48:22 +0000 (09:48 +0100)]
Merge pull request #1363 from igaw/cleanup-libuuid-dep

nvme-print: Remove dead !LIBUUID code

3 years agoMerge pull request #1361 from igaw/doc-build
Daniel Wagner [Thu, 10 Feb 2022 08:46:05 +0000 (09:46 +0100)]
Merge pull request #1361 from igaw/doc-build

docs: Introduce documentation build option

3 years agoMerge pull request #1357 from igaw/fix-force-flag-parsing
Daniel Wagner [Thu, 10 Feb 2022 08:44:22 +0000 (09:44 +0100)]
Merge pull request #1357 from igaw/fix-force-flag-parsing

nvme: Fix --force flag inversion

3 years agoMerge pull request #1367 from jeffreyalien/sn650-fix
Daniel Wagner [Wed, 9 Feb 2022 15:20:54 +0000 (16:20 +0100)]
Merge pull request #1367 from jeffreyalien/sn650-fix

[nvme-cli] Fix vs-smart-add-log command for SN650 devices

3 years ago[nvme-cli] Fix vs-smart-add-log command for SN650 devices
Jeff Lien [Mon, 7 Feb 2022 22:50:41 +0000 (16:50 -0600)]
[nvme-cli] Fix vs-smart-add-log command for SN650 devices

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1366 from AkhileshRN/SN_telemetry
Daniel Wagner [Wed, 9 Feb 2022 13:47:13 +0000 (14:47 +0100)]
Merge pull request #1366 from AkhileshRN/SN_telemetry

Added telemetry log fetch support for WDC vs-internal-log command

3 years agoAdded telemetry log fetch support for SN810, SN530 and SN740 series NVMe SSDs through...
AkhileshRN [Wed, 9 Feb 2022 12:33:37 +0000 (18:03 +0530)]
Added telemetry log fetch support for SN810, SN530 and SN740 series NVMe SSDs through wdc vs-internal-log command

3 years agonvme-print: Remove dead !LIBUUID code
Daniel Wagner [Tue, 8 Feb 2022 17:33:45 +0000 (18:33 +0100)]
nvme-print: Remove dead !LIBUUID code

We have added a hard dependency to libuuid. Remove the ifdefs and the
dead code.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodocs: Introduce documentation build option
Daniel Wagner [Tue, 8 Feb 2022 15:37:41 +0000 (16:37 +0100)]
docs: Introduce documentation build option

Build the documentation only if explicitly asked to build it. If not
fallback to install the precompiled versions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1358 from igaw/fix-matching-nvmf-connect
Daniel Wagner [Tue, 8 Feb 2022 14:49:58 +0000 (15:49 +0100)]
Merge pull request #1358 from igaw/fix-matching-nvmf-connect

nvmf: Remove --matching from systemd service file

3 years agonvmf: Remove --matching from systemd service file
Daniel Wagner [Tue, 8 Feb 2022 14:27:33 +0000 (15:27 +0100)]
nvmf: Remove --matching from systemd service file

'--matching' is not a great concept. The whole point of a discovery
log is to return different port addresses from the one we're using.

Thus the '--matching' logic was dropped when switching over the
libnvme but we forgot to remove it from the systemd service file.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Fix --force flag inversion
Daniel Wagner [Tue, 8 Feb 2022 11:13:34 +0000 (12:13 +0100)]
nvme: Fix --force flag inversion

argparse sets the default_value member when the argument has been
provided by the user. But in parse_and_open we set O_EXCL when --force
is not used.

It also introduced a regression in the 'id-ns' where the --force flag
is used to determine which function is used to identify the
namespace (nvme_identify_allocated_ns() vs nvme_identify_ns()).

Fixes: 2100609 ("nvme: open namespace exclusive by default")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1349 from jeffreyalien/telemetry-da4
Daniel Wagner [Tue, 8 Feb 2022 10:20:02 +0000 (11:20 +0100)]
Merge pull request #1349 from jeffreyalien/telemetry-da4

[nvme-cli] Add support for data area 4 to get-telemetry-log

3 years agonvme: Add support for data area 4 to get-telemetry-log
Jeff Lien [Mon, 31 Jan 2022 22:25:38 +0000 (16:25 -0600)]
nvme: Add support for data area 4 to get-telemetry-log

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Tue, 8 Feb 2022 10:12:03 +0000 (11:12 +0100)]
build: Update libnvme wrap

Update to the latest version of libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1342 from Arunpandian15/Supported_Cap_Config_List_Log_Page
Daniel Wagner [Tue, 8 Feb 2022 10:08:19 +0000 (11:08 +0100)]
Merge pull request #1342 from Arunpandian15/Supported_Cap_Config_List_Log_Page

nvme: Add Supported Capacity Configuration List log page(LID: 0x11)

3 years agoMerge pull request #1355 from igaw/fix-libjson-define
Daniel Wagner [Tue, 8 Feb 2022 09:34:05 +0000 (10:34 +0100)]
Merge pull request #1355 from igaw/fix-libjson-define

nvme: Rename LIBJSONC_14 to CONFIG_JSONC_14

3 years agonvme: Rename LIBJSONC_14 to CONFIG_JSONC_14
Daniel Wagner [Tue, 8 Feb 2022 09:27:17 +0000 (10:27 +0100)]
nvme: Rename LIBJSONC_14 to CONFIG_JSONC_14

We missed to rename LIBJSONC_14 to CONFIG_JSONC_14 in the nvme.h
header file in 4c3a8c058eb3 ("build: Prefix configuration options").

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Add Supported Capacity Configuration List log page(LID: 0x11)
Arunpandian J [Mon, 7 Feb 2022 05:40:22 +0000 (11:10 +0530)]
nvme: Add Supported Capacity Configuration List log page(LID: 0x11)

Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agoMerge pull request #1353 from igaw/fail-on-warnings
Daniel Wagner [Mon, 7 Feb 2022 14:29:39 +0000 (15:29 +0100)]
Merge pull request #1353 from igaw/fail-on-warnings

build: Make CI build fail on warnings.

3 years agonvme: Provide format string for fprintf in get_ns_id
Daniel Wagner [Mon, 7 Feb 2022 14:26:39 +0000 (15:26 +0100)]
nvme: Provide format string for fprintf in get_ns_id

fprintf() expects a format string. Update the error string handling to
usual pattern.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Make CI build fail on warnings.
Daniel Wagner [Mon, 7 Feb 2022 14:13:40 +0000 (15:13 +0100)]
build: Make CI build fail on warnings.

Currently, warnings are hidden in the logs and the build is marked as
succeeded. Mark all warnings as error so that we see them show up in
the review process.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1352 from Arunpandian15/Enhanced_ctlr_MD
Daniel Wagner [Fri, 4 Feb 2022 13:18:19 +0000 (14:18 +0100)]
Merge pull request #1352 from Arunpandian15/Enhanced_ctlr_MD

nvme: Add Enhanced Controller Meta Data(FID: 0x7D)

3 years agonvme: Add Enhanced Controller Meta Data(FID: 0x7D)
Arunpandian J [Fri, 4 Feb 2022 09:55:50 +0000 (15:25 +0530)]
nvme: Add Enhanced Controller Meta Data(FID: 0x7D)

Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agonvme-print: Add NVME_FEAT_FID_ENH_CTRL_METADATA to nvme_feature_to_string
Daniel Wagner [Fri, 4 Feb 2022 13:14:27 +0000 (14:14 +0100)]
nvme-print: Add NVME_FEAT_FID_ENH_CTRL_METADATA to nvme_feature_to_string

Add missing NVME_FEAT_FID_ENH_CTRL_METADATA to stringify function
nvme_feature_to_string().

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1312 from sc108-lee/for-upstream/tp4095
Daniel Wagner [Fri, 4 Feb 2022 13:11:19 +0000 (14:11 +0100)]
Merge pull request #1312 from sc108-lee/for-upstream/tp4095

For upstream/tp4095

3 years agonvme-print: remove unused nvme_show_id_ctrl function
Steven Seungcheol Lee [Fri, 4 Feb 2022 08:48:11 +0000 (17:48 +0900)]
nvme-print: remove unused nvme_show_id_ctrl function

rename __nvme_show_id_ctrl -> nvme_show_id_ctrl

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add nvm-id-ns-lba-format(CNS 0Ah) command from TP4095
Steven Seungcheol Lee [Fri, 7 Jan 2022 09:37:06 +0000 (18:37 +0900)]
nvme: Add nvm-id-ns-lba-format(CNS 0Ah) command from TP4095

I/O Command Set specific Identify Namespace data structure
for the specified LBA Format index for the NVM Command Set
specified in the CSI field.

None capabilities from nvme_id_ns structure are returned as 0 with this command
Set maximum nlbaf when identify ns for all ns is failed to print elbafs

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add NVM Command Set specific identify namespace command
Steven Seungcheol Lee [Thu, 6 Jan 2022 12:53:08 +0000 (21:53 +0900)]
nvme: Add NVM Command Set specific identify namespace command

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add id-ns-lba-format(CNS 09h) command from TP4095
Steven Seungcheol Lee [Thu, 6 Jan 2022 07:54:07 +0000 (16:54 +0900)]
nvme: Add id-ns-lba-format(CNS 09h) command from TP4095

Identify Namespace data structure for the specified
User Data Format index containing the namespace capabilities
for the NVM Command Set.

None capabilities from nvme_id_ns structure are returned as 0 with this command

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: Add nulbaf(Number of Unique Capability LBA Formats) field on nvmd_id_ns
Steven Seungcheol Lee [Wed, 5 Jan 2022 08:03:09 +0000 (17:03 +0900)]
nvme: Add nulbaf(Number of Unique Capability LBA Formats) field on nvmd_id_ns

Based on spec NVMe - TP 4095 Namespace Capability Reporting 2021.06.28 - Ratified

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agosubprojects: libnvme update
Steven Seungcheol Lee [Mon, 17 Jan 2022 07:21:55 +0000 (16:21 +0900)]
subprojects: libnvme update

Include tp4095 changes

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1351 from sc108-lee/fix/dracut_dir
Daniel Wagner [Fri, 4 Feb 2022 07:22:05 +0000 (08:22 +0100)]
Merge pull request #1351 from sc108-lee/fix/dracut_dir

meson: fix default dracut directory based on dracut manual

3 years agomeson: fix default dracut directory based on dracut manual
Steven Seungcheol Lee [Fri, 4 Feb 2022 07:13:04 +0000 (16:13 +0900)]
meson: fix default dracut directory based on dracut manual

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1344 from sc108-lee/fix/rpmbuild
Daniel Wagner [Fri, 4 Feb 2022 06:50:00 +0000 (07:50 +0100)]
Merge pull request #1344 from sc108-lee/fix/rpmbuild

Fix/rpmbuild

3 years agoMerge pull request #1350 from amaier17/andrew/fix-readme
Daniel Wagner [Fri, 4 Feb 2022 06:40:21 +0000 (07:40 +0100)]
Merge pull request #1350 from amaier17/andrew/fix-readme

README: Update the ubuntu install instructions and fix a formatting issue

3 years agorpmbuild: Add json required version that detected from meson
Steven Seungcheol Lee [Fri, 28 Jan 2022 07:53:52 +0000 (16:53 +0900)]
rpmbuild: Add json required version that detected from meson

With higher version of json-c, yum install shows required version of it
Error: Package: nvme-2.0-1.el7.x86_64 (/nvme-2.0-1.el7.x86_64)
           Requires: json-c >= 0.14
           Installed: json-c-0.11-4.el7_0.x86_64 (@anaconda)
               json-c = 0.11-4.el7_0

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agorpmbuild: enable rpmbuild via make rpm
Steven Seungcheol Lee [Thu, 27 Jan 2022 11:40:36 +0000 (20:40 +0900)]
rpmbuild: enable rpmbuild via make rpm

Makefile:
  add make rpm via meson
  rename libnvme -> nvme on Makefile

meson.build, meson_options.txt:
  using former path that nvme provided
  using libdir to be installed right place (32bit -> lib, 64bit -> lib64)

rpmbuild:
  remove unnecessary rpm stages
  since rpm spec file created from meson build
  no need to pacaking it to rpmbuild directory
  build in meson directory
  using rpmbuild directory for install & packaging rpm

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoREADME: Fix 80 character formatting issue
Andrew Maier [Thu, 3 Feb 2022 18:59:19 +0000 (11:59 -0700)]
README: Fix 80 character formatting issue

3 years agoREADME: Update the ubuntu install instructions
Andrew Maier [Thu, 3 Feb 2022 18:55:56 +0000 (11:55 -0700)]
README: Update the ubuntu install instructions

nvme-cli is now a supported package in the Ubuntu universe (from Xenial
and above). Therefore, we can remove the reference to the sbates ppa.
This patch also updates the wording around the supported packages and
architectures.

3 years agoMerge pull request #1346 from igaw/update-logging v2.0-rc2
Daniel Wagner [Tue, 1 Feb 2022 10:57:06 +0000 (11:57 +0100)]
Merge pull request #1346 from igaw/update-logging

nvme: Adapt to logging changes in libnvme

3 years agonvme: Adapt to logging changes in libnvme
Daniel Wagner [Mon, 31 Jan 2022 13:34:33 +0000 (14:34 +0100)]
nvme: Adapt to logging changes in libnvme

libnvme allows to define which file descriptor should be used for
logging. This is only for the fabric related interface relevant hence
this is attached to the nvme_root_r object.

Use common code for this into a helper which maps the verbose command
line levels to the correct log levels.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Tue, 1 Feb 2022 10:47:55 +0000 (11:47 +0100)]
build: Update libnvme wrap

Update to the latest version of libnvme.

3 years agoMerge pull request #1345 from igaw/nvme_strerror
Hannes Reinecke [Sat, 29 Jan 2022 08:31:34 +0000 (09:31 +0100)]
Merge pull request #1345 from igaw/nvme_strerror

Handle libnvme error codes and return proper error code when termiating nvme-cli

3 years agotree: Stringify libnvme error codes
Daniel Wagner [Fri, 28 Jan 2022 13:52:25 +0000 (14:52 +0100)]
tree: Stringify libnvme error codes

libnvme can return library specific error codes. Introduce a wrapper
which makes sure we print a proper error text.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agotree: Do not map status to errno codes
Daniel Wagner [Fri, 28 Jan 2022 17:58:45 +0000 (18:58 +0100)]
tree: Do not map status to errno codes

The caller of the commands is not interersted in any mapping
of status codes to error codes. It only wants to know success(0) or
failure (!=0). Remove all nvme_status_to_errno() calls.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Return 0 on success and 1 on error
Daniel Wagner [Fri, 28 Jan 2022 13:35:50 +0000 (14:35 +0100)]
nvme: Return 0 on success and 1 on error

main() should return 0 on success and 1 on error. Generally there are
not fixed rules. Though SUSv3 specifies EXIT_SUCCESS(0) and
EXIT_FAILURE(1).

The main reason why we should avoid anything but 0/1 is the shell
interpretes those return codes. Values above 128 can cause confusion
in shell scripts. When a command is terminated by a signal, the
shell indicates this fact by setting the value of the variable $?
to 128 plus the signal number.

See also
  https://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux
  https://tldp.org/LDP/abs/html/exitcodes.html

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Do no try to print out of memory message
Daniel Wagner [Fri, 28 Jan 2022 17:40:16 +0000 (18:40 +0100)]
nvme: Do no try to print out of memory message

Avoid allocating new memory for printing an error message when we run
out memory.

While at also remove all errno assigments as we do use them later.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1343 from igaw/fix-list-ns
Daniel Wagner [Fri, 28 Jan 2022 12:40:46 +0000 (13:40 +0100)]
Merge pull request #1343 from igaw/fix-list-ns

nvme: Call nvme_identify_*list with correct nsid offset

3 years agonvme: Call nvme_identify_*list with correct nsid offset
Daniel Wagner [Thu, 27 Jan 2022 10:06:39 +0000 (11:06 +0100)]
nvme: Call nvme_identify_*list with correct nsid offset

Commit 81bb8289f642 ("nvme: update list-ns nsid option") changed the
start index for the namespace argument. But the merge back from the
monolithic branch was incomplete and missed to update the index offset
when calling nvme_identify_allocated_ns_list and
nvme_identify_active_ns_list.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1338 from ikegami-t/telemetry-log
Daniel Wagner [Thu, 27 Jan 2022 08:38:37 +0000 (09:38 +0100)]
Merge pull request #1338 from ikegami-t/telemetry-log

nvme: MAINT: Refactor telemetry-log command for build warning #1323

3 years agonvme: Use canonical types
Tokunori Ikegami [Thu, 27 Jan 2022 08:31:30 +0000 (09:31 +0100)]
nvme: Use canonical types

Use the more common type names.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[dwagner: carved this change from other independ change]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Refactor telemetry-log command for build warning #1323
Tokunori Ikegami [Fri, 21 Jan 2022 15:58:38 +0000 (00:58 +0900)]
nvme: Refactor telemetry-log command for build warning #1323

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
3 years agoMerge pull request #1341 from jeffreyalien/new-dev-support2
Daniel Wagner [Tue, 25 Jan 2022 16:58:09 +0000 (17:58 +0100)]
Merge pull request #1341 from jeffreyalien/new-dev-support2

[nvme-cli] Add support for Additional SN450 Device

3 years agoMerge pull request #1340 from hreinecke/tls-key
Hannes Reinecke [Mon, 24 Jan 2022 10:34:42 +0000 (11:34 +0100)]
Merge pull request #1340 from hreinecke/tls-key

nvme: fixup 'check-tls-key'

3 years agoMerge pull request #1339 from igaw/drop-nvme_msg
Daniel Wagner [Mon, 24 Jan 2022 10:33:56 +0000 (11:33 +0100)]
Merge pull request #1339 from igaw/drop-nvme_msg

fabrics: Stop using nvme_msg from libnvme

3 years agonvme: fixup 'check-tls-key'
Hannes Reinecke [Mon, 24 Jan 2022 10:33:23 +0000 (11:33 +0100)]
nvme: fixup 'check-tls-key'

The offsets into the key are wrong, causing the check to fail on
valid keys.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: Stop using nvme_msg from libnvme
Daniel Wagner [Fri, 21 Jan 2022 17:01:33 +0000 (18:01 +0100)]
fabrics: Stop using nvme_msg from libnvme

nvme_msg() is logging function from libnvme. The cli should not use
the logging infrastructure from the library instead it should use it's
own infrastructure. At this point nvme-cli doesn't have one, so just
use the default stderr for all error messages.

This is a preperation step to unexport the nvme_msg() from libnvme.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1337 from hreinecke/disable-sqflow v2.0-rc1
Hannes Reinecke [Fri, 21 Jan 2022 12:58:16 +0000 (13:58 +0100)]
Merge pull request #1337 from hreinecke/disable-sqflow

build: Update libnvme wrap

3 years agobuild: Update libnvme wrap
Hannes Reinecke [Fri, 21 Jan 2022 10:09:52 +0000 (11:09 +0100)]
build: Update libnvme wrap

Get updated nvmf_add_ctrl() argument list (libnvme PR#195)
and fixup callers.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1336 from hreinecke/ctrl-init
Hannes Reinecke [Fri, 21 Jan 2022 12:08:34 +0000 (13:08 +0100)]
Merge pull request #1336 from hreinecke/ctrl-init

build: Update libnvme wrap

3 years agobuild: Update libnvme wrap
Hannes Reinecke [Fri, 21 Jan 2022 10:09:52 +0000 (11:09 +0100)]
build: Update libnvme wrap

Get fix for incorrect controller display (libnvme PR#195)

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 21 Jan 2022 10:09:52 +0000 (11:09 +0100)]
build: Update libnvme wrap

Get compile fix for latest nvme_get_log_args changes (libnvme PR#192)

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Update zlib to verison 1.2.11-6
Daniel Wagner [Fri, 21 Jan 2022 10:08:38 +0000 (11:08 +0100)]
build: Update zlib to verison 1.2.11-6

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1330 from Arunpandian15/Media_Unit_Status_Log_Page
Daniel Wagner [Fri, 21 Jan 2022 09:32:24 +0000 (10:32 +0100)]
Merge pull request #1330 from Arunpandian15/Media_Unit_Status_Log_Page

nvme: Add Media Unit Status log page(LID: 0x10)

3 years agonvme: Add Media Unit Status log page(LID: 0x10)
Arunpandian J [Thu, 20 Jan 2022 08:57:07 +0000 (14:27 +0530)]
nvme: Add Media Unit Status log page(LID: 0x10)

Reviewed-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Arunpandian J <apj.arun@samsung.com>
3 years agobuild: Sync libnvme wrap to lastest version
Daniel Wagner [Fri, 21 Jan 2022 09:26:06 +0000 (10:26 +0100)]
build: Sync libnvme wrap to lastest version

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1335 from hreinecke/tls-key
Daniel Wagner [Fri, 21 Jan 2022 09:22:50 +0000 (10:22 +0100)]
Merge pull request #1335 from hreinecke/tls-key

nvme: add 'gen-tls-key' and 'check-tls-key' options

3 years agoMerge pull request #1333 from sc108-lee/fix/#1324
Daniel Wagner [Fri, 21 Jan 2022 09:14:44 +0000 (10:14 +0100)]
Merge pull request #1333 from sc108-lee/fix/#1324

fix #1324 using explicit casting, using libnvme macro for cap

3 years agoMerge pull request #1329 from samiWaheed/master
Daniel Wagner [Fri, 21 Jan 2022 09:10:45 +0000 (10:10 +0100)]
Merge pull request #1329 from samiWaheed/master

list-ctrl should support CNS values of 12h and 13h

3 years agoMerge pull request #1332 from hreinecke/check-ns
Daniel Wagner [Fri, 21 Jan 2022 08:47:40 +0000 (09:47 +0100)]
Merge pull request #1332 from hreinecke/check-ns

nvme-print: check namespace in nvme_ctrl_for_each_path()

3 years agonvme: add 'gen-tls-key' and 'check-tls-key' options
Hannes Reinecke [Fri, 21 Jan 2022 08:33:16 +0000 (09:33 +0100)]
nvme: add 'gen-tls-key' and 'check-tls-key' options

Add options to generate and check an NVMe TLS PSK.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1307 from sc108-lee/fix/flbas
Daniel Wagner [Fri, 21 Jan 2022 08:31:13 +0000 (09:31 +0100)]
Merge pull request #1307 from sc108-lee/fix/flbas

nvme: modify flbas rsvd bits to be used

3 years agofix #1324 using explicit casting, using libnvme macro for cap
Steven Seungcheol Lee [Fri, 21 Jan 2022 04:58:15 +0000 (13:58 +0900)]
fix #1324 using explicit casting, using libnvme macro for cap

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme-print: check namespace in nvme_ctrl_for_each_path()
Hannes Reinecke [Fri, 21 Jan 2022 07:17:34 +0000 (08:17 +0100)]
nvme-print: check namespace in nvme_ctrl_for_each_path()

We should check if the namespace is available when scanning all
paths in nvme_ctrl_for_each_path(); a controller might be resetting
and might not be able to access the namespaces here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1327 from igaw/remove-lightnvm-doc
Hannes Reinecke [Fri, 21 Jan 2022 07:13:25 +0000 (08:13 +0100)]
Merge pull request #1327 from igaw/remove-lightnvm-doc

doc: Remove lightnvm documentation

3 years agonvme: modify flbas rsvd bits to be used
Steven Seungcheol Lee [Fri, 7 Jan 2022 06:56:24 +0000 (15:56 +0900)]
nvme: modify flbas rsvd bits to be used

flbas Bits 6:5 indicate the most significant 2 bits of
the Format Index of the supported LBA Format indicated
in this data structure that was used to format the namespace

using libnvme util function nvme_id_ns_flbas_to_lbaf_inuse
to extract currently used lba index

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1328 from jeffreyalien/compiler-warnings2
Daniel Wagner [Thu, 20 Jan 2022 07:37:30 +0000 (08:37 +0100)]
Merge pull request #1328 from jeffreyalien/compiler-warnings2

[nvme-cli] Fix build warnings in Micron Plugin - Issue 1317

3 years agoUpdate nvme.c
Sami Waheed [Thu, 20 Jan 2022 01:31:29 +0000 (17:31 -0800)]
Update nvme.c

list-ctrl should support CNS values of 12h and 13h.  The support for CNS=13h was dropped from 2.0 version

3 years ago[nvme-cli] Fix build warnings in Micron Plugin - Issue 1317
Jeff Lien [Wed, 19 Jan 2022 18:49:34 +0000 (12:49 -0600)]
[nvme-cli] Fix build warnings in Micron Plugin - Issue 1317

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agodoc: Remove lightnvm documentation
Daniel Wagner [Wed, 19 Jan 2022 17:10:05 +0000 (18:10 +0100)]
doc: Remove lightnvm documentation

Commit fa49249 ("nvme: remove lightnvm") removed the implementation but
missed to remove the documentation. Remove it now.

While at it also remove it from bash-completion.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1325 from jeffreyalien/compiler-warnings2
Daniel Wagner [Wed, 19 Jan 2022 15:24:19 +0000 (16:24 +0100)]
Merge pull request #1325 from jeffreyalien/compiler-warnings2

[nvme-cli] Fix build warnings in WDC Plugin from Issue #1309

3 years ago[nvme-cli] Fix build warnings in WDC Plugin from Issue #1309
Jeff Lien [Wed, 12 Jan 2022 22:04:12 +0000 (16:04 -0600)]
[nvme-cli] Fix build warnings in WDC Plugin from Issue #1309

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years ago[nvme-cli] Add support for Additional SN450 Device
Jeff Lien [Tue, 18 Jan 2022 19:03:27 +0000 (13:03 -0600)]
[nvme-cli] Add support for Additional SN450 Device
Updated WDC Plugin to 1.16.1

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1318 from hreinecke/host_traddr v2.0-rc0
Daniel Wagner [Fri, 14 Jan 2022 13:31:32 +0000 (14:31 +0100)]
Merge pull request #1318 from hreinecke/host_traddr

Update to libnvme host_traddr changes

3 years agofabrics: Only disconnect discovery controllers during 'connect-all'
Hannes Reinecke [Fri, 14 Jan 2022 13:16:22 +0000 (14:16 +0100)]
fabrics: Only disconnect discovery controllers during 'connect-all'

When calling 'connect-all' the 'persistent' argument only applies to
discovery controllers; normal I/O controllers should stay connected,
as this was kinda the point...

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoRemove 'nvme-private.h'
Hannes Reinecke [Fri, 14 Jan 2022 12:29:37 +0000 (13:29 +0100)]
Remove 'nvme-private.h'

With the libnvme split this file is not used anymore.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agofabrics: update for libnvme host_traddr and host_iface changes
Hannes Reinecke [Fri, 14 Jan 2022 12:28:15 +0000 (13:28 +0100)]
fabrics: update for libnvme host_traddr and host_iface changes

Libnvme moved the 'host_traddr' and 'host_iface' entries into the
fabrics configuration, so update nvme-cli to follow suit.

Signed-off-by: Hannes Reinecke <hare@suse.de>
3 years agoMerge pull request #1316 from jeffreyalien/new-dev-support2
Daniel Wagner [Fri, 14 Jan 2022 05:18:19 +0000 (06:18 +0100)]
Merge pull request #1316 from jeffreyalien/new-dev-support2

Add support for new PCI device ID for SN655 Drive