Commit Graph

1138 Commits

Author SHA1 Message Date
Seth Howell
c2312f6cb3 test/check_format.sh: remove moved symbols in naming check
There was an edge case in this check where a public symbol
definition was just moved and that movement triggered this
check. Going forward, check the diff for symbols that were
both added and removed in the same patch. This indicates a
symbol that was just moved instead of newly added.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I71bbcd6d6b3e0a2133e77c29f4ec7a4f2b09e3c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2765
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-06-05 09:02:44 +00:00
Michal Berger
cba9514dec rxe_cfg: Drop librxe and port minimal rxe_cfg functionality to Bash
Since rdma-core handles the entire libibverbs suite, and because it
dropped rxe_cfg in favor of iproute2's rdma tool, building librxe is
not needed anymore. That said, the functionality of the rxe_cfg that
our test suites are using is basic and useful enough to be preserved
in a form of a simple Bash script. This can be used to avoid full
overhaul of the code which would need to be adjusted for iproute2's
tooling. In case more complex rdma configuration link-wise is needed,
iproute2 dependency can be added then.

Additionally, some of the nvmf functions have been simplified to make
use of the rxe_cfg port.

The formatting of the status cmd is left compatible with the rxe_cfg.

Change-Id: I594a24b73472a16d51401bcd74fd30c415b24ddb
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-05 09:02:27 +00:00
Darek Stojaczyk
d3030f6b95 scripts/setup.sh: add a newline before VMD status section
VMD section wasn't separated from virtio.

$ scripts/setup.sh status
<SNIP>

IDXD Engine
BDF             Vendor  Device  NUMA    Driver

virtio
BDF             Vendor  Device  NUMA    Driver          Device name
VMD
BDF             Numa Node       Driver Name

Change-Id: Iffecf06a036ec1a9738c8edd74664eb2d22c45fa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2763
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-05 09:02:20 +00:00
Alexey Marchuk
1551197db5 rpc: Deprecate max_qpairs_per_ctrlr parameter
This parameter describes the number of admin and IO
qpairs while admin qpair always exists and should not
be configured explicitly.
Introduce a new parameter `max_io_qpairs_per_ctrlr`
which configures the number of IO qpairs.
Internal structure of NVMF transport is not changed,
both RPC parameters configure the same nvmf transport parameter.

Deprecate max_qpairs_per_ctrlr in spdkcli as well

Side change: update dif_insert_or_strip description -
it can be used by TCP and RDMA transports

Config files parsing is not changed since it is deprecated

Fixes #1378

Change-Id: I8403ee6fcf090bb5e86a32e4868fea5924daed23
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2279
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-06-04 07:20:45 +00:00
Darek Stojaczyk
922d90c806 log: remove backtrace printing
It was broken since long ago. --enable-log-bt doesn't change
anything. log.c expects SPDK_LOG_BACKTRACE_LVL to be defined
for backtrace to work, but it's not defined anywhere.

Apparently nobody needs this, so remove it.

Change-Id: I2313fd24198b0bf718663f2eafee9b5c6efa0a7f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2194
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-03 07:39:08 +00:00
Maciej Wawryk
4e6f8167ea scripts/vagrant: Clear environment variables in clearlinux
Clearlinux after installation has no empty environment variables,
which caused test failtures.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8e0673a22c1fe3cf93232704bf8950be357a21b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2717
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-06-02 09:52:08 +00:00
Maciej Wawryk
8a1160fb77 scripts/pkgdep: Add ClearLinux dependencies to pkgdep.sh
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id3ce1b6ffe06c4d32a8585f7a8afc336b8372629
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2643
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-02 09:52:08 +00:00
Maciej Wawryk
9839e8cbf7 scripts/vagrant: Add clearlinux to Vagrant scripts
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ia3b9255abf84ace0d8eec7db3cd9b7293285a9c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2642
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-06-02 09:52:08 +00:00
Darek Stojaczyk
59ff57b93c scripts/check_format: use version_lt to compare shfmt version
It turns out we have a function to compare version numbers.
It additionally handles cases like "3.0.10 > 3.0.9". The
previous code returned false, the new one returns true.

version_lt() actually tests for less or equal, so compare
against 3.1.0 - the real minimum shfmt version we need.

Change-Id: Ibd18c4505e5b81c0073a907f23c3fc034cfbafbe
Suggested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2574
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-02 09:51:14 +00:00
Seth Howell
a354903737 check_format: compare commits against previous commit.
Previously when doing the naming conventions check, we were
checking against master which was causing some weird issues on
patches which weren't rebased. The much simpler check is to just
compare each patch against the previous one.

This method still works to prevent any bad changes from getting
merged, but handles naming issues on a patch by patch basis.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic031ce07ca1c67819b792dc292dcf6c50df5b1a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2733
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-02 09:48:43 +00:00
paul luse
230f827a38 misc comment/echo cleanup, replace use of word DMA for consistency
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I186c68250e7e882e80ed49964dd9dbbba988612d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2111
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 09:22:54 +00:00
Michal Berger
f385076a1b pkgdep: Make pkgdep.sh to use distro-specific source files
Change-Id: Iee7ba04c489ee1192f6fd65c6647c78536440246
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2508
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
af8f939e2f pkgdep: Intrdouce FreeBSD-specific source
Change-Id: I3617a08089b11ace54f34ce2f21bd120a9aa05a3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2507
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
511de06bb5 pkgdep: Introduce SUSE-specific source
Change-Id: Ie106459d7dbe92e32933dad569b79c348a8f0052
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
75febdfba7 pkgdep: Introduce RHEL-specific source
Change-Id: Iaa29cdb1920ec3283c1fa62dd4fc20d4c58b1340
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2505
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
ca95a71863 pkgdep: Introduce Debian-specific source
Change-Id: I71b129b3928f1d5881f42ebfd1510a3fb4055cd3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
b4c74897f3 pkgdep: Introduce arch-specific source
Change-Id: Ib28364c84a46b98c36ea7202412b34231324f226
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
c988348361 check_format: Use $output_dir to store shfmt patch in
If $output_dir is set, putting the shfmt diff there will make it
easier to extract it and/or look it up from the side of the per
patch build.

Change-Id: Iefb601a29f165e59b7670a8878e95bb6b16c9650
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2277
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-29 14:59:53 +00:00
Maciej Wawryk
6f702d4ea7 scripts/perf: Fix type error in run_nvmf.py
TypeError: unsupported operand type(s) for /: 'int' and 'range'

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8266c80cc886a51b43d9719b8bf845ffd0730b03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2259
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-29 14:59:40 +00:00
yupeng
240b243af5 bdev: add doc for bdev_auto_examine
Explain the bdev_auto_examine parameter of the bdev_set_options rpc.
Add bdev_auto_examine parameter for the bdev_set_options
in the python rpc client.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I268cd5c01129180467967c2ebfffa7c3ba7e5b1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2580
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 14:58:16 +00:00
Michal Berger
6e08a3146c pkgdep: Use major version of the pip bin
pip3 can come for different python releases (3.6, 3.7, etc.) and
depending on which version is installed some maj.min bins may simply
not exist.

Change-Id: Iefc26902161e2e3578d07e99a9e742b132ef11f0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2565
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-27 07:36:39 +00:00
Seth Howell
0506fd21ff scripts/check_format: add a check for proper naming conventions.
This test prevents anyone from adding a function that begins with
spdk to the lib or module directories without also adding that file
to the corresponding map file and a header in spdk/include or
spdk_internal/include.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ife7db13d4bb8fec7570c8492ac3326222a850c36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2423
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-27 07:35:02 +00:00
Seth Howell
4bd48a3d97 scripts/check_format: remove extra output from shfmt check.
All of the other checks simply print OK if the test passes
this check prints out a lot of text (especially when run at the
tip of long patch series) that can make it difficult to tell if
anything is actually wrong.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie681d200aa13f208e4afa1ab419cbad63ef6606c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2403
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:42 +00:00
Maciej Wawryk
e96d3280a0 scripts/pkgdep: Add ninja and meson packages to minimal install option
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I36cba747313349f9dbe9d98e6e6297e1a449af3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2517
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-20 14:14:29 +00:00
Michal Berger
3425fc1fb8 check_format: Don't attempt to review perms of the symlinks
Change-Id: I3cd20ad9f1cadb5ca5e6de78d9b44d5df95f51d8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:43:37 +00:00
Dayu Liu
5cdab5e2e6 doc: fix some typos and align indent when setup.sh --help
Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: Id0a2a3a577adfd5026b662d97d74c9ec6aebeb8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2396
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 10:14:56 +00:00
Darek Stojaczyk
e5f021c10e scripts/check_format: auto-detect shfmt binary
A newer version of shfmt was released, but the script still
looked explicitly for the older one.

Make it execute the first binary '^shfmt.*' in PATH whose --version
returns at least v3.1.0.

Change-Id: If621abfa4d995a9dc985e6bab8c33aa36c327fae
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2428
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-18 10:14:52 +00:00
Tomasz Zawadzki
2e55b97d96 setup.sh: execute checking ulimit as a user
When using vfio a warning for memlock limit is printed.
TARGET_USER is one set by caller when executing the script,
or set to user that called the script (even when using sudo).

Yet ulimit was printed for the one executing the script,
most likely root.

This patch verifies ulimit for a particular TARGET_USER.
Along with more explicit information which user the
information pertains to.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I20ad62109bc316295208e21f959ecfc263307e1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1964
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-13 07:46:51 +00:00
Maciej Szwed
b0bac20ad6 rpc: Add possibility to load module with additional RPC commands
This patch adds '--plugin <module_name>' parameter
to rpc.py script which is used to provide module
name with additional RPC commands that should be
included in rpc.py script. User must export path
to rpc module with PYTHONPATH before calling rpc.py
with this new parameter.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I971429a33cf4ea943d2b7f3abd5a6cb82398d2a4

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2263
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-13 07:46:17 +00:00
Michal Berger
871214e2c1 rpc.py: Allow loading json config from different sources
This is relevant in context of rpc_cmd() which was introduced with the
following commit:

     "scripts/rpc.py: add daemon mode" 8b98cdb64a

When rpc.py runs in a server mode, its stdin is already attached to a
pipe connected to its parent Bash process. In such a setup, it's not
possible to use some of the rpc methods, e.g. load_config().

To make use of said methods possible, allow them to load the config
from different sources - a regular file or a string.

Change-Id: I6fa7d13fa1957b6449ce5d5c5a810bd58d0a5703
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2106
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-13 07:46:04 +00:00
Michal Berger
15f52aec2f setup.sh: Watch for NUMA_NO_NODE value
The -1 is valid value indicating that the node id for given device
has not been specified. Detect it and map it to "unknown".

Change-Id: Id97d9046be0e4d5ff257bca66ae3e73e906253fe
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2229
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Michal Berger
5853749ba0 setup.sh: Check status of all numa nodes
Use * instead of ? to match all the potential nodes not only those
with a single digit id. The actual node limit is dependent on
kernel's CONFIG_NODES_SHIFT hence in theory, the actual number of
numa nodes may be far greater than 10.

Change-Id: I1d587735b433ed23594725b9d77a44f7cc729494
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2228
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Michal Berger
c8c4f71efe gen_nvme: Be FreeBSD friendly
Since sysfs is not used by the FreeBSD the following error can be
seen each time gen_nvme.sh is run:

  grep: /sys/bus/pci/devices/$bdf/uevent: No such file or directory

Avoid that by looking up the pci address in a way specific to
FreeBSD.

Change-Id: If81e71cece52c2f27dcf68f7a7eba3dd7d8ce10f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2227
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Michal Berger
d51345c0b9 setup.sh: Add basic function for handling status option on FreeBSD
Change-Id: I64bcc9f06be7e5cca18195bab58f87a4ba74c903
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2226
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Michal Berger
18c0288730 setup.sh: exit from the script if not supported platform is detected
Also, store kernel name in the separate var and use it throughout the
entire script.

Change-Id: Iaa1c4c4aa52fb4aa708fb476478a81e9c6067b58
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2340
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-12 08:12:09 +00:00
Michal Berger
5a436f0c61 scripts/common: Cache vendor|device ids for reverse lookup
Change-Id: I69959547d1c71cf3b65f8eb0b786197650a6ece0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2225
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Karol Latecki
4cfc2e2641 scripts/pkgdep: install yum-utils for CentOS
This will probably be not installed by default in CentOS
installations. If we're going to use "config-manager" then
it requires yum-utils.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7d310e376430b065742b671d983d11dd87bb5fac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2221
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:35:00 +00:00
Karol Latecki
4d7936227a scripts/pkgdep: add missing "assume yes" to install command
Change-Id: I2a1a22e9d665a5b806b42db504062780f4f5ce53
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2220
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:35:00 +00:00
Michal Berger
d596ba87b2 check_format: Introduce shfmt tooling for .sh style enforcement
Add new dev tool for enforcing proper formatting of the Bash code
across the entire repo. This is done in order of defining a common
set of good practices to follow when writing .sh|Bash code.

As powerful as shfmt may be, it allows only for some specific rules
to be enforced, hence it still needs to work side by side with
shellcheck syntax-wise. If it comes to style, following rules are
being enforced:

  * indent_style = tab - Lines must be indented with tabs. The exception
			 from this rule is the use of heredocs with
			 <<BASH redirect operator. Spaces can be used to
			 format the line only if it's already preceded
			 with a tab.

  * binary_next_line = true - Lines can start with logical operators. E.g:

			      if [[ -v foo ]] \
			      	&& [[ -v bar ]]; then
				 ...
			      fi
  * switch_case_indent = true - case|esac patterns are indented with tabs.

  * space_redirects = true - redirect operators are followed with a space.
			     E.g: > foo over >foo.

In addition, shfmt will enforce its own Bash-style for different parts
of the code as well. Examples and more details can be found here:

  https://github.com/mvdan/sh

Change-Id: I6e5c8d79e6dba9c6471010f3d0f563dd34e62fd6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1418
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
Michal Berger
844c8ec383 check_format: Reformat the Bash code in compliance with shfmt
Change-Id: I93e7b9d355870b0528a0ac3382fba1a10a558d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1718
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
paul luse
3044bd27d0 lib/accel: remove RPC for setting the module
This was added before the usage of having a SW engine and 2 HW
engines was fully thought out. The current rules are:

* if no HW engine specific enable RPC is sent, use SW
* if a HW engine specific enable RPC is sent, use it
* If a 2nd HW engine specific enable RPC is sent, ignore

In this scheme there's no need for an RPC that lets the user
choose which engine to use because they already do so when
they enable an engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I006ffb3b417f1e93bb061b29535d157ba66f03b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2033
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-07 10:41:44 +00:00
Michal Berger
ae7300425b autobuild: Use mktemp() for spdk workspace
With issues similar to https://github.com/spdk/spdk/issues/1293 it
would be better to use temporary directories for spdk workspace
instead of depending on the hardcoded path (/tmp/spdk). This will
mitigate potential scenario where permissions of the target dir
are suddenly changed in-between autobuild runs.

Change-Id: If44a2dcce712a185287186f33e7361223dc6d451
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:41:08 +00:00
Tomasz Zawadzki
519d720902 scripts/rpc: do not list positional arguments for the subparser
Main subparser for rpc lists all positional arguments. Like so:
positional arguments:
  {framework_start_init,start_subsystem_init,framework_wait_init,....

This again is duplicated with better help message.

This patch just removes this list, leaving the most detailed one.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5e6b9d0dd6ccf68bfe1cd5959ed509032738c037
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2126
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-05-07 08:26:54 +00:00
Tomasz Zawadzki
0d105d4f1f scripts/rpc: do not list commands for the main parser
The main parser will show usaged like so:
usage: rpc.py [-h] [-s SERVER_ADDR] [-p PORT] [-t TIMEOUT] [-v]
              [--verbose {DEBUG,INFO,ERROR}] [--dry_run] [--server]
              {framework_start_init,start_subsystem_init,............

The above contains very long list of all RPCs.
This is duplicates help from the subparsers, which contain
more descriptive help message.

This patch replaces the usage with:
usage: rpc.py [options]

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibf400987103f5571f79c57d8a9588d97f463d773
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2125
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-05-07 08:26:54 +00:00
Tomasz Zawadzki
17c2f4ee8f script/rpc: do not send rpc when no arguments provided
Any time script is called an RPC is called and socket
connection is attempted.

This should not be required when no arguments were provided,
such as calling help to explore possible options.

Example of the error:

[tzawadzk@PowerEdgeFour spdk]$ sudo ./scripts/rpc.py
Traceback (most recent call last):
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 40, in __init__
    self.sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/rpc.py", line 2438, in <module>
    args.client = rpc.client.JSONRPCClient(args.server_addr, args.port, args.timeout, log_level=getattr(logging, args.verbose.upper()))
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 56, in __init__
    "Error details: %s" % (addr, ex))
rpc.client.JSONRPCException: Error while connecting to /var/tmp/spdk.sock
Error details: [Errno 111] Connection refused

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3734e1603fa7151fd53b99b8af4ea79bf82fe0f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2124
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:26:54 +00:00
Michal Berger
36e573fc6b scripts/common: Introduce cache for the pci devices
Expose a cache of pci devices in form of an assoc array that could be
looked up during the runtime of a script like setup.sh.

In case of setup.sh, caching speeds up execution quite visibly:

config run, no caching:
real    0m4.488s
user    0m1.440s
sys     0m1.260s

config run, caching in use:
real    0m2.876s
user    0m0.365s
sys     0m0.420s

Note that for initial config runs, binding controllers to proper
drivers is the actual bottleneck.

status run, no caching:
real    0m1.877s
user    0m1.252s
sys     0m0.984s

status run, caching in use:
real    0m0.371s
user    0m0.242s
sys     0m0.204s

reset run, no caching:
real    0m2.559s
user    0m1.409s
sys     0m1.322s

reset run, caching in use:
real    0m0.960s
user    0m0.432s
sys     0m0.419s

Additionally, in case common tools, e.g. lspci, are missing, fallback to
sysfs to pick all needed devices from the pci bus. Targeted for Linux
systems only.

Change-Id: Ib69ef724b9f09eca0cbb9b88f1c363edc1efd5dc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1845
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-07 08:23:52 +00:00
Maciej Szwed
2bd001620f scripts: Add SSL certificate option in rpc_http_proxy
This is required for SSL verification when running on https.
Added argparse to handle multiple optional arguments.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib8731bafaaf38264ed86ed84ca7eeca5ff4935b3

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2122
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-05 08:04:00 +00:00
Vitaliy Mysak
20bc88d284 scripts/vagrant: fix exporting array in bash script
In create_vhost_vm we export SDPK_VAGRANT_DISTRO
variable to vagrant subprocess that is called
during the script.
But if SPDK_VAGRANT_DISTRO is an array variable,
then Vagrant will not see it
and always default to ubuntu16.
This small patch fixes that.

Change-Id: I45e9ed4f847e4fa10b90650a613f9cfe17ee38e3
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1676
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-28 13:47:46 +00:00
Ziye Yang
94345a0a1a nvme: Add the priority field in struct spdk_nvme_transport_id
Purpose: To set the priority of the NVMe-oF connection especially
for TCP connection.

For example, the previous example can be:

trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420

With the change, it could be:

trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420 priority:2

The priority is optional. We try to change
spdk_nvme_transport_id but not in spdk_nvme_ctrlr_opts since
the opts in spdk_nvme_ctrlr_opts will reflect in every nvme ctrlr,
this is short of flexibility.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I1ba364c714a95f2dbeab2b3fcc832b0222b48a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1875
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-24 15:53:34 +00:00
paul luse
42eb233e48 scripts/rpc: addd RPC support to enable idxd
The new RPC also includes and option for which
idxd config is to be used. Config options will be
explained in detail in a later patch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1322bab4d6ca9cc45ec3a56d7267dc7dc09dbea3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1726
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-23 15:48:32 +00:00