]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
2 years agoMerge pull request #1819 from innogritkenny/master
Daniel Wagner [Wed, 15 Feb 2023 10:21:00 +0000 (11:21 +0100)]
Merge pull request #1819 from innogritkenny/master

plugins/innogrit: modify command opcode for eventlog and cdump

2 years agonvme-print: print the nvme generic name in json output as well
Sagi Grimberg [Wed, 15 Feb 2023 09:00:20 +0000 (11:00 +0200)]
nvme-print: print the nvme generic name in json output as well

For both simple and detailed outputs present the nvme generic
chardev name/path similar to how the ns name/path is presented.

Fixes: f0895ceb145e ("nvme-print: print generic device in list command")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Link: https://lore.kernel.org/r/20230215090020.620994-1-sagi@grimberg.me
[dwagner: added additional "Generic" output to json_details_list in the
          "Namespace" section]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoplugins/innogrit: modify command opcode for eventlog and cdump
innogritkenny [Wed, 15 Feb 2023 09:05:59 +0000 (17:05 +0800)]
plugins/innogrit: modify command opcode for eventlog and cdump

2 years agoMerge pull request #1817 from sc108-lee/completion
Daniel Wagner [Wed, 15 Feb 2023 07:40:20 +0000 (08:40 +0100)]
Merge pull request #1817 from sc108-lee/completion

completion: fix typo, add missing args

2 years agocompletion: fix typo, add missing args
Steven Seungcheol Lee [Wed, 15 Feb 2023 04:42:31 +0000 (13:42 +0900)]
completion: fix typo, add missing args

write-zeros -> write-zeroes
--nmic short name is -m
add missing space
add missing args

Reported-by: Youngjin Jung <yj4369.jung@samsung.com>
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Co-authored-by: Minsik Jeon <hmi.jeon@samsung.com>
2 years agoMerge pull request #1814 from jeffreyalien/latency-log
Daniel Wagner [Tue, 14 Feb 2023 08:55:51 +0000 (09:55 +0100)]
Merge pull request #1814 from jeffreyalien/latency-log

plugins/wdc: Fix data Formatting for Latency Monitor Log Page

2 years agoplugins/wdc: Fix data Formatting for Latency Monitor Log Page
Jeffrey Lien [Fri, 10 Feb 2023 22:14:04 +0000 (16:14 -0600)]
plugins/wdc: Fix data Formatting for Latency Monitor Log Page

Signed-off-by: Jeffrey Lien <jeff.lien@wdc.com>
2 years agoMerge pull request #1800 from igaw/make-json-c-optional
Daniel Wagner [Fri, 10 Feb 2023 15:35:27 +0000 (16:35 +0100)]
Merge pull request #1800 from igaw/make-json-c-optional

Make json-c optional

2 years agonvme: Make json-c optional again
Daniel Wagner [Tue, 7 Feb 2023 08:46:44 +0000 (09:46 +0100)]
nvme: Make json-c optional again

But with the price that functionality is missing.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agonvme-print: Move JSON printing function into a new file
Daniel Wagner [Wed, 8 Feb 2023 08:03:06 +0000 (09:03 +0100)]
nvme-print: Move JSON printing function into a new file

Let's split the JSON printing part from the console printing code as
the file is getting to big.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoplugins/solidigm: Use json_create_object wrapper
Daniel Wagner [Mon, 6 Feb 2023 20:23:04 +0000 (21:23 +0100)]
plugins/solidigm: Use json_create_object wrapper

Use everywhere the json_create_object() wrapper to stay consistent.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoplugins/solidigm: Use struct json_object instead of typedef
Daniel Wagner [Mon, 6 Feb 2023 17:35:46 +0000 (18:35 +0100)]
plugins/solidigm: Use struct json_object instead of typedef

It strongly preferred to use explicit types and avoid typedefs.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: No need to sanitize trsvcid and traddr
Daniel Wagner [Wed, 8 Feb 2023 07:49:43 +0000 (08:49 +0100)]
fabrics: No need to sanitize trsvcid and traddr

libnvme does already sanitze these strings, so need to do it again.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1805 from martin-belanger/fix-doc
Daniel Wagner [Fri, 10 Feb 2023 12:49:50 +0000 (13:49 +0100)]
Merge pull request #1805 from martin-belanger/fix-doc

docs: Fixed typos and add missing option

2 years agoMerge pull request #1809 from igaw/fix-appimage
Daniel Wagner [Fri, 10 Feb 2023 12:40:42 +0000 (13:40 +0100)]
Merge pull request #1809 from igaw/fix-appimage

build: Update library paths for AppImage

2 years agobuild: Update library paths for AppImage
Daniel Wagner [Fri, 10 Feb 2023 10:55:11 +0000 (11:55 +0100)]
build: Update library paths for AppImage

Ubuntu uses a multilib setup hence the libraries are not found
in /lib64.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agodocs: Fixed typos and missing options
Martin Belanger [Thu, 9 Feb 2023 17:13:43 +0000 (12:13 -0500)]
docs: Fixed typos and missing options

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
2 years agoMerge pull request #1802 from igaw/fix-suffix_binary_parse-regression
Daniel Wagner [Thu, 9 Feb 2023 10:26:27 +0000 (11:26 +0100)]
Merge pull request #1802 from igaw/fix-suffix_binary_parse-regression

util: Numbers without any suffix are also valid

2 years agoutil: Numbers without any suffix are also valid
Daniel Wagner [Thu, 9 Feb 2023 10:04:07 +0000 (11:04 +0100)]
util: Numbers without any suffix are also valid

suffix_binary_parse() is used to parse most of the numeric command
lines. As it turns out the main use case to provide just numbers without
any suffix. Fix the regression recently introduced when we made the
parser also to check two characters suffixes.

Fixes: 1e5abd545622 ("util: Update suffix_binary_parse API")
Reported-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1789 from ikegami-t/get-feature-status
Daniel Wagner [Tue, 7 Feb 2023 15:39:34 +0000 (16:39 +0100)]
Merge pull request #1789 from ikegami-t/get-feature-status

nvme: Check invalid field status code value correctly for get feature…

2 years agoMerge pull request #1790 from igaw/reimplement-suffix_si_parse
Daniel Wagner [Tue, 7 Feb 2023 15:37:17 +0000 (16:37 +0100)]
Merge pull request #1790 from igaw/reimplement-suffix_si_parse

util: Reimplement suffix_si_parse

2 years agoutil: Update suffix_binary_parse API
Daniel Wagner [Thu, 2 Feb 2023 14:58:33 +0000 (15:58 +0100)]
util: Update suffix_binary_parse API

Use the same API type for suffix_binary_parse as we have
for suffix_si_parse. While at it also introduce a unit test
for it.

Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoutil: Reimplement suffix_si_parse
Daniel Wagner [Wed, 1 Feb 2023 15:16:00 +0000 (00:16 +0900)]
util: Reimplement suffix_si_parse

suffix_si_parse() has an very awkward interface with using errno and
suffixed as return value. Let's just use the return code as status
value and use an argument for returning the value and avoid setting the
errno.

Furthermoe, this function should not know anything about LBAs, it just
supposed to parse a string with a suffix. In order to support the
previous use case we also return the endprt which allows to implement
the nsze-si parse use case and the caller side (see documentation on
create-ns).

Next problem is that suffix_is_parse uses double for calculation which
tend to get inaccurate, e.g. 6.14T results in 61399999997. Instead let's
do do all in pure integer arithmetic.

Also handle the decimal point according the locale settings.

Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agonvme: Filter out status flags for get feature command
Tokunori Ikegami [Wed, 1 Feb 2023 16:57:35 +0000 (01:57 +0900)]
nvme: Filter out status flags for get feature command

Since previously unnecessary DNR, M and CRD status fields were checked.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agoMerge pull request #1798 from igaw/drop-zlib
Daniel Wagner [Tue, 7 Feb 2023 08:43:56 +0000 (09:43 +0100)]
Merge pull request #1798 from igaw/drop-zlib

util: Add crc32 implementation

2 years agoMerge pull request #1799 from igaw/fix-muon-build
Daniel Wagner [Tue, 7 Feb 2023 08:43:27 +0000 (09:43 +0100)]
Merge pull request #1799 from igaw/fix-muon-build

build: Use prefixdir directly on sysconfdir

2 years agobuild: Use prefixdir directly on sysconfdir
Daniel Wagner [Mon, 6 Feb 2023 13:36:11 +0000 (14:36 +0100)]
build: Use prefixdir directly on sysconfdir

The sysconfdir is an explicit path '/etc' and the muon implementation of
join_paths is dropping the prefixdir, thus we need to string concanate
the syscondfir path instead of using the join_paths function.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoutil: Add crc32 implementation
Daniel Wagner [Mon, 6 Feb 2023 10:22:49 +0000 (11:22 +0100)]
util: Add crc32 implementation

a05d4213f0f9 ("Add 'gen-dhchap-key' command") introduced the zlib
dependency in order to use the crc32 function. This simple function
alone is a not worth the additional dependency, so let's ship our own
crc32 function.

The implementation is from teh elfutils project which is licensed under
LGPL 3 or later of GPL 2 or later. For this project we choose the GPL 2
or later license.

Link: https://sourceware.org/git/?p=elfutils.git;a=blob;f=lib/crc32.c;hb=575198c29a427392823cc8f2400579a23d06a875
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agonvme-print: Use attrs_info as key for Zone Attributes Information
sunxing [Sat, 4 Feb 2023 09:00:43 +0000 (17:00 +0800)]
nvme-print: Use attrs_info as key for Zone Attributes Information

The JSON output uses the key 'attrs' for both 'za' and 'zai' members.
Fix this by using 'attrs_info' for the 'zai'.

[dwagner: updated commit messages]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Also trigger Azure Pipeline for PR
Daniel Wagner [Fri, 3 Feb 2023 14:23:48 +0000 (15:23 +0100)]
build: Also trigger Azure Pipeline for PR

Run also the blktests for PRs.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1795 from igaw/add-blkttests
Daniel Wagner [Fri, 3 Feb 2023 14:14:42 +0000 (15:14 +0100)]
Merge pull request #1795 from igaw/add-blkttests

build: Enable Azure Pipeline again

2 years agobuild: Enable Azure Pipeline again
Daniel Wagner [Fri, 3 Feb 2023 14:02:30 +0000 (15:02 +0100)]
build: Enable Azure Pipeline again

Let's give it another try to use the addition tests. The Azure Pipeline
Agent extension seems to work now.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1794 from igaw/effects-log
Daniel Wagner [Fri, 3 Feb 2023 10:26:23 +0000 (11:26 +0100)]
Merge pull request #1794 from igaw/effects-log

nvme: Support effects-log for fabrics ctrl

2 years agonvme: Support effects-log for fabrics ctrl
Daniel Wagner [Fri, 3 Feb 2023 10:16:11 +0000 (11:16 +0100)]
nvme: Support effects-log for fabrics ctrl

nvme-cli v1.16 supported effects-log for fabric devices only, nvme-cli
2.x supported only memory based transports (aka PCI). Obviously, we
should support effects-log independent of the transport type.

Do this by first trying to map the PCI registers and read the CAP
property if this fails fall back using the get-properties approach.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoplugins/solidigm: Add uuid index resolution
da Cunha, Leonardo [Fri, 20 Jan 2023 01:21:53 +0000 (17:21 -0800)]
plugins/solidigm: Add uuid index resolution

Add automated uuid_index resolution when retrieving latency-tracking
log, garbage collection log, and SMART log.

2 years agoplugins/ocp: Use network byte order for OCP UUID value
da Cunha, Leonardo [Wed, 1 Feb 2023 00:09:51 +0000 (16:09 -0800)]
plugins/ocp: Use network byte order for OCP UUID value

The initialization of the OCP UUID needs to be in network byte order.

2 years agodoc: Regenerate all docs for v2.3 v2.3
Daniel Wagner [Mon, 30 Jan 2023 13:14:36 +0000 (14:14 +0100)]
doc: Regenerate all docs for v2.3

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Update version to v2.3
Daniel Wagner [Mon, 30 Jan 2023 13:14:14 +0000 (14:14 +0100)]
build: Update version to v2.3

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Bump libnvme.wrap release v1.3
Daniel Wagner [Mon, 30 Jan 2023 13:11:37 +0000 (14:11 +0100)]
build: Bump libnvme.wrap release v1.3

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1782 from ikegami-t/dst
Daniel Wagner [Mon, 30 Jan 2023 12:45:31 +0000 (13:45 +0100)]
Merge pull request #1782 from ikegami-t/dst

Device self-test changes

2 years agonvme: Use abort self-test code definition value instead hard-code value
Tokunori Ikegami [Sat, 28 Jan 2023 02:02:04 +0000 (11:02 +0900)]
nvme: Use abort self-test code definition value instead hard-code value

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agodoc: Update device-self-test command documentation
Tokunori Ikegami [Fri, 27 Jan 2023 21:20:19 +0000 (06:20 +0900)]
doc: Update device-self-test command documentation

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agonvme: Move static variable definitions to top of file
Tokunori Ikegami [Fri, 27 Jan 2023 20:58:38 +0000 (05:58 +0900)]
nvme: Move static variable definitions to top of file

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agonvme: Add device self-test SIGINT signal handling for wait option to abort
Tokunori Ikegami [Fri, 27 Jan 2023 20:56:35 +0000 (05:56 +0900)]
nvme: Add device self-test SIGINT signal handling for wait option to abort

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agonvme: Ignore device self-test wait option for abort operation
Tokunori Ikegami [Fri, 27 Jan 2023 16:23:09 +0000 (01:23 +0900)]
nvme: Ignore device self-test wait option for abort operation

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agonvme: Use self-test code definition values instead hard-coded values
Tokunori Ikegami [Fri, 27 Jan 2023 16:16:46 +0000 (01:16 +0900)]
nvme: Use self-test code definition values instead hard-coded values

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agobuild: Bump libnvme wrap
Daniel Wagner [Mon, 30 Jan 2023 12:33:00 +0000 (13:33 +0100)]
build: Bump libnvme wrap

Fetch self test code updates.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1781 from igaw/release-update-libnvme-version
Daniel Wagner [Fri, 27 Jan 2023 13:23:46 +0000 (14:23 +0100)]
Merge pull request #1781 from igaw/release-update-libnvme-version

build: Update libnvme version dependency on release

2 years agobuild: Update libnvme version dependency on release
Daniel Wagner [Fri, 27 Jan 2023 13:18:38 +0000 (14:18 +0100)]
build: Update libnvme version dependency on release

The release script should also update the dependency on libnvme. Use the
libnvme.wrap information as base.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1778 from igaw/pdc-fixes
Daniel Wagner [Fri, 27 Jan 2023 11:46:39 +0000 (12:46 +0100)]
Merge pull request #1778 from igaw/pdc-fixes

Persistent discovery controller fixes

2 years agoMerge pull request #1780 from calebsander/fix/strip-spaces
Daniel Wagner [Fri, 27 Jan 2023 09:31:48 +0000 (10:31 +0100)]
Merge pull request #1780 from calebsander/fix/strip-spaces

json_discovery_log: avoid buffer overrun

2 years agojson_discovery_log: avoid buffer overrun
Caleb Sander [Thu, 26 Jan 2023 17:53:07 +0000 (10:53 -0700)]
json_discovery_log: avoid buffer overrun

nvme_strip_spaces() has an off-by-one error and starts stripping spaces
at the byte AFTER the end of the buffer. Use space_strip_len() instead,
which doesn't have this bug and is already used in print_discovery_log().

Signed-off-by: Caleb Sander <csander@purestorage.com>
2 years agoMerge pull request #1779 from ikegami-t/util-suffix
Daniel Wagner [Thu, 26 Jan 2023 17:16:13 +0000 (18:16 +0100)]
Merge pull request #1779 from ikegami-t/util-suffix

util: Parse suffix binary value as unsinged long long correctly

2 years agodoc: Add storage-tag option description for compare, read and write commands
Tokunori Ikegami [Thu, 26 Jan 2023 16:47:32 +0000 (01:47 +0900)]
doc: Add storage-tag option description for compare, read and write commands

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agoutil: Parse suffix binary value as unsinged long long correctly
Tokunori Ikegami [Thu, 26 Jan 2023 16:39:38 +0000 (01:39 +0900)]
util: Parse suffix binary value as unsinged long long correctly

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agoMerge pull request #1777 from birkelund/tp4146-fixes
Daniel Wagner [Thu, 26 Jan 2023 14:06:11 +0000 (15:06 +0100)]
Merge pull request #1777 from birkelund/tp4146-fixes

TP4146 fixes

2 years agonvme-print: pretty print fdp event timestamp
Klaus Jensen [Thu, 26 Jan 2023 08:52:41 +0000 (09:52 +0100)]
nvme-print: pretty print fdp event timestamp

Properly parse the nvme timestamp of FDP events and print it.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agobuild: bump libnvme
Klaus Jensen [Thu, 26 Jan 2023 13:54:23 +0000 (14:54 +0100)]
build: bump libnvme

Bump libnvme.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agofabrics: Pass discovery ctrl to __discover()
Daniel Wagner [Thu, 26 Jan 2023 13:43:16 +0000 (14:43 +0100)]
fabrics: Pass discovery ctrl to __discover()

We should pass the discovery controller down to __discover and not the iterator.

Fixes: 952aa044b331 ("fabrics: Honor JSON config file in connect-all command")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Fix already connected test
Daniel Wagner [Thu, 26 Jan 2023 13:40:08 +0000 (14:40 +0100)]
fabrics: Fix already connected test

The lookup will also return controllers created from discovery.conf
and config.json. These might not yet connected. When the controller has
a device name we assume that we are connected.

Fixes: 07d6b911e081 ("fabrics: Do not attempt to reconnect to already connected ctrls")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Fix discovery controller filter function
Daniel Wagner [Thu, 26 Jan 2023 13:36:56 +0000 (14:36 +0100)]
fabrics: Fix discovery controller filter function

disc_ctrl_config_match() should also test if the controller is actually
a discovery controller. Because of that ctrl_config_match() can't call
disc_ctrl_config_match() anymore.

Fixes: 07d6b911e081 ("fabrics: Do not attempt to reconnect to already connected ctrls")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agonvme-print: print 64 bit values with json add_value_uint64
Klaus Jensen [Thu, 26 Jan 2023 08:50:54 +0000 (09:50 +0100)]
nvme-print: print 64 bit values with json add_value_uint64

Fix json formatting of 64 bit values.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agoplugins/fdp: use the right command-line switch
Klaus Jensen [Thu, 26 Jan 2023 08:43:03 +0000 (09:43 +0100)]
plugins/fdp: use the right command-line switch

The '-H' switch is generally used to request human-readable output. The
documentation already lists '-E' to request Host Events, so fix it up.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agonvme-print: prettify the fdp event printing
Klaus Jensen [Thu, 26 Jan 2023 08:38:40 +0000 (09:38 +0100)]
nvme-print: prettify the fdp event printing

The default human readable printing of FDP events does not have to print
the event flags since they are only used to indicate the validity of
some of the fields.

Remove the flags from printing and use it to conditionally print valid
fields.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agonvme-print: print unused reclaim unit handles
Klaus Jensen [Thu, 26 Jan 2023 08:32:10 +0000 (09:32 +0100)]
nvme-print: print unused reclaim unit handles

Add printing the "Unused" attribute of reclaim unit handles.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2 years agoMerge pull request #1775 from igaw/make-pdc-optional
Daniel Wagner [Wed, 25 Jan 2023 11:34:51 +0000 (12:34 +0100)]
Merge pull request #1775 from igaw/make-pdc-optional

fabrics: Make PDC behavior configurable

2 years agofabrics: Make PDC behavior configurable
Daniel Wagner [Wed, 25 Jan 2023 08:16:53 +0000 (09:16 +0100)]
fabrics: Make PDC behavior configurable

The persistent discovery controller is a behavior change which might
break existing installation. Instead enabling it per default, introduce
a compile time and a global configuration option to define the default
settings.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Update libnvme wrap
Daniel Wagner [Wed, 25 Jan 2023 11:24:40 +0000 (12:24 +0100)]
build: Update libnvme wrap

Update libnvme wrap to include the persistent discovery controller
config flag feature.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1773 from linux-nvme/dependabot/github_actions/actions/upload...
Daniel Wagner [Wed, 25 Jan 2023 11:13:10 +0000 (12:13 +0100)]
Merge pull request #1773 from linux-nvme/dependabot/github_actions/actions/upload-artifact-3

build(deps): bump actions/upload-artifact from 2 to 3

2 years agoMerge pull request #1774 from ikegami-t/util-maint
Daniel Wagner [Tue, 24 Jan 2023 13:49:58 +0000 (14:49 +0100)]
Merge pull request #1774 from ikegami-t/util-maint

MAINT: util: Delete duplicated OPT_LONG definition

2 years agoMAINT: util: Delete duplicated OPT_LONG definition
Tokunori Ikegami [Tue, 24 Jan 2023 13:19:02 +0000 (22:19 +0900)]
MAINT: util: Delete duplicated OPT_LONG definition

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agoMerge pull request #1765 from igaw/make-pdc-default
Daniel Wagner [Tue, 24 Jan 2023 10:07:23 +0000 (11:07 +0100)]
Merge pull request #1765 from igaw/make-pdc-default

Make unique discovery controllers persistent as default

2 years agoMerge pull request #1772 from ikegami-t/util-print
Daniel Wagner [Tue, 24 Jan 2023 08:57:01 +0000 (09:57 +0100)]
Merge pull request #1772 from ikegami-t/util-print

util: Add file stream parameter to print word wrapped

2 years agobuild(deps): bump actions/upload-artifact from 2 to 3
dependabot[bot] [Mon, 23 Jan 2023 18:06:03 +0000 (18:06 +0000)]
build(deps): bump actions/upload-artifact from 2 to 3

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoutil: Add file stream parameter to print word wrapped
Tokunori Ikegami [Mon, 23 Jan 2023 17:33:38 +0000 (02:33 +0900)]
util: Add file stream parameter to print word wrapped

This is to allow to select stdout or stderr streams for print.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
2 years agobuild: The release workflow can't tag
Daniel Wagner [Mon, 23 Jan 2023 16:01:53 +0000 (17:01 +0100)]
build: The release workflow can't tag

The releaser action is not able to auto tag the tree (permission).
Anyway, we don't want to have a 'tip' or 'latest' tag just because the
build process expects this. So we have to find a different way to have
latest AppImage.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1771 from igaw/appimage-release
Daniel Wagner [Mon, 23 Jan 2023 15:53:54 +0000 (16:53 +0100)]
Merge pull request #1771 from igaw/appimage-release

build: Upload latest AppImage

2 years agobuild: Upload latest AppImage
Daniel Wagner [Mon, 23 Jan 2023 15:21:54 +0000 (16:21 +0100)]
build: Upload latest AppImage

We have to upload the AppImage as release to be able set a link.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1770 from igaw/dst-wait
Daniel Wagner [Mon, 23 Jan 2023 10:26:29 +0000 (11:26 +0100)]
Merge pull request #1770 from igaw/dst-wait

nvme: Add wait for device self test

2 years agonvme: Add wait for device self test
Keith Busch [Tue, 10 Jan 2023 20:43:17 +0000 (12:43 -0800)]
nvme: Add wait for device self test

Add a wait command line option to device-self-test which makes nvme-cli
staying in forground and reports progress. This make it possible to wait
for the end of the test.

Signed-off-by: Keith Busch <kbusch@kernel.org>
[dwagner: make termination condition handling the end of self test]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1749 from ikegami-t/smart-log
Daniel Wagner [Fri, 20 Jan 2023 14:36:31 +0000 (15:36 +0100)]
Merge pull request #1749 from ikegami-t/smart-log

nvme-print: Display smart log data units read and written SI value

2 years agogitignore: Ignore clang build artifacts
Daniel Wagner [Fri, 20 Jan 2023 09:39:19 +0000 (10:39 +0100)]
gitignore: Ignore clang build artifacts

When using language server support from clang, the .cache directory is
added. Also for getting lsp working properly the compile_commands.json
file has to present (which is just a link to Meson generared json file).

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Do not disconnect unique disc ctrl on default
Daniel Wagner [Tue, 17 Jan 2023 08:36:40 +0000 (09:36 +0100)]
fabrics: Do not disconnect unique disc ctrl on default

Do not disconnect unique discovery controller on default.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Handle DUPRETINFO and EPCSD when doing discovery
Daniel Wagner [Thu, 19 Jan 2023 08:21:45 +0000 (09:21 +0100)]
fabrics: Handle DUPRETINFO and EPCSD when doing discovery

The TP8014 adds two new flags for providing information to the host
which discovery controller is returning the same information we already
know or if the discovery controller doesn't support explicit
persistency.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Prefer unique disc ctrl over well known
Daniel Wagner [Tue, 17 Jan 2023 08:32:19 +0000 (09:32 +0100)]
fabrics: Prefer unique disc ctrl over well known

Currently, the well known discovery controller is used per default even
though the target might support unique discovery controller as defined
in TP8013.

Change the default behavior to use the unique discovery controller
whenever the target supports it.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Update libnvme wrap
Daniel Wagner [Fri, 20 Jan 2023 07:53:56 +0000 (08:53 +0100)]
build: Update libnvme wrap

Update libnvme wrap to include the unique discovery controller API
changes.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1768 from igaw/misc-fabric-fixes
Daniel Wagner [Fri, 20 Jan 2023 07:50:55 +0000 (08:50 +0100)]
Merge pull request #1768 from igaw/misc-fabric-fixes

Miscellaneous fabric fixes/improvements

2 years agofabrics: Do not attempt to reconnect to already connected ctrls
Daniel Wagner [Wed, 18 Jan 2023 17:20:09 +0000 (18:20 +0100)]
fabrics: Do not attempt to reconnect to already connected ctrls

Currently, connect-all and connect will blindly try to reconnect to
already connected controllers. Try to lookup the controller in the local
hierarchy. If found just ignore the attempt and fail.

Note, we have to distinguish between normal controllers and discovery
controller when comparing them. The main difference is that we have
ignore the discovery nqn and assume if we find a discovery controller
it's the correct one (persistent). This basically means the well known
discovery nqn matches any found controller.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Set discovery KATO also for current disc crtl
Daniel Wagner [Thu, 19 Jan 2023 07:58:15 +0000 (08:58 +0100)]
fabrics: Set discovery KATO also for current disc crtl

The default KATO should also be set for the current discovery
controller (subtype 3) and not just for the discovery
controller (subtype 1).

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Update error message when connect attemp fails
Daniel Wagner [Wed, 18 Jan 2023 17:26:08 +0000 (18:26 +0100)]
fabrics: Update error message when connect attemp fails

The error code will print the reason why it fails, so we don't have to
assume we didn't find it. Just state what we tried to achieve.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agonvme: Ingore LOG_NOTICE level
Daniel Wagner [Wed, 18 Jan 2023 17:16:36 +0000 (18:16 +0100)]
nvme: Ingore LOG_NOTICE level

We don't use the LOG_NOTICE level at all. That means a single '-v' has
no impact. So just ingore it and we get some useful information starting
with LOG_INFO.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Add support for binary output
Daniel Wagner [Wed, 18 Jan 2023 09:39:51 +0000 (10:39 +0100)]
fabrics: Add support for binary output

The command line help says we support binary output, thus add this
feature.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Use endian helper when reading discovery log entries
Daniel Wagner [Wed, 18 Jan 2023 09:36:45 +0000 (10:36 +0100)]
fabrics: Use endian helper when reading discovery log entries

We should use the correct CPU endian helper when reading the discovery
log. While at it, also sync the JSON output with the console output and
stringify the EFLAGS.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agofabrics: Do not overwrite errno with return code
Daniel Wagner [Mon, 16 Jan 2023 13:44:40 +0000 (14:44 +0100)]
fabrics: Do not overwrite errno with return code

__create_discover_ctrl() is calling nvmf_add_ctrl() which sets errno
when something doesn't work. Hence we should not overwrite the errno
with the return code in __ctrl_discover_ctrl().

This prevents to propagate the errno code to the callside and the
nvme_strerror(errno) call is just return 'unknown error -1'.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Set projects default to debug and prefix /usr/local
Daniel Wagner [Mon, 16 Jan 2023 13:51:07 +0000 (14:51 +0100)]
build: Set projects default to debug and prefix /usr/local

Do not install to /usr per default and accidently overwrite the
distributions version of the package. And also debugging symbols per
default to make development setup as we don't install it anyway to /usr
anyway.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #1769 from igaw/create-appimage
Daniel Wagner [Fri, 20 Jan 2023 07:26:24 +0000 (08:26 +0100)]
Merge pull request #1769 from igaw/create-appimage

Create AppImage

2 years agobuild: Add AppImage build workflows
Daniel Wagner [Thu, 19 Jan 2023 12:28:00 +0000 (13:28 +0100)]
build: Add AppImage build workflows

Provide an AppImage version of the current head for testing.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agobuild: Renaming and cleanups of workflow files
Daniel Wagner [Thu, 19 Jan 2023 12:24:46 +0000 (13:24 +0100)]
build: Renaming and cleanups of workflow files

2 years agoMerge pull request #1756 from birkelund/tp4146
Daniel Wagner [Fri, 20 Jan 2023 07:00:29 +0000 (08:00 +0100)]
Merge pull request #1756 from birkelund/tp4146

Add 'fdp' plugin for managing devices supporting TP4146 ("Flexible Data Placement")

2 years agonvme: add flexible data placement management commands
Klaus Jensen [Tue, 13 Dec 2022 20:05:12 +0000 (21:05 +0100)]
nvme: add flexible data placement management commands

Add relevant TP4146 ("Flexible Data Placement") management commands.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>