]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
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 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>
3 years agoMerge pull request #1300 from eli-schwartz/meson-fixups
Daniel Wagner [Mon, 27 Dec 2021 13:38:02 +0000 (14:38 +0100)]
Merge pull request #1300 from eli-schwartz/meson-fixups

Meson fixups

3 years agomeson: fix incorrect substitutions in configured files
Eli Schwartz [Fri, 24 Dec 2021 00:14:22 +0000 (19:14 -0500)]
meson: fix incorrect substitutions in configured files

The custom Makefile rules performed this substitution:

@@VAR@@ -> VAL

However, meson did this substitution:

@@VAR@@ -> @VAL@

This produced incorrect behavior, such as configuring a udev file to
read:

install_items+=" @/usr/etc/udev/rules.d@/70-nvmf-autoconnect.rules "

muon, meanwhile, failed loudly with:

/tmp/nvme-cli/nvmf-autoconnect/dracut-conf/70-nvmf-autoconnect.conf.in:1:19: error: key of zero length not supported
  1 | install_items+=" @@UDEVRULESDIR@@/70-nvmf-autoconnect.rules "
                        ^
/tmp/nvme-cli/meson.build:161:1: error: in function configure_file
161 | configure_file(
      ^

Since meson does not support custom token rules for configuring
replacements, and there is no real benefit to doubling the @@, just fix
this to use one @.

3 years agomeson: fix incorrect argument call to has_header()
Eli Schwartz [Fri, 24 Dec 2021 00:12:36 +0000 (19:12 -0500)]
meson: fix incorrect argument call to has_header()

It only accepts a string, but an array of strings was passed.

Due to meson internal implementation details, arguments are sometimes
flattened and this works anyway.

However, muon choked on it and errored out.

3 years agoMerge pull request #1215 from olase23/open_namespace_exclusive
Daniel Wagner [Thu, 23 Dec 2021 10:46:01 +0000 (11:46 +0100)]
Merge pull request #1215 from olase23/open_namespace_exclusive

nvme: open namespace exclusive by default

3 years agonvme: Consolidate --force option and udpate documetation
Daniel Wagner [Wed, 15 Dec 2021 09:32:37 +0000 (10:32 +0100)]
nvme: Consolidate --force option and udpate documetation

Refactor the error handling for the --force option.
Drop support for the -f and use --force consistent in all commands.
Also update the documation accordingly.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme: open namespace exclusive by default
Olaf Schmerse [Tue, 19 Oct 2021 10:05:59 +0000 (12:05 +0200)]
nvme: open namespace exclusive by default

All data modifying functions open the namespace exclusive. With the --force
option this can be bypassed.

Signed-off-by: Olaf Schmerse <olaf.schmerse@ionos.com>
3 years agomemblaze-nvme: remove power loss protection from smart-log-add (#1292)
jinhua2021 [Wed, 22 Dec 2021 13:37:19 +0000 (21:37 +0800)]
memblaze-nvme: remove power loss protection from smart-log-add (#1292)

* remove power loss protection from smart-log-add

Signed-off-by: jinhua2021 <jinhua.huang@memblaze.com>
3 years agoMerge pull request #1291 from igaw/meson-feature-option
Daniel Wagner [Tue, 21 Dec 2021 10:34:06 +0000 (11:34 +0100)]
Merge pull request #1291 from igaw/meson-feature-option

build: Use Feature option for OpenSSL

3 years agobuild: Use Feature option for OpenSSL
Daniel Wagner [Mon, 20 Dec 2021 16:02:19 +0000 (17:02 +0100)]
build: Use Feature option for OpenSSL

Simplify the OpenSSL logic by using meson's Feature option.

Suggested-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1288 from igaw/gen-nvme-connect-doc
Daniel Wagner [Fri, 17 Dec 2021 17:48:57 +0000 (18:48 +0100)]
Merge pull request #1288 from igaw/gen-nvme-connect-doc

Generate nvme-connect documentation

3 years agofabrics: Remove unnecessary brackets
Daniel Wagner [Fri, 17 Dec 2021 17:45:25 +0000 (18:45 +0100)]
fabrics: Remove unnecessary brackets

0ad49ade724e ("Print device name on connect") introduced the brackets
which were necessary in the orginal code base. Drop them.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agodocs: Update nvme-connect
Daniel Wagner [Fri, 17 Dec 2021 17:44:43 +0000 (18:44 +0100)]
docs: Update nvme-connect

0ad49ade724e ("Print device name on connect") added new option,
update the generated documetation.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1287 from ikegami-t/nvme-connet
Daniel Wagner [Fri, 17 Dec 2021 17:36:08 +0000 (18:36 +0100)]
Merge pull request #1287 from ikegami-t/nvme-connet

Print device name on connect

3 years agoPrint device name on connect
Tokunori Ikegami [Fri, 17 Dec 2021 17:01:02 +0000 (02:01 +0900)]
Print device name on connect

Commit 0ad49ad ("Print device name on connect")
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
3 years agoMerge pull request #1286 from igaw/add-ctrl-metadata-and-ns-metadata
Daniel Wagner [Fri, 17 Dec 2021 16:47:40 +0000 (17:47 +0100)]
Merge pull request #1286 from igaw/add-ctrl-metadata-and-ns-metadata

Add ctrl metadata and ns metadata

3 years agonvme-print: Add Controller Metadata and Namespace Metadata
Daniel Wagner [Fri, 17 Dec 2021 15:45:10 +0000 (16:45 +0100)]
nvme-print: Add Controller Metadata and Namespace Metadata

Port and extent the libnvme part from the commit b8a403b ("Add NVMe MI
Features: Controller Metadata (0x7E) and Namespace Metadata (0x7F).")
from the nvme-cli monolithic branch.

While at it add the missing definitions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme-print: Resort nvme_features_ids usage
Daniel Wagner [Fri, 17 Dec 2021 15:10:39 +0000 (16:10 +0100)]
nvme-print: Resort nvme_features_ids usage

The order is not matching the definion order of the spec. Let's make
it consistent and order them according the value.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1285 from igaw/wrapdb-openssl-zlib
Daniel Wagner [Fri, 17 Dec 2021 14:38:24 +0000 (15:38 +0100)]
Merge pull request #1285 from igaw/wrapdb-openssl-zlib

build: wrapdb for OpenSSL and zlib, detect libhugetblfs

3 years agobuild: Change wording from 'required' to 'available'
Daniel Wagner [Wed, 15 Dec 2021 13:25:19 +0000 (14:25 +0100)]
build: Change wording from 'required' to 'available'

The help text is added to config.h which is a bit missleading. The
flag indicates if the library/header/feature is available not if it is
required.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Use compiler.find_library for libhugetlbfs
Daniel Wagner [Wed, 15 Dec 2021 13:22:02 +0000 (14:22 +0100)]
build: Use compiler.find_library for libhugetlbfs

libhugetlbfs is not detected via dependency() because the library
neither provides a pkg-config() nor a cmake helper. Use
compiler.find_library to figure out if the library is available.

We do not use the has_header feature of compiler.find_library()
function as this would update our minimum version for meson to
0.50.0. Instead open code it by using compiler.has_header().

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Add wrapdb support for zlib
Daniel Wagner [Wed, 15 Dec 2021 12:29:54 +0000 (13:29 +0100)]
build: Add wrapdb support for zlib

The meson wrapdb library supports also zlib. Let's add it as fallback
option to the build.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Add wrapdb support for OpenSSL
Daniel Wagner [Wed, 15 Dec 2021 12:18:06 +0000 (13:18 +0100)]
build: Add wrapdb support for OpenSSL

The meson wrapdb library has support for OpenSSL. Introduce a combo
option for full control if the user wants OpenSSL added to nvme-cli or
not. Only if the option is set to 'true' the fallback will be
considered when there is no system version of OpenSSL available.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agobuild: Add subpackages contents to .gitignore
Steven Seungcheol Lee [Thu, 16 Dec 2021 08:15:08 +0000 (09:15 +0100)]
build: Add subpackages contents to .gitignore

we just need to maintain .wrap files for dependencies

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoMerge pull request #1277 from igaw/add_get_log_page_fields_2.0
Daniel Wagner [Wed, 15 Dec 2021 13:44:39 +0000 (14:44 +0100)]
Merge pull request #1277 from igaw/add_get_log_page_fields_2.0

nvme: Add Command Set Idendifier and Offset Type to get_log

3 years agonvme: Add Command Set Idendifier and Offset Type to get_log
Daniel Wagner [Mon, 13 Dec 2021 14:01:28 +0000 (15:01 +0100)]
nvme: Add Command Set Idendifier and Offset Type to get_log

Add Command Set Identifier (CSI) and Offset Type (OT) support to
get_log as per the Spec 2.0.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agoMerge pull request #1284 from sc108-lee/fixes
Daniel Wagner [Wed, 15 Dec 2021 10:06:09 +0000 (11:06 +0100)]
Merge pull request #1284 from sc108-lee/fixes

Fixes

3 years agoMerge pull request #1282 from bjpaupor/report-zones-json
Daniel Wagner [Wed, 15 Dec 2021 10:03:28 +0000 (11:03 +0100)]
Merge pull request #1282 from bjpaupor/report-zones-json

Fix JSON Report Zones Output

3 years agobuild: Add subpackages dirs to .gitignore
Daniel Wagner [Wed, 15 Dec 2021 08:34:20 +0000 (09:34 +0100)]
build: Add subpackages dirs to .gitignore

Add the two not tracked by git directories to .gitignore.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agonvme-print: fix wrong log name, reorder case based on lid
Steven Seungcheol Lee [Wed, 15 Dec 2021 08:21:25 +0000 (17:21 +0900)]
nvme-print: fix wrong log name, reorder case based on lid

Log name based on spec to be aligned other logs name

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agonvme: getrandom function should be defined when sys/random.h is exist
Steven Seungcheol Lee [Wed, 15 Dec 2021 07:40:23 +0000 (16:40 +0900)]
nvme: getrandom function should be defined when sys/random.h is exist

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
3 years agoFix JSON report zones output
Brandon Paupore [Tue, 14 Dec 2021 17:49:15 +0000 (11:49 -0600)]
Fix JSON report zones output

Previously multiple JSON objects would be in the output of
zns-report-zones if there were more than 1024 zones requested because of
the chunked requests sent by nvme-cli.

Fix this to output a single JSON object with one zone_list. This is done
by passing around and appending to the zone_list, then outputting all of
it once after receiving all the reports.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
3 years agoMerge pull request #1276 from MatiasBjorling/zns-fixes
Hannes Reinecke [Tue, 14 Dec 2021 07:06:10 +0000 (08:06 +0100)]
Merge pull request #1276 from MatiasBjorling/zns-fixes

zns: small cleanups to zrwa

3 years agozns: Documentation update and whitespace fixes
Daniel Wagner [Mon, 13 Dec 2021 18:35:00 +0000 (19:35 +0100)]
zns: Documentation update and whitespace fixes

Signed-off-by: Daniel Wagner <dwagner@suse.de>
3 years agozns: small cleanups to zrwa
Matias Bjørling [Mon, 13 Dec 2021 13:38:21 +0000 (13:38 +0000)]
zns: small cleanups to zrwa

A couple of cleanups for the ZRWA to align it with the existing
style.

Signed-off-by: Matias Bjørling <matias.bjorling@wdc.com>
3 years agoMerge branch 'pel_fix_nvme_cli'
Daniel Wagner [Fri, 10 Dec 2021 15:15:43 +0000 (16:15 +0100)]
Merge branch 'pel_fix_nvme_cli'

3 years agonvme-cli: Add support Telemetry CRT in PEL
Wen Xiong [Wed, 1 Dec 2021 22:31:07 +0000 (17:31 -0500)]
nvme-cli: Add support Telemetry CRT in PEL

Add "Telemetry CRT" event in PEL.

Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
3 years agonvme-cli: Add support set feature event in PEL
Wen Xiong [Wed, 1 Dec 2021 22:29:58 +0000 (17:29 -0500)]
nvme-cli: Add support set feature event in PEL

Add "Set Feature" event in PEL.

Persistent Event Entries:
Event Number: 0
Event Type: Set Feature Event(0xb)
Event Type Revision: 1
Event Header Length: 21
Controller Identifier: 65
Event Timestamp: 564587204146155
Vendor Specific Information Length: 0
Event Length: 16
Set Feature Event Entry:
Set Feature ID  :0x7 (Number of Queues),  value:0x270027
        Number of IO Completion Queues Allocated (NCQA): 40
        Number of IO Submission Queues Allocated (NSQA): 40

Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
3 years agonvme-cli: Adds readable firmware level in persistent
Wen Xiong [Wed, 1 Dec 2021 22:28:44 +0000 (17:28 -0500)]
nvme-cli: Adds readable firmware level in persistent

For example, In Firmware Commit Event:

Old Firmware Revision: 3617604718875264338
New Firmware Revision: 3833777500989048146

changes to

Old Firmware Revision: 3617604718875264338 (REV.SP42)
New Firmware Revision: 3833777500989048146 (REV.SP45)

Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com