]> git.infradead.org Git - users/sagi/libnvme.git/log
users/sagi/libnvme.git
2 years agodoc: Provide SYSCONFDIR without quotes v1.0-rc7
Daniel Wagner [Fri, 18 Mar 2022 16:40:19 +0000 (17:40 +0100)]
doc: Provide SYSCONFDIR without quotes

Unfortunately, we can't use the configuration data object defined in
the top meson.build file as this one is with quotes. Instead, making
the c code ugly, just provide a new configuration data object without
the quotes. This avoid generating strings suchs as

  "/etc"/nvme/hostnqn

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #297 from igaw/fix-stringify-hostnqn
Daniel Wagner [Fri, 18 Mar 2022 15:19:50 +0000 (16:19 +0100)]
Merge pull request #297 from igaw/fix-stringify-hostnqn

fabrics: Correctly stringify default hostnqn and hostid paths

2 years agoMerge pull request #298 from hreinecke/log-page-len
Hannes Reinecke [Fri, 18 Mar 2022 15:15:16 +0000 (16:15 +0100)]
Merge pull request #298 from hreinecke/log-page-len

linux: fixup log page offset in nvme_get_log_page()

2 years agofabrics: Correctly stringify default hostnqn and hostid paths
Daniel Wagner [Fri, 18 Mar 2022 13:05:27 +0000 (14:05 +0100)]
fabrics: Correctly stringify default hostnqn and hostid paths

Fixes: f356ab0ca74a ("fabrics: Allow to change sysconfdir for hostnqn and hostid file")
Reported-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #296 from igaw/set_default_trsvcid
Hannes Reinecke [Fri, 18 Mar 2022 13:58:37 +0000 (14:58 +0100)]
Merge pull request #296 from igaw/set_default_trsvcid

tree: Add support for default trsvcid for all controllers

2 years agolinux: fixup log page offset in nvme_get_log_page()
Hannes Reinecke [Fri, 18 Mar 2022 13:54:07 +0000 (14:54 +0100)]
linux: fixup log page offset in nvme_get_log_page()

When resubmitting the log page with a different length in
nvme_get_log_page() we need to store the original length
of the log page to avoid the length being overwritten.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2 years agotree: Add support for default trsvcid for all controllers
Daniel Wagner [Fri, 18 Mar 2022 08:33:21 +0000 (09:33 +0100)]
tree: Add support for default trsvcid for all controllers

When the user doesn't provide trsvcid always use the default values
for tcp/rdma transport.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #290 from glimchb/rpm
Daniel Wagner [Wed, 16 Mar 2022 11:30:37 +0000 (12:30 +0100)]
Merge pull request #290 from glimchb/rpm

rpm: add makefile rule for rpms

2 years agoMerge pull request #293 from igaw/fix-sysconfdir
Daniel Wagner [Wed, 16 Mar 2022 11:17:38 +0000 (12:17 +0100)]
Merge pull request #293 from igaw/fix-sysconfdir

fabrics: Allow to change sysconfdir for hostnqn and hostid file

2 years agoMerge pull request #294 from hreinecke/disc-ttrsvcid
Daniel Wagner [Wed, 16 Mar 2022 11:16:43 +0000 (12:16 +0100)]
Merge pull request #294 from hreinecke/disc-ttrsvcid

tree: fixup coredump during nvme discover

2 years agotree: fixup coredump during nvme discover
Hannes Reinecke [Wed, 16 Mar 2022 10:40:55 +0000 (11:40 +0100)]
tree: fixup coredump during nvme discover

nvme_free_ctrl() expects the 'trsvcid' string to be dynamically
allocated; just calling 'stringify' will cause a coredump on exit.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2 years agofabrics: Allow to change sysconfdir for hostnqn and hostid file
Daniel Wagner [Tue, 15 Mar 2022 11:09:58 +0000 (12:09 +0100)]
fabrics: Allow to change sysconfdir for hostnqn and hostid file

Instead hard coding the sysconfdir allow the user to overwrite the
location of the hostnqn and hostid file. The default is "/etc" but
when configured with --prefix=DIR the files should be read from
"DIR/nvme/".

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agorpm: add makefile rule for rpms
Boris Glimcher [Mon, 14 Mar 2022 12:44:07 +0000 (14:44 +0200)]
rpm: add makefile rule for rpms

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #289 from glimchb/rpm
Daniel Wagner [Mon, 14 Mar 2022 08:56:05 +0000 (09:56 +0100)]
Merge pull request #289 from glimchb/rpm

dist: add missing BuildRequires to spec file

2 years agodist: add missing BuildRequires to spec file
Boris Glimcher [Sun, 13 Mar 2022 14:23:26 +0000 (16:23 +0200)]
dist: add missing BuildRequires to spec file

According to https://docs.fedoraproject.org/en-US/packaging-guidelines/Meson/

Fixes #288

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agodoc: Regenerate all documentation v1.0-rc6
Daniel Wagner [Fri, 11 Mar 2022 16:01:20 +0000 (17:01 +0100)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #283 from hreinecke/ana-path
Hannes Reinecke [Fri, 11 Mar 2022 13:43:51 +0000 (14:43 +0100)]
Merge pull request #283 from hreinecke/ana-path

tree: add nvme_ctrl_get_ana_state()

2 years agotree: add nvme_ctrl_get_ana_state()
Hannes Reinecke [Fri, 11 Mar 2022 08:06:36 +0000 (09:06 +0100)]
tree: add nvme_ctrl_get_ana_state()

Add a function to return the ANA state of a namespace on a given
controller.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2 years agotree: link paths to namespaces in nvme_subsystem_scan_namespace()
Hannes Reinecke [Fri, 11 Mar 2022 12:43:08 +0000 (13:43 +0100)]
tree: link paths to namespaces in nvme_subsystem_scan_namespace()

Depending on the order of scanning nvme_subsystem_scan_namespace()
might be called after nvme_scan_ctrl(), causing the links from
paths to namespaces to be missing.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2 years agoMerge pull request #282 from glimchb/wheel2
Daniel Wagner [Fri, 11 Mar 2022 11:29:44 +0000 (12:29 +0100)]
Merge pull request #282 from glimchb/wheel2

CI: add python wheel build in addition to source package

2 years agoMerge pull request #284 from hreinecke/filter-doc
Hannes Reinecke [Fri, 11 Mar 2022 09:02:11 +0000 (10:02 +0100)]
Merge pull request #284 from hreinecke/filter-doc

Document filter functions

2 years agoDocument filter functions
Hannes Reinecke [Fri, 11 Mar 2022 08:37:37 +0000 (09:37 +0100)]
Document filter functions

Add documentation for the various filter functions.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2 years agoCI: add python wheel build in addition to source package
Boris Glimcher [Mon, 28 Feb 2022 17:24:02 +0000 (19:24 +0200)]
CI: add python wheel build in addition to source package

When using source distribution,
python package will be compiled during pip install.

Wheels make the end-to-end installation of Python packages faster:
- wheels are typically smaller in size than source distributions
- pip fetches a prebuilt wheel and avoids the intermediate step of building

So why cibuildwheel and manylinux?

See https://github.com/pypa/manylinux and https://github.com/pypa/cibuildwheel

The goal of the manylinux project is to provide a convenient way to distribute binary Python extensions as wheels on Linux

See https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml

Skipping musllinux and auditwheel repair.
Skipping MacOS and Windows for now.

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #281 from glimchb/opensslci
Daniel Wagner [Tue, 8 Mar 2022 13:50:54 +0000 (14:50 +0100)]
Merge pull request #281 from glimchb/opensslci

CI: add test for subproject fallbacks compilation

2 years agoCI: add test for subproject fallbacks compilation
Boris Glimcher [Tue, 1 Mar 2022 12:30:36 +0000 (14:30 +0200)]
CI: add test for subproject fallbacks compilation

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #280 from glimchb/test
Daniel Wagner [Tue, 8 Mar 2022 10:09:26 +0000 (11:09 +0100)]
Merge pull request #280 from glimchb/test

test: adding dependency on pynvme

2 years agotest: adding dependency on pynvme
Boris Glimcher [Tue, 8 Mar 2022 07:55:18 +0000 (09:55 +0200)]
test: adding dependency on pynvme

On few systems (i.e. Fedora) when running meson test,
the python library build is not invoked.

For example, on Ubuntu, this works fine.
That's why CI dodn't catch it.

So adding explicit dependency in tests.

Fixes #279

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #278 from sc108-lee/list_ns
Daniel Wagner [Tue, 8 Mar 2022 08:14:40 +0000 (09:14 +0100)]
Merge pull request #278 from sc108-lee/list_ns

ns list bug fix (wrong cns value)

2 years agoMerge pull request #277 from glimchb/openssl
Daniel Wagner [Tue, 8 Mar 2022 07:45:42 +0000 (08:45 +0100)]
Merge pull request #277 from glimchb/openssl

openssl: update to patch-3 to fix installation issue

2 years agoMerge pull request #275 from Arunpandian15/types_05
Daniel Wagner [Tue, 8 Mar 2022 07:41:33 +0000 (08:41 +0100)]
Merge pull request #275 from Arunpandian15/types_05

types: Add missing doc field description

2 years agoioctl.h: ns list bug fix (wrong cns value)
Steven Seungcheol Lee [Tue, 8 Mar 2022 06:35:09 +0000 (15:35 +0900)]
ioctl.h: ns list bug fix (wrong cns value)

original cns is not using csi field
naming align
NVME_IDENTIFY_CNS_CSS_ALLOCATED_NS_LIST -> NVME_IDENTIFY_CNS_CSI_ALLOCATED_NS_LIST

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
2 years agotypes.h: Key Value Command Set Identifier added (NVME_CSI_KV)
Steven Seungcheol Lee [Tue, 8 Mar 2022 06:28:30 +0000 (15:28 +0900)]
types.h: Key Value Command Set Identifier added (NVME_CSI_KV)

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
2 years agoopenssl: update to patch-3 to fix installation issue
Boris Glimcher [Sun, 6 Mar 2022 16:33:12 +0000 (18:33 +0200)]
openssl: update to patch-3 to fix installation issue

Fixes #268

Patch taken from https://mesonbuild.com/Wrapdb-projects.html
Wrap file used https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-3/openssl.wrap
Fixed by mesonbuild/wrapdb#322

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agotypes: Add missing doc field description
Arunpandian J [Sat, 5 Mar 2022 05:10:53 +0000 (10:40 +0530)]
types: Add missing doc field description

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #274 from sc108-lee/status_code_type
Daniel Wagner [Fri, 4 Mar 2022 13:41:31 +0000 (14:41 +0100)]
Merge pull request #274 from sc108-lee/status_code_type

types: fix status code type bug (wrong masking)

2 years agotypes: fix status code type bug (wrong masking)
Steven Seungcheol Lee [Fri, 4 Mar 2022 07:50:29 +0000 (16:50 +0900)]
types: fix status code type bug (wrong masking)

the error comes from fc274c57c6b3063d35dd76e36b777adc4da29e0d
using NVME_GET for masked value #148

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
2 years agodoc: Regenerate all documentation v1.0-rc5
Daniel Wagner [Thu, 3 Mar 2022 18:35:43 +0000 (19:35 +0100)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agolinux: Add log.h back
Daniel Wagner [Thu, 3 Mar 2022 17:55:59 +0000 (18:55 +0100)]
linux: Add log.h back

We still need log.h for the various log level definitions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agolinux: Include private.h
Daniel Wagner [Thu, 3 Mar 2022 17:53:24 +0000 (18:53 +0100)]
linux: Include private.h

Replace log.h with private.h because we added log.h only for
nvme_msg() but this define has been moved to the private.h header
file.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #236 from birkelund/meson-fixes
Daniel Wagner [Thu, 3 Mar 2022 15:55:59 +0000 (16:55 +0100)]
Merge pull request #236 from birkelund/meson-fixes

meson: small fixes

2 years agoMerge pull request #273 from igaw/fix-libssl-dep
Daniel Wagner [Thu, 3 Mar 2022 15:32:37 +0000 (16:32 +0100)]
Merge pull request #273 from igaw/fix-libssl-dep

build: Depend on libssl when using the fallback dependency

2 years agobuild: Depend on libssl when using the fallback dependency
Daniel Wagner [Thu, 3 Mar 2022 15:27:18 +0000 (16:27 +0100)]
build: Depend on libssl when using the fallback dependency

libnvme doesn't depend on the openssl application. Update the fallback
dependency to libssl.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #272 from Arunpandian15/sc
Daniel Wagner [Thu, 3 Mar 2022 10:15:51 +0000 (11:15 +0100)]
Merge pull request #272 from Arunpandian15/sc

util: Add status code values in order to return errno

2 years agoutil: Add status code values in order to return errno
Arunpandian J [Thu, 3 Mar 2022 08:36:20 +0000 (14:06 +0530)]
util: Add status code values in order to return errno

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #267 from igaw/traddr-case-insesitive
Daniel Wagner [Wed, 2 Mar 2022 07:46:18 +0000 (08:46 +0100)]
Merge pull request #267 from igaw/traddr-case-insesitive

tree: Ignore traddr case in nvme_lookup_ctrl()

2 years agoMerge pull request #269 from Arunpandian15/util_sc_02
Daniel Wagner [Wed, 2 Mar 2022 07:27:11 +0000 (08:27 +0100)]
Merge pull request #269 from Arunpandian15/util_sc_02

util: Congregate status code values to return EINVAL

2 years agoMerge pull request #270 from igaw/fix-pel
Daniel Wagner [Wed, 2 Mar 2022 07:19:48 +0000 (08:19 +0100)]
Merge pull request #270 from igaw/fix-pel

ioctl: Set lsp to action in nvme_get_log_persistent_event

2 years agoioctl: Set lsp to action in nvme_get_log_persistent_event
Wen Xiong [Tue, 1 Mar 2022 21:32:18 +0000 (16:32 -0500)]
ioctl: Set lsp to action in nvme_get_log_persistent_event

Retrieving PEL fails because the lsp is set to NVME_LOG_LSP_NONE
instead of action:

  # nvme -persistent-event-log  -a 1 /dev/nvme0
  NVMe status: Command Sequence Error: The command was aborted due to a protocol violation in a multi- command sequence(0xc)

Signed-off-by: Wen Xiong <wenxiong@linux.ibm.com>
[dwagner: updated commit message]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoutil: Congregate status code values to return EINVAL
Arunpandian J [Wed, 2 Mar 2022 05:40:52 +0000 (11:10 +0530)]
util: Congregate status code values to return EINVAL

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agotree: Ignore traddr case in nvme_lookup_ctrl()
Daniel Wagner [Tue, 1 Mar 2022 15:01:27 +0000 (16:01 +0100)]
tree: Ignore traddr case in nvme_lookup_ctrl()

Some FC discovery controllers return traddr strings with upper case
hexadecimal. There was is no requirement in the NVME-FC specification
that it be upper or lower case. Switch to strcasecmp for case
insentive traddr comparison.

Based on nvme-cli change 1264c6323937 ("nvme-cli: Make connect-all
matching be case insensitive")

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #264 from igaw/fix-system-uuid
Daniel Wagner [Tue, 1 Mar 2022 13:51:46 +0000 (14:51 +0100)]
Merge pull request #264 from igaw/fix-system-uuid

fabrics: Do not swap bytes for system uuid

2 years agofabrics: Do not swap bytes for system uuid
Daniel Wagner [Tue, 1 Mar 2022 09:03:23 +0000 (10:03 +0100)]
fabrics: Do not swap bytes for system uuid

The kernel is taking care of swapping the system uuid bytes since
f1d8e614d74b ("drivers/firmware/dmi_scan.c: check dmi version when get
system uuid"). Hence we should not swap them again. Instead just read
/sys/class/dmi/id/product_uuid and store the bytes directly into the
system_uuid buffer.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #266 from glimchb/actionbranch
Daniel Wagner [Tue, 1 Mar 2022 13:40:15 +0000 (14:40 +0100)]
Merge pull request #266 from glimchb/actionbranch

CI: rename branch main to master

2 years agoCI: rename branch main to master
Boris Glimcher [Tue, 1 Mar 2022 12:49:22 +0000 (14:49 +0200)]
CI: rename branch main to master

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #257 from glimchb/setuptools
Daniel Wagner [Tue, 1 Mar 2022 12:39:35 +0000 (13:39 +0100)]
Merge pull request #257 from glimchb/setuptools

 pyproject.toml instead of setup.py for new packaging

2 years agoWorkflow: temporary disable publish to PyPI, starting with TestPyPI
Boris Glimcher [Tue, 1 Mar 2022 10:14:21 +0000 (12:14 +0200)]
Workflow: temporary disable publish to PyPI, starting with TestPyPI

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agoMerge pull request #259 from Arunpandian15/fix_sct
Daniel Wagner [Tue, 1 Mar 2022 09:44:35 +0000 (10:44 +0100)]
Merge pull request #259 from Arunpandian15/fix_sct

types: status code type value update as per NVMe specification

2 years agoMerge pull request #262 from Arunpandian15/util_01
Daniel Wagner [Tue, 1 Mar 2022 09:30:48 +0000 (10:30 +0100)]
Merge pull request #262 from Arunpandian15/util_01

util: Add status code values in geneic status to errono conversion

2 years agoutil: Add status code values in generic status to errno conversion
Arunpandian J [Tue, 1 Mar 2022 07:15:46 +0000 (12:45 +0530)]
util: Add status code values in generic status to errno conversion

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #261 from martin-belanger/move-ccan-out-of-public-headers
Daniel Wagner [Mon, 28 Feb 2022 18:03:58 +0000 (19:03 +0100)]
Merge pull request #261 from martin-belanger/move-ccan-out-of-public-headers

Move ccan definitions out of public headers.

2 years agoMove ccan definitions out of public headers.
Martin Belanger [Mon, 28 Feb 2022 16:26:07 +0000 (11:26 -0500)]
Move ccan definitions out of public headers.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
2 years agoAdd workflow to publish to PyPI and TestPyPI
Boris Glimcher [Mon, 28 Feb 2022 07:34:06 +0000 (09:34 +0200)]
Add workflow to publish to PyPI and TestPyPI

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agopyproject.toml instead of setup.py for new packaging
Boris Glimcher [Sun, 27 Feb 2022 19:36:04 +0000 (21:36 +0200)]
pyproject.toml instead of setup.py for new packaging

This allows to build with meson and package for Pypi

Build like this:
    python -m build

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
2 years agotypes: status code type value update as per NVMe specification
Arunpandian J [Mon, 28 Feb 2022 10:52:22 +0000 (16:22 +0530)]
types: status code type value update as per NVMe specification

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #258 from Arunpandian15/types_doc_28
Daniel Wagner [Mon, 28 Feb 2022 09:28:20 +0000 (10:28 +0100)]
Merge pull request #258 from Arunpandian15/types_doc_28

types: Add missing doc for ZNS, NVMe OF, NVMe command set

2 years agotypes: Add missing doc for ZNS, NVMe OF, NVMe command set
Arunpandian J [Mon, 28 Feb 2022 05:55:02 +0000 (11:25 +0530)]
types: Add missing doc for ZNS, NVMe OF, NVMe command set

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #256 from Arunpandian15/doc_types_25
Daniel Wagner [Fri, 25 Feb 2022 12:22:12 +0000 (13:22 +0100)]
Merge pull request #256 from Arunpandian15/doc_types_25

types: Add doc section for enum fields

2 years agotypes: Add doc section for enum fields
Arunpandian J [Fri, 25 Feb 2022 11:08:53 +0000 (16:38 +0530)]
types: Add doc section for enum fields

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #255 from Arunpandian15/types_doc_24
Daniel Wagner [Thu, 24 Feb 2022 11:59:12 +0000 (12:59 +0100)]
Merge pull request #255 from Arunpandian15/types_doc_24

types: Add doc field for admin opcodes, FIDs, LIDs, Identify commands

2 years agotypes: Add doc field for admin opcodes, FIDs, LIDs, Identify commands
Arunpandian J [Thu, 24 Feb 2022 11:03:31 +0000 (16:33 +0530)]
types: Add doc field for admin opcodes, FIDs, LIDs, Identify commands

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #254 from Arunpandian15/mi_types
Daniel Wagner [Wed, 23 Feb 2022 15:12:31 +0000 (16:12 +0100)]
Merge pull request #254 from Arunpandian15/mi_types

types: All MI command related structure doc field update

2 years agotypes: All MI command related structure doc field update
Arunpandian J [Wed, 23 Feb 2022 08:40:52 +0000 (14:10 +0530)]
types: All MI command related structure doc field update

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agobuild: Use boolean type for docs-build default v1.0-rc4
Daniel Wagner [Tue, 22 Feb 2022 17:09:45 +0000 (18:09 +0100)]
build: Use boolean type for docs-build default

muon complains about the type used for the default value. As it a
boolean type use a boolean as value instead of a string value.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agodoc: Regenerate all documentation
Daniel Wagner [Tue, 22 Feb 2022 16:35:32 +0000 (17:35 +0100)]
doc: Regenerate all documentation

Prepare for next release candiate.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agodoc: Do not precomple HTML doc anymore
Daniel Wagner [Tue, 22 Feb 2022 16:45:58 +0000 (17:45 +0100)]
doc: Do not precomple HTML doc anymore

The HTML part is not ready yet. Let's remove the precompiled HTML doc.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #253 from igaw/port-default-port-for-discovery
Daniel Wagner [Tue, 22 Feb 2022 15:45:42 +0000 (16:45 +0100)]
Merge pull request #253 from igaw/port-default-port-for-discovery

fabrics: add default port number for NVMe/TCP I/O controllers

2 years agofabrics: add default port number for NVMe/TCP I/O controllers
Daniel Wagner [Tue, 22 Feb 2022 15:06:52 +0000 (16:06 +0100)]
fabrics: add default port number for NVMe/TCP I/O controllers

As per section 7.4.9.3 "Transport Service Identifier" of the NVMe over
Fabrics 1.1 specification, the default IANA port number for a NVMe/TCP
discovery controller is 8009. But at the same time, it also clearly
states that NVMe/TCP I/O controllers should not use TCP port number
8009, but may instead use 4420 as the default here.

So make sure to fill these values appropriately, and pass it down.

Signed-off-by: Martin George <marting@netapp.com>
[dwagner: backport from monolithic branch]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #252 from Arunpandian15/doc_mi
Daniel Wagner [Tue, 22 Feb 2022 14:07:43 +0000 (15:07 +0100)]
Merge pull request #252 from Arunpandian15/doc_mi

types: doc field update for NVM commands, Feature Identifiers

2 years agotypes: doc field update for NVM commands, Feature Identifiers
Arunpandian J [Tue, 22 Feb 2022 04:39:08 +0000 (10:09 +0530)]
types: doc field update for NVM commands, Feature Identifiers

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #248 from igaw/tp8010-support-refactored
Daniel Wagner [Mon, 21 Feb 2022 16:06:47 +0000 (17:06 +0100)]
Merge pull request #248 from igaw/tp8010-support-refactored

TP8010 support refactored

2 years agofabrics: Add support to register with a DC
Martin Belanger [Fri, 18 Feb 2022 09:42:49 +0000 (10:42 +0100)]
fabrics: Add support to register with a DC

This adds support for the TP8010 by introducing nvmf_registration_ctlr
function which performs the registration task with a Discovery
Controller.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: refactored, reformated, udpated documentation,
          moved nvme_fetch_cntrltype_dctype_from_id here]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoioctl: Add nvme_dim_send()
Martin Belanger [Fri, 18 Feb 2022 09:07:11 +0000 (10:07 +0100)]
ioctl: Add nvme_dim_send()

Add nvme_dim_send() to send Discovery Information Managements commands.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: reorder args arguments, rename function]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoutil: Add key-value helpers and OS identification tools
Martin Belanger [Thu, 17 Feb 2022 15:16:11 +0000 (16:16 +0100)]
util: Add key-value helpers and OS identification tools

Key value helpers and also the OS identification are used for
implementing TP8010 support.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: refactoring, reformating]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agotypes: Add Discovery Information Managment types
Martin Belanger [Thu, 17 Feb 2022 16:33:50 +0000 (17:33 +0100)]
types: Add Discovery Information Managment types

Add Discovery Information Management related types for TP8010.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: renaming, adding documation and reformating]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agotree: Add cntrltype and dctype to the controller object
Martin Belanger [Wed, 16 Feb 2022 15:11:05 +0000 (10:11 -0500)]
tree: Add cntrltype and dctype to the controller object

The Discovery Controller Type (dctype) is a new attribute defined
in TP8010. This new attribute, as well as the existing Controller
Type (cntrltype) attributes will now be exposed through the sysfs
starting with kernel 5.18. For older kernels, the cntrltype and
dctype must be retrieved by performing a Identify command.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: Removed nvme_fetch_cntrltype_dctype_from_id]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agoMerge pull request #250 from Arunpandian15/types_h_doc_21
Daniel Wagner [Mon, 21 Feb 2022 11:01:55 +0000 (12:01 +0100)]
Merge pull request #250 from Arunpandian15/types_h_doc_21

types.h: doc update for ZNS structures

2 years agoMerge pull request #246 from igaw/fix-nvme_msg
Daniel Wagner [Mon, 21 Feb 2022 10:53:58 +0000 (11:53 +0100)]
Merge pull request #246 from igaw/fix-nvme_msg

log: Allow nvme_msg usage with invalid root pointer

2 years agolog: Allow nvme_msg usage with invalid root pointer
Daniel Wagner [Thu, 17 Feb 2022 09:25:31 +0000 (10:25 +0100)]
log: Allow nvme_msg usage with invalid root pointer

24ac082f481d ("Add 'nvme_root_t' argument to nvme_msg()") and
19b12831a9ec ("Move global logging variables into nvme_root_t") moved
the logging controller knobs into the root object. In case the pointer
is invalid we should not try to use it. Instead just bailing out just
log the line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agotypes.h: doc update for ZNS structures
Arunpandian J [Mon, 21 Feb 2022 07:06:33 +0000 (12:36 +0530)]
types.h: doc update for ZNS structures

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #247 from Arunpandian15/types_h_doc_field
Daniel Wagner [Fri, 18 Feb 2022 13:57:58 +0000 (14:57 +0100)]
Merge pull request #247 from Arunpandian15/types_h_doc_field

types.h: Add missing documentation for all the log pages

2 years agoMerge pull request #249 from AkhileshRN/telemetry_ctlr
Daniel Wagner [Fri, 18 Feb 2022 13:55:58 +0000 (14:55 +0100)]
Merge pull request #249 from AkhileshRN/telemetry_ctlr

Fix to update size for telemetry log page when telemetry controller initiated data is unavailable.

2 years agolinux: Update size when telemetry controller initiated data is unavailable
Akhilesh RN [Fri, 18 Feb 2022 13:41:10 +0000 (19:11 +0530)]
linux: Update size when telemetry controller initiated data is unavailable

Fix to update size for telemetry log page when telemetry controller
initiated data is unavailable.

2 years agotypes: Add DCTYPE to nvme_id_psd
Martin Belanger [Thu, 17 Feb 2022 13:09:07 +0000 (14:09 +0100)]
types: Add DCTYPE to nvme_id_psd

TP8010 introduced Discovery Controller Type (DCTYPE) to the
Identify Controller data structure. Add the new field.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agotree: Add host symbolic name
Martin Belanger [Tue, 15 Feb 2022 20:54:38 +0000 (15:54 -0500)]
tree: Add host symbolic name

The host symbolic name was introduced in TP8010. It is used for
explicit registration with discovery controllers using the
discovery information management (DIM) command.x

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
2 years agopython: Add dump_config
Martin Belanger [Fri, 18 Feb 2022 09:10:15 +0000 (10:10 +0100)]
python: Add dump_config

Add support to the Python binding to dump the JSON config by hooking
up nvme_dump_config.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agotypes.h: Add missing documentaion for all the log pages
Arunpandian J [Fri, 18 Feb 2022 07:22:10 +0000 (12:52 +0530)]
types.h: Add missing documentaion for all the log pages

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
2 years agoMerge pull request #245 from Arunpandian15/cleanup_17
Daniel Wagner [Thu, 17 Feb 2022 09:21:36 +0000 (10:21 +0100)]
Merge pull request #245 from Arunpandian15/cleanup_17

Cleanup patch for linux.h, log.h, tree.h

2 years agotree: Add missing documentation
Arunpandian J [Thu, 17 Feb 2022 09:10:50 +0000 (10:10 +0100)]
tree: Add missing documentation

Add missing documentation to all functions declarations.
While at it also fix whitespace issues and intentions levels

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
[dwagner: added commit messages, extended the docs bits]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agolog: Fix whitespacing in documentation
Arunpandian J [Thu, 17 Feb 2022 09:10:37 +0000 (10:10 +0100)]
log: Fix whitespacing in documentation

Make the documentation consistent with the other header files.

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
[dwagner: added commit messages]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
2 years agolinux: Streamline documentation
Arunpandian J [Thu, 17 Feb 2022 06:23:40 +0000 (11:53 +0530)]
linux: Streamline documentation

Make the documetation consistent with the other header files.
While at it also fix whitespace issues and intentions levels

Signed-off-by: Arunpandian J <apj.arun@samsung.com>
[dwagner: added commit messages, extended the docs bits]
Signed-off-by: Daniel Wagner <dwagner@suse.de>