Skip to content

Commit

Permalink
Merge branch 'master' into nvme-reg
Browse files Browse the repository at this point in the history
  • Loading branch information
ikegami-t authored Feb 4, 2024
2 parents 1842cbc + 79abafe commit 21a239c
Show file tree
Hide file tree
Showing 15 changed files with 620 additions and 176 deletions.
11 changes: 7 additions & 4 deletions Documentation/nvme-connect-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SYNOPSIS
[--hostid=<hostid> | -I <hostid>]
[--raw=<filename> | -r <filename>]
[--device=<device> | -d <device>]
[--cfg-file=<cfg> | -C <cfg>]
[--config=<filename> | -J <cfg>]
[--keep-alive-tmo=<sec> | -k <sec>]
[--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>]
Expand All @@ -27,7 +27,7 @@ SYNOPSIS
[--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>] [--keyring=<#>]
[--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G]
[--persistent | -p] [--tls] [--quiet | -S]
[--persistent | -p] [--tls] [--concat] [--quiet | -S]
[--dump-config | -O] [--nbft] [--no-nbft]
[--nbft-path=<STR>] [--context=<STR>]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]
Expand Down Expand Up @@ -121,8 +121,8 @@ OPTIONS
command "connect-all" or "discover". <device> follows the format
nvme*, eg. nvme0, nvme1.

-C <cfg>::
--config-file=<cfg>::
-J <filename>::
--config=<filename>::
Use the specified JSON configuration file instead of the
default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
Expand Down Expand Up @@ -186,6 +186,9 @@ OPTIONS
--tls::
Enable TLS encryption (TCP).

--concat::
Enable secure concatenation (TCP).

-S::
--quiet::
Suppress error messages.
Expand Down
11 changes: 7 additions & 4 deletions Documentation/nvme-connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SYNOPSIS
[--host-iface=<iface> | -f <iface>]
[--hostnqn=<hostnqn> | -q <hostnqn>]
[--hostid=<hostid> | -I <hostid>]
[--config-file=<cfg> | -J <cfg>]
[--config=<filename> | -J <filename>]
[--dhchap-secret=<secret> | -S <secret>]
[--dhchap-ctrl-secret=<secret> | -C <secret>]
[--nr-io-queues=<#> | -i <#>]
Expand All @@ -29,7 +29,7 @@ SYNOPSIS
[--keyring=<#>] [--tls_key=<#>]
[--duplicate-connect | -D] [--disable-sqflow | -d]
[--hdr-digest | -g] [--data-digest | -G] [--tls]
[--dump-config | -O] [--application=<id>]
[--concat] [--dump-config | -O] [--application=<id>]
[--output-format=<fmt> | -o <fmt>] [--verbose | -v]

DESCRIPTION
Expand Down Expand Up @@ -95,8 +95,8 @@ OPTIONS
UUID(Universally Unique Identifier) to be discovered which should be
formatted.

-J <cfg>::
--config-file=<cfg>::
-J <filename>::
--config=<filename>::
Use the specified JSON configuration file instead of the
default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
Expand Down Expand Up @@ -176,6 +176,9 @@ OPTIONS
--tls::
Enable TLS encryption (TCP).

--concat::
Enable secure concatenation (TCP).

-O::
--dump-config::
Print out resulting JSON configuration file to stdout.
Expand Down
11 changes: 7 additions & 4 deletions Documentation/nvme-discover.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SYNOPSIS
[--hostid=<hostid> | -I <hostid>]
[--raw=<filename> | -r <filename>]
[--device=<device> | -d <device>]
[--cfg-file=<cfg> | -C <cfg>]
[--config=<filename> | -J <filename>]
[--keep-alive-tmo=<sec> | -k <sec>]
[--reconnect-delay=<#> | -c <#>]
[--ctrl-loss-tmo=<#> | -l <#>]
Expand All @@ -27,7 +27,7 @@ SYNOPSIS
[--nr-poll-queues=<#> | -P <#>]
[--queue-size=<#> | -Q <#>] [--keyring=<#>]
[--tls_key=<#>] [--hdr-digest | -g] [--data-digest | -G]
[--persistent | -p] [--quiet | -S] [--tls]
[--persistent | -p] [--quiet | -S] [--tls] [--concat]
[--dump-config | -O] [--output-format=<fmt> | -o <fmt>]
[--force] [--nbft] [--no-nbft] [--nbft-path=<STR>]
[--context=<STR>]
Expand Down Expand Up @@ -140,8 +140,8 @@ OPTIONS
command "connect-all" or "discover". <device> follows the format
nvme*, eg. nvme0, nvme1.

-C <cfg>::
--config-file=<cfg>::
-J <filename>::
--config=<filename>::
Use the specified JSON configuration file instead of the
default @SYSCONFDIR@/nvme/config.json file or 'none' to not read in
an existing configuration file. The JSON configuration file
Expand Down Expand Up @@ -206,6 +206,9 @@ OPTIONS
--tls::
Enable TLS encryption (TCP).

--concat::
Enable secure concatenation (TCP).

-S::
--quiet::
Suppress already connected errors.
Expand Down
210 changes: 208 additions & 2 deletions completions/_nvme
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ _nvme () {
'nvme-mi-send:send a NVMe-MI send command'
'version:show the program version'
'ocp:OCP cloud SSD extensions'
'solidigm:Solidigm plug-in extensions'
'help:print brief descriptions of all nvme commands'
'json:dump output in json format'
)
Expand Down Expand Up @@ -261,7 +262,188 @@ _nvme () {
-o':alias for --output-file'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp internal-log options" _internal_log
_describe -t commands "nvme ocp telemetry-string-log options" _telemetry_string_log
;;
(*)
_files
;;
esac
;;
(solidigm)
case ${words[2]} in
(id-ctrl)
local _id_ctrl
_id_ctrl=(
--verbose':Increase output verbosity'
-v':alias for --verbose'
--output-format':Output format: normal|json|binary'
-o':alias for --output-format'
--vendor-specific':dump binary vendor field'
-V':alias for --vendor-specific'
--raw-binary':show identify in binary format'
-b':alias for --raw-binary'
--human-readable':show identify in readable format'
-H':alias for --human-readable'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm id-ctrl options" _id_ctrl
;;
(smart-log-add)
local _smart_log_add
_smart_log_add=(
--namespace-id':(optional) desired namespace'
-n':alias for --namespace-id'
--output-format':Output format: normal|json|binary'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm smart-log-add options" _smart_log_add
;;
(vs-smart-add-log)
local _vs_smart_add_log
_vs_smart_add_log=(
--output-format':output Format: normal|json'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm vs-smart-add-log options" _vs_smart_add_log
;;
(vs-internal-log)
local _vs_internal_log
_vs_internal_log=(
--type':Log type: ALL,
CONTROLLERINITTELEMETRY,
HOSTINITTELEMETRY,
HOSTINITTELEMETRYNOGEN, NLOG,
ASSERT, EVENT. Defaults to ALL.'
-t':alias for --type'
--namespace-id':Namespace to get logs from.'
-n':alias for --namespace-id'
--dir-prefix':Output dir prefix; defaults to device serial number.'
-p':alias for --dir-prefix'
--verbose':To print out verbose info.'
-v':alias for --verbose'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm vs-internal-log" _vs_internal_log
;;
(garbage-collect-log)
local _garbage_collect_log
_garbage_collect_log=(
--output-format':Output format: normal|json|binary'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm garbage-collect-log" _garbage_collect_log
;;
(market-log)
local _market_log
_market_log=(
--raw-binary':dump output in binary format'
-b':alias for --raw-binary'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm market-log" _market_log
;;
(latency-tracking-log)
local _latency_tracking_log
_latency_tracking_log=(
--enable':Enable Latency Tracking'
-e':alias for --enable'
--disable':Disable Latency Tracking'
-d':alias for --disable'
--read':Get read statistics'
-r':alias for --read'
--write':Get write statistics'
-w':alias for --write'
--type':Log type to get'
-t':alias for --type'
--output-format':Output format: normal|json|binary'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm latency-tracking-log" _latency_tracking_log
;;
(parse-telemetry-log)
local _parse_telemetry_log
_parse_telemetry_log=(
--host-generate':Controls when to generate new
host initiated report. Default
value '1' generates new host
initiated report, value '0'
causes retrieval of existing
log.'
-g':alias for --host-generate'
--controller-init':Gather report generated by the controller.'
-c':alias for --controller-init'
--data-area':Pick which telemetry data area to
report. Default is 3 to fetch
areas 1-3. Valid options are 1,
2, 3, 4.'
-d':alias for --data-area'
--config-file':JSON configuration file'
-j':alias for --config-file'
--source-file':data source <device> is binary
file containing log dump instead
of block or character device'
-s':alias for --source-file'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm parse-telemetry-log" _parse_telemetry_log
;;
(clear-pcie-correctable-errors)
local _clear_pcie_correctable_errors
_clear_pcie_correctable_errors=(
--no-uuid':Skip UUID index search (UUID index not required for OCP 1.0)'
-n':alias for --no-uuid'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm clear-pcie-correctable-errors" _clear_pcie_correctable_errors
;;
(clear-fw-activate-history)
local _clear_fw_activate_history
_clear_fw_activate_history=(
--no-uuid':Skip UUID index search (UUID index not required for OCP 1.0)'
-n':alias for --no-uuid'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm clear-fw-activate-history" _clear_fw_activate_history
;;
(vs-fw-activate-history)
local _vs_fw_activate_history
_vs_fw_activate_history=(
--output-format':output format : normal | json'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm vs-fw-activate-history" _vs_fw_activate_history
;;
(log-page-directory)
local _log_page_directory
_log_page_directory=(
--output-format':output format : normal | json'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm log-page-directory" _log_page_directory
;;
(temp-stats)
local _temp_stats
_temp_stats=(
--raw-binary':dump output in binary format'
-b':alias for --raw-binary'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm temp-stats" _temp_stats
;;
(vs-drive-info)
local _vs_drive_info
_vs_drive_info=(
--output-format':output format : normal | json'
-o':alias for --output-format'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm vs-drive-info" _vs_drive_info
;;
(*)
_files
Expand Down Expand Up @@ -2077,6 +2259,30 @@ _nvme () {
_arguments '*:: :->subcmds'
_describe -t commands "nvme ocp options" _ocp
;;
(solidigm)
local _solidigm
_solidigm=(
id-ctrl':Send NVMe Identify Controller'
smart-log-add':Retrieve Solidigm SMART Log'
vs-smart-add-log':Get SMART / health extended log (redirects to ocp plug-in)'
vs-internal-log':Retrieve Debug log binaries'
garbage-collect-log':Retrieve Garbage Collection Log'
market-log':Retrieve Market Log'
latency-tracking-log':Enable/Retrieve Latency tracking Log'
parse-telemetry-log':Parse Telemetry Log binary'
clear-pcie-correctable-errors':Clear PCIe Correctable Error Counters (redirects to ocp plug-in)'
clear-fw-activate-history':Clear firmware update history log (redirects to ocp plug-in)'
vs-fw-activate-history':Get firmware activation history log (redirects to ocp plug-in)'
log-page-directory':Retrieve log page directory'
temp-stats':Retrieve Temperature Statistics log'
vs-drive-info':Retrieve drive information'
cloud-SSDplugin-version':Prints plug-in OCP version'
version':Shows the program version'
help':Display this help'
)
_arguments '*:: :->subcmds'
_describe -t commands "nvme solidigm options" _solidigm
;;
(help)
local _h
_h=( id-ctrl id-ns list-ns id-iocs create-ns delete-ns attach-ns detach-ns
Expand All @@ -2094,7 +2300,7 @@ _nvme () {
get-property write-zeroes write-uncor verify sanitize sanitize-log reset
subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect
dim disconnect disconnect-all gen-hostnqn show-hostnqn dir-receive dir-send
virt-mgmt rpmb version ocp
virt-mgmt rpmb version ocp solidigm
)
_arguments '*:: :->subcmds'
_describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h
Expand Down
Loading

0 comments on commit 21a239c

Please sign in to comment.