]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
17 months agonvme-print-json: Replase json_object_add_value_int() to obj/root_add_int()
Tokunori Ikegami [Sat, 14 Oct 2023 06:56:29 +0000 (15:56 +0900)]
nvme-print-json: Replase json_object_add_value_int() to obj/root_add_int()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Replase json_object_add_value_uint64() to obj/root_add_uint64()
Tokunori Ikegami [Sat, 14 Oct 2023 06:35:47 +0000 (15:35 +0900)]
nvme-print-json: Replase json_object_add_value_uint64() to obj/root_add_uint64()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Replase json_object_add_value_string() to obj/root_add_str()
Tokunori Ikegami [Thu, 2 Nov 2023 18:23:26 +0000 (03:23 +0900)]
nvme-print-json: Replase json_object_add_value_string() to obj/root_add_str()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Update feature_show_fields_*** to use root/obj_add_***()
Tokunori Ikegami [Fri, 13 Oct 2023 19:31:37 +0000 (04:31 +0900)]
nvme-print-json: Update feature_show_fields_*** to use root/obj_add_***()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Update lba_status_log to use root_add_***() and obj_add_***()
Tokunori Ikegami [Fri, 13 Oct 2023 18:48:52 +0000 (03:48 +0900)]
nvme-print-json: Update lba_status_log to use root_add_***() and obj_add_***()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Replace lba_status_log printf() to root_add_result()
Tokunori Ikegami [Fri, 13 Oct 2023 18:36:17 +0000 (03:36 +0900)]
nvme-print-json: Replace lba_status_log printf() to root_add_result()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add list_item print function
Tokunori Ikegami [Fri, 13 Oct 2023 17:43:56 +0000 (02:43 +0900)]
nvme-print-json: Add list_item print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add lba_status_info print function
Tokunori Ikegami [Fri, 13 Oct 2023 17:18:34 +0000 (02:18 +0900)]
nvme-print-json: Add lba_status_info print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add lba_range print function
Tokunori Ikegami [Fri, 13 Oct 2023 17:12:09 +0000 (02:12 +0900)]
nvme-print-json: Add lba_range print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add id_ctrl_rpmbs print function
Tokunori Ikegami [Fri, 13 Oct 2023 16:46:57 +0000 (01:46 +0900)]
nvme-print-json: Add id_ctrl_rpmbs print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Unify json_list and jroot object names to root
Tokunori Ikegami [Fri, 13 Oct 2023 12:42:13 +0000 (21:42 +0900)]
nvme-print-json: Unify json_list and jroot object names to root

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add json_zns_changed print function
Tokunori Ikegami [Fri, 13 Oct 2023 12:15:18 +0000 (21:15 +0900)]
nvme-print-json: Add json_zns_changed print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add root_add_result() to output result message
Tokunori Ikegami [Fri, 13 Oct 2023 12:13:57 +0000 (21:13 +0900)]
nvme-print-json: Add root_add_result() to output result message

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Split persistent_event_log print function
Tokunori Ikegami [Fri, 13 Oct 2023 11:35:10 +0000 (20:35 +0900)]
nvme-print-json: Split persistent_event_log print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Remove unnecessary string newline code
Tokunori Ikegami [Fri, 13 Oct 2023 09:29:56 +0000 (18:29 +0900)]
nvme-print-json: Remove unnecessary string newline code

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Replace effects_log_list print to use json_print()
Tokunori Ikegami [Fri, 13 Oct 2023 09:22:48 +0000 (18:22 +0900)]
nvme-print-json: Replace effects_log_list print to use json_print()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Print persistent_event_log no log data result correctly
Tokunori Ikegami [Fri, 13 Oct 2023 09:17:04 +0000 (18:17 +0900)]
nvme-print-json: Print persistent_event_log no log data result correctly

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add static "result" and "erorr" strings variables
Tokunori Ikegami [Fri, 13 Oct 2023 09:27:20 +0000 (18:27 +0900)]
nvme-print-json: Add static "result" and "erorr" strings variables

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add single_property printf function
Tokunori Ikegami [Fri, 13 Oct 2023 06:58:33 +0000 (15:58 +0900)]
nvme-print-json: Add single_property printf function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme: Replace get feature command stderr output to nvme_show_error()
Tokunori Ikegami [Thu, 12 Oct 2023 15:00:16 +0000 (00:00 +0900)]
nvme: Replace get feature command stderr output to nvme_show_error()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Change d() output to use d_json()
Tokunori Ikegami [Thu, 2 Nov 2023 18:20:26 +0000 (03:20 +0900)]
nvme-print-json: Change d() output to use d_json()

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme: Fix get-feature command mixed stdout and json outputs
Tokunori Ikegami [Thu, 12 Oct 2023 13:52:37 +0000 (22:52 +0900)]
nvme: Fix get-feature command mixed stdout and json outputs

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Add remaining feature fields print functions
Tokunori Ikegami [Thu, 12 Oct 2023 13:59:11 +0000 (22:59 +0900)]
nvme-print-json: Add remaining feature fields print functions

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme-print-json: Update formatting and codying style
Tokunori Ikegami [Thu, 12 Oct 2023 13:58:02 +0000 (22:58 +0900)]
nvme-print-json: Update formatting and codying style

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agobuild: Add -std=c99 to CFLAGS for muon on CentOS 7
Tokunori Ikegami [Wed, 8 Nov 2023 16:28:07 +0000 (01:28 +0900)]
build: Add -std=c99 to CFLAGS for muon on CentOS 7

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agofabrics: add udev rule to avoid renaming nbft interfaces
Martin Wilck [Tue, 23 May 2023 12:19:14 +0000 (14:19 +0200)]
fabrics: add udev rule to avoid renaming nbft interfaces

In the initramfs, the interface naming is taken care of by dracut.
But there are various network-interface-naming policies in place which
may attempt to rename the interface, causing confusion and possibly
wrong interface parameters.

Add an udev rule that avoids renaming any network interface that
has been assigned a name nbft$N, which is by convention the naming
scheme that is used for NBFT device in the initramfs.

Note: The simpler 'NAME:="%k"' directive doesn't work because udev rejects
it ('Ignoring NAME="%k", as it will take no effect.'). The ":=" syntax makes
sure the interface isn't renamed any more by later rules. "INTERFACE" is set
by the kernel in the "add" uevent for a network interface.

Signed-off-by: Martin Wilck <mwilck@suse.com>
17 months agofabrics: autoconnect: add service unit for connecting NBFT subsystems
Martin Wilck [Tue, 23 May 2023 10:48:55 +0000 (12:48 +0200)]
fabrics: autoconnect: add service unit for connecting NBFT subsystems

Create a separate unit file for connecting to NBFT-defined subsystems.
This unit is intended to be called in "post-up" scripts from network
management software if an interface defined in the HFI section of the
NBFT is brought up (L3-configured).

In simple scenarios with just one HFI, this won't be necessary because the
interface must be brought up in the initramfs already. But in multipath
scenarios, the initramfs may choose not to wait for every HFI to come up, and
thus it may be necessary to bring up the secondary connection(s) later on.

Signed-off-by: Martin Wilck <mwilck@suse.com>
[dwagner: use unit options instead of ExecStartPre
          update nvme command line]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
17 months agofabrics: autoconnect: explicitly express module dependency
Daniel Wagner [Thu, 12 Oct 2023 07:29:30 +0000 (09:29 +0200)]
fabrics: autoconnect: explicitly express module dependency

Use Wants/After to let systemd handle loading the kernel module, which
is the preferred way.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
17 months agoUpdates to codeql config
Andrew Meir [Mon, 6 Nov 2023 09:25:15 +0000 (10:25 +0100)]
Updates to codeql config

* Split c-cpp and python init sections
* Add paths-ignore config for pythin init
* Add json-c wrap during build - increases c codeql coverage

17 months agoREADME: Add make static explanation
Steven Seungcheol Lee [Tue, 7 Nov 2023 11:43:22 +0000 (20:43 +0900)]
README: Add make static explanation

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
17 months agolibnvme-wrap: exit on VOID_FN lookup failure
Caleb Sander [Sun, 5 Nov 2023 16:02:02 +0000 (09:02 -0700)]
libnvme-wrap: exit on VOID_FN lookup failure

libnvme-wrap provides fallbacks for missing libnvme functions.
For functions that return a value, the FN() macro can be used
to define a default return value if the function isn't found.
This isn't possible for functions returning void,
so VOID_FN() currently is a no-op if the function can't be found.
For nvme_init_copy_range_f1(), the only current VOID_FN() user,
this will result in silently sending a Copy command
with a zeroed range, which is not what the user requested.
Instead, exit the process immediately if the function can't be found.

Signed-off-by: Caleb Sander <csander@purestorage.com>
17 months agoplugins/ocp:Added the ocp C6h feature api
Vigneshwaran Saravanan/SSD TS Dev /SSIR/Engineer/Samsung Electronics [Mon, 6 Nov 2023 11:47:48 +0000 (17:17 +0530)]
plugins/ocp:Added the ocp C6h feature api
Reviewed-by: Karthik Balan karthik.b82@samsung.com, Arunpandian J arun.j@samsung.com
Signed-off-by: Vigneshwaran Saravanan/SSD TS Dev /SSIR/Engineer/Samsung Electronics <s.vignesh@samsung.com>
17 months agoplugin/ocp_fid_c6h:Added the ocp C6h feature api
Vigneshwaran Saravanan/SSD TS Dev /SSIR/Engineer/Samsung Electronics [Fri, 20 Oct 2023 07:45:43 +0000 (13:15 +0530)]
plugin/ocp_fid_c6h:Added the ocp C6h feature api
Reviewed-by: Karthik Balan karthik.b82@samsung.com, Arunpandian J arun.j@samsung.com
Signed-off-by: Vigneshwaran Saravanan/SSD TS Dev /SSIR/Engineer/Samsung Electronics <s.vignesh@samsung.com>
17 months agonvme-copy: support cross-namespace copy
Joy Gu [Wed, 25 Oct 2023 20:38:25 +0000 (13:38 -0700)]
nvme-copy: support cross-namespace copy

Add support for NVMe TP4130 ("Cross-Namespace Copy")
- Add Copy Descriptor Formats 2h and 3h
- Add "--snsids" option to specify source namespaces to copy from
- Add "--sopts" option to specify source options (Fast Copy Only)
- Print new Host Behavior Support bits, new ONCS bits, and new Optional
  Copy Formats Supported bits
- Extend unit test case to test cross-namespace copy formats

17 months agobuild(deps): bump actions/checkout from 3 to 4
dependabot[bot] [Mon, 6 Nov 2023 18:53:16 +0000 (18:53 +0000)]
build(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
17 months agonvme/plugins: fix mismatch operator
jinhua.huang [Fri, 3 Nov 2023 09:08:25 +0000 (17:08 +0800)]
nvme/plugins: fix mismatch operator

Signed-off-by: jinhua.huang <jinhua.huang@memblaze.com>
17 months agonvme: fix overflow possiblity
Steven Seungcheol Lee [Fri, 3 Nov 2023 00:53:50 +0000 (09:53 +0900)]
nvme: fix overflow possiblity

The implicit type conversion will expand both operands to the type
int and not unsigned long long as the result expects. Promote
the first operand to the target type. Obviously the multiplication
can still overflow, but this is a different problem.

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: added commit message]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
17 months agonvme: reduce identify cmd issue
Steven Seungcheol Lee [Fri, 3 Nov 2023 00:48:48 +0000 (09:48 +0900)]
nvme: reduce identify cmd issue

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
17 months agonvme: allow set-features to take input from stdin
Joy Gu [Fri, 20 Oct 2023 21:48:08 +0000 (14:48 -0700)]
nvme: allow set-features to take input from stdin

Fixes: fed9e5ee04cd ("nvme: auto free nvme_dev resource")
17 months agoFix common misspellings from codespell project
Yi Zhang [Thu, 2 Nov 2023 07:01:27 +0000 (15:01 +0800)]
Fix common misspellings from codespell project

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
[dwagner: dropped auto generated documentation
          dropped ccan changed]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
17 months agonvme-print: Correct to print correct ascii character string length
Tokunori Ikegami [Tue, 31 Oct 2023 23:14:35 +0000 (08:14 +0900)]
nvme-print: Correct to print correct ascii character string length

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agoprint-stdout: print Host Behavior Support correctly
Caleb Sander [Wed, 25 Oct 2023 20:52:19 +0000 (14:52 -0600)]
print-stdout: print Host Behavior Support correctly

In nvme-cli 1.16, printing the Host Behavior Support feature
logged the values of the 3 fields ACRE, ETDAS, and LBAFEE.
This appears to have regressed in nvme-cli 2.0,
and now only the value of ACRE is printed, without any description.
Log all 3 fields with proper descriptions.
Drop "Host Behavior Support" from their names,
as it's redundant with the feature name.

Signed-off-by: Caleb Sander <csander@purestorage.com>
17 months agobuild: Bump libnvme wrap
Daniel Wagner [Thu, 2 Nov 2023 16:54:49 +0000 (17:54 +0100)]
build: Bump libnvme wrap

Get ETDAS and LBAFEE definitions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
17 months agoplugins/solidigm: Added support for temperature statistics log page
da Cunha, Leonardo [Fri, 22 Sep 2023 15:27:51 +0000 (08:27 -0700)]
plugins/solidigm: Added support for temperature statistics log page

Signed-off-by: leonardo.da.cunha <leonardo.da.cunha@solidigm.com>
17 months agoAdd support for codeql sweeps
Andrew Meir [Wed, 18 Oct 2023 09:55:31 +0000 (11:55 +0200)]
Add support for codeql sweeps

Update codeql.yml

17 months agodoc: Add virt-mgmt command
Tokunori Ikegami [Sun, 22 Oct 2023 13:30:48 +0000 (22:30 +0900)]
doc: Add virt-mgmt command

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agodoc: Add id-uuid command
Tokunori Ikegami [Sun, 22 Oct 2023 07:20:42 +0000 (16:20 +0900)]
doc: Add id-uuid command

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agodoc: Add list-secondary command
Tokunori Ikegami [Sat, 21 Oct 2023 01:05:39 +0000 (10:05 +0900)]
doc: Add list-secondary command

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agodoc: Add id-ns-granularity command
Tokunori Ikegami [Sat, 21 Oct 2023 00:56:52 +0000 (09:56 +0900)]
doc: Add id-ns-granularity command

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agodoc: Add nvme commands --output-format and --verbose options
Tokunori Ikegami [Fri, 20 Oct 2023 19:25:27 +0000 (04:25 +0900)]
doc: Add nvme commands --output-format and --verbose options

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agocompletions: Add nvme-mi-recv nad nvme-mi-send commands completions
Tokunori Ikegami [Sat, 14 Oct 2023 05:40:09 +0000 (14:40 +0900)]
completions: Add nvme-mi-recv nad nvme-mi-send commands completions

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agocompletions: Change short option -o and -v duplicated to upper case
Tokunori Ikegami [Fri, 13 Oct 2023 16:25:51 +0000 (01:25 +0900)]
completions: Change short option -o and -v duplicated to upper case

The nvme-mi-recv and nvme-mi-send commands completions are not added.
All nvme commands doc/completions not added output-format/verbose options.
So for those will be added and updated doc/completions later separately.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agodoc: Change short option -o and -v duplicated to upper case
Tokunori Ikegami [Fri, 13 Oct 2023 09:34:37 +0000 (18:34 +0900)]
doc: Change short option -o and -v duplicated to upper case

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agonvme: Change short option -o and -v duplicated to upper case
Tokunori Ikegami [Fri, 13 Oct 2023 07:55:43 +0000 (16:55 +0900)]
nvme: Change short option -o and -v duplicated to upper case

The output-format and verbose options are added by NVMF_ARGS() macro.
So some commands short option duplicated with the option added.
Change the command short options duplicated to upper case -O and -v.
But only the get-log command lpo option changed to -L not upper case.
Sicne already upper case -O option also is used for the ot option.
  Note: Documentation and completions will be updated separately.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
17 months agobuild(deps): bump actions/checkout from 3 to 4
dependabot[bot] [Mon, 16 Oct 2023 18:24:56 +0000 (18:24 +0000)]
build(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
17 months agonvme: Change phy-rx-eom-log command to use NVME_ARGS instead
Tokunori Ikegami [Fri, 13 Oct 2023 07:14:23 +0000 (16:14 +0900)]
nvme: Change phy-rx-eom-log command to use NVME_ARGS instead

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agoplugins/memblaze: Add smart-log-add and latency-feature functions
jinhua.huang [Thu, 12 Oct 2023 08:27:43 +0000 (16:27 +0800)]
plugins/memblaze: Add smart-log-add and latency-feature functions

1. add smart-log-add, latency-feature functions
2. convert code style to align with linux kernel code style
3. using __packed instead of pragma style

Signed-off-by: jinhua.huang <jinhua.huang@memblaze.com>
18 months agoplugins/solidigm: internal-logs Telemetry auto detect last data area.
da Cunha, Leonardo [Wed, 6 Sep 2023 13:45:46 +0000 (06:45 -0700)]
plugins/solidigm: internal-logs Telemetry auto detect last data area.
Faster telemetry retrieval using large buffers.

Signed-off-by: leonardo.da.cunha <leonardo.da.cunha@solidigm.com>
18 months agonvme: Change to use NVME_FLBAS_META_EXT() macro to check flbas value
Tokunori Ikegami [Thu, 12 Oct 2023 13:07:39 +0000 (22:07 +0900)]
nvme: Change to use NVME_FLBAS_META_EXT() macro to check flbas value

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add host memory buffer and timestamp features print functions
Tokunori Ikegami [Wed, 11 Oct 2023 16:11:14 +0000 (01:11 +0900)]
nvme-print-json: Add host memory buffer and timestamp features print functions

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add feature fields print functions
Tokunori Ikegami [Tue, 10 Oct 2023 16:41:21 +0000 (01:41 +0900)]
nvme-print-json: Add feature fields print functions

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add TMPTH feature print function
Tokunori Ikegami [Mon, 9 Oct 2023 15:26:00 +0000 (00:26 +0900)]
nvme-print-json: Add TMPTH feature print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add show_feature_fields print function
Tokunori Ikegami [Mon, 9 Oct 2023 14:15:47 +0000 (23:15 +0900)]
nvme-print-json: Add show_feature_fields print function

Note: Only partial features are supported yet since still under
      implementing for remaining features.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add select_result print function
Tokunori Ikegami [Mon, 9 Oct 2023 12:24:56 +0000 (21:24 +0900)]
nvme-print-json: Add select_result print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Use json_print to print and free object
Tokunori Ikegami [Mon, 9 Oct 2023 05:51:57 +0000 (14:51 +0900)]
nvme-print-json: Use json_print to print and free object

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add lba_status print function
Tokunori Ikegami [Mon, 9 Oct 2023 05:30:54 +0000 (14:30 +0900)]
nvme-print-json: Add lba_status print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Combine variable definition and setting value
Tokunori Ikegami [Mon, 9 Oct 2023 04:14:37 +0000 (13:14 +0900)]
nvme-print-json: Combine variable definition and setting value

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add id_iocs print function
Tokunori Ikegami [Mon, 9 Oct 2023 01:35:47 +0000 (10:35 +0900)]
nvme-print-json: Add id_iocs print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-stdout: Fix coding style errors
Tokunori Ikegami [Sun, 8 Oct 2023 07:45:52 +0000 (16:45 +0900)]
nvme-print-stdout: Fix coding style errors

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Add directive print function
Tokunori Ikegami [Sun, 8 Oct 2023 07:44:26 +0000 (16:44 +0900)]
nvme-print-json: Add directive print function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme: Fixed segmentation fault when getting host initiated telemetry
da Cunha, Leonardo [Wed, 11 Oct 2023 16:01:44 +0000 (09:01 -0700)]
nvme: Fixed segmentation fault when getting host initiated telemetry

Signed-off-by: leonardo.da.cunha <leonardo.da.cunha@solidigm.com>
18 months agoplugins/wdc: enhanced SN861 device support
Brandon Paupore [Wed, 11 Oct 2023 22:20:28 +0000 (17:20 -0500)]
plugins/wdc: enhanced SN861 device support

This commit enables several commands to work with this device properly
and adds a new plugin command set-latency-monitor-feature.

Reviewed-by: Jeffrey Lien <jeff.lien@wdc.com>
Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
18 months agoplugins/wdc: cleanup line lengths
Brandon Paupore [Wed, 11 Oct 2023 22:20:11 +0000 (17:20 -0500)]
plugins/wdc: cleanup line lengths

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
18 months agonvme: do not include meta data for PRACT=1 and MD=8
Daniel Wagner [Wed, 11 Oct 2023 13:04:34 +0000 (15:04 +0200)]
nvme: do not include meta data for PRACT=1 and MD=8

No meta data is transfered for PRACT=1 and MD=8:
   5.2.2.1 Protection Information and Write Commands
   5.2.2.2 Protection Informatio and Read Commands

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agonvme: use block-count arg if provided
Daniel Wagner [Wed, 11 Oct 2023 12:29:52 +0000 (14:29 +0200)]
nvme: use block-count arg if provided

When the user provides the --block-count argument use this value and
don't be clever and try to calculate the value. This is not what
the user asked us to do.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agobuild: bump libnvme to disable tests option
Steven Seungcheol Lee [Wed, 11 Oct 2023 10:45:03 +0000 (19:45 +0900)]
build: bump libnvme to disable tests option

it occur multiple definition error with static build
project use successful build of subproject revision (no need to build tests)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
18 months agobuild: Add static build on CI target
Steven Seungcheol Lee [Wed, 11 Oct 2023 10:06:39 +0000 (19:06 +0900)]
build: Add static build on CI target

Update container image as debian:latest(targets run on ubuntu-latest)

Co-authored-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
18 months agomeson: Add libhugetlbfs option to not included in static
Steven Seungcheol Lee [Wed, 11 Oct 2023 05:52:00 +0000 (14:52 +0900)]
meson: Add libhugetlbfs option to not included in static

libhugetlbfs does not support static library
https://github.com/libhugetlbfs/libhugetlbfs/issues/11

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
18 months agoMakefile: add standalone build
Steven Seungcheol Lee [Fri, 8 Sep 2023 05:10:22 +0000 (14:10 +0900)]
Makefile: add standalone build

To handover build binary for different environment users
Build result checked with ldd below
[root@localhost .build]# ldd nvme
        not a dynamic executable
Do not run libnvme tests(set subproject revision successful build)
Disable keyutils on libnvme(pkgconfig always find shared first when -llib is given)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
18 months agobuild: upload artifacts only for upstream repo
Daniel Wagner [Wed, 11 Oct 2023 09:56:06 +0000 (11:56 +0200)]
build: upload artifacts only for upstream repo

Only upload any artifacts to linux-nvme organization if it's NOT a fork.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agonvme-print: Add nvme_zns_start_zone_list() API function
Tokunori Ikegami [Sat, 7 Oct 2023 03:34:52 +0000 (12:34 +0900)]
nvme-print: Add nvme_zns_start_zone_list() API function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print: Add nvme_zns_finish_zone_list() API function
Tokunori Ikegami [Sat, 7 Oct 2023 03:22:57 +0000 (12:22 +0900)]
nvme-print: Add nvme_zns_finish_zone_list() API function

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-binary: Set list function to NULL if unimplemented
Tokunori Ikegami [Fri, 29 Sep 2023 15:35:12 +0000 (00:35 +0900)]
nvme-print-binary: Set list function to NULL if unimplemented

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-json: Change order list functions and set NULL if unimplemented
Tokunori Ikegami [Fri, 29 Sep 2023 12:07:17 +0000 (21:07 +0900)]
nvme-print-json: Change order list functions and set NULL if unimplemented

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme-print-stdout: Fix to set stdout_list_item print function missed
Tokunori Ikegami [Thu, 28 Sep 2023 14:34:34 +0000 (23:34 +0900)]
nvme-print-stdout: Fix to set stdout_list_item print function missed

Also change order the list functions and set NULL if unused to make sure.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agoplugins/solidigm: log page name extraction using nvme_log_to_string function
shankara [Wed, 20 Sep 2023 09:36:56 +0000 (02:36 -0700)]
plugins/solidigm: log page name extraction using nvme_log_to_string function

Signed-off-by: shankaralingegowda <shankaralingegowda.singonahalli@solidigmtechnology.com>
18 months agonvme-print: Added missing logpage names in nvme_log_to_string function
shankara [Wed, 20 Sep 2023 08:13:06 +0000 (01:13 -0700)]
nvme-print: Added missing logpage names in nvme_log_to_string function

Signed-off-by: shankaralingegowda <shankaralingegowda.singonahalli@solidigmtechnology.com>
18 months agoudev-rules: rename netapp udev rule
Martin George [Thu, 5 Oct 2023 06:42:46 +0000 (12:12 +0530)]
udev-rules: rename netapp udev rule

Rename 71-nvmf-iopolicy-netapp.rules.in to 71-nvmf-netapp.rules.in
so as to make the name generic, since this not only sets the
iopolicy here but also modifies the ctrl_loss_tmo.

Signed-off-by: Martin George <marting@netapp.com>
18 months agoudev-rules: set ctrl_loss_tmo to -1 for ONTAP NVMe/TCP
Martin George [Tue, 3 Oct 2023 10:35:23 +0000 (16:05 +0530)]
udev-rules: set ctrl_loss_tmo to -1 for ONTAP NVMe/TCP

Setting ctrl_loss_tmo to -1 for ONTAP NVMe/TCP controllers would enable
indefinite reconnect attempts during a path loss and help avoid purging
the path on the host, which otherwise may lead to mounted fs read-only
behavior. So add a rule towards enabling the same.

Signed-off-by: Martin George <marting@netapp.com>
18 months agodoc: Regenerate all docs for v2.6 v2.6
Daniel Wagner [Fri, 29 Sep 2023 06:33:13 +0000 (08:33 +0200)]
doc: Regenerate all docs for v2.6

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agobuild: Update version to v2.6
Daniel Wagner [Fri, 29 Sep 2023 06:33:06 +0000 (08:33 +0200)]
build: Update version to v2.6

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agobuild: bump libnvme wrap to v1.6
Daniel Wagner [Fri, 29 Sep 2023 06:30:37 +0000 (08:30 +0200)]
build: bump libnvme wrap to v1.6

Signed-off-by: Daniel Wagner <dwagner@suse.de>
18 months agonvme: allocate payload buffer in create-ns command
Vikash Kumar [Thu, 28 Sep 2023 14:54:14 +0000 (20:24 +0530)]
nvme: allocate payload buffer in create-ns command

Fixes: 1a8bd305c61d ("nvme: allocate aligned payloads for all nvme commands")
Signed-off-by: Vikash Kumar <vikash.k5@samsung.com>
18 months agonvme-print-stdout: Add CAP.CPS and CAP.NSSS human readable outputs
Tokunori Ikegami [Wed, 27 Sep 2023 16:35:06 +0000 (01:35 +0900)]
nvme-print-stdout: Add CAP.CPS and CAP.NSSS human readable outputs

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agoREADME: Fix meson build badge
Martin Belanger [Wed, 27 Sep 2023 16:03:28 +0000 (12:03 -0400)]
README: Fix meson build badge

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
18 months agonvme: Add output-format default option instead of argconfig json option
Tokunori Ikegami [Tue, 26 Sep 2023 15:09:35 +0000 (00:09 +0900)]
nvme: Add output-format default option instead of argconfig json option

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
18 months agonvme: fw-download offset only describes FW offset, not file offset
Jeremy Kerr [Sat, 23 Sep 2023 18:06:40 +0000 (11:06 -0700)]
nvme: fw-download offset only describes FW offset, not file offset

In e7ca3bcbdba, we (unintentionally) changed the semantics of the
fw-download's --offset argument to also apply an offset to the source
file.

According to https://github.com/linux-nvme/nvme-cli/issues/2013, the old
behaviour is useful when the source firmware image was provided in
separate chunks.

This change restored to the old hehaviour, where --offset only applies
to the destination firmware buffer on the device. This means that the
start of the source file will end up at the destination offset.

Fixes: https://github.com/linux-nvme/nvme-cli/issues/2013
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
19 months agounit: add locale number test
Daniel Wagner [Mon, 25 Sep 2023 12:38:11 +0000 (14:38 +0200)]
unit: add locale number test

When the fr_FR.utf-8 locale is available test a string which has an
utf-8 encoded separator for a number.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
19 months agoutil: handle utf-8 thousend separators correctly
Daniel Wagner [Mon, 25 Sep 2023 12:32:23 +0000 (14:32 +0200)]
util: handle utf-8 thousend separators correctly

The separator char can be an utf-8 encoded symbol thus the length
of the string is necessarly one.

The check if we have to issue an separator needs to a fixed modulo of 3
or 4 (without or with l10n enabled) to place the symbol at the right
position in the string.

The copy loop needs to copy the all bytes from the back of the separator
byte sequence to the front, the same order we print the number.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
19 months agonvme: Change to use NVME_ARGS verbose default option from OPT_ARGS
Tokunori Ikegami [Sun, 24 Sep 2023 13:41:50 +0000 (22:41 +0900)]
nvme: Change to use NVME_ARGS verbose default option from OPT_ARGS

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>