Steven Seungcheol Lee [Mon, 17 Apr 2023 05:17:41 +0000 (14:17 +0900)]
fdp: set-events feature is saveable
TP4146 Flexible Data Placement 2022.11.30 Ratified
5.27.1.TBD1 Flexible Data Placement Events (Feature Identifier 1Eh)
mentioned as below
This Feature shall be saveable (refer to section 4.2).
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com> Reported-by: Youngjin Jung <yj4369.jung@samsung.com>
Changes for linux kernel check patch warnings remained.
Change to use `//` instead for proper SPDX comment style.
And also change symbolic permissions `S_IRUSR | S_IWUSR' as '0600'.
Note: Still remaining a check patch error.
Daniel Wagner [Mon, 17 Apr 2023 06:26:35 +0000 (08:26 +0200)]
build: Extend static linked binary build test
So far, the binary was still linking against the libc dynamically.
The final step to link completely statically can be achieved by setting
the LDFLAGS environment variable.
Daniel Wagner [Thu, 13 Apr 2023 10:56:10 +0000 (12:56 +0200)]
build: Disable fallback on default
meson's default setting for wrap mode is to attempt to download missing
dependencies. Disable this feature as the community is unhappy with
this default behavior.
da Cunha, Leonardo [Thu, 16 Mar 2023 23:53:37 +0000 (16:53 -0700)]
plugins/solidigm: Fixes and clean-up of Telemetry parse code.
Fixed parsing of 64 bit values.
Fixed COD field name.
Fixed compilation warnings when compiling for 32 bit.
Added missing free().
Consolidated single entry function to telemetry parser.
Consolidated use of integer types.
Martin George [Tue, 4 Apr 2023 09:29:09 +0000 (14:59 +0530)]
fabrics: fix fc config JSON file handling
Unlike other nvme transports, nvme/fc connection requires a valid
host_traddr in addition to traddr and transport type. Current fc
config JSON handling is broken due to the host_traddr not getting
updated even if explicitly listed in the JSON file, as shown below:
nvme connect-all -J /usr/local/etc/nvme/config.json
Failed to write to /dev/nvme-fabrics: Invalid argument
And the below error is logged in the messages file for the same:
nvme_fabrics: missing parameter 'host_traddr=%s'
Fix this by ensuring the relevant host_traddr string is appropriately
passed to the respective nvme controller structure. And while we are
at it, ensure the host_iface string is updated too but noting that it
is only applicable to tcp alone, and not rdma or fc.
Daniel Wagner [Wed, 5 Apr 2023 06:27:53 +0000 (08:27 +0200)]
build: Fetch all references before using git describe
The release script is using git describe to get the references string of
the library. The returned string validated if it is a valid release
string, e.g. v1.4. If not we abort the operation.
Thus we need to make sure that we have all references including the
tags, thus do a git fetch --all first.
Minwoo Im [Sun, 26 Mar 2023 11:06:49 +0000 (20:06 +0900)]
nvme-print: Unify number base format for nsid
`nvme list` is one of the most frequently used subcommand to list up
nvme devices in the system. `nvme list -v` prints much more detail in
it. But, those two commands have different number base format which are
decimal and hexadecimal without any prefix (e.g., 0x) or something.
nvme list -v shows hexadecimal nsid without `0x` which means it might be
confused between decimal and hexadecimal. To unify this, this patch
expands device NSID fields width from 8 to 10 to cover `0x` two chracters
as a prefix for both `nvme list` and `nvme list -v`.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Tokunori Ikegami [Fri, 24 Mar 2023 17:37:59 +0000 (02:37 +0900)]
util: Cleanup argconfig parse function
1. Split to parse config type function
2. Change if else statement to switch case statement
3. Use calloc instead of malloc
4. Delete unused while 0 statement
5. Add argconfig error common function
Martin George [Wed, 22 Mar 2023 06:36:55 +0000 (12:06 +0530)]
nvme-print: sanitize supported-log-pages output
The current nvme supported-log-pages output is a little cryptic
as seen below:
Support Log Pages Details for nvme1n1:
LID 0x0 (Supported Log Pages), supports 0x3
LID 0x1 (Error Information), supports 0x3
...
So sanitize this output to make it more meaningful with better
formatting. This should apply to the verbose output as well.
With these changes, the sanitized normal output should show up
as follows:
Support Log Pages Details for nvme1n1:
LID 0x0 - Supported Log Pages
LID 0x1 - Error Information
...
And the sanitized verbose output would show up as:
Support Log Pages Details for nvme1n1:
LID 0x0 - Supported Log Pages
LSUPP is supported
IOS is supported
LID 0x1 - Error Information
LSUPP is supported
IOS is supported
...
Martin George [Tue, 21 Mar 2023 08:49:11 +0000 (14:19 +0530)]
nvme: fix block count and data size logic
The required block count and data size is not automatically set
for a namespace device in submit_io(). Also it is the user specified
block count and not the actual required block count that is passed
to the ioctl data structure, often leading to nvme passthrough io
errors. For e.g. an nvme read on a 512b block size namespace device
with data size set to 4K ends up with the below error:
nvme read /dev/nvme0n1 -s 0 -z 4096
NVMe status: Data SGL Length Invalid: The length of a Data SGL is too
short or too long and the controller does not support SGL transfers
longer than the amount of data to be transferred(0x400f)
This read is successful only when the appropriate block count is
passed from the command line:
So fix this by deriving the required block count and data size based
on the logical block size and passing them appropriately to the
respective ioctl data structure. And while we are at it, remove a
couple of superfluous braces in this part of the code.
Martin George [Sat, 11 Mar 2023 05:49:37 +0000 (11:19 +0530)]
nvme-doc: update man page for supported-log-pages
There is no human-readable option implemented for nvme
supported-log-pages. Instead there is only a verbose option.
So update the respective man page to reflect the same.
Martin Belanger [Wed, 15 Mar 2023 19:49:43 +0000 (15:49 -0400)]
build: Print option summary
At the end of the meson setup command, display the options so that
we can quickly determine that we're configured the project properly
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: ported this from libnvme to nvme-cli] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Steven Seungcheol Lee [Wed, 15 Mar 2023 05:40:30 +0000 (14:40 +0900)]
nvme: Fix parameter limit range
3 Bits - Max value 7
SEL : Bits [10:08] of Get Features Command Dword 10
4 Bits - Max value 15
OWPASS : Bits [07:04] of Sanitize – Command Dword 10
7 Bits - Max value 127
LSP : Bits [14:08] of Get Log Page Command Dword 10
UUID Index : Bits [06:00] of Get Log Page, Get Features, Set Features Command Dword 14
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Caleb Sander [Thu, 9 Mar 2023 16:29:06 +0000 (09:29 -0700)]
nvme-print: Fix printing of u32 values
Fields HMPRE, HMMIN, and NN in the Identify Controller data structure
are 32-bit unsigned values but are being printed as signed integers.
Print them using %u so large values are not displayed as negative ones.
Also make JSON uint objects use uint64 instead of int64 internally
so u32 values are stored accurately.
Daniel Wagner [Tue, 7 Mar 2023 09:24:01 +0000 (10:24 +0100)]
fabrics: Fix ordering for auto connect services
In order to be able to mount file systems via /etc/fstab we have to
make sure that the corresponding auto connect services have been
executed. Because the mounting of the local filesystem happens very
early in the boot we have to carefully sort these service file into the
boot process.
First, we have to disable the DefaultDependency as this will
automatically add dependency on sysinit.target which is too late (after
local mounts). Though without the default dependency we have to provide
a Before and After conditions.
The Before is simple as we have a local-fs-pre target. The After
is a bit tricky as there are no targets available.
Because the whole autoconnect machinery depends on udev events being
delivered we place the service after systemd-udevd has been started.
Steven Seungcheol Lee [Fri, 3 Mar 2023 07:44:55 +0000 (16:44 +0900)]
nvme.c: Check Firmware Update Granularity in fwdl
FWUG indicates the granularity and alignment requirement of the
firmware image being updated by the Firmware Image Download command
FWUG is reported in 4 KiB units
0h indicates that no information on granularity is provided
FFh indicates there is no restriction
so when this is 0 value, use 4 KiB split as a default
Do not override when xfer is given by user
-> Support for ignore fwug in (fwug>mdts) case
Reviewed-by: Keith Busch <keith.busch@gmail.com> Reported-by: Minsik Jeon <hmi.jeon@samsung.com> Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
丁剑 [Sun, 19 Feb 2023 07:43:07 +0000 (15:43 +0800)]
log: high latency timestamp issue
1. The old nvme-cli set-feature uses 32bit to represent timestamp, but the spec definition is 48bit.
2. memblaze made a slight correction to allow for overflow.
3. Now this correction is no longer needed.
Tokunori Ikegami [Fri, 24 Feb 2023 15:54:24 +0000 (00:54 +0900)]
nvme: Continue get feature on invalid NS error to get multiple feature ids
Some features returned invalid NS if NSID all 0xffffffff default specified.
Also print get feature ID for invalid NS error to get multiple feature ids.
* The unit name 'kelvin' is written in lowercase, unless it starts a sentence. However, its plural 'kelvins' is more appropriate because of the context.
* Added a space between the number and the unit (e.g. 30 °C or 303 K).
* Wherever '°C' and 'kelvin' appeared in the same context, the latter is replaced with 'K'.
Ref.: *The International System of Units*, 9th edition (2019, updated 2022), Bureau International des Poids et Mesures
Dedow, Karl [Thu, 16 Feb 2023 21:07:25 +0000 (13:07 -0800)]
plugins/ocp: Fix whitespace and style issues
As reported by a code linter results in OCP plugin
[dwagner:
- lot's of manual cleanup
- fixed non white space changes reported by checktool
- verified result with 'git diff --word-diff'
] Signed-off-by: Daniel Wagner <dwagner@suse.de>
Tokunori Ikegami [Fri, 17 Feb 2023 13:53:26 +0000 (22:53 +0900)]
util: Revert JSON output to plain numbers
Add explicit a localization stringify function for uint128_t types.
Also set serializer to generate a number instead of a string.
Fixes: 2a8bc94 ("nvme-print: Display smart log data units read and written SI value") Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
[dwagner: introduce an explicit l10 function] Signed-off-by: Daniel Wagner <dwagner@suse.de>