]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
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 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

3 years ago[nvme-cli] Update WDC plugin version to 1.16.0
Jeff Lien [Thu, 13 Jan 2022 18:32:47 +0000 (12:32 -0600)]
[nvme-cli] Update WDC plugin version to 1.16.0

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years ago[nvme-cli] Add support for new SN655 PCI ID - 0x2722
Jeff Lien [Mon, 10 Jan 2022 22:17:25 +0000 (16:17 -0600)]
[nvme-cli] Add support for new SN655 PCI ID - 0x2722

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1314 from igaw/api-rework
Hannes Reinecke [Tue, 11 Jan 2022 14:15:59 +0000 (15:15 +0100)]
Merge pull request #1314 from igaw/api-rework

nvme: Adapt to API rework

3 years agonvme: Adapt to API rework
Daniel Wagner [Mon, 10 Jan 2022 17:29:51 +0000 (18:29 +0100)]
nvme: Adapt to API rework

libnvme changed the calling API, which uses an an argument structure
instead of passing all arguments one by one. Update all call sites
accordingly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1313 from igaw/fix-unitialized-variable
Daniel Wagner [Mon, 10 Jan 2022 16:28:29 +0000 (17:28 +0100)]
Merge pull request #1313 from igaw/fix-unitialized-variable

Fix unitialized variable

3 years agonvme: Initialize variable in passthru
Daniel Wagner [Mon, 10 Jan 2022 15:28:31 +0000 (16:28 +0100)]
nvme: Initialize variable in passthru

Always initialize huge so that we avoid reading the unitialized
variable in nvme_free().

Fixes: fb15eee3d72b ("support a meatadata file redirection for passthru").
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Add libhugetablefs to CI environment
Daniel Wagner [Mon, 10 Jan 2022 15:25:46 +0000 (16:25 +0100)]
build: Add libhugetablefs to CI environment

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1310 from linux-nvme/pt-meta
Daniel Wagner [Mon, 10 Jan 2022 08:33:47 +0000 (09:33 +0100)]
Merge pull request #1310 from linux-nvme/pt-meta

Pt meta

3 years agoupdate passthrough documentation
Keith Busch [Fri, 7 Jan 2022 17:08:55 +0000 (09:08 -0800)]
update passthrough documentation

Adding the metadata file parameter.

Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agosupport a meatadata file redirection for passthru
Keith Busch [Tue, 4 Jan 2022 17:02:55 +0000 (09:02 -0800)]
support a meatadata file redirection for passthru

The passthrough command provided a way to specific a metadata size, but
no way to save or set the data from a file. Provide an option so this is
allowed.

While we're here, it looks like the passthrough command only supported
file redirection for data-out commands. Go ahead and fix that with this
commit since the metadata needs to go both ways too.

Link: https://github.com/linux-nvme/nvme-cli/issues/1298
Signed-off-by: Keith Busch <kbusch@kernel.org>
3 years agobuild: Add provide section in libnvme.wrap
Daniel Wagner [Fri, 7 Jan 2022 17:02:36 +0000 (18:02 +0100)]
build: Add provide section in libnvme.wrap

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1297 from igaw/openssl-3-support
Daniel Wagner [Fri, 7 Jan 2022 16:46:39 +0000 (17:46 +0100)]
Merge pull request #1297 from igaw/openssl-3-support

Add OpenSSL 3 support for dhchap-key generation

3 years agonvme: Use libnvme for generating DH-HMAC-CHAP host keys
Daniel Wagner [Wed, 22 Dec 2021 13:31:16 +0000 (14:31 +0100)]
nvme: Use libnvme for generating DH-HMAC-CHAP host keys

libnvme learned to generate the keyes. Use it. With this we can also
drop the dependency on OpenSSL.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1290 from igaw/logical-block-size
Daniel Wagner [Fri, 7 Jan 2022 16:40:54 +0000 (17:40 +0100)]
Merge pull request #1290 from igaw/logical-block-size

 nvme: support ns generic device to submit_io

3 years agonvme: Use libnvme helper to retrieve logical block size
Daniel Wagner [Mon, 20 Dec 2021 15:34:35 +0000 (16:34 +0100)]
nvme: Use libnvme helper to retrieve logical block size

Use the libnvme helper nvme_get_logical_block_size to figure out the
logical block size. This way we have support for normal char
devices (nvme%d) and for generic devices (ng%d%d).

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: Remove unused function decleration
Daniel Wagner [Mon, 20 Dec 2021 10:51:37 +0000 (11:51 +0100)]
nvme: Remove unused function decleration

There is no implementation for these functions and no user.
Remove it.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1302 from igaw/fix-help-message-fid-support-effects-log
Daniel Wagner [Fri, 7 Jan 2022 16:34:19 +0000 (17:34 +0100)]
Merge pull request #1302 from igaw/fix-help-message-fid-support-effects-log

Fix help message fid support effects log

3 years agonvme: Fix entry short help text for fid-support-effects-log
Daniel Wagner [Tue, 28 Dec 2021 15:44:36 +0000 (16:44 +0100)]
nvme: Fix entry short help text for fid-support-effects-log

The function is to retrieve the log page information. Update the help
text accordingly and moved the entry up into the group of get_log_page
functions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Set maximum warning level
Daniel Wagner [Mon, 27 Dec 2021 14:52:50 +0000 (15:52 +0100)]
build: Set maximum warning level

Without defining the default warning level the build system
will use the default level, which is implementation depended.
For example muon sets it to 3 which includes '-Wpendantic'.
This results in a lot of ISO-C non compliant warnings.

Let's define the warning level so that all build systems
are using the same values.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Ingore default .build directory
Daniel Wagner [Fri, 7 Jan 2022 16:28:08 +0000 (17:28 +0100)]
build: Ingore default .build directory

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1306 from igaw/build-replace-make-by-meson
Daniel Wagner [Fri, 7 Jan 2022 16:07:45 +0000 (17:07 +0100)]
Merge pull request #1306 from igaw/build-replace-make-by-meson

build: Replacing make by meson.

3 years agobuild: Replacing make by meson.
Daniel Wagner [Fri, 7 Jan 2022 10:14:20 +0000 (11:14 +0100)]
build: Replacing make by meson.

This involves replacing all Makefiles by meson.build files.
Also the top-level configure script now simply invokes meson.
The top-level Makefile is just a wrapper for meson. It supports
the following operations:

make
make test
make install
make clean    # Remove build artifacts but keep configuration
make purge    # Remove build artifacts and configuration

Based on Martin Belanger's libnvme work.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Fix *.wrap exclude pattern in .gitignore
Daniel Wagner [Fri, 7 Jan 2022 15:49:01 +0000 (16:49 +0100)]
build: Fix *.wrap exclude pattern in .gitignore

The current rules trigger git to to complain with

 $ git add subprojects/libnvme.wrap
 The following paths are ignored by one of your .gitignore files:
 subprojects

We need to keep the parent directory in the tracking
domain and just filter out all sub directories and files
except the wrap files.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1304 from jeffreyalien/master
Daniel Wagner [Fri, 7 Jan 2022 10:34:57 +0000 (11:34 +0100)]
Merge pull request #1304 from jeffreyalien/master

[nvme-cli] Fix vs-smart-add-log bug to retrieve customer id

3 years ago[nvme-cli] Fix vs-smart-add-log bug to retrieve customer id
Jeff Lien [Thu, 6 Jan 2022 15:54:02 +0000 (09:54 -0600)]
[nvme-cli] Fix vs-smart-add-log bug to retrieve customer id

Signed-off-by: Jeff Lien <jeff.lien@wdc.com>
3 years agoMerge pull request #1301 from igaw/build-fix-include-config
Daniel Wagner [Wed, 29 Dec 2021 07:55:43 +0000 (08:55 +0100)]
Merge pull request #1301 from igaw/build-fix-include-config

build: cleanup and make the defines more consistent

3 years agobuild: Use _dep postfix for dependency objects
Daniel Wagner [Wed, 22 Dec 2021 09:37:10 +0000 (10:37 +0100)]
build: Use _dep postfix for dependency objects

Use consistently _dep postfix for all dependency objects.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Prefix configuration options
Daniel Wagner [Wed, 22 Dec 2021 09:35:06 +0000 (10:35 +0100)]
build: Prefix configuration options

Use the prefix CONFIG for all configuration option.

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