Commit Graph

527 Commits

Author SHA1 Message Date
Seth Howell
f7a072db7d module/env_dpdk_rpc: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibd61bd61f309cee6f9663327a43e81f6d70c7921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2345
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
30e3f4d900 module/blobfs: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2c464bf5a2f220e6f0b8af36dd0dc3283a855df7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2344
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
fb32b6d402 module/blobfs_bdev: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I311e332c68ec91bde42721b222bd62641799c6b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2343
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
paul luse
8c1fd55583 lib/idxd: implement idxd back end for CRC
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib23c23f69d8f002023dd72be1b7369e50ac44fb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2105
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-15 08:12:13 +00:00
paul luse
db8fe014b7 lib/accel: Add CRC function
Add the CRC function at the framework level and implement the
software engine back end to use ISAL. The patch series will continue
to include an option for accel_perf to test CRC as well as IDXD
implementation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4eff3bbcf98c0bc2928a48272a57031c8b96394e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2072
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 08:12:13 +00:00
Richael Zhuang
4664d683cc sock/posix: enable pipe buffer on arm64
The pipe buffer gives about 19% randwrite and 56% randread
performance boost on arm64 from my test. We can also enable it on
arm64.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Iff4c6eaffb4ec5ae8fe02b35f72aed7f6b272bb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 08:11:36 +00:00
Vitaliy Mysak
257734a1e1 module/ocf: improve logging callback
Change OCF logger callback to
use spdk_vlog interface,
instead of manually deciding log level and
printing messages to a FILE.

This allows user to modify logging preferences
for OCF without modifying our OCF code.

Change-Id: Ibe526c97965acb9a5e9816446354e3a200d0cc31
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1947
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-15 08:10:39 +00:00
Seth Howell
9211c005e5 module/blob_bdev: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibc4ccc29fc254e26685d9d0fb2e004f73cd3c0cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2342
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 07:58:03 +00:00
Seth Howell
a5e56dd3f2 module/bdev_zone: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I20be68b52b1db7b3eb3476e965bc02454e7fc330
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2339
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
406d9482fa module/bdev_virtio: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3579bba5964f0f88f6660e707a4be8a6feb4efd4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2338
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
fb9bf9f65e module/bdev_uring: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I23d371170fcfe87864a041c37d9cc2053d3d5dc8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2337
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
db0df37d98 module/bdev_split: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I337ed5dd8ed4470645c02b4b5e519c28657c024c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2336
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
56623287a1 module/bdev_rpc: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I256b79b4519bd011e490d286383d97999d5f6434
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2335
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
289e0f5943 module/bdev_rbd: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie34606469aa78cd60dd949106d947cdf70c28f90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2334
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
fe5ba3033a module/raid_bdev: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8dd833800dbad6c0739ddd13fed546f8b01ec684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2333
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
f4653b8a74 module/bdev_pmem: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id8d492068f73682946ab2c3e96393916eb9bb28f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2332
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
941f14a95f module/bdev_passthru: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0ea51cc3dc7b56b40d02b2708a4840f7d6ab82c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2331
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
64807a1ab4 module/bdev_ocf: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4709877457aa1fc70687210a4d38e8965ba55e6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2330
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-15 07:58:03 +00:00
Seth Howell
b95421d48e module/bdev_nvme: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iad8b672463c80abe1f13efc486bed0f88bccef21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2329
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
d4f4fd45cf module/bdev_null: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib4887b503149f207ca7196c4369a4315fa50c001
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2328
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
f8acb89377 module/bdev_malloc: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id2505868480a021e719feea80efec83f1dbfc699
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2327
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
c93e560f7a module/bdev_lvol: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ica88901f201227f53900633983902a5367ce50c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2326
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
af44c224a6 module/bdev_iscsi: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifea75fb304ca33868a3bcc0b5224758c12d75e76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2325
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
1d2faf6d2b module/bdev_gpt: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibbe4a0fff51ca901aedaca62f424cb67a52100d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 07:58:03 +00:00
Seth Howell
f3eccec5c7 module/bdev_ftl: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9558d64ff1b3c2edbf3fa06dabf4d415b00fc4b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2323
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
ef78704f94 module/bdev_error: remove spdk prefix from static/internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7905e6d1d8e98bcefc347ebd6f094263c381a2c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2322
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
684cf6039a module/bdev_delay: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I99794cbe29a7f9b7ad0f1665269e70a48c05dac5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2321
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 07:58:03 +00:00
Seth Howell
e1e341ee74 module/bdev_crypto: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Icac29ac2fb9d8a3927a8aba017fdcd1ed087175d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2320
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 07:58:03 +00:00
Seth Howell
347499e732 module/bdev_compress: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7d3fd307a89592ed854e6d63852b895d44984644
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 07:58:03 +00:00
Seth Howell
0668d53b3b module/bdev_aio: remove spdk prefix from static functions
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I68a454a3473bc30b20b796d570267d0d84d06b06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2318
Community-CI: Mellanox Build Bot
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>
2020-05-15 07:58:03 +00:00
Ziye Yang
0662a0fbca posix: Disable zero copy feature if IP is configured on a loopback device.
Purpose: To disabled the zero copy support if IP is configured on a loopback
device.

To address issue: https://github.com/spdk/spdk/issues/1340

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia337f108851653c60d259328b6fefd4ba1e3d654
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2372
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-14 10:56:22 +00:00
Seth Howell
40a465bae4 module/bdev: add map files for all bdev modules.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I92ee0ee4fc381c2d92c6c15b88f7e2f839adf9f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2317
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
798551bf2a module/accel: remove spdk prefix from static functions in IOAT module.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I83026fbe8ae2dbdb159616cf98af4be1556a20ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2315
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
Seth Howell
57ce3d9dd6 module/accel: add a map file to IOAT module.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I46080ce0e9920eacf2a9d53dfb328e4dfc593319
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2314
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
Seth Howell
05cf9839fc module/accel: remove spdk prefix from static functions in IDXD module.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0eb95c89329b29c6bff8e71d5d599d522a4d4144
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2313
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
Seth Howell
63171bffeb module/accel: add map file for IDXD module.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2ff812f6c3cc53dc5babc5c31aa2ae828d2f0dba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2312
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
yidong0635
0881b1923a bdev/ocf: Remove clear_starting_indicator_vbdev fuction.
Put clear behavior of setting flags to funtion vbdev_ocf_mngt_exit.
No need to add an extra funtion any more, so remove it.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Icb5b569ada597b4896523c95ba19abae3f064f4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2384
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-13 07:46:36 +00:00
Seth Howell
cfb2463599 module/event: remove SPDK_LOG_NVMF from subsystem library
These two infologs we using the wrong log flag.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1e531a2c7922468d4ad849badd750e3acbede678
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2290
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-12 21:49:03 +00:00
Tomasz Zawadzki
d306693130 Revert "nvme/opal: deprecate spdk_opal_supported()"
This reverts commit 669985172f.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icadca660c1d245f53d3ce1812a811732df0bff0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2376
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-11 16:58:03 +00:00
yidong0635
cb3e674c1e ocf/vbdev_ocf: construct function vbdev_ocf_mngt_exit.
Put these exit behaviors into one function.
Make this more readable.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ifd7a74910847dffd3d8c6c6db61e6e1fc7a8d779
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2283
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:35:54 +00:00
Changpeng Liu
669985172f nvme/opal: deprecate spdk_opal_supported()
The spdk_opal_supported() is redundant with spdk_opal_dev_construct(),
because we only return the spdk_opal_dev structure when the drive
can support OPAL feature.

Change-Id: I2a8b70aa92828cf60d168dcf2985759e0eb9a6e3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2217
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:35:43 +00:00
paul luse
18a2fc606a module/idxd: factor out common code for queueing an operation
Prior to adding more operations, make this more efficient.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ief65d7b18de8c06263ed3cffb293f2824e2b86cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2070
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-07 10:41:44 +00:00
paul luse
fad052b0cb accel: add write_config json for accel modules
Add both the plumbing in the engine to call module entry
points if they exist as well as the json write config
for idxd (the only module with config info at this time).

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I91376d3fc60227cd79fae17b164722619eafb9e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2052
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:41:44 +00:00
paul luse
3044bd27d0 lib/accel: remove RPC for setting the module
This was added before the usage of having a SW engine and 2 HW
engines was fully thought out. The current rules are:

* if no HW engine specific enable RPC is sent, use SW
* if a HW engine specific enable RPC is sent, use it
* If a 2nd HW engine specific enable RPC is sent, ignore

In this scheme there's no need for an RPC that lets the user
choose which engine to use because they already do so when
they enable an engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I006ffb3b417f1e93bb061b29535d157ba66f03b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2033
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-07 10:41:44 +00:00
Ziye Yang
79215d80c1 sock/uring: use batched manner to get the cqes.
Purpose: This can improve the performance.

Change-Id: I3f5526ab8716cb0771b5e193afa9a0dbffec5cc0
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1929
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-06 12:43:33 +00:00
paul luse
2d097539dc accel: Add/update prints so user knows which engine is in use
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I046cdd485637a6373083f7a50624aa22abd5d934
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2028
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
paul luse
d5b059dedc accel: add new API to discover an engine's capabilities
This patch also implements the new API for the 3 existing engines.
There was also some minor clean in one file, moving a function to
eliminate multiple forward declarations (there would have been
another one with this new API).

The next patch will use this API in the accel perf tool.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4ebc9cb3d1c588919235b5080cbeec29189efa21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2025
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
paul luse
9da404699e module/crypto: zero in memory keys before freeing memory
For security.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I805d5d0c4584de0389316c00c1eaf43566fa2aea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2074
Reviewed-by: Seth Howell <seth.howell@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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-30 07:25:05 +00:00
Ziye Yang
f5d63dfa44 uring: Add the feature to cancel the active pollin task.
We should add the cancel task feature in uring if
sock is removed from the group.

This issue is detected after the group polling
feature is added in NVMe tcp initiatator side. Before
the patch, SPDK NVMe initiator side will not use
group polling feature. After the group polling
feature added in the iniatiator side, we should add this
patch.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I012b403a9f57a5a8ee96c83471b775f0d99b9eb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2049
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 07:24:56 +00:00
yidong0635
af039a7a99 bdev/ocf: Fix typo about vbdev_ocf_qctx.
Change vbdev_ocf_qcxt to vbdev_ocf_qctx.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ifdabb911d0ba5279b5ae4bc02a7b0873ba40ca36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2037
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-04-29 06:42:55 +00:00
Ziye Yang
15a415461c uring: Change the location of spdk_uring_sock_group_impl_remove_sock
Purpose: prepare for the next patch

Change-Id: Iae6a3d7a2c90a78c7dd1e510e718e4e1c07b3f32
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2048
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-29 06:40:44 +00:00
Ziye Yang
339e42ffdf uring: Add the sock into pending_recv list if there is data in pipe
Port the similiar code from posix sock module if a sock
is removed and added to a new group.

Change-Id: I306bed3c90f79ee06a363fbab02c776e756cda2f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2047
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-29 06:40:44 +00:00
Changpeng Liu
597a7d08b5 bdev/nvme: use g_nvme_bdev_ctrlrs as the poll group io device
IO device "bdev_nvme_poll_groups" is not unregistered in the finish
module, so we need to unregister this io device, since the "nvme_if"
is staic variable in bdev_nvme.c, it's can't be accessed in common.c
so we use "g_nvme_bdev_ctrlrs" instead.

Change-Id: Id4675f5acc8f386609903497da5ca84bf8af3a15
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2035
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-27 05:41:45 +00:00
Seth Howell
2d18104489 module/bdev_nvme: Add basic poll group implementation.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4b4682f84449af7c2a6fa1aaf29d190d241ce823
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/634
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-24 16:36:03 +00:00
Ziye Yang
94345a0a1a nvme: Add the priority field in struct spdk_nvme_transport_id
Purpose: To set the priority of the NVMe-oF connection especially
for TCP connection.

For example, the previous example can be:

trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420

With the change, it could be:

trtype:TCP adrfam:IPv4 traddr:10.67.110.181 trsvcid:4420 priority:2

The priority is optional. We try to change
spdk_nvme_transport_id but not in spdk_nvme_ctrlr_opts since
the opts in spdk_nvme_ctrlr_opts will reflect in every nvme ctrlr,
this is short of flexibility.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I1ba364c714a95f2dbeab2b3fcc832b0222b48a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1875
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-04-24 15:53:34 +00:00
Ziye Yang
b9a7313e2e sock: Add spdk sock opts related three functions.
Purpose: This is used to make users can specify
some options on the socket, e.g., the different priority for the socket.

While creating sockets, the priority needs to be set before connect()
and listen system calls, so better to add one parameter in spdk_sock_opts
which can contain options (e.g., priority) in spdk_sock_listen_ext and
spdk_sock_connect_ext functions.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I406238e9da7abd69f937b7072535a19124ed0169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1874
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-04-24 15:53:34 +00:00
Tomasz Zawadzki
b31b4229a7 lvol: remove lvol_task structure
Last and only usage of struct lvol_task was removed in
previous patch.

Since it is no longer used, remove the structure itself.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3612106de2ab3a9197245de078c73c53beeff443
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1971
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-24 15:45:21 +00:00
Tomasz Zawadzki
4e4c293b9a lvol: do not use task->status
There is no point in setting this value on submission
and changing it on callback.
Since it is based on blob bserrno.

lvol_task is removed in next patch.

This change was motivated by lvol_op_comp() accessing
the task->status pointer on hot path for I/O.
There is no need to do so, so just pass status.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I17461fcf355f771f4de4e6d5ec1900d5042bd3d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1804
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-24 15:45:21 +00:00
Seth Howell
2a6a491250 bdev/nvme: add an assert for nvme_bdev_ctrlr when populating namespaces.
This is always going to be true because of the
context we are in when calling this function, but
add an assert just to be safe.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifbd075865a191529eb9e656c360f182dba8a85bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1985
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-24 07:07:43 +00:00
Seth Howell
2e69975fab lib/event: add asserts that reactors aren't NULL.
In practice, the reactor pointers will never be NULL
in these cases, but some static analysis tools don't
realize that.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0657959e5572df2741398b179907f2bbf0b02b3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1984
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>
Community-CI: Mellanox Build Bot
2020-04-24 07:07:43 +00:00
Tomasz Zawadzki
ef6ffb39d6 lib/cuse: provide proper error codes up to RPC
This patch adjusts several return codes to provide
more than just -1.

Along with fix to json rpc error print,
where negative error code was passed to spdk_strerror().
Resulting in unkown error being reported.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I254f6d716d0ce587f88cc658163ba049378f3b2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1915
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 20:29:46 +00:00
Tomasz Zawadzki
e396d97db0 nvme/cuse: get functions for cuse ctrlr/ns names to accept a buffer
This was changed to better facilitate thread safety.
In next patch a lock will be held when going over the
cuse devices list.

Now user is expected to pass a buffer of a sufficient size
that will be filled with ctrlr or ns cuse device name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3202ef285e427111e3595389619463fda58dbef6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1978
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-04-23 20:29:46 +00:00
Tomasz Zawadzki
d9a11fd5b1 cuse: fix nvme_cuse unregister segfault
Unregistering nvme_cuse when the device did not exist
resulted in SEGFAULT within nvme_io_msg_ctrlr_unregister().

To prevent that, when no nvme_cuse is registered for the
ctrlr do not unregister nvme_io_msg_producer.

RPC and spdk_nvme_cuse_unregister() now return an error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id77cebe23ff91023a24cfe091f5f62a76a9175fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1921
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-04-23 20:29:46 +00:00
paul luse
5b03dd938c module/idxd: accel framework plug-in for idxd
Docs, RPC, unit tests, etc., will follow.  Notes:

* The current implementation will only work with VFIO.

* The current implementation supports only the existing accel
framework API. The API will be expanded for DSA exclusive features
in a subsequent patch.

* SW is required to manage flow control, to not over-run the work queues.
This is provided in the accel plug-in module. The upper layers use public
API to manage this.

* As we need to support any number of channels (we can't limit ourselves
to the number of work queues) we need to dynamically size/resize our
per channel descriptor rings based on the number of current channels. This
is done from upper layers via public API into the lib.

* As channels are created, the total number of work queue slots is divided
across the channels evenly.  Same thing when they are destroyed, remaining
channels will see the ring sizes increase. This is done from upper layers
via public API into the lib.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifaa39935107206a2d990cec992854675e5502057
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1722
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 15:48:32 +00:00
Liang Yan
6a29c6a906 bdev/rbd: add ceph rbd resize function.
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Change-Id: Id7f24f1f5e0789ee6d4c07ae7f59cc2d98983e98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1766
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 07:28:10 +00:00
Seth Howell
844e460277 lib/event: add subsystem iterator functions.
This allows us to hide the implementations of
g_subsystems and s_subsystems_deps within the
libraries themselves.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I60716b9465b58d6cdb3a43262a7ded844bd80eda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1786
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-22 09:21:55 +00:00
Seth Howell
d02d16ffdf lib/event: remove list arg from spdk_subsystem_find
This is part of a larger effort to remove the g_subsystems and
g_subsystems_deps variables from the spdk_event map file. The
implementation of those variables should be internal to the
library.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3c2c04933859c6c484a903e666df10f810b26709
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1785
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-22 09:21:55 +00:00
Seth Howell
749c917fc1 lib/event: add map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I50b64e93114d7979aec809e8fb224b24b79e6317
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1710
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-22 09:21:55 +00:00
Seth Howell
6569a0ea06 lib/blobfs: add a map file.
Also, increment the library version since some non-public symbols have been removed.

Please note, SPDK_LOG_BLOBFS is included in the map file because it is used by the
blobfs_bdev module.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib05c0b6630951d97b1a5b2931746471eeb9d9630
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1702
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-22 09:21:55 +00:00
Seth Howell
d8343f9496 module/bdev_nvme: Fix some unreachable code.
All of the error cases for spdk_nvme_transport_id_parse_trtype
were covered earlier, so just make this an assert.

fix kw warning 12653.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If0eea934764b35d097887b98b0441ae5d7dd3e4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1953
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-22 09:21:04 +00:00
Seth Howell
9f50e7c244 lib/nvmf: remove some unreachable code.
With the advent of custom transports, it is impossible
for this call to fail.

fix kw warning #12653

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib1f9d0992e2def9eafd8696310b6c79ab6ac8c78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1952
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-22 09:21:04 +00:00
Seth Howell
aa0dad5730 module/delay_bdev: remove unreachable code.
Fixing kw warning 10412.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I947af63e091f56b772db886b2a126dfa3b78ffa4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1949
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-22 09:21:04 +00:00
Ziye Yang
8ad1f4bfa8 lib/sock: remove spdk_sock_set_priority
Since the related feature is already contained in
spdk_sock_listen and spdk_sock_connect functions,
we no longer need this function.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1eafff0d139fa266a355fbee2bf0fc3947db69fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1876
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-04-22 09:19:01 +00:00
Maciej Szwed
cd4b7a11ad rpc/thread: Add thread id to thread_get_pollers RPC output
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Icdeb61cefbf9df5d3f653af5b3222808fe55ce7e

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1909
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-22 09:17:14 +00:00
Ziye Yang
11e25ed27e uring: Add the Internally buffer reads support
Do large reads from the socket and buffer into a pipe.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ibce74917a1cd7248ff1a325204c0d338cc6a3470
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1349
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-20 07:25:36 +00:00
Vitaliy Mysak
d7a3a052ab ocf: update ocf submodule to v20.3
New OCF version is ready, so update our submodule.
There were a lot of API changes so
we need to adjust our bdev/ocf and lib/ocf_env code.

Description of code changes:
- env: added small functions like ENV_BUILD_BUG_ON, env_vzalloc_flags
- env: added "destroy" method for all locks
- env: added "execution context" interface
- cache/core "id" field made private
- signature of "ocf_io_configure" changed
- "io->volume" field made private

List of changes to OCF is available at
https://github.com/Open-CAS/ocf/releases
But no new features were implemented for our
OCF module since 19.6

Change-Id: I1ac2b6db0aad2a9840e4fa73d65608c5638fcb23
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1801
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-17 07:32:48 +00:00
Seth Howell
4021f34520 test/make: fix the confirm_abi_deps test.
I reversed the arguments to abidiff when I first submitted
this test which was causing additions to be reported as removals
and vice versa.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iac50243f7cda7c1f9c2302af13a34eca844e0689
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1705
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-15 22:10:08 +00:00
Shuhei Matsumoto
ab0bc5c254 lib/thread: Use function name as poller name by using macro SPDK_POLLER_REGISTER
We will be create fine name for each poller but it will need large
effort. Replacing spdk_poller_register by the macro SPDK_POLLER_REGISTER
will provide better name than function address with minimum effort.

Following patches may improve function name for clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If862a274c5879065c3f7cb04dcb5ca7844523e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1781
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Community-CI: Broadcom CI
2020-04-15 07:23:09 +00:00
Shuhei Matsumoto
29252a483b bdev/compress: Cache use the original I/O thread into a variable and use it
Cache the return value of spdk_io_channel_get_thread() to orig_thread
and use it in the function. This will clarify the logic and improve
readability a little by reducing line length. Besides, in
vbdev_compress_submit_request(), spdk_io_channel_get_thread() can be
replaced by spdk_get_thread() and do the replacement in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0fadb5dae9b78ecade99c5deb650849bf6257ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-14 11:35:44 +00:00
Shuhei Matsumoto
85724ba270 bdev/compress: Ensure put_io_channel() on the correct thread for vbdev_reduce_load_cb()
Previously only bdev_close() had been ensured to execute on the
correct thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie3019bd1206060a86ec3c598795255c4c4357b0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1696
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
2020-04-14 11:35:44 +00:00
Shuhei Matsumoto
31d260156e bdev/compress: Ensure bdev_close and related operations on the correct thread for vbdev_compress_destruct_cb()
Not only bdev_close() but also TAILQ_REMOVE and bdev_module_release_bdev()
are better to be executed on the correct thread for
vbdev_compress_destruct_cb().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0810ecc4149747315e6ec290437ba40fb4b71686
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1694
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-14 11:35:44 +00:00
Shuhei Matsumoto
137684a820 bdev/compress: Ensure release I/O channel on the correct thread at vbdev_reduce_init_cb()
vbdev_reduce_init_cb() had ensured only closing bdev was done on
the correct thread. I/O channel should have been released on the
same thread.

Fix this potential issue. reduce_errno and vol cannot be passed
through message because message can have a single parameter.
So set vol before sending message and use vol as reduce_errno.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I923a9e3148db0f5413a6903d62f869eec122dcca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1693
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-14 11:35:44 +00:00
Shuhei Matsumoto
e65e798b34 bdev/compress: Refactor _compress_operation() about mbuf allocation
Factor out setup source and destination mbufs operation from
_comppress_operation() into a helper function _setup_compress_mbufs().

Setup source mbufs and setup destination mbufs are identical except
for total_length, and so this refactorinng is possible.

This refactoring will improve readability and clarify the logic
a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0a230c2d5e74aec917580aae969b49266178191
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1683
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-14 11:35:44 +00:00
Ben Walker
f76cf58294 bdev/iscsi: Release request after connection is done
This request was getting leaked previously.

Change-Id: I6e7dc24c92d7bae7a8df54025d61eb391a569df9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1591
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-14 11:32:35 +00:00
Ben Walker
50529593c4 bdev/iscsi: Release lun poller on correct thread.
If thread A is the first to grab a channel, the poller will be on thread
A. But then if the shutdown happens such that thread B is the final
channel to release it's channel, it will attempt to free the lun poller
from thread B and crash.

Change-Id: I354f9f28d55e5e82cb6c737c734acadbd80e283d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1590
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-14 11:32:35 +00:00
Vitaliy Mysak
9f133b1bcc module/ocf: check cache name during recovery from metadata
Save cache device name in metadata section to
check if names agree during auto creation on examine.

This change prevents accidental creation of ocf devices.

Consider example in which vbdev_split is used as cache:
1) bdev_malloc_create -b Malloc0 ...
2) bdev_malloc_create -b Malloc1 ...
3) bdev_nvme_attach_controller -b nvme ...
4) bdev_split_create nvme 2
5) bdev_ocf_create ocf0 wt nvmen1p0 Malloc0
6) bdev_ocf_create ocf1 wt nvmen1p1 Malloc1
7) *shutdown*
8) *startup*
9) bdev_nvme_attach_controller -b nvme
Now ocf0 bdev gets created with cache = nvmen1 (not nvmen1p0)!

This is because nvmen1 and nvmen1p0 have the same metadata.
The result is rather unexpected,
so we would like to verify that cache device
is the one used during creation.
Name is not an ideal way to verify that,
but it should work for most cases.

This change is related to issue #1320

Change-Id: I19ce97163090c5c5b3324eaed90b3134011bb3fb
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1544
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-10 07:08:50 +00:00
Shuhei Matsumoto
99e4374f8d lib/thread: Add busy count for poller to increment only when some work was done
Currently run count of poller has been incremented per execution.
It will be helpful for us to know how poller is busy by adding busy
count which is incremented only when some work is done.

spdk_thread_poll() has used the same timestamp in it, and so this is
the maximum we can do for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0adfbf9a62c959499978124ecc97d377c96c3769
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1713
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>
2020-04-09 13:44:14 +00:00
Ziye Yang
71fc81620f posix: Add the socket into pending_recv list if migrated from another polling group.
When the socket is migrated from one polling group to another
(e.g., iSCSI target example), we should add it into pending_recv_list

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I56d34000344ae452a25b82952c831f09e0266d66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1448
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-08 06:43:56 +00:00
Shuhei Matsumoto
78accbf4e5 lib/event: Count reactor CPU stats (idle/busy tsc)
Following the idea of thread CPU stats, add reactor CPU stats.

Reactor CPU stats accumulates run time of spdk_thread_poll() calls
to idle TSC or busy TSC according to their return codes.

Add necessary unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1a1391e79d74387c68f1651a61c8900e4c6faf66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1501
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: Ben Walker <benjamin.walker@intel.com>
2020-04-08 06:43:05 +00:00
Ben Walker
1621809e7e nvmf/tcp: Correctly size the socket receive buffer
The code used to do this but it was removed when the buffering was
shifted down to the posix layer. Add a way for users of sockets
to still properly size the buffers.

This also means that by default, the receive buffering is not enabled
on sockets. That matches the behavior of the previous release.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I20ce875be2efd841fe3a900047b4655a317d7799
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1560
Community-CI: Broadcom CI
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-04-08 06:42:55 +00:00
Seth Howell
302ae5cc5c bdev_nvme: don't register multiple ctrlr destruct pollers.
This change is aimed at fixing github issue #1312 where we are
apparently calling the nvme_bdev_ctrlr_destruct function more than
once.

In the previous implementation, if a controller was resetting for more than
one iteration of the poller, a second iteration of the poller would get
registered.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ica01ecb21d76ea4f60624efd780bf4eea957c277
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1611
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-06 07:48:13 +00:00
Shuhei Matsumoto
d5a0220ed1 bdev/compress: Cleanup vbdev_reduce_load_cb() by code reordering
Reorder vbdev_redoce_load_cb() so that normal case comes first,
orphaned case comes second, and other error cases come at last.

This will simplify the code and improve readability a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieb79364f0b3996600e8ff7ec340101877527cac2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1477
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
99e6fe4102 bdev/compress: Fix error paths in vbdev_reduce_load_cb()
Error paths were not implemented correctly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I419338a717209b6bb1de3979a9b53dc7f076276a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1470
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
3934784dbc bdev/compress: A few cleanups for vbdev_compress_claim()
Move queue insertion to the end to avoid removal in error cases.

spdk_bdev_module_examine_done() is duplicated with the caller in
error cases and so remove it.

I/O channel is not got in this function and so remove
spdk_put_io_channel() in error cases.

move up spdk_bdev_close() to call at error_bdev_register or
error_claim label.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I34a1459dcb0d3e0a2018f5b50db5be3ac44b6049
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1469
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
82b8dd90d8 bdev/compress: A few cleanups for create/delete I/O channel callback
In comp_bdev_ch_create_cb(), list head comp_bdev->pending_comp_ios and
comp_bdev->queued_comp_ops should be initialized only when
comp_bdev->ch_count is 0. Besides, extra brackets for if condition
can be removed.

In _comp_bdev_ch_destroy_cb(), comp_bdev->ch_count is not necessary
to check if it is 0 again.

Fix these.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I71786423a77819c41419c51a4cfcad71b85a0b39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1444
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
6a98b18fb2 bdev/compress: Fix base channel is freed by wrong thread when freeing comp channel
When reduce volume is unloaded at compress bdev removal, the callback
to unload did not get base bdev's I/O channel on the same thread
that opened base bdev.

Hence spdk_put_io_channel() hit assert later.

This patch fixes the bug by sending message to get I/O channel.

Fixes issue #1307.

Besides, add assert to _delete_vol_unload_cb() to detect the unexpected
complex cases. Fix will be added later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If4983c2e06d7b0b7618f38fb80f3aa73effe4b83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1426
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: Paul Luse <paul.e.luse@intel.com>
2020-04-03 06:31:10 +00:00
Shuhei Matsumoto
fcf8e4543d bdev/compress: Ensure callback to bdev_compress_delete() runs on the original thread
Introduce context structure to ensure the callback function to
bdev_compress_delete() runs on the original thread.

The time to free comp_bdev and the time to call the callback function
to bdev_compress_delete() are different. Hence it is necessary to
allocate context separately.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I534f5673b58d2a0321ee752534c3ea10fb37b11d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1472
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-03 06:31:10 +00:00
Changpeng Liu
ebb01092a3 nvme/opal: use secure erase API again
Commit 8c1d107 added a new erase API and renamed the original
API with "secure_" prefix according to the specification, as the
secure one will not cryptographically erase user data, due to
the limitation from the drive, only the secure API can be
supported, so changing the caller to use the original again.

Change-Id: I25cb054e728065d9ae9c6c30aa0ab374d60cf6f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1519
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-04-01 01:08:39 +00:00
Ziye Yang
cbe6e0f7cd posix: Fix the ASAN issue whiling using internal buffer.
Fixes #1314

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I096dcba3d5eea91e79680ce64e894e7f10028ad3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1459
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-31 07:59:26 +00:00
Ziye Yang
3f73038e25 posix: Fix the pendinging_recv flag setting.
The statement in line 1199 is may not be correct:
Actually, it should be following two cases
to pendinging_recv into false;
1  posck->recv_pipe == NULL

2 psock->recv_pipe != NULL  & avalable_bytes == 0;

So this patch can fix this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie612f781b0848e1f0ab1b48dc8c45e39862b772a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1446
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-31 07:58:34 +00:00