Commit Graph

11474 Commits

Author SHA1 Message Date
Wojciech Malikowski
6557c2bf82 lib/ftl: IO retry queue associated with io channel
Process IO retries on IO channel poller. This patch
replaces retry queue associated with device with the
queue associated with IO channel. This patch also adds
putting IO write request on retry queue in case write
buffer is full instead thread message sending.

Change-Id: Iec9c9a4e858c90f1fe344bb298ff13ed0e13397f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/543
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 09:51:28 +00:00
Wojciech Malikowski
68cd46b622 lib/ftl: IO completion queue associated with io channel
Do not complete user IO writes immediately but put them to IO
channel completion queue. This allow to complete IO requests in
batches and reduce need of unnecessary message sending in bdev layer.

Change-Id: I1bd1e076ff31e9e5faef70f9d0b3512d8f3a31b7
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/542
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 09:51:28 +00:00
Jacek Kalwas
a7a0d02d8b nvme: fix command specific status code
Given enum was not aligned with spec. This status can be reported when
size equals 0.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If51f6b051c13880c1fd4e6bb0a02f134b28b5a88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/928
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-20 09:49:24 +00:00
Jacek Kalwas
33d5eee15f nvmf/transport: align to spdk code style
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I38db83b060e39d435d45ac12db09401e7a5d20eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/962
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-20 09:48:28 +00:00
paul luse
8e16979b21 examples/fio_plug-in: update README to clarify licensing
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I720533fe79942cc76bf3c7c0781ad7cb7085242d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:48:11 +00:00
Jacek Kalwas
6d8f1fc648 nvmf: remove redundant trid obj copy
It is memory optimisation as transport id is 'heavy'. As a side effect
simpler handling of listen and stop_listen on transport specific layer.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4e9d0e0c5eee2d570ec4ac9079270c32d5afb8db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
Jacek Kalwas
6913a864fb nvmf: add const to trid within listener allowed
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I31b10c860e8a40745e001a0898e081152afac7e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
Jacek Kalwas
c79d4eef85 nvmf: rename listener to subsystem listener
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I5c1e009114bdf8e8b59e0ca07fbae0900131a58e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
Jacek Kalwas
e2577e2a24 nvmf: move transport stop listen into public interface
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ibb44cb2058dda98d8b56a7e1954706fc7721047c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 13:43:15 +00:00
Wojciech Malikowski
f545e3009f lib/ftl: Fix condition for moving zone state to full
This patch fixes condition used to change zone state.
Zone write pointer is an offset from disk beginning and
was wrongly used as an offset from zone.

Change-Id: I6cd42c6db78003812ec6d6bc75550bb7a5b067ca
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/954
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-19 13:37:37 +00:00
GangCao
26328b7b1a Test/QoS: enable QoS testing on Malloc with ZCOPY
We've now supported ZCOPY io type and Malloc bdev will use
ZCOPY for the read/write operation. Add the support for the
test case of Malloc with ZCOPY operation.

Change-Id: I291fc9ef82b1eae800c97c5a6b7a0c810c357fe0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-19 09:48:08 +00:00
Maciej Wawryk
f7d520e864 scripts/vagrant: Fix missing line break
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iaace103027e4261e01b5e13233afc4094abf2386
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/939
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: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-19 09:47:56 +00:00
Maciej Wawryk
af694c3de8 scripts/pkgdep.sh: Add dependencies for Centos8
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I5921d5f7f70f2df634ccd008eb27a02496a47bee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/603
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
e5a5eaa660 scripts/pkgdep.sh: Add flag for building docs dependencies
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If2c64eaa688fdc067479a357cbfd407570937419
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/602
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
fe5954c67f scripts/pkgdep.sh: Add flag for RDMA dependencies
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id38a3c5066c2c71d681d61f7ea8be748ddadaaf0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/601
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
2fc1ed76af scripts/pkgdep.sh: Add flag for FUSE and NVMe-CUSE dependencies
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I2cfdd33b7d0e655d80e28958aa0f12c465592cb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/600
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
f035937dd5 scripts/pkgdep.sh: Add flag for pmem dependencies
Add flag for pmem dependencies needed by reduce and pmdk components.
Also add missing libpmem in Ubuntu section.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I596a1e6660f8b6f92bdab81046fa3533ae78fca3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/599
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
c79a950fe4 scripts/pkgdep.sh: Fix NASM dependencies Ubuntu
Add information about missing dependencies for Ubuntu versions smaller than 19.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I776d93e156c07c618df9cb5eeb99c0ca8f78e388
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/598
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
0c50f8311e scripts/pkgdep.sh: Fix libfuse3-dev dependencies for Ubuntu
Add information about missing dependencies for Ubuntu versions smaller than 19.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id48b462be35a761fd9fad4bdc48c1757cf5a7580
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/597
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-18 14:42:16 +00:00
Maciej Wawryk
9ebbf3acac scripts/pkgdep.sh: Add flag for developer tools installation
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8876fd7c60198c597d931c5f498644c415c2a868
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/596
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 14:42:16 +00:00
paul luse
d8aa3ab6be module/crypto: fix use of wrong ch param in queueing IO
Vbdev module should use the base channel, not the vbdev channel.

fixes #1195

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7e426a2fc1735213c986ba55dc17623bc3ce948e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/791
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-18 08:05:42 +00:00
paul luse
b69c95b67f blockdev.sh/ add QAT AES_XTS to CI
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1329ffa4e3195b93ae92059e4c58fc0ab33445ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/443
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-02-18 08:05:42 +00:00
paul luse
f241068fca module/crypto: add AES_XTS support for QAT pmd
Tests are coming in next patch...

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8b9c80f3ea1d3f59006f802840da52c3c8c46167
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 08:05:42 +00:00
paul luse
f070b78cd1 module/crypto: add RPC and plumbing to support QAT AES_XTS cipher
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iadd03f8da305e97e3f1d57ef4aeaece400e8d959
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/441
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-18 08:05:42 +00:00
paul luse
9e1b82ac9c subsystem/accel: add entry point for .write_config_json
Write config json for setting the selected accel module.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ife11d4d4a776254b56fa6d24dc817481beb78c3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/664
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>
2020-02-18 08:05:34 +00:00
paul luse
e753402aa1 lib/accel: add RPC to select which accel module should be used
Startup RPC only to avoid issues trying to switch while in use.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7f1801905de0927f3610c4065182dd8fa88cdfdd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/660
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>
2020-02-18 08:05:34 +00:00
paul luse
aa3cf73311 accel: move code, add/edit comments, etc.
* Moved code around in accel framework as the sw implementation
is included in the same file (it's always present) so that its
easier to differentiate framework functions from sw accel
* Renamed some functions for the same reason
* Added/edit comments to clarify things

All in prep for extending the API to more functions.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I465ee743d999999df4c06e3f68feddcd73c6e6a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/580
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>
2020-02-18 08:05:34 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
Seth Howell
b1daf62be5 nvme: add internal function to iterate over transports.
This will come in handy in the new poll group API.

Change-Id: I9cf14082270b28b35f4a440c5cb2471c81e374ba
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/578
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Seth Howell
19260848f6 nvme: publicly declare spdk_nvme_transport
This will be useful in the upcoming spdk_nvme_poll_group api.

Change-Id: Id83340a2ce9887817312f5aac38db4de8c588974
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/577
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Ziye Yang
c515a7cab7 sock ut: enable the posix_ut testing in auto test.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1c3e68430c44d54ccdc2d42f6c59b1df265f96e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/917
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>
2020-02-18 08:05:00 +00:00
Darek Stojaczyk
8c37b10702 sock/posix: fix potential segfault in zero-copy
CMSG_FIRSTHDR could theoretically return NULL. Check it for the
peace of mind.

CMSG_FIRSTHDR() returns a pointer to the first cmsghdr in the
          ancillary data buffer associated with the passed msghdr.
          It returns NULL if there isn't enough space for a cmsghdr
          in the buffer.

Change-Id: I6c7e1eb59121b59c568d3ad7f5eda649a49026f4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/771
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:04:55 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
93be26a51d Fix Markdown MD022 linter warnings - headers blank lines
MD022 Headers should be surrounded by blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
8ba413a7a4 Fix Markdown MD019 linter warnings - multiple spaces after header
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6f7bd6db36feb723aceac74df4136a22ef01deb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/655
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
c344dac9cc Fix Markdown MD003 linter warnings - header style
MD003 - Header style
Triggered when inconsistent header styles are used accros file.

Also adjust other headers in file to fix
MD022 - Headers should be surrounded by blank lines
MD025 - Multiple top level headers in the same document

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1937abc0d29dc8a21a8eac54d0af2427ebf95bdc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/653
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>
2020-02-17 10:07:21 +00:00
Shuhei Matsumoto
39068b6b5c lib/iscsi: Fix a scan-build warning
1 warning generated.
  LIB libspdk_nvmf.a
iscsi_subsystem.c:1285:25: warning: Result of 'calloc' is converted to a pointer
of type 'struct spdk_iscsi_sess *', which is incompatible with sizeof operand type 'void *'
        g_spdk_iscsi.session = calloc(1, sizeof(void *) * g_spdk_iscsi.MaxSessions);
                               ^~~~~~    ~~~~~~~~~~~~~
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

Change-Id: Ieb8dcac8ec172405c5ca97a4867582ff9bfaa569
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/827
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
aefe3fe23c lib/iscsi: Remove dry run processing from portal config file parsing
Dry run processing in iscsi_parse_portal() now only checks if
portal string is not NULL. Portals are managed not by fixed size
array but linked list now. Hence dry run processing is not needed
itself now.

So remove the dry_run parameter from iscsi_parse_portal() and
the dry run loop in iscsi_parse_portal_grp().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7cb444b51581b8ee603388aad34bc58d1cc9023
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
16724dc135 lib/iscsi: Free session pool after all connections are exited
Global session pool had been freed immediately after starting
connection shutdown.  iSCSI connection shutdown is asynchronous.
It will be safe to free global session pool after completion of
all connections shutdown.  Hence move free(g_spdk_iscsi.session)
from spdk_iscsi_fini() to _iscsi_fini_dev_unreg().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4c16930a0e861a190115049cba3739ec01f0a8a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/494
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-02-17 10:06:47 +00:00
Shuhei Matsumoto
de5f1ea0ba lib/iscsi: Create and terminate poll group threads explicitly
Login acceptor still runs on one of the default reactor threads,
but we move iSCSI poll group from the default reactor threads to
dedicated threads created at startup.

At startup, use reference count to detect completion and
move to the next step. By returning completion message to the init
thread, we can avoid using any atomic operation.

At shutdown, we can use spdk_for_each_channel() conveniently. Put
voluntary spdk_thread_exit() calls into the callback to
spdk_put_io_channel().

Moving login acceptor to a dedicated thread is another task.

To maintain the original behavior, number of threads created is
the number of cores that SPDK app uses.

Change-Id: Ifd1de9343ac0183254ca608d1fd8faa94acc254e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/492
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-02-17 10:06:47 +00:00
Shuhei Matsumoto
7d26adb6c0 lib/iscsi: Move iscsi_parse_configuration() up in a file
This is a preparation to the next patch. We don't have to pass
iscsi_parse_configuration() as an argument of
initialize_iscsi_poll_group(). We can refer iscsi_parse_configuration()
directly in initialize_iscsi_poll_group() instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I96715399e68ebfa0d292c0b4591d271e975e1a04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/491
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-02-17 10:06:47 +00:00
Shuhei Matsumoto
239a407897 lib/iscsi: Send message to request logout to active connection
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI connection will be created or destroyed on
these threads. On the other hand, logout request to the active
connection will be still invoked by the default thread.

This unmatch will hit assertion such that poller is unregistered
different thread that registered it.

Fix this unmatch by sending message to the thread explicitly to
request logout and wait for the logout process to start.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iff361e78b9ba077230e38d9586f7187968e33314
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/490
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-02-17 10:06:47 +00:00
Shuhei Matsumoto
5adeda4807 lib/iscsi: Send message to add connection to poll group even at startup
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI configuration management will be done by
different thread from these poll group threads.

Hence send message explicitly to add connection to poll group even
at startup. We can do this for the current master branch.

Remove some code related with SPDK thread framework from unit tests
for iSCSI portal group because thread management is moved to
connection.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cacdb2066f65866f7ef83cf3b3e4e8b8cd322e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/489
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-02-17 10:06:47 +00:00
Alexey Marchuk
f8cbdf2c81 rdma: release incomplete requests during qpair desctruction
qpair might be deleted with incomplete requests (e.g. when NIC
is removed or when huge amount of qpair are being destroyed
simultaneously), this reduces the capacity of the transport
buffers pool. Check that qpair qd is nonzero and process
requests whose state is not FREE. Processing of requests
when qpair is being deleted leads to their release.

Change-Id: I0e42b5cb78f35add9f37942db77781db72c1e59c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/676
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-02-17 10:06:38 +00:00
Alexey Marchuk
33204a4354 nvme/tcp: Align local variables types
Some of variables have types which don't match their
usage in code

Change-Id: Ic2bd5fd6561c70143dde436ce9cddc0be4d3b0d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/521
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Alexey Marchuk
8c1859067f nvme: Move trid to "cold" spdk_nvme_ctrlr section
This field is not used in data path, so move it to "cold" data

Change-Id: I25f2fdb3aff613f9e16a2e13b2b06f8180a60fb2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/520
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Alexey Marchuk
c3ba9127d0 nvme: Store NVMEoF ioccsz and icdoff in ctrlr structure
This allows to avoid calculation of ioccsz bytes on each request
and removes access to "cold" ctrlr structures in data path.
Add UT to check validness of calculation

Change-Id: I55ceff99eb924156155e69a20f587a4f92b83f0b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Ben Walker
450d19d117 nvme/cuse: Don't allocate data buffers from CMB for cuse commands
These data buffers can't later be freed and need to be carefully
managed by the host. Also, this is very likely slower.

Change-Id: I0d205c0c7136e0aa972e927361bd88e765d218c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/784
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:20 +00:00
Ben Walker
5ac51a3214 nvme:Make ctrlr_alloc_cmb_io_buffer optional for transports
If the transport doesn't define one, don't call it.

Change-Id: I8b83132f9fc0accbd4faa8fa0fc17a6bd11e543e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/783
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:20 +00:00