Commit Graph

12847 Commits

Author SHA1 Message Date
Darek Stojaczyk
3554970375 env_dpdk: drop DPDK 18.08 support
DPDK versions 17.11 to 18.08 reached EOL.

Change-Id: Icfec27b0099f53d6ab00ec3aed63e5d30d94ee4d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2940
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
64c4fafd32 nvme/pcie: dont initiate hotremoval on SIGBUS for VFIO devices
This is an attempt to workaround a kernel data race spotted in #1275.
We have to delay our VFIO interraction until after the kernel handles
the PCIe hotremoval. Otherwise we risk having a deadlock inside the
kernel. We could put a dummy delay in SPDK hotremove routine, but we
don't know exactly how long we have to wait, so wait for the VFIO
hotremove notification to arrive instead. From what I understand it
is always sent after the kerner already releases the critical locks.

This patch breaks hotremove for VFIO devices when running with
DPDK version < 18.05, but those reached EOL already and their support
is removed from SPDK later within this series.

It would be nice to wait for this VFIO notification inside lib/env_dpdk
e.g. inside the detach function, but we don't know there why the
detach is happening. It could be triggered by a user RPC, not physical
device hotremoval.

Change-Id: I2727de923bb2e3e05a83202465330a32a77d7cfc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1732
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-07-23 20:48:47 +00:00
Darek Stojaczyk
f280ce59b7 vmd: dont remove the hooked pci device on its detach
The hooked spdk_pci_device was being removed when someone
stopped using it (detached from it). The following didn't
work:

$ rpc.py bdev_nvme_attach_controller 10000:00:01.0
$ rpc.py bdev_nvme_detach_controller 10000:00:01.0
$ rpc.py bdev_nvme_attach_controller 10000:00:01.0

The second attach can't find PCI device 10000:00:01.0.
To fix it, simply don't do anything in VMD on device detach.
The entire callback will be removed soon. You don't get
notified when someone starts using your hooked device, so
there's not much gain from knowing when someone stops.

Change-Id: I147c24609077be24182ecfd2e273988a2e9e26b2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2938
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
7c6f0ef001 env_dpdk/pci: fix segfault on simultaneous VFIO hotremove and user detach
There was a chance we scheduled a device removal to the DPDK thread
while that thread was already removing the device from a VFIO hotremove
notification (on the DPDK interrupt thread). The second hotremove
attempt touches some freed memory and segfaults.

The VFIO hotremove notification already checks pending_removal flag
under a mutex and sets it to true, so do the same in spdk_detach_rte()
(called from the SPDK init thread).

Change-Id: Ib3f0eb7c0c5c6e1ab8cf253b7711fd149925a143
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1730
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
d3bcd1ca5b env_dpdk/pci: split dpdk device detach and removal
Simplify the code path a bit. VFIO notification is the only
place where detach callback is called from the dpdk intr thread.
Detach checks the current thread and behaves differently in this
case, but it could be the VFIO notification that simply calls
a different function.

So instead of carrying the VFIO notification through the generic
detach routine, carry it just through the DPDK-thread specific
subset. This lets us remove some ifs in the generic routine.

Change-Id: I5e8866e4643ef08fb3cd12621e2d262b5e827c74
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1731
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
b71ee92e3b Revert "pci: fix the hotplug issue"
This reverts commit 301c5aeec9.

The patch doesn't fix anything as the hotremoval could be still
called twice and the second call would do use-after-free.

Change-Id: I78a1120707dbdf36c871ec378a312c4a058fc76b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 20:48:47 +00:00
Alexey Marchuk
1415e38411 make/dpdk: Correct compiler type detection
This commit fixes compiler type detection to suppress
warnings specific for gcc 10.

Change-Id: I66264451792ff84a53001badc7c2f8a452d732af
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3472
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 08:24:49 +00:00
Maciej Wawryk
7dbaf54bf5 scripts/nvmf: Fixed python syntax error
Missing comma in nvmet_cfg caused this error.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I71864c8dc443e2bb73cd9f575eb6540e16bab40e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3470
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-23 07:29:01 +00:00
Karol Latecki
ddba021eea test/nvme_perf: move getopts to main script
There's no reason to keep usage and getopts
outside of the main script.
Other small changes while at it:
- use small letters for all "dir" variables
  (consistent with most of other test scripts)
- try to move default & global variables into
  one place.
- remove long comment from top of the main script.
  It was basically the same as "help" for getopts.

Change-Id: Ic99f4bb1808b55dea80b534f7b4e0a65595ed053
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3335
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
6cebf49243 test/nvme_perf: make fio log_avg_msec configurable
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I92c7af88713ff4aa9e4a7cdf347ca06a303e5a07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3334
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
30491c4675 test/nvme_perf: allow CPU list from file
Read CPU list to use in test directly from option
value of from a file if it's an existing path.
This will make running tests in CI a bit easier.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I174a38ab615c2f2cd2c3b4a95e0ebf886c478a51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3333
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
ae4c75b20d test/nvme_perf: add bdev io cache and pool size option
Allow to set custom size of bdev IO cache and pool
sizes.

Change-Id: I574d1e949f705d8f834539d5879f0a1e72865e00
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3297
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:28:53 +00:00
Seth Howell
f8cf17f58e test/fuzz: fix nvmf fuzzer for AERs.
Something changed about the way we support
AERs in the target. Now, the AER commands remain
queued in the target side causing the fuzzer to
think it is timed out.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8e892a11d9922e84cd7a09e6adc8b69b6db4e8d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3453
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: Karol Latecki <karol.latecki@intel.com>
Community-CI: Mellanox Build Bot
2020-07-23 07:25:28 +00:00
Seth Howell
7192849ed2 lib: add checks for return code of pthread_spin_init
This function can fail with -EAGAIN or -ENOMEM so we
should really check the return value.

Change-Id: I4a443351f3c85032f47e8af9e70b6b71ba3413f5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3240
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:25:21 +00:00
Michal Berger
8b155b6e3b test/dd: Add tests for POSIX flags
Change-Id: I9cfc3ef5012ac125c1afdb26fdcb2d7ff4041e88
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3103
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
55f1698f5f test/dd: Add basic tests for spdk_dd
Change-Id: I78df1a70bc16d4a3f8c11386c3c78a5f0ff12394
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2898
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
cc163dd47e test/common: Add spdk_dd to applications.sh
Change-Id: I08fa2b00ff06384c08b9d5a81ae038aee729209f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2897
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
bfaad6be04 test/common: Fix name of the logflag argument
Change-Id: I3b77027a46ba8d4e5f8733be21891f189a50c91f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2896
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
35babaded1 scripts/common: Use separate function for nvme driver lookup
Check if given pci address is bound to nvme driver via a separate
function - this makes the task of getting list of the nvme devices
that can be used in tests a bit easier since we don't have to relay
on, e.g., gen_nvme.sh where the extra step to get said devices is
to parse the actual config.

Change-Id: I1f15f08a3678c0c41b051348af259e225356c340
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3014
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
eb1f031c88 spdk_dd: Add posix flags support
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie051a399af6dea694faa942a412844c267500d2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3060
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
dcd2a253f1 spdk_dd: Exit gracefully on SIGINT
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I979dd7499a845867893acdb2620ce9f5147d4527
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2996
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
ef72cb11b3 spdk_dd: Create file automatically if it does not exist
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I358b8b3977fc15773c6d354d72b8a30d4327fe76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2965
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
3b3f2e5d0a spdk_dd: Add support for skip and seek flags
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If7878ab1968b791ded0b331ef1d6ce834e18dd79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2963
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
a78468a3f5 spdk_dd: Add copying speed and progress
Display copying speed and progress.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4440bbdbe08402c3a343bb039a635eeeffb0ffd5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
690b189a35 spdk_dd: Add copying functionality
Add basic functionality to copy data between
bdevs and files.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1ed028d304cc61200a81ba5fbbe475b9e12516f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2926
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
360398c303 spdk_dd: Initial patch for spdk_dd tool
spdk_dd is a tool for coping data to/from files
and SPDK bdevs efficiently.

This is initial patch preparing files, application
help output and arguments parser.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iee31df6f9f4ac1f64d96a30bb4c16fdf285df22e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2925
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Wawryk
03382cf795 scripts/vagrant: Add Fedora32
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibf0d4b51485ad0060afa7117236f1217354d7c0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3314
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 23:27:45 +00:00
paul luse
8cee297c3f lib/idxd: add batching support for compare command
Also one small bug fix w/compare in accel_perf as a result
of changes made in accel_perf sicne base compare was added.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id8e67bd9de9cbd006ac148f4a77807cc3e8e662b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2958
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
8d0334726f lib/idxd: factor out common code used in prep'ing batch commands
Create helper function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I264f0ed067e4657f21ee38d875235b3410d9d04b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2957
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
80da74964a lib/idxd: add support for batching crc32c requests
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I38e8b26272e86e84e579262496b367375976638d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2955
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
e54f14a52b lib/accel: add batch prep for crc32c to accel fw and sw engine
Also update accel_perf to support it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ida7b863de02c64239ec4cfbdc3b0235d4e0521f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2954
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
396b05a3e4 lib/idxd: add support for batching the fill command
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0996db55e78b7b74bf0a603ac0e9825a4d80d2e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2953
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
d207237fc4 lib/accel: add batch functionality for fill command
Also as a minor drive-by, added verify capability for fill that
wasn't there before, useful in making sure the prep function
was working and really should have been there anyway.

idxd support for prep fill will follow.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib54311c1fb98abd2fb61df6603cf3c5300b71161
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2952
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
a7dfca5b45 lib/accel: have the accel fw default to use sw at times
When an engine has not filled out an entry point for an accel_fw
function, call the sw implmentation that's built into the accel_fw
transparently.

Also update the accel_perf app to no longer block attempts to use
capabilities not reported as supported by the selected engine but
instead to print an informational message.

The exception is batch related commands as their implementation
is specific to the engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0b3971d075ced20182f97e95147e8887103e68cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2930
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>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
d137ba3033 examples/accel/perf: add support for batching compare cmd
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3e26ad0fe873ea3e6157cf4f0b8570929457d309
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2929
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>
2020-07-22 15:02:06 +00:00
paul luse
11c2e05fd8 lib/accel: add support for batching compare commands
Adds support for both the accel fw and the sw implementation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib8748f272a688a074ca475a86dea14179acc020d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2928
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>
2020-07-22 15:02:06 +00:00
paul luse
68a648ca90 lib/idxd: use more appropriate casting of ptr to int values
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8e5b65c43d073bc479be145c3355d1974ee04d04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2916
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>
2020-07-22 15:02:06 +00:00
Vitaliy Mysak
8f345eca22 bdevperf: move global options to job struct
This will allow us to specify per-job options
in upcoming bdevperf config file feature

Change-Id: I80b28856bcb16d393fbadf89d6238c824ee9b276
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3062
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 12:24:08 +00:00
Vitaliy Mysak
800b18d028 lib/conf: allow multiple sections with same name
Add disable_sections_merge() procedure that will allow
to have multiple sections with a same name.
This behaviour is how FIO treats such sections
and so will be used in bdevperf config file.

Change-Id: If221daeb7753d91b5d2608d25ccbb16f2d43ccce
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3433
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 12:24:08 +00:00
Karol Latecki
a7972f0a54 test/nvme_perf: use config file to select test disks
Use a simple config file to select NVMes for test
instead of selecting them all via gen_nvme.sh.
HW platforms may differ significantly in setup and
capabilities, so using all disks in sequential order
is not always a good way.
(e.g. using "first" four available NVMes for test
may yield not optimal results if it turns out that
NVMes are connected to oversubscibed PCIe switch)

Change-Id: I55dd85799a5859c4764e94e1d8058e01ad9b84f0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3296
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
20995d370b test/nvme_perf: remove --disk-no option from perf script
Script was written in such a way that tests would be
performed starting with all found NVMe disks in configuration.
Then the number of disks for the workload would be reduced in
loop until reaching 1. This is the scenario used in test
case 1, described in SPDK NVMe Performance Benchmark document.

--disk-no allowed to avoid running test in loop, and specify
just a single value for the number of disks to be tested.

Both loop logic and --disk-no are no longer required as
tests are scheduled and run via CI system which picks the
parameters for each test run.

Change-Id: Iad0f4d0d259ac64680fd5bb69d7cbb7e0afff79c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3295
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
0655f92a0f test/nvme_perf: improve fio results parsing
- Change divisor in nsec to usec calculation to "1000".
- Ignore MIX param when rw mode is set to 100% read or
  100% write.
- Use MIX param as number in 0.0-1.0 range for calculating
  summary read+write latency.
- Use jq "//" alternative operator when querying for fields
  which might not exist in JSON object. Assume "0" for
  non-existent fields, otherwise jq reports "null", which
  in turn results in script errors.

Change-Id: Ibc8f91f058d9ae31ee1b60f4b253c42b743ae22f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3294
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
da5c4e093d test/nvme_perf: reorganize fio config generation
Previous changes moved some of the fio CLI parameters into
a bash heredoc to save into a text file, but it was put in
wrong place in the script.

Move global fio parameters a couple lines up so that the
resulting fio config file has the correct form of:
[global]
  global_params
[testjob]
  testjob_params

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3a958fe5ce880ab63a079c345e6b24fd1d3bae32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3293
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
3ef00ffb99 test/nvme_perf: fix nvme perf app directory
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7f2b5bc3f25b444e1be8050a5ec74e884ff13068
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Changpeng Liu
2d1fc3ca06 iscsi: report that long text responses isn't supported
When there are many Target information which exceeds the data
buffer, the initiator and target can use long text responses,
but SPDK doesn't support this feature now, so here we just
report an error here, we may add this feature in following
patches.

Fix issue #1442.

Change-Id: I5962c00943819cd11ce21e610e4b37265451f0cb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3454
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:21:48 +00:00
Ziye Yang
1da44e0604 nvme_tcp: Move the default buffer factor size in nvme_tcp.h
1 Change the default factor from 4 to 8, which can be used
to improve the performance.

2 Change the base buffer size in nvme_tcp.c,
we should not use sizeof(struct spdk_nvme_tcp_cmd),
it is 72 bytes. Normally, the initiator will receive
C2h pdus and R2T Pdus by most, so set the size of using
sizeof(struct spdk_nvme_tcp_c2h_data_hdr) is enough.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I384f4cb026cb8d83e75b639f7256ee8cb8ed1df1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3283
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 12:21:07 +00:00
Seth Howell
f0be991330 lib/nvmf: complete requests in req_process for inactive qpairs.
There is no reason to continue processing these requests if the
qpair is not still active. We should complete them and free
any resources they are still holding.

Also, not doing so can cause issues with trying to access pointers
in the qpair after they are invalid. See issue #1460.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6e570a576983dfedf726dc4a9a83316209403e00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3451
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-22 12:20:55 +00:00
Sudheer Mogilappagari
2d877401fd nvmf/tcp: Add recv to busy poll hw queue for data
Call recv to trigger busy polling even when no socket is active. when
epoll_wait returns zero,  the first socket in poll group is used to
trigger busy polling in kernel stack and potentially reap incoming data

Change-Id: I15f04cb4a2c7b382dd07391eda69678fd7919790
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3180
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-22 12:20:47 +00:00
paul luse
22058d70fc lib/idxd: add support for batching dualcast commands
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia5b5a346ae5c8470d9792766dba2bcf68c6fe2fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2915
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-07-22 12:20:27 +00:00
paul luse
ec086e6f3f lib/accel: add support for batch dualcast to fw and sw engine
Includes a few related changes:

* slight refactor to have common prep function for batch prep
commands in the sw engine
* added support for dualcast batching in accel_perf example app

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If9f078a0f8eb509d296e60a94331c92a72f8cb10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2913
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-07-22 12:20:27 +00:00