Commit Graph

6800 Commits

Author SHA1 Message Date
Jim Harris
8c50e8c106 test: handle align=0 in test_env spdk_malloc
DPDK treats align=0 as effectively align=8.  But the
test_env spdk_malloc uses posix_memalign and passes
the align as-is.  posix_memalign requires a non-zero
align parameter however.  So change the test_env
implementation to match DPDK.

This fixes libreduce unit tests, since it does some
allocations with default alignment.

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

Reviewed-on: https://review.gerrithub.io/433083
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-14 09:58:18 +00:00
Ben Walker
08d36a55f9 thread: Make the thread internally manage pollers
The user of the thread library is now only responsible for
periodically calling spdk_thread_poll. Pollers are handled
internally.

In order to avoid changing all of the unit tests, the ability
to provide function pointers to change the behavior of
the  poller registration is still in the code. This should
only be used from tests until they are all converted.

Change-Id: Ie2c00ce1d57ca3710ed2c469cd711924768e23ef
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/417784
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-13 14:26:37 +00:00
Ben Walker
4e3cc6e1de nvmf: Change max_delay_us to 0
This sets the maximum tolerated additional latency
on an I/O, which potentially allows a thread to
sleep and save power. However, today if a poller
is registered on the thread it will never sleep,
which is always true for the nvmf_tgt.

Further, if this were fixed such that the thread could
sleep as long as the pollers all reported idle, this
max latency ends up breaking the QoS test because the
service provided is more than 10% away from the target
number.

Change-Id: Ic9decbd92ad4e0c19eb81eea18a59207d6028367
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432497
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-13 14:26:37 +00:00
Ed rodriguez
9ba446a25c test: Add support to configure ipsec git repo
Also make ipsec configuration and install optional
  in pkgdep.sh.

Change-Id: I0c973398cebce0f50c704b21f6397e8d996ba9f9
Signed-off-by: Ed rodriguez <edwinr@netapp.com>
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/432424
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-11-12 22:27:35 +00:00
Darek Stojaczyk
b3db2a65ea vfio: don't use VFIO when IOMMU is disabled
Previously we used VFIO if only the vfio-pci kernel module
was loaded, which is different from what our setup.sh script
did. On a fairly usual system configuration, setup.sh could
have bound devices to UIO, but SPDK would still try to map
memory to an (empty) DPDK VFIO container just because its fd
was available. That would fail obviously.

setup.sh checks for IOMMU presence in order to use vfio-pci
and SPDK should probably do the same. We could check the
kernel driver of each attached PCI device, but there's no
chance right now of supporting both UIO and VFIO devices
at the same time with IOMMU passthrough. That's not
a reasonable configuration anyway. To keep things simple,
we just add a single check on vtophys initialization.

Fixes #462

Change-Id: Ica653f117743be322291a1b7e37ed00e34ef5035
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432518
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: <wuzhouhui@kingsoft.com>
2018-11-12 22:24:34 +00:00
Jim Harris
cfc372c2ec reduce: write path of pm file to backing dev
Write pm filepath first to offset 4K.  Then write
the super block to offset 0.  This ensures the backing
device isn't really valid until both are written
(avoiding the case where the super block got written
but not the path.)

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

Reviewed-on: https://review.gerrithub.io/432505
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <spdk-ci.pdl@broadcom.com>
2018-11-12 22:23:44 +00:00
Jim Harris
b4f9dd1a17 reduce: write metadata to backing_dev
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaccb9f37d4c08aeb44719ed9bfeecfc394207d25

Reviewed-on: https://review.gerrithub.io/432504
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2018-11-12 22:23:44 +00:00
Jim Harris
b7623dd483 reduce: check that all backing_dev function ptrs are specified
While here, add basic implementations for these function ptrs
in the unit tests.

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

Reviewed-on: https://review.gerrithub.io/432503
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2018-11-12 22:23:44 +00:00
Seth Howell
b7f54bd66e app: RPC to wait for app subsystem initialization.
Change-Id: I66a9f9c1a92c8b9185a0c4c882e61b028e1da261
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432491
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-11-12 22:21:33 +00:00
Piotr Pelplinski
17d652d720 bdev_aio: enable double buffering on write path
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I621a8a3891c8f3829564940219c70c6520c6f9c7
Reviewed-on: https://review.gerrithub.io/427899
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 21:56:24 +00:00
Jim Harris
807c3a2b27 iscsi: change connection messages to DEBUGLOGs
Printing messages every time an iSCSI connection logs in or
logs out/terminates is too noisy.  Make these DEBUGLOGs
instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifc1014e4f8dce414a1c4ef75ea6b6749954083cc
Reviewed-on: https://review.gerrithub.io/432606
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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-11-12 20:15:25 +00:00
Jim Harris
0d8783cabc bdev/passthru: check early for duplicate passthru bdev names
The bdev layer will sort of check this when we try to
register the bdev, but it's better to catch this much
earlier.  That way we catch it when the name gets inserted
into the list, rather than when the base bdev appears.

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

Reviewed-on: https://review.gerrithub.io/432602
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00
Jim Harris
bd02b6ab4e bdev/passthru: return error code from vbdev_passthru_register
This ensures any errors get properly propagated back to the
RPC handler.

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

Reviewed-on: https://review.gerrithub.io/432601
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00
Jim Harris
72ff92381f test/json_config: add passthru to clear_config.py
This avoids "already claimed" error messages in the bdev
json_config tests, by making sure the passthru bdevs
get deleted before we create it again via the JSON
config file.

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

Reviewed-on: https://review.gerrithub.io/432600
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00
Ben Walker
edb693c58d nvmf: Use bdevperf for the shutdown test
Rewrite the shutdown test to use bdevperf. This has a few advantages:

1) We avoid any kernel bugs in the NVMe-oF initiator which is not
designed to be connected/disconnect quickly.
2) It is much faster
3) It is much less variable in behavior.

Change-Id: I410ade64677ec14a7b0851a674650a145555f4ed
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432356
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-12 18:30:20 +00:00
Ben Walker
bf1a82cf5a nvme/rdma: Make RDMA memory map per-pd again
The RDMA memory map needs to be per-protection
domain, not per NVMe controller. Otherwise, when
an NVMe controller is removed, the memory map may
reference an invalid pointer to a detached
controller.

Change-Id: I0c5bd2172daee0c70efb40eab784839e0cde8bc4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432590
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-12 15:31:34 +00:00
Darek Stojaczyk
a817ccf571 Revert "env: remove default pre-reserved memory size"
Apparently this patch revealed an issue somewhere in SGL
handling in NVMf initiator which is causing our CI to fail.
Let's revert it while we work on a proper fix.

This reverts commit 6f5840d225.
This is not a full revert, some app.c changes to the usage text
were kept unchanged.

Change-Id: Iddea5c2b9df50bd12ef8f6226165883f6622ab33
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432576
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
2018-11-09 18:31:45 +00:00
Jim Harris
d912dba2cb reduce: close backing dev during unload
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id94095d2b7069a811ac63123ddd8c5d94f4b53a7

Reviewed-on: https://review.gerrithub.io/432502
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-09 17:51:02 +00:00
Jim Harris
3981ba698b test/reduce: create common function for initializing backing dev
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ica3c2bc6b7c286485ec92e27c71d17ee1e8779a3

Reviewed-on: https://review.gerrithub.io/432501
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2018-11-09 17:51:02 +00:00
Jim Harris
649a585f2f test/reduce: rename init() unit test to init_failure()
There are now other unit tests which exercise the success path.

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

Reviewed-on: https://review.gerrithub.io/432500
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ben Walker <benjamin.walker@intel.com>
2018-11-09 17:51:02 +00:00
Liu Xiaodong
5aace13984 lib/nvme: tolerate abnormal char device
In some special cases, NVMe device with cdata.nn=0
may be used to do validation or other test work.
cdata.nn=0 means the device can't support NS at all.

Change-Id: I55f75a8cb21b8d1b99c5318e27c876a4371d6dd4
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/432191
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: joevannip <jparairo@nvxltech.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:35:28 +00:00
tone.zhang
e93d56b1ed setup.sh: Enable users select kernel driver for identified PCI deivces
The PCI devices used for SPDK are bound with vfio-pci or
uio_pci_generic kernel drivers. In setup.sh, if the path /sys/kernel
/iommu_groups is not empty, vfio-pci kernel driver is the only choice;
otherwise uio_pci_generic is selected.

In system, IOMMU can be enabled but set to pass through. It means
IOMMU will not affect the DMA transmission although IOMMU groups has
been configured. In this case both two kernel drivers are workable. The
script cannot deal with the case now.

The new option DRIVER_OVERRIDE is introduced in the patch and allow
user selects the kernel driver for PCI devices. With the patch the above
case can be handled correctly.

Change-Id: I540d8750bf837ce67b8bc8b516a1a3acb72c502c
Signed-off-by: tone.zhang <tone.zhang@arm.com>
Reviewed-on: https://review.gerrithub.io/427297
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
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>
2018-11-08 23:33:59 +00:00
Darek Stojaczyk
f4ba781552 pci: fix config access return codes on BSD
BSD implementation for config access in DPDK seems to
return 0 on success while Linux implementation returns 0
only on failure. The env wrapper was always treating 0 as
an error and caused some of our PCI initialization code
to fail prematurely.

At one point DPDK harmonized this BSD behavior with Linux,
but only for config reads.

Fixes #484

Change-Id: I4ea850ea50f5e667fad28e8125209b21c377a2a3
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432401
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-11-08 23:15:26 +00:00
Piotr Pelplinski
dadd2a6dc0 bdev: add unit tests for double buffering in bdev modules
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Idcfb328a26fc85f3c144da9c27086a71c00d0d46
Reviewed-on: https://review.gerrithub.io/427830
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2018-11-08 23:11:17 +00:00
Piotr Pelplinski
c1f1a876aa bdev: double buffering for unaligned buffers
Now, that _spdk_bdev_io_get_buf offers allocating aligned buffers,
add possibility to store original buffer and replace it by aligned
one for the time of IO.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: If0ed306175631613c0f9310dccaae6615364fb49

Reviewed-on: https://review.gerrithub.io/429754
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-08 23:11:17 +00:00
Darek Stojaczyk
3e75e90a8e env: add --huge-dir option
Allow specifying a custom hugetlbfs directory.
This can be useful e.g. when trying to use hugepages
with fixed size, different size limit, or different
access permissions.

Change-Id: I418cbab99ed183383300b3c3d9945095a03478db
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432105
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-11-08 23:09:34 +00:00
Seth Howell
5240cbbb9a doc: update the NVMe-oF user guide
Update it to reflect the preferred way of initializing a transport over
RPC.

Change-Id: I6e37cca927e41082fd29808298ed8f5c4c3cdb60
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/429842
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-11-08 23:08:26 +00:00
Seth Howell
962ba4e89a nvmf: remove tgt_opts from nvmf_tgt
This option is deprecated. Also, rename the rpc and configuration
options for setting the opts to reflect that they now only set the max
number of subsystems

Change-Id: Iaabcbf33dd0a0dc489d81233fda74e9e7f3e0d2e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/430161
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-11-08 23:08:26 +00:00
Darek Stojaczyk
70ef3d917f app: fixup default values in the usage text
In the usage output, the default config could be printed
as "(null)" and mem_size as "-1MB".

Change-Id: Ib6adc1ab86c43a40096d392bdfc64d3d508a86bc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432422
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-11-08 23:07:32 +00:00
Darek Stojaczyk
6f5840d225 env: remove default pre-reserved memory size
Now that we utilize DPDK dynamic memory allocation, we
no longer need to set the default pre-reserved memory size.
It'll now be 0, which implies all memory will be allocated
at runtime.

The option to pre-reserve all hugepages on the system is
now only available on BSD, so also clarify that bit in the
app usage text.

Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432204
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:07:32 +00:00
Seth Howell
9bec452561 rpc: add function to get the current RPC state
Change-Id: I74e08a4ce5d3073933721011dc5fb8a92a46c184
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432490
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-11-08 23:04:50 +00:00
Evgeniy Kochetov
90b4bd6cf9 nvmf/rdma: Fix QP shutdown procedure implementation
This patch implements the following QP shutdown flow:
1. Move the QP to ERR state
2. Post dummy work requests to send and receive queues
3. Poll CQ until it returns dummy work requests (with WR Flush Error status)
4. Call ibv_destroy_qp and release resources

In order to differentiate dummy and normal WRs new spdk_nvmf_rdma_wr
structure was introduced which contains type of WR. Since now it is
expected that wr_id field in ibv_recv/send_wr and ibv_wc always points
to this structure. Based on WR type wr_id can be safely casted to
correct container structure. In case of unsuccessful work completions
'opcode' can not be used for this purpose because it may be
invalid (see "IB Architecture Specification Volume 1", ch. 11.4.2.1
"Poll for completion").

Change-Id: Ifb791e36114c619c71ad4d831f2c7972fe7cf13d
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-on: https://review.gerrithub.io/430754
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>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
2018-11-08 21:20:25 +00:00
Jim Harris
c6323a8d52 reduce: close pm_file during unload
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibd0026a95cbda1577155a0d9520a93e2e4ba921b

Reviewed-on: https://review.gerrithub.io/430649
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-08 03:55:50 +00:00
Jim Harris
dfd44de7de reduce: pass details of pm file to init
Add the following to struct spdk_reduce_pm_file:
* path of the pm file
* pointer to the mmapped pm region
* whether the mmaped address is pmem or not

Now use pmem_persist or pmem_msync to persist volume
parameters.  Note that we do *not* persist the pm filename
to the pm file - the pm filename will be written to the
backing disk in a later patch.

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

Reviewed-on: https://review.gerrithub.io/430648
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>
2018-11-08 00:01:47 +00:00
Jim Harris
970228038f reduce: add configure option
--with-reduce required to build reduce.  This depends on
libpmem being installed.

We still need to work out details in pkgdep.sh and
vm_setup.sh.  Some distributions like Ubuntu still
require configuring extra package repositories to
get libpmem packages.

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

Reviewed-on: https://review.gerrithub.io/430646
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>
2018-11-08 00:01:47 +00:00
Jim Harris
f28f81333f reduce: add spdk_reduce_vol_init() and _unload()
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I07b78d476aca2dd5c1d64f0100f35f431f699623

Reviewed-on: https://review.gerrithub.io/430645
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-08 00:01:47 +00:00
Jim Harris
dd42c80857 lib/reduce: add functions to get pm and backing sizes
A compressed volume will require both a persistent
memory region/file for per-chunk metadata and a
backing device to store the compressed blocks.
Add functions here to calculate the sizes of these
based on the desired size of the compressed volume,
its chunk size and the size of each backing block.

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

Reviewed-on: https://review.gerrithub.io/430387
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>
2018-11-08 00:01:47 +00:00
Jim Harris
6bf35070c6 lib/reduce: add empty library, include, unit tests
reduce will be a block compression algorithm designed
specifically for SPDK.  It is called "reduce" because
it reduces the data size on disk.

This patch just adds the shell of a library, include
files and unit tests.  This will be fleshed out in
the rest of the patches in this series.

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

Reviewed-on: https://review.gerrithub.io/430386
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: Changpeng Liu <changpeng.liu@intel.com>
2018-11-07 18:11:49 +00:00
Jim Harris
cf0e73483e doc: add document describing "reduce" compression algorithm
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I67f1bf569a8a21f77729a30e933efd04ee05b86f

Reviewed-on: https://review.gerrithub.io/430385
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-11-07 18:11:49 +00:00
Pawel Kaminski
b7b7efdeaa test/spdkcli: Delete multiple subnodes from iscsi node
Change-Id: Iedea21339cde0b9ffd7bd724f642b5257208b82a
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/430384
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-07 17:24:08 +00:00
Ben Walker
814a2dd90a fio_plugin: Perform initialization and teardown on consistent thread
Change-Id: I2798f2b0c5a7fe210f03b4e1477fd04f480febb3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/431843
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: Jim Harris <james.r.harris@intel.com>
2018-11-07 17:22:55 +00:00
Ben Walker
68b9d5838b fio_plugin: exit immediately if spdk_fio_init_env fails
This is going to be moved to a separate thread later in
the patch series and it won't be able to return an error
code. The entire program must exit.

Change-Id: I718d2a82346f78596f805492392a843e7a79359e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432088
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-11-07 17:22:55 +00:00
Liu Xiaodong
38ed4e4a05 bdev_nvme: tolerate failure on bdev creation
NVMe controller won't be removed if it has no namespace
or no bdev is succesfully created out.

Change-Id: I45b7e364a0cb35c902af5e745237931b67335145
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/431701
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-07 17:21:04 +00:00
Pawel Kaminski
c016b65939 test/spdkcli: Delete multiple items from nvmf node
Change-Id: I72e5815eb318e82a8701e48c5b502b0a3ca1c367
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/429821
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: Jim Harris <james.r.harris@intel.com>
2018-11-07 17:19:41 +00:00
Tomasz Zawadzki
9b91f9c47c net: add asynchronous initialization and finish
Change-Id: Ic67818adf28ffc58a029cb8a551c74e51abde381
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/426829
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-07 17:08:27 +00:00
Tomasz Kulasek
21bd942751 libsock: add functional tests
Change-Id: I3c86c1b4a9c8ae3f18264f33b15d647e4081a12c
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/421911
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-07 17:08:27 +00:00
Ben Walker
e086dba5af test/nvmf: Use bdevperf in lvol test instead of fio
This is much, much faster to set up and tear down than
the kernel initiator plus fio.

Change-Id: I9532b734123556d6e2055e4f3acf2ad4887784c3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432085
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-07 17:06:11 +00:00
Pawel Wodkowski
5d0f262073 jsonrpc: introduce spdk_jsonrpc_client_response
As a step toward non-blocking JSON RPC client change the the way we
retrive the response.

Now we retrive full response by calling
spdk_jsonrpc_client_recv_response(). If response is ready it will be
parsed to spdk_jsonrpc_client_response object then user can issue
spdk_jsonrpc_client_get_response() to get the response object. When
processing response object is done the user calls
spdk_jsonrpc_client_free_response() to free it.

This logic will simplify both non-blocking mode and multiple response
handling.

Change-Id: I737d8a34283f4a68795d6bc6ba0c8646b7ae3319
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/429262
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-06 19:00:41 +00:00
Pawel Kaminski
b8dc21cb78 test/bdev: Dynamic memory allocation tests.
Check if dpdk can allocate memory dynamically

Change-Id: I36751140f96bac36ef5e16f47e1d163019618313
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/412768
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-11-06 18:47:04 +00:00
paul luse
164d79143b passthru: add RPC testing
And change names of parms to be consistent with others used in
RPC testing.

Change-Id: I8331c6a22866d89a2a4ffb5fc8d41d74b4b7b07d
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/428724
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-06 17:32:08 +00:00