Commit Graph

14305 Commits

Author SHA1 Message Date
Michal Berger
45c42ac2f2 scripts: Use core dump collector
This is done in order to track core dumps in a more efficient
manner. Till now, some cores could be missed if the binary was
executed outside of the cwd of the autotest (i.e. outside of
the spdk repo) but which was part of the critical path of the
actual test (e.g. fio in vhost-initiator tests). Also, since
core_pattern was set to plain "core", impact on the underlying
storage wasn't controlled either - if core was 20G in size,
this is what we would get. This could easly exhaust storage in
case error-prone patchsets were submitted on the CI side.

The collector will try to mitigate all the above by doing the
following:

  - collecting all the cores, regardless of their cwd
  - limiting size of the core to 2G
  - compressing the cores (lz4)

Also, limit of 2 collectors executing at once is set - if more
processes crashes at approx. the same time, they will be logged
in the kernel log instead.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5956a9030c463ae85a21bfe95f28af5568c5c285
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5369
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.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>
2021-01-06 00:01:05 +00:00
Jim Harris
d82118485d nvmf: suppress error message for invalid nsid
Use a DEBUGLOG instead of ERRLOG when nvmf target
receives a command for an invalid nsid.  This condition
can happen when namespaces are removed while I/O is
in progress, so we don't want to create lots of error
messages when that happens.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5766
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-06 00:00:54 +00:00
Naresh Gottumukkala
e84cf46f38 nvmf/fc: Delete FC LS pending requests.
As part of IT delete make sure to delete any pending LS requests
for that remote port.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic3c60ab40bcf54d56ac57bcde84b85acfc5cf3f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5712
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: Jim Harris <james.r.harris@intel.com>
2021-01-05 22:36:46 +00:00
Naresh Gottumukkala
1b011d5d44 nvmf/fc: Add FC LLD specific fc_port.
Add FC LLD specific port placeholder in spdk_nvmf_fc_port.
As part of SPDK_FC_HW_PORT_INIT admin API, Let the LLD know about
the new fc_port.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ib9300176d294642a1825577a31ad999590f5f29d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5711
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: Jim Harris <james.r.harris@intel.com>
2021-01-05 22:36:46 +00:00
Naresh Gottumukkala
41f8789ce4 nvmf/fc: Check if qpair is already disconnecting.
Dont call spdk_nvmf_qpair_disconnect if qpair is already
disconnecting.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ie7032507775b6abdd178b534a636c5338ecc7d87
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5710
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: Jim Harris <james.r.harris@intel.com>
2021-01-05 22:36:46 +00:00
Naresh Gottumukkala
34cb6a1578 nvmf/fc: Validate connection and QPair state.
When ever command is recieved, validate connection and qpair state
before accepting the command.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I4636b98ab24de9be0fa7fd727c8b80f16922eb2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5709
Community-CI: Broadcom CI
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>
2021-01-05 22:36:46 +00:00
Naresh Gottumukkala
e89d9af092 nvmf/fc: Cleanup FC qpair_fini code.
As NVMF qpair maps to a FC level connection, Ideally a qpair fini
should cleanup fc level connection irrespective of what type of qpair
it is i.e admin or IO. But today IO qpair cleanup is actually a dummy.

Also FC nvmf_transport_qpair_fini is just triggering fc level connection
cleanup but not properly synchronized. Use latest async nature of
nvmf_transport_qpair_fini enhancements to fix this.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I883ed774769e2d4a2575b6d90bb3348981cd1e0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5700
Community-CI: Broadcom CI
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>
2021-01-05 22:36:46 +00:00
Naresh Gottumukkala
b50c6bc2d9 nvmf/fc: Use connection list hash table.
Currently we are iterating over a hwqp connection list for every
IO command received. With high load of connections, this is causing
penalty. Use hash table for connection lookup based on connection ID
and also RPI identifier.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I857e299722a0b72b25b0dbfe646d446ad98b7c76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5688
Community-CI: Broadcom CI
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>
2021-01-05 22:36:46 +00:00
Shuhei Matsumoto
7c9a81a2b6 bdev/nvme: Inline detach_bdev_from_ns() and attach_bdev_to_ns()
Object structure will be different after introducing subsystem.
Let's inline nvme_bdev_attach_bdev_to_ns() and
nvme_bdev_detach_bdev_from_ns() as a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I93fd43db231780b9e86ebaec1a9fb40f8511dab9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5756
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>
2021-01-05 09:43:09 +00:00
Shuhei Matsumoto
060495b140 bdev/nvme: Factor out decrementing ref. count of nvme_bdev_ns
Factor out the common operation of nvme_ctrlr_depopulate_namespace_done()
and nvme_bdev_attach_bdev_to_ns() into a helper function nvme_bdev_ns_detach().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8efa8bc2c2d455d0fd9e0865ff85fd265d14ee06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5613
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-05 09:43:09 +00:00
Shuhei Matsumoto
723d9443f9 bdev/nvme: Separate ref. count between nvme_bdev_ctrlr and nvme_bdev_ns
Separate reference count of nvme_bdev_ctrlr between nvme_bdev_ctrlr
and nvme_bdev_ns.

Set ctrlr->ref to 1 when creating ctrlr, increment ctrlr->ref when
populating ns, decrement ctrlr->ref when destructing ctrlr or
when ns->ref becomes 0, and destruct ctrlr actually when ctrlr->ref is 0.

Set ns->ref to 1 when populating ns, increment ns->ref when
adding bdev to ns, decrement ns->ref when depopulating ns or removing
bdev from ns, and decrement ns->ctrlr->ref when ns->ref becomes 0.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7810384d97a174d8f55d316e5cdf2a9ef4a11432
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5608
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-05 09:43:09 +00:00
Shuhei Matsumoto
528cec83fb bdev/nvme: Merge decrementing ref. count into nvme_bdev_ctrlr_destruct()
For further simplification, merge decrementing reference count of
nvme_bdev_ctrlr into nvme_bdev_ctrlr_destruct().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I604039c3f38a60b316ae465d4649e9eb11bfb6cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5573
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-05 09:43:09 +00:00
Shuhei Matsumoto
2caff467ea bdev/nvme: Remove destruct_poller and process deferred destruct request after completing reset
destruct_poller had been used to destruct ctrlr after completing reset, but
we can remove destruct_poller and change reset processing to destruct ctrlr
after its completion by itself.

spdk_io_device_unregister() may fail spdk_for_each_channel(). Hence call
nvme_bdev_ctrlr_do_destruct() as the completion function of spdk_for_each_channel().

The first idea was to always run destruct_poller at nvme_bdev_ctrlr_destruct(),
but this patch will be simpler and more intuitive.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I43a400bdb67ab015d707fb9679693bd3d5bfb070
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5607
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-05 09:43:09 +00:00
ShadowMov
d2b0b15406 lib/iscsi: fix op_logout rsph->response judgement
According to iSCSI 7143 spec 11.15.1 (3720 spec 10.15.1),
Rsph->response should be 0 if connection or session closed successfully.

The current code mistakenly compared cid provided by initiator with
inner conn->id parameter, which does not follow the spec.

Change-Id: I12dbb3471be5d49380c6b65bcdb67c57df11665f
Signed-off-by: ShadowMov <jinnian.hjn@alibaba-inc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5731
Reviewed-by: Ziye Yang <ziye.yang@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-05 09:38:23 +00:00
Michal Berger
ab27b2c4d2 pkgdep/git: Use .x branch for the 20.01 LTS ref build
This is done in order to workaround currently existing issues with
building spdk_abi_lts on systems with newer versions of the compiler.

Change-Id: I514580308f2cfbbffa13a821dcf72fc9fb60cd73
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5716
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-05 09:38:15 +00:00
Maciej Wawryk
e7fb0e9a8a scripts/nvmf: Add scheduler_setting option in NVMe-oF performance scripts
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1933b1c3026c86b55c3e2b712bff02fa8f711bc7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5446
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-05 09:38:00 +00:00
Maciej Wawryk
da5c9b328a scripts/nvmf: enable zcopy on target side
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I5fb99ebf57e7989f23d877798feddddd70179d4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5297
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-05 09:38:00 +00:00
Maciej Wawryk
05c573be5d test: remove spdk/nvme-cli references
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8b7777a89491b45ba785629679a34e0aa22f7e61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5543
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-04 16:28:01 +00:00
Maciej Wawryk
b36f099937 test/common: Remove unused nvme_cli_build function
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I5226c58f9993e0d1d8665ac75930ea952e474f05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5542
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-01-04 16:28:01 +00:00
Maciej Wawryk
24ad09ba2f test: Replace spdk/nvmecli with stock nvmecli
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I00998ce36b46902687065c5fa4684da9b7dd26d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5541
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-01-04 16:28:01 +00:00
Ziye Yang
42580f7e15 lib/nbd: Set the O_NONBLOCK flag for kernel_sp_fd
Change-Id: I656be9023d7e0ccd86d1c8fbac3e2848ce61a772
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5733
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-31 08:29:05 +00:00
Ziye Yang
a1d4a714b2 lib/nbd: merge read_from_socket/write_to_socket into nbd_sock_rw
Purpose:

1 Remove duplicated code.
2 Add one error return check.

Change-Id: I8d2517e120818482b9bdf56e02cd901363b79aee
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5732
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-31 08:29:05 +00:00
Ziye Yang
d2704a0f48 lib/nbd: Fix the nbd_cleanup_io logic
1 For nbd_io in received list, we should not call nbd_put_io directly.
We should still let those I/O be executed by the lower bdev layer in SPDK.

2 For nbd io in executed_io_list, we should not directly put the nbd device.
The correct way is that we should write the io response to the kernel NBD
device. Then the nbd device will not hang.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic031ca23241dd77ef47e6ac21f6c346e67f3ce28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5720
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-31 08:29:05 +00:00
Alexey Marchuk
6ea36f46c4 nvme: Update CQ error logging
Current version provides unclear output

Change-Id: Ib044b00b5f91b1e363911f1b79c51c73c8a6920c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5743
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-31 08:28:32 +00:00
Alexey Marchuk
0bee1bb67b nvmf: Fix search for request to abort
Transport specific request to abort is never null,
if we don't find a request by cid then we will abort the
last request.

Change-Id: Ie9eb55822b47381ae254e19266b9f3ffadbb67ea
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5196
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-31 08:28:32 +00:00
Jim Harris
959cfa0fd5 event: add "A" to SPDK_APP_GETOPT_STRING
-A is equivalent to --pci-allowed, which recently
replaced -W/--pci-whitelist.  But we missed adding
"A" to SPDK_APP_GETOPT_STRING, so -A was not actually
working.

Note that bdevperf was using -A to specify that timed
out I/O should be aborted. This patch changes it to
-X to avoid a conflict. It appears that something
broke with this option earlier this year though,
setting it has no actual effect. This should be
investigated separately from this patch.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5645
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-31 08:28:08 +00:00
Tomasz Zawadzki
62f81a9e7d lib/rdma: remove ERRLOG for handling of split memory regions
Originally introduced in:
"(8126509) rdma: replace improperly aligned buffers in requests."

This behaviour is for handling buffer split over two memory regions.
It is not unique to specific DPDK versions.
As such the comment and ERRLOG is not relevant here.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I31bec435d92d8271d4a040855cfc4ff97f3d9d50
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5345
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-30 07:53:27 +00:00
GangCao
b52b0204a0 Doc/Blob: fix a typo in the document
Change-Id: I2b69c131554895a1929844590053e319ce082a57
Reported-by: HuangYan <mphyatyh@yeah.net>
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5718
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-30 07:52:19 +00:00
Ziye Yang
9472eecbdb blob: Make the ABI compatibility of spdk_blob_open_opts structure.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I8627347f44f0a9cb4b50f41ac5effae18b427c6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5701
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-29 07:55:22 +00:00
Ziye Yang
b47f0f20b7 blob: Make the ABI compatibility of spdk_blob_opts structure.
Change-Id: I1b1806864783e944d8f55c9393228a1954051236
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5687
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-29 07:55:22 +00:00
Ziye Yang
3de9887d6d blob: Make the ABI compatibility for spdk_bs_opts
The purpose of this patch is to make spdk_bs_opts
for compatiblity issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I26d2a6bc644feede64d48890c7903f224b1fc306
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5681
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-29 07:55:22 +00:00
Ziye Yang
304fde153b nvmf/tcp: remove nvmf_tcp_pdu_cmd_complete
This function can be removed if we change the parameter type
in nvmf_tcp_request_free.

Change-Id: I4dbf0e7fa79c8c0115d7bcae99cb241aec367f1a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5702
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-29 07:54:43 +00:00
Ziye Yang
f420b9ef0a bdev: Make the small and large buffer pool configurable.
This patch includes the following work:

1 Add two fields in spdk_bdev_opts structure and make the
two fields configurable.
2 Update the unit test in bdev_ut.c
3 Revise the set_bdev_options rpc call and add the support
to use the two new fields.

Change-Id: Idd6073b3a3ffaba8161e3ffa9444a9e533e67f6d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5664
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 14:05:34 +00:00
Ziye Yang
590b6e7507 nbd: Use async manner to stop nbd device.
Purpose: In order to free all the allocated resources.

Our current code uses sync behaviour, and it will not wait for all
the resources are freed if there is active I/Os, and thus we will
not free some resources, e.g., some fds will not be closed.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iaf9a606da2049ffd0096860c46d89d094038a5ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5601
Community-CI: Broadcom CI
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: Sun Zhenyuan <sunzhenyuan@baidu.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2020-12-28 14:05:15 +00:00
Ziye Yang
ac74de2fe9 nvmf/rdma: Correct the comments for handling requsts waiting for the buffer
The code changes, and this is not the second priority.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I08fdac561f2d3f902763c39c37455727aa529b9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5663
Community-CI: Broadcom CI
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>
2020-12-28 14:04:55 +00:00
Jacek Kalwas
9a1cf1c594 nvmf: make transport service id optional
There are transport types like vfio-user or fc for which this field is
optional so there is no need to explicitly specify it for the add
listener rpc. Still validation of this filed is preserved for rdma and
tcp transport.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I6aef55bed45b3653472fd356e5a7cfead22c6f2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5605
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-28 14:04:39 +00:00
Ziye Yang
e6f73c8045 lib/event: Remove the non-used "FIELD_CHECK" statement.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idd9a14bd5adad68c46e8e50e65fa539185a8cd1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5680
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:58:50 +00:00
paul luse
8da995c4fb examples/accel_perf: move a code block in prep for upcoming patches
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic3b611469091fe1a1a57f51c412dc84212666c54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5490
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 13:55:54 +00:00
paul luse
cdefd3d3f8 examples/accel_perf: move some code around in prep for batching
First in a series of patches to change how batching is implemented.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iaee780cd948beee66a37528fdad6fc6841ea642b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5486
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 13:55:54 +00:00
Jacek Kalwas
2e26faa975 nvmf: add notifications about ns to the transport
It is optional to register i.e. most transports will not need to take
any action. It allows additional verification of ns/bdev capabilities
on transport layer before actual attachment to the subsystem.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I07d96b1d33c2d5433b951cb418ae1a89bf9caea5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5666
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:52:45 +00:00
Jacek Kalwas
3bb303d9e6 nvmf: use util to rm all registrants
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I5352b64ee1dfcca874563398aa49409e6805895e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5671
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:52:45 +00:00
Jacek Kalwas
8162070997 nvmf: change listen associate description
It is not `only a notification` as by return value association can be
blocked.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I19800bc8e278a335aaee972eecca7b3c7e3ac7e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5670
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:52:45 +00:00
Sochin Jiang
3790a412b8 lib/blob: try best to merge the contiguous clusters
blob_persist_clear_clusters() issues 'unmap' or 'write_zeroes'
IOs in one batch, this can consumes lots of 'bdev_io's.
we need to try best to merge the contiguous clusters
especially in the following case:

cluster 0: LBA 128 (count = 128)
cluster 1: LBA 0 (meaning thin provisioned, no cluster allocated)
cluster 2: LBA 256 (count = 128)

Besides, in the long run, we may need to do this batch by sequence.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I436c8b46a1ee33ec127d0f43fd85b2c443689b59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4082
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-28 13:39:56 +00:00
Jacek Kalwas
18274baf87 Revert "nvmf: allow transport specific options within subsystem"
This reverts commit 6d87bc7a8a.

There is an issue with the desing here i.e. lifetime of the subsystem
opts shall be associated with the subsystem but the transport specific
layer is not having any notification about that. As an alternative to
the transport specific subsystem opts listener interface was extended
in a previous commit.

Change-Id: I75c4e329e411a91694959db18ff1955774f0993e
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5571
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:37:07 +00:00
Jacek Kalwas
9a1c2cabc3 nvmf: introduce function to init listen opts
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I21444725c5fdf5c73db67858adbe02d4108bd751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5660
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:37:07 +00:00
Jacek Kalwas
87a062e688 nvmf: introduce listener opts
With new spdk_nvmf_transport_listen function it should be possible to
add generic options without breaking API/ABI. For now it only delivers
json parameters which can be decoded on a transport specific layer.
This is similar to what was done for spdk_nvmf_transport_create and opts there.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Iaf576248a0b10b408c4a3182785270be3e32ebe4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5570
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:37:07 +00:00
Jacek Kalwas
de8ac98b83 nvmf: simplify err output in case transport is not found
We were using the stringified trtype which will always just print "CUSTOM" for pluggable transport
types. It is better to use the trstring since it will exactly print the transport name as requested.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I5c184fe0ec209366339b658c647629d76bb8300b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5643
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:37:07 +00:00
Jim Harris
400c3b8a52 build: initialize SYS_LIBS in spdk.common.mk
There are cases where spdk.common.mk can get included
more than once in a Makefile.  So avoid duplication
in SYS_LIBS by initializing it before appending text
to it.

The duplication was harmless but a bit annoying.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idf081f973e15a9ab6ec9211b9a3cbf02c736c7a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5676
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:32:06 +00:00
Jim Harris
c006a8da16 test/external_code: use -pthread instead of -lpthread
-pthread is what SPDK in-tree Makefiles use, so use that
in the external_code Makefile too.  -pthread can be
used both on the compilation and link stages.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8ef702b8fbde825a4191d961738ebc605b0aa4c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5675
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:32:06 +00:00
Jim Harris
4340de1073 test/external_code: rename public functions from module
The "external" module that we link against is essentially
a copy of the passthru bdev module in the modules/bdev
directory.  But let's not use the same names for the
externally visible functions from this "external" module,
so that we don't get link errors if we happen to link
in both modules into one application.

This will help in a future patch where we use pkg-config
files to generate the list of the bdev modules.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I835c7e7ee8902f6829657ec6a3cf40cd802a1357
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5674
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:32:06 +00:00