Commit Graph

14223 Commits

Author SHA1 Message Date
Jim Harris
88e3ffd7b6 github: automatically close pull requests
This leverages the mistaken-pull-closer GitHub app
to automatically close any GitHub pull requests.
The submitter will receive a notice pointing them
to the SPDK contribution guidelines for Gerrit
instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie8ab095b8b62cafa813427187b878df96ec87b7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6034
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 21:20:53 +00:00
Tomasz Zawadzki
8bb0ded3e5 isa-l: update submodule to v2.30.0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7c1eda311000a56edd957bbd101521f76614d8e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6019
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 19:24:10 +00:00
Jim Harris
91e422572a configure: add --enable-cet to build with CET support
Intel Control-flow Enforcement Technology (CET) is a
processor feature that blocks return/jump-oriented
programming (ROP) attacks.

It is currently only supported on Tiger Lake client
processors, but will be available on other processors
in the future.

CET requires toolchain support.  gcc8 does support it.
For now, this will opt-in only at least until the
technology is available on server processors.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8c7f882eeeaed26484c31dc0d67d5cc42baeaa2d

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5921
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 19:24:10 +00:00
Michal Berger
5636dabc3d test/nvmf: Add tests covering usage of DIF
Change-Id: I95eedb1bc21e296113d7f5853ab286d966adf1b8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5568
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 16:43:54 +00:00
wanghailiangx
0fd4c1f97c example/nvme/plugin: Fix a notice error of bs
We konw bs should be extended_sector_size(ns) * num_blocks.
In other words, bs should be an integral multiple of extended_sector_size.
num_blocks cannot be got here, so we used integral multiple.

Change-Id: Ie521db194cdad6f2d2247fd2704cab92c36ddb82
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5881
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 16:11:16 +00:00
Ziye Yang
c013ef1598 accel_engine test: Add the test case for accel_engine.
This patch is used to create a script to test the
accel_engine. It can be used to test both software/hardware
approach in acccel_engine.

The first usage case is to add the crc32c test. More cases
can be added later.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9f7564e39887265f8bbfce3a15ba446fbd7a14bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5974
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-21 15:49:40 +00:00
Karol Latecki
3164371422 test/common: don't use absolute path for igb_uio
Due to recent change to vm_setup.sh we now expect
this module to be already provision in system and
available under /lib/modules.

Change-Id: Ica40e7ad95710f44bf538919e7a65878f416b7e4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 15:21:20 +00:00
Karol Latecki
1b2eb02410 test/vm_setup.sh : install igb_uio
igb_uio was removed from dpdk 20.11 and moved to
a separate repository:
http://doc.dpdk.org/guides/rel_notes/release_20_11.html
Because of that igb_uio module does not build as part
of dpdk meson build, and we have to build and install
it ourselves as part of test dependencies.

Change-Id: I4081bc3b0233ebaf5dbf926665edf28fa3463fbe
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6006
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 15:21:20 +00:00
Karol Latecki
61ecba1a92 test/vhost_perf: set test block device scheduler to "none"
In recent systems default is set to bfq which lowers
performance when using SPDK vhost.

Change-Id: Iefa3b8b514dac2f7b028cf06c18cee3f59c5a9ac
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5982
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Community-CI: Mellanox Build Bot
2021-01-21 14:40:28 +00:00
Karol Latecki
0773af993a test/vhost_perf: detect cgroups version
Detect which cgroups version is used to set IO
throttling in the guest system.

Change-Id: I4e7f482a8590dfe59da461cf5ef0a557b508fa98
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5981
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>
2021-01-21 14:40:28 +00:00
Alexey Marchuk
288805a00e nvmf: Add missing transport opts in json dump
The following common transport opts are missing:
num_shared_buffers, buf_cache_size, dif_insert_or_strip

Change-Id: I1c9c33bb1b46e2babb61c290a0187f08a5acacad
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6004
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 14:24:47 +00:00
Karol Latecki
55e5baf993 scripts/nvmf_perf: add PCM power measurements
Enable pcm-power measurements with appriate option.
This will be used for scheduler tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I57acc9905c6f1acd7bc3ecdbf886b209a2cdb653
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5979
Reviewed-by: Maciej Szwed <maciej.szwed@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>
Community-CI: Mellanox Build Bot
2021-01-21 14:24:19 +00:00
Maciej Szwed
937d4935d0 spdk_top: Fix core tab
Refactored code for displaying cores information and
at the same time fixed handling cores w/o threads.

Change-Id: I86990e5508523e77ce3d22ab2ace3621567b37d1
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5028
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>
Community-CI: Mellanox Build Bot
2021-01-21 14:22:49 +00:00
Tomasz Zawadzki
a66fde23d7 libvfio-user: set COMMON_CFLAGS for external_code tests
Static compilation for external_code tests uses SYS_LIBS
that now includes libvfio-user. As such the COMMON_CFLAGS
need to point to the build directory.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f3aa670a62445088535eacdfa1483bfacd5ce7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6020
Community-CI: Broadcom CI
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 12:51:13 +00:00
Alexey Marchuk
3e5ea7ff33 nvmf/tcp: Send several C2H for large read op with DIF
Socket request has iov vector of limited size and when
DIF insert of strip feature is enabled we send each data
block as separate iov element to remove metadata.
In the case of large read operation there might be not
enough iov elements to describe all data block. In this
case we can send several C2H PDUs.
To estimate the number of bytes that can be written
with single C2H we try to fill socket iovs. That is
not so cheap operation so this fix is implemented
for DIF case only. Also data buffers in regular
read operation should always fit into socket iov
vector.

Fixes issue #1674

Change-Id: Ie7197f96175ecc0a760d91d35b668512432ef7a7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5968
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-01-21 09:55:53 +00:00
Alexey Marchuk
74542bae77 tcp: Rename readv_offset to rw_offset in nvme_tcp_pdu
In the next patch this member will be used to track
both read and write offsets

Change-Id: I852125ff35257f9821ddf4a641d96afb29ebf0a0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5924
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-01-21 09:55:53 +00:00
Michal Berger
a5b3a7ded5 pkgdep/git: Make sure all object files are built for the QAT driver
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I789948c28d638e647f82d6e4dd64c74ed49294e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5967
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>
2021-01-21 09:51:58 +00:00
Michal Berger
889c8da616 pkgdep/git: Upgrade QAT driver to the latest release
Change-Id: Iaa6ec9a73ca17c1e9599d92cb150e961bce08eae
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5966
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-01-21 09:51:58 +00:00
Nick Connolly
53d172b0e3 test/bdev: Use PRIx64 for portability
POSIX defines PRIx64 for printing 64-bit values in a portable way.
Replace references to %lx to remove the assumption about the size
of a long.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I40374212baf64028f77f87c3a7f0373f6cdb1415
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6003
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 09:51:20 +00:00
Changpeng Liu
77f994a9c5 pkg: change minimum supported dpdk version to 19.11
Change-Id: I7b3705923a0a50ce78e2c34072d0135416cda0da
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5999
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>
Community-CI: Mellanox Build Bot
2021-01-21 09:51:10 +00:00
Jim Harris
79f9a7f572 build: generate pkg-config files for SPDK
Users can now generate the necessary linker args for their
own applications using something like:

PKG_CONFIG_PATH=build/lib/pkgconfig pkg-config --libs spdk_nvme

Dependencies between libraries are included in the generated
.pc files, so the user only needs to pass the top-level subsystems
or individual SPDK libraries they are using in their application.

Modules will automatically be added to the output if the associated
library is specified.  For example, specifying "spdk_bdev" will include
the libraries not only for spdk_bdev, but also all of the bdev modules.

Users still need to supply the -Wl,--no-as-needed or -Wl,--whole-archive
flags. They cannot be added to the .pc files without increasing the length
of the argument string by a factor of 15x to 20x.

Modify the test/external_code/hello_world Makefile to use pkg-config to
ensure this gets tested at some level in our autotest environment.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie48a75f11969d5d775d514cf10bcb82d197eabfd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4371
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 09:46:32 +00:00
Changpeng
3ff9c13614 NVMe/vfio-user: add initial version vfio-user transport to NVMe driver
When NVMf target linked with vfio-user library, we can use
vfio-user client library to connect to the target.

Here is the three examples that can work with target:

identify -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g
perf -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 1 -o 4096 -w read -t 10
reconnect -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 32 -o 4096 -w randrw \
-M 50 -t 10 -c 0xE

You can run the following test script test/nvmf/target/nvmf_vfio_user.sh to have a quick test,
currently enabled with NVMe Identify,Perf,Reconnect tools.

Change-Id: Ieb9842b2f372184fffbf7f23e4aad26feb47c350
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3839
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
1b0ec0b7c2 nvme/pcie: add controller specific vtophys
Libvfio-user assumes the memory translation is IOVA=VA mode,
since SPDK CI is running inside a VM, the memory mode is
IOVA=PA mode, so when testing NVMe vfio-user transport inside
a VM spdk_vtophys doesn't work with libvfio-user, so here
we add a function to return memory address based on TRTYPE.

Change-Id: I11d1c87197f7bbfc243b6bf368795c9a74bd1303
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5958
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
349895a25f nvme/pcie: set doorbell base when allocating the bar
Change-Id: Id40f03f1bc4e90113dad6326dbeb9a7b5af5c1b1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5960
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
6b4b2d2913 nvme: move common pcie transport code new source files
There are some common data structures and APIs in pcie transport
which can be used both for pcie and vfio-user transport, so move
the common code into a new header and source file.

No actual logic change just the code movement except remove the
static function declarations.

Change-Id: Ie9021e703a5780fdd6840f0e3cfea76a0017a811
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5923
Community-CI: Broadcom CI
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
f4fd07c68c NVMf: Add a custom(VFIOUSER) transport target support
VFIO is a framework that allows a physical device to be securely passed through
to a user space process. Typically, the user space process is a VM and the device
is passed through to it in order to achieve high performance. VFIO provides an API
and the required functionality in the kernel.

vfio-user is a framework that allows implementing PCI devices in userspace.

SPDK NVMf library provides the emulation of a NVMe device, combined with vfio-user
protocol, we can provide the emulated NVMe device to VM or client application, such
as SPDK NVMe perf.

This patch has dependency on libvfio-user library, users can start NVMe identify/perf
examples.

Usage:
1. Start nvmf_target.
2. Use RPC to create a subsystem with namespace bdev.

    mkdir -p /var/run/muser
    mkdir -p /var/run/muser/iommu_group
    mkdir -p /var/run/muser/domain/muser0/8
    mkdir -p /dev/shm/muser/muser0

    scripts/rpc.py nvmf_create_transport -t VFIOUSER
    scripts/rpc.py nvmf_create_subsystem -a nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8
    scripts/rpc.py bdev_malloc_create -b muser0 $((512)) 512
    scripts/rpc.py nvmf_subsystem_add_ns -n 1 nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8 muser0
    scripts/rpc.py nvmf_subsystem_add_listener -t VFIOUSER -a "/var/run/muser/domain/muser0/8" -s 0 nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8

    ln -s /var/run/muser/domain/muser0/8 /var/run/muser/domain/muser0/8/iommu_group
    ln -s /var/run/muser/domain/muser0/8 /var/run/muser/iommu_group/8
    ln -s /var/run/muser/domain/muser0/8/bar0  /dev/shm/muser/muser0/bar0

Currently, file /var/run/muser/domain/muser0/8/ctrlr is the socket file which is used
to transfer socket messages between target and client.

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg723794.html

Co-authored-by: Ben Walker <benjamin.walker@intel.com>
Co-authored-by: Changpeng Liu <changpeng.liu@intel.com>
Co-authored-by: Thanos Makatos <thanos.makatos@nutanix.com>

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: I5f2a8e77314a6a13aa6366dd4a6dc77b13434e7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3838
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
6308a24f56 nvme: add a new custom transport SPDK_NVME_TRANSPORT_VFIOUSER
The new custom transport can enable NVMe driver running with
NVMe over vfio-user target.

Change-Id: I5f90e8516eaca08fc3eab658b29b760a03326ff7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5996
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
b30d57cdad libvfio-user: include libvfio-user as a submodule with SPDK
Also add a CONFIG_VFIO_USER config flag, it's enabled by
default.

Change-Id: I18b44c024a264516a60f743d5c366a4c7f7c6785
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5000
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 05:00:18 +00:00
sunshihao520
5fba455d3e lib/nvme: add two async API for Directive Send and Directive Receive.
Add two async API for Directive Send and Directive Receive.
	spdk_nvme_ctrlr_cmd_directive_send;
	spdk_nvme_ctrlr_cmd_directive_receive;

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Icb6974f74902df1512a5ffa9835188132634291b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5803
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-20 16:27:34 +00:00
sunshihao520
e69af13dea nvme: add directive definitions to nvme_spec.h
Add data structure needed by directives to nvme_spec.h

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: xiehuiming <xiehuiming@huawei.com>
Change-Id: I0cbc53fb4f7ca448ab0566d826a7ae8800bbf504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5683
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-20 16:27:34 +00:00
Tomasz Zawadzki
8f40b23192 dpdk: update submodule to DPDK 20.11
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92567bfccf55e4b42bc3466532942418a40a648e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5347
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-20 14:21:38 +00:00
sunshihao520
1572882a7f lib/nvme: add function spdk_nvme_bytes_to_numd to calculate number of dwords
According to kernel, use an inline function spdk_nvme_bytes_to_numd
to transfer paload_size form bytes to numer of dwords.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: I8b9ded122bbf4a3c8e46988993ea52404783c0b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5926
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-20 08:45:43 +00:00
Jim Harris
9317f72d09 fio_plugin: clarify thread=1
There was some confusion from a user on whether thread=1
means only one thread is supported.  So add some extra
documentation around this section to clarify this a bit
more, since the option is a bit confusing.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibcccd1759180e2e6c47e736d94ffbeafc405f7bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5995
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-01-20 08:45:21 +00:00
Alexey Marchuk
1d6ccec9ec ut/nvme: Fix compilation warning
GCC 4.8.5 compains on missing braces:
nvme_tcp_ut.c: In function 'test_nvme_tcp_req_complete_safe':
nvme_tcp_ut.c:456:9: warning: missing braces around initializer [-Wmissing-braces]
  struct nvme_request req = {0};
         ^
nvme_tcp_ut.c:456:9: warning: (near initialization for 'req.cmd') [-Wmissing-braces]
nvme_tcp_ut.c:458:9: warning: missing braces around initializer [-Wmissing-braces]
  struct nvme_tcp_qpair tqpair = {0};
         ^
nvme_tcp_ut.c:458:9: warning: (near initialization for 'tqpair.qpair') [-Wmissing-braces]

Also structure spdk_nvme_qpair is embedded into nvme_tcp_qpair,
there is no need in a separate variable.

Change-Id: I3a9d6760a0cffe90ece0a6d470dda8309a6619e7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5985
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-01-20 08:45:08 +00:00
Liu Xiaodong
5a499ac098 reactor: improve spdk_reactor_get
Size of g_reactors allocated is g_reactor_count, so
valid lcore should be less than g_reactor_count.

Change-Id: I9d5cde7856d6b400a7188631812b53a7e5701d0f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-20 08:44:56 +00:00
Liu Xiaodong
992b168ee5 reactor: replace last_core() by g_reactor_count
Record result of spdk_env_get_last_core() to
g_reactor_count, since spdk_env_get_last_core()
iterates through all core ids in a loop, it is
not so efficient.

Change-Id: I6bbbfec0bc25490bab33436c84fca3da6380cbe8
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5955
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-20 08:44:56 +00:00
Karol Latecki
7090c78598 doc: add NVMe Bdev 20.10 performance report entry
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib64148bb874f744a4ec494407eb0a013bdf9c530
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5986
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-20 08:10:45 +00:00
Liu Xiaodong
021ff6edff bdev: add function to return aio's errno
This helps user to locate whether bdev_io fails in
spdk bdev layer or inside Linux AIO.
SPDK_BDEV_IO_STATUS_AIO_ERROR indicates bdev_io fails
due to Linux AIO or its lower layer's failure.

New functions spdk_bdev_io_complete_aio_status and
spdk_bdev_io_get_aio_status can be used to report out
the errno from Linux AIO.

Change-Id: I32640e4a0459cca057278c02ea5a7522f3408a02
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5690
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-20 00:13:49 +00:00
Ziye Yang
bf10299893 Revert "nvmf/tcp: Remove the await_req list."
This reverts commit 0bcaf050d7.

Reason: After this patch, the last nvme command cannot be executed
on the qpair with the following two conditions together:
(1) The qpair is in waiting for available req state.
(2) There is no incoming data again (i.e.. no read in event).

Fixes issue: 1746

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reported by: John K Kariuki <john.k.kariuki@intel.com>
Change-Id: Ie16a89e19baeaa784002990ae034ae59d90a51f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5951
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-19 21:44:50 +00:00
Naresh Gottumukkala
2f48218a11 nvmf/fc: free g_nvmf_ftransport after nvmf_fc_lld_fini is complete.
Dont free g_nvmf_ftransport before LLD finishes its cleanup.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I61693fbe1afe0b4f6b52828d3149175419457487
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5963
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
2021-01-19 21:05:19 +00:00
Jin Yu
d0657f3230 bdev_null: add null bdev resize rpc
Usually null bdev is used in testing.
The resize function provides flexibility

Change-Id: I603db0b85ff13a86d38ccc8dd6f260807393df93
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5797
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:03:02 +00:00
Jin Yu
e6493c81f3 bdev: improve bdev blockcnt notify
A small improvement in blockcnt change.
If size == bdev->blockcnt just return.

Change-Id: I507a3e5d5fa0f3f17383afa08c47c0bda48be52c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5922
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:03:02 +00:00
Karol Latecki
ec1494e92b test/nvme_perf: add option for alternative fio job layout
Allow for alternative fio job layout.

"group" (default) will create X fio job sections for
X assigned CPUs and distribute available NVMes between
sections. (e.g. 4 CPU test with 24 NVMes will result in
4 fio job sections with 6 NVMes each and scaled iodepth)

"split" will create a separate job section for each
available NVMe, but still pin it to desired CPU thread
using cpus_allowed option.

This allows for alternative way of testing io_uring
which fails to run some cases with fixedbufs=true and
high iodepth values (caused by system-wide default
UIO_MAXIOV=1024).

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iab835596a59f6437b067d1117208e5abd6c8d36b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5727
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-18 13:02:49 +00:00
Mao Jiang
7985c34ca0 test/nvme_rdma: RDMA requests allocation cases
Change-Id: I59b402ed7f204adc20a22406390224400e20ad51
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5746
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:02:40 +00:00
Alexey Marchuk
3289ab6d93 rdma: Remove check for translation length
With min supported DPDK >= 19.11 there is no need
to check that the buffer can be split over
several Memory Regions so we can remove this check.
Keep assert that translation length is not less than
request as a sanity check.

Change-Id: If61e673ecde28bbda8eb57a2768085715bed141a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5938
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:02:20 +00:00
Alexey Marchuk
6715cc2a07 nvmf/rdma: Remove handling of buffers split over MR
Since now min supported DPDK version is 19.11, we can
remove handling of buffer that may be split over several
Memory Regions as it was specific for DPDK < 19.05

Change-Id: I61a79c80b864e3bdde134e8bff6622025ea578a7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5937
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:02:20 +00:00
Mao Jiang
1ddef952f7 test/nvme_tcp: improve unittest coverage of tcp
Cases for nvme tcp requests compelted safety.

Change-Id: Iff5d2418881de8aa1e29fa38149744740772be11
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5856
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-18 13:02:02 +00:00
Alexey Marchuk
59d50e1f1c perf: Add signal handlers
Perf tool doesn't have handlers for SIGINT and SIGTERM
signals, so when the tool is killed with e.g. ctrl-c
all SPDK and transport resources are destroyed
ungracefully. In the case of RDMA we may have
IO requests inflight and if the request is processed
by the driver when the corresponding MR is destroyed by
the kernel, it may cause an error on the target side.
Such errors are not harmful but it is better to
have a graceful shutdown procedure.

Fixes issue #1549

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I7818a4705d2b5cf4a5f3ca4745c62392312d22d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5869
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:00:41 +00:00
Changpeng Liu
7fdf829cd7 test/nvme_reserve: allocate IO queue pair for supported controllers
Move the IO queue pair allocation after checking the support feature
bit.

Change-Id: Ie8c5f20cddacb669b093b05dcf911f01cdb1413e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5909
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:00:33 +00:00
Karol Latecki
df2c932e09 scripts/rpc: fix framework_set_schedule period parameter
Period parameter is marked as optional in rpc.py. This works
as long the rpc call is issued with rpc.py, as argparse
sets period to "None" by default. This patch makes it
an optional argument as well directly in app.py.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2e3cae6df7edd7fc6e1120ee3d4a2655dc60813a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5942
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Community-CI: Mellanox Build Bot
2021-01-18 08:17:28 +00:00