Keith Busch [Tue, 31 Mar 2020 18:11:17 +0000 (03:11 +0900)]
suppress missing attribute warnings
Attribute existence is dependent on kernel versions. Don't automatically
warn if we fail to find the attribute, let the caller decide how to deal
with it.
Reported-by: Jeffrey Lien <Jeff.Lien@wdc.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Kevin Chau [Thu, 19 Sep 2019 01:22:35 +0000 (18:22 -0700)]
intel: Add enable-lat-stats function.
This adds the cli function for lat-stats-tracking. Enabling it allows
the drive to start tracking latency statistics during i/o.
Narasimhan V [Thu, 27 Feb 2020 10:31:37 +0000 (16:01 +0530)]
NVMe get features test fix
For One of the mandatory feature "Interrupt Vector Configuration",
the parameter cdw11 value should be equal to or less than the
number of interrupt vectors. Current implementaion uses the
IRQ number instead. This commit fixes it.
Signed-off-by: Narasimhan V <sim@linux.vnet.ibm.com>
Minwoo Im [Tue, 18 Feb 2020 06:55:00 +0000 (15:55 +0900)]
README: Fix include file location for plugin
If the CMD_INC_FILE is defined with file name without location, the
following error will happen.
In file included from plugins/foo/foo-nvme.h:17:0,
from plugins/foo/foo-nvme.c:4:
./define_cmd.h:12:34: fatal error: foo-nvme.h: No such file or directory
#include CMD_INCLUDE(CMD_INC_FILE)
^
Minwoo Im [Tue, 18 Feb 2020 06:52:08 +0000 (15:52 +0900)]
README: Include nvme.h in plugin template
The newly made plugin must have nvme.h file include, otherwise the
following errors will happen.
CC plugins/samsung/samsung-nvme.o
make: *** No rule to make target 'NVME-VERSION-FILE', needed by 'nvme'. Stop.
make: *** Waiting for unfinished jobs....
In file included from ./define_cmd.h:14:0,
from plugins/samsung/samsung-nvme.h:17,
from plugins/samsung/samsung-nvme.c:3:
./cmd_handler.h:75:2: error: ‘NULL’ undeclared here (not in a function)
NULL, \
^
./cmd_handler.h:79:28: note: in definition of macro ‘PLUGIN’
#define PLUGIN(name, cmds) cmds
^~~~
./plugins/samsung/samsung-nvme.h:11:5: note: in expansion of macro ‘COMMAND_LIST’
COMMAND_LIST(
^~~~~~~~~~~~
In file included from ./define_cmd.h:14:0,
from plugins/samsung/samsung-nvme.h:17,
from plugins/samsung/samsung-nvme.c:3:
./plugins/samsung/samsung-nvme.h: In function ‘init’:
./cmd_handler.h:105:2: error: implicit declaration of function ‘register_extension’ [-Werror=implicit-function-declaration]
register_extension(&plugin); \
^
./plugins/samsung/samsung-nvme.h:10:1: note: in expansion of macro ‘PLUGIN’
PLUGIN(NAME("samsung", "samsung"),
^~~~~~
cc1: all warnings being treated as errors
Makefile:92: recipe for target 'plugins/samsung/samsung-nvme.o' failed
make: *** [plugins/samsung/samsung-nvme.o] Error 1
Yi Zhang [Thu, 16 Jan 2020 07:56:58 +0000 (15:56 +0800)]
nvme-cli: memblaze: change to 100644 mode for memblaze-nvme.c
Bellow WARNING observed with rpmbuild -bb rpmbuild/SPECS/nvme-cli.spec
*** WARNING: plugins/memblaze/memblaze-nvme.c is executable but has
empty or no shebang, removing executable bit
Signed-off-by: Yi Zhang <yi.zhang@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Hannes Reinecke [Wed, 22 Jan 2020 07:45:18 +0000 (08:45 +0100)]
nvmf-autoconnect.service
Add a systemd service to automatically start 'nvme connect-all'
upon booting if an /etc/nvme/discovery.conf file exists.
The 'nvme-tcp' or 'nvme-rdma' modules need to be loaded earlier
by eg the modules-load service.
Jeff Lien [Tue, 7 Jan 2020 15:20:23 +0000 (09:20 -0600)]
[NVME-CLI] Add documentation file for vs-error-reason-identifier WDC
plugin command.
[NVME-CLI] Minor updates/corrections to the clear-fw-activate-history
and vs-fw-activate-history command help text.
Jeff Lien [Tue, 7 Jan 2020 15:16:09 +0000 (09:16 -0600)]
[NVME-CLI] Add support for WDC plugin command - vs-error-reason-identifier
[NVME-CLI] Reverse enable/disable bit on the vs-telemetry-controller-option
WDC plugin command
Kevin Chau [Thu, 19 Sep 2019 01:57:15 +0000 (18:57 -0700)]
intel: Add function lat-stats to cli
Adds the lat-stats function to intel plugin.
If lat-stats-tracking is enabled, lat-stats will print out latency
statistics according to the user's desired format.
Auto detects intel drives to print the correct format.
Can output as raw binary, a formatted histogram, or as formatted json.
Simon Schricker [Fri, 29 Nov 2019 09:52:05 +0000 (10:52 +0100)]
nvme-cli: Check for sysfs interface before NVMe discovery
This prevents an unnecessary error message in the case that the nvme-fc
kernel module is not loaded and the
/sys/class/fc/fc_udev_device/nvme_discovery
handle is not available.
Revanth Rajashekar [Thu, 21 Nov 2019 18:52:05 +0000 (11:52 -0700)]
nvme-cli: Update err value to 0 in get_ns_id func.
Err value should be updated to 0 on success of nvme_get_nsid,
else the File Descriptor is passed on to nvme_status_to_errno
which returns an irrelevant errno.
Keith Busch [Tue, 29 Oct 2019 11:01:57 +0000 (20:01 +0900)]
Unify print routines
Move all the binary/json/normal output handling into a single function
call for each structure that we print. This will reduce the API surface
that we have to maintain.
Keith Busch [Tue, 5 Nov 2019 18:22:53 +0000 (03:22 +0900)]
nvme-cli: Support for hugetlbfs
Some commands require exceptionally large data transfers, and the
kernel driver supports only a limited number of phyiscal segments per
command. To help support this, try to allocate physically contiguous
space via hugetlbfs and fallback to a normal malloc if that fails.
Rather than deal with the nuances of allocating huge pages, use
libhugetlbfs as a dependency.