Commit Graph

5934 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
218fd85dc1 bdevio: check spdk_app_parse_args return code
This makes us exit immediately on '-h' or any parsing error.

Change-Id: I6bd2fc9238bcecba6df1e62a8db42ce79ad73524
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422686
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-20 16:28:01 +00:00
Seth Howell
df531e7faf test: add output tables to autotest_post.py
These output tables will help show graphically which tests are being run
where, and which ones are being tested with ASAN and UBSAN enabled.

Change-Id: Ia11657d4468f1ed41ab13b3241893ce09e949668
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421556
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-17 22:15:50 +00:00
Seth Howell
194b8eca98 eal: add dpdk cl-arg no-shconf
This allows us to avoid creating a shared configuration file in the dpdk
rte directory.

Change-Id: Id57d9111669ee8fd51e82c0b05e8c2c07b6dcd7e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-17 21:02:48 +00:00
paul luse
6fd1d004a8 vbdev: add get_buf call to passthru example
Previously a null buffer on read would get passed on which would
be fine for a simple example but for something more complex where
the module in question might need that buffer at some time after
the read callback, it's possible that an underlying module might
free it too soon.  So, to be a good example we now own the buffer
in this module.

Change-Id: I411477e83b1e222c64011688952cfd587c32c16e
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/422603
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-17 20:56:30 +00:00
Seth Howell
1570c87f81 rdma: disbale send with inval on Soft-RoCE NICs
Currently, the RXE kernel driver does not support send with invalidate.
There is a change to the kernel making its way downstream that will
enable this feature. At that point, we can conditionally enable
send-with-invalidate based on the kernel version.

Change-Id: I05c7bcbf8ec944be89c10bdf6ccc3229e4586914
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422579
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-17 20:56:02 +00:00
Seth Howell
b4de8e1158 nvmf_tgt: add support for remote invalidate.
Change-Id: I619421677ecc77c3b458c3b98fdc1cb27870a222
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421258
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-17 20:56:02 +00:00
Seth Howell
7671073bed config: add define for rdma send with inval
On newer versions of the kernel, we see a significant performance impact
if send with invalidate is not enabled. However, depending on the user's
version of IB verbs, it may not be supported. We need to warn them of
the performance issues.

Change-Id: I93a5f5375af90ca3102a6bd084df430b1153419c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-17 20:56:02 +00:00
Wael Halbawi
5abf2ecfcd Do not recreate passthru vbdev unnecessarily.
The passthru module associates a vbdev and the underlying bdev.
This association lives throughout the lifetime of the module and because
of this, passthru vbdevs are recreated when they shouldn't be.

This patch ensures that the association between a vbdev and a bdev is
broken when the vbdev is removed, so that if the underlying bdev is ever
recreated (after being deleted), the vbdev does not reappear.

Note that this change does not affect hot-remove operations.

Change-Id: I5cb4cf7efcb5e5eeaeef79849e0aaefec4684a4f
Signed-off-by: Wael Halbawi <waelhalbawi@gmail.com>
Reviewed-on: https://review.gerrithub.io/422474
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-17 19:21:26 +00:00
Lance Hartmann
e9424c7e1c build: add build of individual shared libraries
Change-Id: Ief6ba77352a0248bbc608d98a0b338f2e03ee0dc
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/422306
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-17 14:23:31 +00:00
Lance Hartmann
0923734c9f build: Conditionally builds single and separate shared libs
Adds option to configure script (default is disabled)
to build SPDK shared libraries, and enhances build
correspondingly to do so.  This includes the single, combined
shared library encompassing all of the SPDK static libs,
as well as production of individual SPDK shared libraries
corresponding to each of the static ones.  Although the
SPDK shared libs conform with shared lib naming conventions
complete with version numbering suffixes, this does not
confer any ABI compatibility claims whatsoever at this time.
It's merely conformance with the naming conventions.
Finally, there are no built-in dependencies between SPDK
shared libs, thus requiring one to specify all needed SPDK
shared libs to resolve all symbols in the final link of an
executable wishing to use said SPDK shared libs.

Change-Id: Ia375c0e3fb6d150d45a39e84e3b226fbaea48545
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/422307
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-17 14:23:31 +00:00
Dariusz Stojaczyk
a6c89adf09 nvme/rdma: fix mem_map allocation failure check
Change-Id: I206787234bc6d83d8b9694a8263626c56dc07bc7
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422563
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-08-17 02:19:03 +00:00
Jim Harris
26628773d3 bdev/lvol: point directly to lvol->unique_id for bdev name
The lvol->unique_id will never change - so just point the
bdev->name directly to it.  That eliminates the need to
free bdev->name when cleaning up the bdev, and removes
an extra strdup.

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

Reviewed-on: https://review.gerrithub.io/421408
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-08-17 00:11:03 +00:00
Jim Harris
1be2a279c3 bdev/lvol: have the RPC methods use lvol->unique_id
Ideally lvols would not point to bdevs (bdev/lvol
should be layered on top of lvol).  This is a small
step towards making that happen.

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

Reviewed-on: https://review.gerrithub.io/421407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-17 00:11:03 +00:00
Jim Harris
671b77e5cd bdev: remove vbdevs and base_bdevs arrays
The intents of these arrays was to keep track in the
bdev layer of all base<->virtual bdev relationships -
i.e. which member disk bdevs make up a RAID bdev,
which logical volume bdevs are associated with a
bdev that contains an lvolstore, etc.

Currently none of this is used however.  And trying
to keep track in the bdev layer instead of asking
the bdev modules for the relationships has a number
of complications.  Early one, we tried to do this
with TAILQs - but that doesn't work since this can't
be done with a single TAILQ_ENTRY in the bdev
structures.  So we moved to arrays - that works a bit
better, but then the pointer arrays have to be
realloc'd which isn't ideal.

The biggest problem though with these arrays is that
they held bdev pointers - not bdev descriptor pointers.
It's not really valid to access bdevs without a
descriptor - the descriptors are what make sure active
references are accounted for when a bdev is hotplugged.
Of course the bdev layer knows when a bdev is getting
removed and could go and do the updates to these
arrays separately - but that just seems very convoluted.

So for now just remove these arrays completely.  If
there is a future need for the bdev layer to
understand relationships between bdevs, we can add
module APIs so that the generic layer can ask
the modules about the relationships.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I99ef1068240bff1262f64f234260cf2fb44df51d
Reviewed-on: https://review.gerrithub.io/420932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2018-08-17 00:11:03 +00:00
Jim Harris
43c8d0eb1e bdev/split: use bdev_part interface to get split names
The base_bdev and vbdevs arrays are going away in the
common bdev layer in a future patch, so prepare for that
in the split RPCs to use the bdev_part interface instead
to get the names of the split bdevs created from the
base_bdev.

No change in observed functionality.

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

Reviewed-on: https://review.gerrithub.io/420931
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-17 00:11:03 +00:00
Jim Harris
01035cd49f bdev: cleanup registered bdevs in reverse order
This ensures (for example) that a RAID volume is
unregistered before its member disks.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7a7c16acc351f2d5d4218b64b370e2c77c6e2b5e
Reviewed-on: https://review.gerrithub.io/420812
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-17 00:11:03 +00:00
Jim Harris
fd75d35771 bdev/raid: release claim and close descriptors during destruct
During system shutdown, we want each module to release its
claim and close any open descriptors when one of its bdevs
is unregistered.

This prepares for a future patch which will unregister
bdevs at shutdown in reverse order - i.e the RAID bdev
will be unregistered before its member disks.

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

Reviewed-on: https://review.gerrithub.io/420927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-17 00:11:03 +00:00
Dariusz Stojaczyk
1469679f09 setup.sh: cleanup any leftover DPDK files
SPDK deletes those files automatically for single-process
applications and the multi-process' ones can now be freed
with `./setup.sh cleanup`.

The script clears so called DPDK runtime directories, which
are defined as follows (for DPDK 18.05+):
 * If DPDK is running as root, /var/run/dpdk/<per-pid-prefix>/
 * If DPDK is not running as root:
   * If $XDG_RUNTIME_DIR is set, ${XDG_RUNTIME_DIR}/dpdk/<per-pid-prefix>/
   * Otherwise, /tmp/dpdk/<per-pid-prefix>/

Since DPDK 18.08, even the shared config file is placed in
the runtime dir, making it the only dir we have to clear.

Change-Id: I13f58a98f6a07e609b888b4e816dd45eac10f49c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422485
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 21:09:05 +00:00
Dariusz Stojaczyk
8f186a81c5 doc: update command line parameters page
Fixed various misstatements, mentioned long params, and described
some parameters in more depth.

Change-Id: Id3b37e810c7b9f626b1f7e42ba72af99b8b574ae
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422537
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-16 16:48:42 +00:00
Karol Latecki
9a361ac01d scripts/vagrant: add configuration for vhost tests
Use libvirt provider to provision the VM by syncing vhost dir
which holds all dependencies needed to run vhost tests
(VM image, fio binary and SSH keys).

Change-Id: If8c65ef683cae37301e980fdaecc753c7371aeeb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/421919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 16:48:24 +00:00
Maciej Szwed
039a4c6cb0 vhost-blk: put bdev IO channel on hot remove
On hot remove, before closing bdev, put its IO channel.
If we don't do this bdev won't be destroyed until controller
is removed.

This fixes GitHub issue #401.

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

Reviewed-on: https://review.gerrithub.io/422258
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 15:21:54 +00:00
Jim Harris
e7c9f62046 jsoncat, histogram_perf: add missing dependencies
These weren't needed for static linking, but popped
up as problems with some upcoming patches enabling
individual shared libraries.

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

Reviewed-on: https://review.gerrithub.io/422442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
5e181ba84f build: explicitly link unit tests with static libraries
Unit tests define mock functions in the unit test code
itself.  This links fine with static libraries, but
doesn't work if trying to link with shared libraries.

So change the unit tests to always explicitly link
with the static libraries.

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

Reviewed-on: https://review.gerrithub.io/422441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
afca551212 shared_lib: add rte_vhost_* to map
This is a bit of a hack for now, but the rte_vhost_*
symbols need to be exported to support individual
shared libraries in future patches.

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

Reviewed-on: https://review.gerrithub.io/422440
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
ffc1d37c53 spdk.app.mk: fix SPDK_FILTER_LIB_LIST
When we build the SPDK_FILTER_LIB_LIST, we should
maintain the dependencies between libraries.  Primary
culprit is vhost depending on scsi.  So add vhost
to SPDK_FILTER_LIB_LIST before scsi, and then stop
sorting the list unnecessarily before using it.

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

Reviewed-on: https://review.gerrithub.io/422439
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
3f38382c37 build: fix some library dependencies
Upcoming patches from Lance Hartmann have pointed out
some places where the library lists should be
reordered to enable linking with shared libraries
without building dependencies into the shared
libraries themselves.  We will build these dependencies
into the shared libraries at some point, but these
patches let us defer that for a bit.

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

Reviewed-on: https://review.gerrithub.io/422438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 14:27:18 +00:00
Jim Harris
9ee4942130 bdev/gpt: fail more gracefully on extended block size bdevs
The GPT module isn't designed currently to support extended
block sizes like 520 or 4104, and we don't really have a good
way to put GPT down on one of these devices anyways.

So just check the block size when examining a new bdev, and
fail immediately if it's not an even multiple of 512.

Long-term, this should probably be a DEBUG print and not an
ERRLOG, but while we work through the bdev implications
of extended block sizes, keep it as an ERRLOG to facilitate
debugging.

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

Reviewed-on: https://review.gerrithub.io/422321
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-16 04:38:36 +00:00
Jim Harris
5b900148e5 nvme: add spdk_nvme_ns_get_extended_sector_size
spdk_nvme_ns_get_sector_size returns the sector
size of the data only.  This new function adds
in the metadata size, if any.

While here, modify the bdev/nvme driver to use this
function - this is needed for ongoing extended sector
size work through the bdev layer.

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

Reviewed-on: https://review.gerrithub.io/422445
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-08-16 04:38:10 +00:00
Seth Howell
fdf5e5854b test/nvmf: add init and fini functions to tgt tests
These functions enable a user to run one of the Nvme-oF tests directly
from the command line without having to manually invoke all of the setup
we typically do.

Change-Id: Ib0baa77c08abb24c2fa2a1e21cf38ac613d663e0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/422336
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 03:37:26 +00:00
Tsuyoshi Uchida
edfde53def scripts/pkgdep.sh: remove unavailable yum option "--allowerasing"
Change-Id: I61ea0c11956a9a9bacbfef63f50a79e1a25ef412
Signed-off-by: Tsuyoshi Uchida <will.sun.hope.truth@gmail.com>
Reviewed-on: https://review.gerrithub.io/422204
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 03:36:50 +00:00
Leonid Ravich
eaea3f24cc RDMA: fixing create qp failure due to not suppored send sge number,
some vendorse support less send sge then SPDK_NVMF_MAX_SGL_ENTRIES.

Change-Id: I5b550b537b6ff4ae5d7876a3f277f88cf06049e4
Signed-off-by: Leonid Ravich <Leonid.Ravich@dell.com>
Reviewed-on: https://review.gerrithub.io/421012
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: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 03:35:12 +00:00
Ben Walker
008ec0bd91 nvmf: Store thread in controller structure
The admin queue pair may get disconnected before
the controller is entirely destroyed and can't
be relied on to obtain the correct thread.

Change-Id: I5e80ef286693d53a161134610dd8354c458f8390
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/422134
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: qun wan <qun.wan@intel.com>
2018-08-16 03:30:24 +00:00
Seth Howell
e03aca3ce3 nvmf/rdma: don't delete queue pair until it is empty.
Change-Id: I6ee2f9fd02292cc03db6ed16858a9d2cc9c4de05
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/421167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-16 03:30:24 +00:00
wuzhouhui
3113b446f1 vhost: return more appropriate errno if controller is still in use
Change-Id: I7716f1748803872cac85e296d60747752ca046f4
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/422273
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: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-08-16 01:42:39 +00:00
Chen Zhenghua
92ebb7c899 doc/bdev: fix minor typo and format issues
Change-Id: Iafee71dcdf8469a6c2edab42f4fc8e2f1778bef2
Signed-off-by: Chen Zhenghua <chen.zhenghua@zte.com.cn>
Reviewed-on: https://review.gerrithub.io/422247
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>
2018-08-16 00:32:02 +00:00
Lance Hartmann
3f6f569854 shared_lib: Update shared lib build and install
Updates build and install of shared lib to conform with
standard naming conventions for shared libraries, including
the setting of the lib's soname.

Change-Id: Ib46d298ab5f77fd8c32b7c04022b546446189428
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/421936
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-16 00:27:53 +00:00
Jim Harris
aec9c3cded test: use spdk_unittest.mk for raid unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I925bf71414fe74868eb14faf365e09258fea87eb

Reviewed-on: https://review.gerrithub.io/421177
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Kunal Sablok <kunal.sablok@intel.com>
2018-08-15 23:32:04 +00:00
Jim Harris
c899854d03 bdev: add new fini_start notification callback for modules
When an SPDK application shuts down, the bdev layer will
automatically unregister all of the bdevs to ensure they
are properly quiesced and cleaned up.

Some modules may want to perform different operations when
a bdev is destructed during normal runtime vs. shutdown.
For example, for lvol, when the last lvol is cleaned up,
it should unload the lvolstore, release and close the bdev
that contains the lvolstore.  You never want to do this
during normal runtime though - it is perfectly valid to
have an lvolstore that contains no lvols.  RAID and future
bdev modules such as multipath have similar use cases.

So add a new bdev module callback named "fini_start".
If a module specifies a function pointer for this callback,
the bdev layer will call it before it starts the bdev
unregistrations.

This enables some future patches to the bdev layer such
that it will always unregister block devices that are not
claimed (i.e. logical volumes) before block devices that
are claimed (i.e. the bdev containing an lvolstore).

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

Reviewed-on: https://review.gerrithub.io/421175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-15 23:32:04 +00:00
Pawel Niedzwiecki
341fff6397 test/iscsi: Add installation of socat in vm_setup.sh configuration
script

socat is used in iscsi_tgt's libsock test

Change-Id: I027930a99e58ff9862a540d5eed3b1a50de28a93
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/422255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 18:09:46 +00:00
Ziye Yang
1ba87aba31 iSCSI: set a connection to EXISTING STATE in condition
If the connection is already in exiting or exited
status, we should not set it again. And this
could prevent the coredump.

Change-Id: Ia506d13b12c3a6cb5619d65e4b3353b149a85947
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/421668
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 18:09:19 +00:00
Karol Latecki
a257328d69 scripts/vagrant: sync spdk common for all providers
We have to sync spdk sources regardless of used provider.
Can also sync tools if available.

Change-Id: Ia149a68d632abadf69d20d7c34c6d7f158e2d7cb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/422285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 18:08:42 +00:00
Dariusz Stojaczyk
75327bc67e env/dpdk: allow 0 requested memory size
Now that DPDK can reserve additional memory on the fly,
the initial requested memory only serves as preallocation
and it makes sense to request no preallocated memory.

Right now, passing `--mem-size 0` counterintuitively
tries to reserve all hugepages on the system.

Change-Id: I281900efc7bd0bbb7eed30161ba0b88e16195170
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422241
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:43:30 +00:00
Dariusz Stojaczyk
ce643e0efe env/dpdk: enable dynamic memory allocation for DPDK >= 18.08
DPDK 18.08 includes the fixes we proposed
and we're now ready to make the switch.

Change-Id: Ie5abf25480d2449cb2c8e23de10c8090fc7b14fb
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422240
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:43:30 +00:00
Dariusz Stojaczyk
e4a79fd1ae dpdk/pci: support DPDK 18.08 write combined PCI resources
We used to support it by default in our DPDK forks,
but starting with DPDK 18.08, a new PCI driver flag
RTE_PCI_DRV_WC_ACTIVATE is required.

We enable now it for NVMe and Virtio, but not for I/OAT,
as our I/OAT driver currently assumes strong memory
ordering, which prefetchable resources do not provide.

Change-Id: I1a13356e28535981153b3d3e52bfe9d66b6172af
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422239
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:43:30 +00:00
Dariusz Stojaczyk
13eb81e1ab env/dpdk: link with rte_kvargs by default
Starting with DPDK 18.08, rte_kvargs is a dependency
of rte_eal.

Change-Id: I0cde78f632fc313cec745d41ee519fb8b37de81b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422238
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:43:30 +00:00
Dariusz Stojaczyk
e85f8481ef dpdkbuild: always compile librte_kvargs
We need it to compile our internal rte_vhost, and
starting with DPDK 18.08 it's an EAL dependency.

Even though CONFIG_RTE_LIBRTE_KVARGS got commented out in
common_base, it's still hardcoded to =y in common_spdk
and that's why our autotest works.

Trying to build a DPDK target that doesn't use common_spdk
fails terribly right now, because other PMDs and libraries
that are built by default (defined in common_base) actually
depend on kvargs.

Change-Id: I171e768a75c6a460fc090ae3c9c65807eaec5945
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422237
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:43:30 +00:00
xuhuagen
9f6b1099e5 autotest: add unmap,flush,reset testing for iscsi initiator.
Change-Id: Ic5fffd0fbdf7693aa85cc16ff259fe107438637d
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/422031
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:36:40 +00:00
Jim Harris
b8a05080e0 bdev/malloc: remove blocklen power of 2 restriction
This enables easier testing of variable sector size
block lengths (512 + 8, 4096 + 8, etc.) - otherwise
you need an NVMe namespace specially formatted for
VSS.

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

Reviewed-on: https://review.gerrithub.io/422320
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-15 17:36:00 +00:00
Ziye Yang
c8fd001075 iscsi: fix the primary iscsi task free in queued_datain_tasks
Reason: If the task is queued in scsi layer to handle, we
should free the task after calling the spdk_iscsi_task_cpl.
Otherwise, if only this task is executed (without subread tasks),
the task will be freed by the loop early, which will cause
the segment fault in spdk_iscsi_task_cpl function.

Change-Id: Ifc42399957b24d976af5fd12f6e33459a3ea86ba
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/421706
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:35:38 +00:00
John Kariuki
f85f70b40a doc/performance_report: add NVMe-oF performance report
Change-Id: Ia9573342d95c6c56050a005425c96f936e762b72
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.gerrithub.io/422357
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-08-15 17:33:48 +00:00