Commit Graph

14457 Commits

Author SHA1 Message Date
paul luse
598eda5d78 test/accel: add UT for spdk_accel_get_capabilities()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6e18929dc8753301cf8735c2a33f53258a098768
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6356
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:03:35 +00:00
paul luse
480d8ac71d test/accel: add UT for spdk_accel_task_complete()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I847e85dbcc363f87e62264fb618c81447d2271f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6355
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:03:35 +00:00
paul luse
5f868ed1c9 test/accel: continue to add UT
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I423b2307967112e1e4b99c9ba176112811073324
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6353
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:03:35 +00:00
paul luse
a8a7bfcae4 test/accel: add UT for sw engine register and unregister
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4e957ca524af3924e0b0568e76d145752ab3a9d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6352
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:03:35 +00:00
paul luse
82d7226c8e test/accel: add first UT for accel framework
Implementation is pretty solid now, add first test with many
more to follow.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4b80f3108fcd07919949bcd14dadfdfeb10c45fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6332
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-02-22 10:03:35 +00:00
Konrad Sztyber
8aa989e2ba bdev/ocssd: fill in offset_blocks in append callback
The user only specifies the starting address of a zone to which to
append to and the actual location is expected to be returned in
bdev_io->u.bdev.offset_blocks.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Icc2e9f5461a746d19686d5288075f03d09bf1b19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6441
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.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-02-19 11:33:49 +00:00
Jim Harris
345bb2e89d nvme/identify: submit only one GET_FEATURE at a time
This is a workaround for issue #1799 that would require
a fix from Google Cloud Platform.  GCP NVMe SSDs do
not support overlapped GET_FEATURE commands - the
cdw0 value on completions get mixed up.

On GCP the result is that identify app reports only
1 SQ/CQ supported when in fact it supports 16.

We can easily workaround this in the identify app by
submitting one GET_FEATURE and then polling for its
completion before submitting the next one.

We may consider reverting this in the future should GCP
provide a fix, but there is really no harm in keeping
this patch long term since this isn't an I/O path issue.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6454
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>
Community-CI: Mellanox Build Bot
2021-02-19 11:33:21 +00:00
Jim Harris
06ace1efbf nvme/fio_plugin: add print_qid_mappings option
print_qid_mappings=1 will now add logging messages
showing the {filename,qid} tuples associated with
each job.

Note that for the nvme plugin, the filename is
essentially the transport ID.  We just print that
filename for simplicity rather than reconstructing
a transport ID string from the ctrlr object.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6396
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:33:21 +00:00
Tomasz Zawadzki
d108dcf5b9 test/bdevio: simplify thread allocation
This test was designed with 3 cores in mind,
where ut_thread and io_thread were always on separate
cores.

This patch just simplifies the logic for doing exactly that.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica0b594d2be20df0fa430e290e97f0b34be17c62
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6233
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: Changpeng Liu <changpeng.liu@intel.com>
2021-02-19 11:30:53 +00:00
Michal Berger
62ab898c8f pkgdep/ubuntu: Include packaged version of meson
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ib6bff3b5d77d5cc0a08d11e9608c10bf0e4d119f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6412
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>
2021-02-19 11:30:43 +00:00
Nick Connolly
a1ae47f34f module/sock/posix: improve portability
Default to using epoll unless __FreeBSD__ is defined. Add macros SPDK_KEVENT
and SPDK_EPOLL to indicate whether epoll or kevent is present. The macros
match the naming convention for SPDK_ZEROCOPY which controls zero copy
in a similar way.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I4c46fb94b254cb075427bfe07a8085887254c45a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-19 11:30:32 +00:00
Nick Connolly
a14deb22e0 lib/event: improve portability
In _set_thread_name, use pthread_setname_np as the default for
platforms that are not Linux or FreeBSD; it's the most common
'non-portable' pthread extension used to set the thread name.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ia841166f0537cd1303eded15bc7ef1a9f03e3b6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6465
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>
2021-02-19 11:30:22 +00:00
Ben Walker
1d8861e58f doc: Stop generating latex docs
We only publish them as HTML

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I88daf01556271bf87e5bff45608fb068523cb0c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6452
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>
2021-02-19 11:30:07 +00:00
paul luse
9a70b6375d idxd: update low level lib and poller to indicate busy/idle
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0acb74bd679e924977fb058a29ee947734e7aa83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6287
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>
2021-02-19 11:29:53 +00:00
Karol Latecki
78ce3152b5 scripts/nvmf_perf: add function to get interface names
Interface names will later be needed for additional
test options.

Change-Id: Ic16d305a97087ab1fdc35d5fd5a3d1ed2a021d90
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6206
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-02-19 11:29:18 +00:00
Karol Latecki
c4a330c937 scripts/nvmf_perf: add remote_nic_ips field to configuration
So far the information about remote target IP addresses was
stored in "nic_ips" attribute. Add a new "remote_nic_ips"
attribute to be able to differantiate which IPs are local
to given Server class object.

Change-Id: I03dac140241341996674b350c51c18da6e2ee447
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6205
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-19 11:29:18 +00:00
Liu Xiaodong
62a00973bf nbd: put nbd_disk_register ahead
Also remove duplicated checking on nbd path

Change-Id: I3b2aec6de5134ef2404529690f7692689c198a56
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6121
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-19 11:29:07 +00:00
Liu Xiaodong
59d527f10f nbd: release bdev ch and desc after close nbd fd
bdev channel is used in nbd fini process, so it should
be released in the latter part of nbd_stop

Change-Id: I87edea63d2d91954cc41cdb71261485ae24c0d9f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6280
Community-CI: Broadcom CI
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: <dongx.yi@intel.com>
2021-02-19 11:29:07 +00:00
Shuhei Matsumoto
894ef450a5 bdev/ocssd: Remove ocssd_bdev parameter from from/to_disk_lba() and to_chunk_info_offset()
Remove ocssd_bdev_parameter from bdev_ocssd_from_disk_lba(),
bdev_ocssd_to_disk_lba(), and bdev_ocssd_to_chunk_info_offset()
including unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaf52e3e33609e9f1fe13050e95020bad688dc6ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6223
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:28:53 +00:00
Shuhei Matsumoto
49a7346e0a bdev/ocssd: Remove range parameter from translate_lba()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0ebed08814ce4011a64a18a832603348c1f5ab08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6222
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:28:53 +00:00
Shuhei Matsumoto
c9096ce712 bdev/ocssd: Get number of parallel units directly from ocssd_ns->geometry
Remove helper functions, ocssd_range_num_parallel_units() and
bdev_ocssd_num_parallel_units(), and get number of parallel units
directly from ocssd_ns->geometry.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2b8c4765442aff4642ad1eaa38df6694ee7ed43d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6221
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:28:53 +00:00
Shuhei Matsumoto
20f1cf632b bdev/ocssd: Remove range parameter from bdev_ocssd_create RPC
It has been confirmed that there is no affected use case in
the SPDK community when we remove the range parameter from
the bdev_ocssd_create RPC.

Hence, remove the range parameter from the bdev_ocssd_create RPC,
remove range parameter from bdev_ocssd_create_bdev(), remove range
info from ocssd_bdev_config_json(), and then update unit tests
accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1b0a541b61bf26732fd028dc43becb7ca2384f8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6220
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:28:53 +00:00
Shuhei Matsumoto
bd8de45801 bdev/ocssd: Fix the bug that no media event is pushed to the target bdev
Recent refactoring added a critical bug that no media event is pushed
to the target bdev.

Fix the bug by changing return to break.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia674ea2c9c21d08dd23b50a0f726da55011d4be4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6455
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-19 11:28:53 +00:00
Michal Berger
9ab2855d6e pgkdep/git: Don't treat warnings as errors in refspdk build on FreeBSD
12.2 FreeBSD release has problems with building spdk with 3.19 fio
vm_setup.sh provides. Instead of patching anything, simply ignore the
warnings.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1d85320126d664c7ed45ee369612391cfba8fd06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6405
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>
Community-CI: Mellanox Build Bot
2021-02-18 13:38:15 +00:00
Alexey Marchuk
92f62deefc nvmf: Fix race condition when adding IO qpair
Similar issue was fixed in
813869d823
nvmf: Fix possible race condition when adding IO qpair

This patch fixes the same issue which occurs a bit later,
when a  message is delivered to another thread. This issue
occurred on CI, callstack is the following:

00:11:46.296  #6  0x00007f2705199f05 in __ubsan_handle_type_mismatch_v1 () from /lib64/libubsan.so.1
00:11:46.296  No symbol table info available.
00:11:46.296  #7  0x00007f27067ace6f in ctrlr_add_qpair_and_update_rsp (qpair=0x221edc0, ctrlr=0x1dc4ea0, rsp=0x2242918) at ctrlr.c:230
00:11:46.296          __PRETTY_FUNCTION__ = "ctrlr_add_qpair_and_update_rsp"
00:11:46.296          __func__ = "ctrlr_add_qpair_and_update_rsp"
00:11:46.296  #8  0x00007f27067b1d0b in nvmf_ctrlr_add_io_qpair (ctx=0x2242540) at ctrlr.c:534
00:11:46.296          req = 0x2242540
00:11:46.296          rsp = 0x2242918
00:11:46.296          qpair = 0x221edc0
00:11:46.296          ctrlr = 0x1dc4ea0
00:11:46.296          __func__ = "nvmf_ctrlr_add_io_qpair"
00:11:46.296  #9  0x00007f27062553ce in msg_queue_run_batch (thread=0x1cff540, max_msgs=8) at thread.c:553

where line 230 in ctrlr.c was
assert(ctrlr->admin_qpair->group->thread == spdk_get_thread());
That means that admin qpair was disconnected from the poll
group and controller is in the process of destruction

Change-Id: I818ba56adda5ed3488a8df78483c0b6839758192
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6364
Community-CI: Broadcom CI
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>
2021-02-18 13:37:01 +00:00
Shuhei Matsumoto
b3dae51b65 ut/bdev_nvme: Add test case for submit NVMe command
Test bdev_nvme_submit_request() for all supported I/O types
including comare and write.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c3e7e1b93307329e9cc55692fa3e0e8c291a5b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6190
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-02-18 13:36:33 +00:00
Shuhei Matsumoto
c4c28dfa74 ut/bdev_nvme: Add test case for async event
Add a test case for AER. It includes populating, depopulating, and
resizing namespaces dynamically.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib00c3279142cbdd70a0d571baee5797e661bb963
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6138
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-02-18 13:36:33 +00:00
Shuhei Matsumoto
24da97d3ec ut/bdev_nvme: Add test case for reconnecting qpair
Add test case to reconnect connection by adding stubs for I/O
completion.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I52f72708bdb9a6638c24e8ff6121080b0105e67f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6136
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-02-18 13:36:33 +00:00
Shuhei Matsumoto
bbbceb2a63 ut/bdev_nvme: Add test case for attach nvme_bdev_ctrlr
Add stubs and test case to attach nvme_bdev_ctrlr.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I66395de999c3ebc26230b6521bd45c35c4547796
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6135
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-18 13:36:33 +00:00
Shuhei Matsumoto
d189309aaa ut/bdev_nvme: Add test cases to reset or failover nvme_bdev_ctrlr including race condition
Add stub of struct spdk_nvme_qpair and related APIs, and test cases
to reset or failover nvme_bdev_ctrlr. They include a case that destruct
and reset are executed concurrently, and a case that two reset requests
are submitted concurrently. For failover, the test cases are for a single
trid or two trids.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6538a4dc32a73d0d72d6cac2a48c79ea7f00d332
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6132
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-18 13:36:33 +00:00
Shuhei Matsumoto
d7cdcbf0ca ut/bdev_nvme: Create framework and add test case to create nvme_bdev_ctrlr
Add framework for unit tests of bdev_nvme, and add a very simple
test case to create and destruct a nvme_bdev_ctrlr first.

Following patches will add more test cases and dynamic stubs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98f07d58d469949f3dac5a0bd36a3963de8dc3d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6131
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-18 13:36:33 +00:00
Young Tack Jin
e3c82a0ae2 examples/nvme/identify: add occsd verbose mode for OCSSD chunk state map
print chunk state map of MAX_OCSSD_PU chunks in ocssd verbose mode

Signed-off-by: Young Tack Jin <youngtack.jin@gmail.com>
Change-Id: I5cfe5ece49086acd680f93228d4765215eee3d87
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6089
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>
Community-CI: Mellanox Build Bot
2021-02-18 13:36:25 +00:00
Alexey Marchuk
27d8fd9f4c rdma: Add functions to work with SRQ
Add 4 new functions to create/delete SRQ, queue and flush
recv Work Requests.

Change-Id: I55401d22724cf1ce24f2cca588f2bd1384cdbcd0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6289
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-17 10:19:28 +00:00
Alexey Marchuk
4f2a837238 rdma: Fix doxygen comments
Change-Id: I6a9e9d173aad96c1d6c162396c1e3023b756498b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6288
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-17 10:19:28 +00:00
Jacek Kalwas
0e0805b551 build: add missing log dep for env_dpdk
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ieab3a3851eea9c6c9db2ddbf74d59b17128c3f0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6403
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>
Community-CI: Mellanox Build Bot
2021-02-17 10:19:06 +00:00
Jacek Kalwas
f758833ef8 build: combine env_dpdk / event_bdev so pkgconfig can de-duplicate deps
- it shows nice feature and usage of pkg-config
- it also prevents from duplicate symbols issue for static build in
case listed libs have a common dependencies

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1f470d202ea7efe03e354dca472fd50e97bca747
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6406
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-17 10:19:06 +00:00
paul luse
9b18966796 accel_perf: update program exit code to reflect non-fatal errors
For use by test scripts to know when there was a non-fatal error.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1c5e37edb13570aec1e186fe534ed6780a6de0c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6324
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>
Community-CI: Mellanox Build Bot
2021-02-17 10:18:30 +00:00
paul luse
445fe74ef5 accel_perf: add option to specify threads per core
Useful for DSA, for example, where we might need more than one
thread hitting a single DSA device at a time.  Previously you'd
have to do this by using multiple cores.

Note: the -n option was removed and replaced with -T, it was
a carry over from the ioat perf tool that this was modeled after.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I44840655dc297cdc3116ca7b67718444b0800ab3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6333
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>
Community-CI: Mellanox Build Bot
2021-02-17 10:18:30 +00:00
Alexey Marchuk
0d3ad99929 sock/posix: Don't return if zcopy is disabled
When socket is being created and zcopy is disabled
by the config, we can return from posix_sock_alloc
function before we try to set quick_ack

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I6670b8337e70ec12b18a5e6753674fbef9e95648
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6382
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>
2021-02-17 10:18:16 +00:00
Alexey Marchuk
04474fec32 nvme/fabric: Make connect related logs more verbose
Add logging of transport address and status codes

Fixes issue #1790

Change-Id: I67c23f74dd4a4b39233f50c4c29efe25872e0777
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6338
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-02-17 10:18:05 +00:00
Jim Harris
5e37d3b2d8 nvme: add spdk_nvme_qpair_get_id
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I550d42806a84eb94effd1e1c4e26d9493cda7703

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6395
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-17 10:17:43 +00:00
Niklas Cassel
17ef8ec9ac examples/nvme_fio_plugin: add support for zone append
Now when we have support for spdk_nvme_zns_zone_append() and
spdk_nvme_zns_zone_appendv(), hook them up in the nvme fio plugin.

Note that fio itself does not have support for zone append,
since unlike SPDK, there is no user facing zone append API in
Linux. Therefore, this new option simply replaces writes with
zone appends in the SPDK fio backend.

This is however still useful for the following reasons:
-Provides a way to test zone append in SPDK.
-By using zone append, we can test with iodepth > 1.

With regular writes, the user can only specify iodepth=1.
This is because for zone namespaces, writes have to target
the write pointer. Having more than one write in flight, per
zone, will lead to I/O errors.

In Linux, it is possible to use fio with iodepth > 1
on zoned namespaces, simply because of the mq-deadline
scheduler, which throttles writes such that there is only
one write in flight, per zone, even if user space has
queued up more.

Since a user might not want to use zone append unconditionally,
even on a namespace that supports it, make this an option
rather than enabling it unconditionally.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I028b79f6445bc63b68c97d1370c6f8139779666d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6330
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-17 10:17:22 +00:00
Niklas Cassel
014baeb8ef nvme: add support for ZNS zone append vector variant
We already have support for spdk_nvme_zns_zone_append(),
add support for spdk_nvme_zns_zone_appendv() (zone append with
NVME_PAYLOAD_TYPE_SGL).

_nvme_ns_cmd_rw() currently performs verification of the SGL,
if the parameter check_sgl is set. This parameter is set for all
calls with payload of type NVME_PAYLOAD_TYPE_SGL.

In order to be able to perform the same check_sgl verfication on
zone append vectors, we need to refactor _nvme_ns_cmd_rw() a bit.

Setting check_sgl ensures that _nvme_ns_cmd_split_request_sgl() or
_nvme_ns_cmd_split_request_prp() gets called.

These functions will split an oversized I/O into several different
requests. However, they also iterate the SGE entries, verifies that
the total payload size, total SGE entries is not too many, and that
buffers are properly aligned. A proper request will not get split.

For zone append, splitting a request into several is not allowed,
however, we still want the verification part to be done, such that
(e.g.) a non first/last SGE which is not page aligned, will cause
the whole request to be rejected.
(In the case of spdk_nvme_ns_cmd_write(), a non first/last SGE which
is not page aligned will instead cause the request to be split.)

An alternative would be to try to rip out the verification part from
_nvme_ns_cmd_split_request_sgl() and _nvme_ns_cmd_split_request_prp().
However, that is non-trivial, and would most likely end up with a lot
of duplicated code, which would easily get out of sync.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I2728acdcadeb70b1f0ed628704df19e75d14dcca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6248
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-17 10:17:22 +00:00
Niklas Cassel
b1b4b8676f nvme: use spdk_nvme_zns_ns_get_zone_size_sectors() where appropriate
Use the new function spdk_nvme_zns_ns_get_zone_size_sectors() where
it is appropriate (in comparison to the existing
spdk_nvme_zns_ns_get_zone_size() variant).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ic929ffbc5a1f4a16ba6719a985c05ae625caed46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2021-02-17 10:17:22 +00:00
Niklas Cassel
9a800c38f5 nvme: add spdk_nvme_zns_ns_get_zone_size_sectors()
Sometimes it is more optimal to get the zone size in number
of sectors, instead of in number of bytes.

Therefore, add a new spdk_nvme_zns_ns_get_zone_size_sectors()
function to get zone size in number of sectors.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0fe67e00a3d74dd27acfc895ae97448d995b89a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2021-02-17 10:17:22 +00:00
Niklas Cassel
8f5b48f8fd nvme: make enum spdk_nvme_ns_flags more readable
Make enum spdk_nvme_ns_flags more readable.
Other enums in spdk, e.g. enum spdk_nvme_ctrlr_flags,
and e.g. enum NVME_RDMA_COMPLETION_FLAGS, already define
the enum values using bit shifts.

Do the same for enum spdk_nvme_ns_flags.

No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia78ab0bab6fa37d700178d5b2669feb5a3003871
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6383
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-17 10:17:22 +00:00
Simon A. F. Lund
a587d90dcb examples/nvme/identify: add a limit to the zns zone report dump option
Add an optional limit, -z N, to the zone report dump option -z.

The variable g_zone_report_limit replaces the MAX_ZONE_DESC_ENTRIES such
that the maximum-number of zone-descriptors is overwritable. It also
replaces g_zone_report_full as it is represented by the limit-value 0,
e.g. "no limit" dump the full report.

The print of the section-header now includes the total amount of zones
and the limit. With this information, the header's width varies. A
helper-function, print_uline(), for printing an "underline" using a
given marker, is also added.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Ic8abead693ed83bb8612eef1f35605098ccade84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6036
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
2021-02-16 08:43:24 +00:00
Simon A. F. Lund
1b0134e0a9 examples/nvme/identify: assert optarg to satisfy analyser
Despite spdk_nvme_transport_id_parse() checking optarg for NULL, then
the Jenkins CI doing code-analysis fails with the error message:

"Null pointer passed as an argument to a 'nonnull' parameter"

This adds an assertion to satisfy the code-analysis.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I35f7ee659624c1d5a2abda91bccac9fb58393063
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6068
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>
Community-CI: Mellanox Build Bot
2021-02-16 08:43:24 +00:00
Simon A. F. Lund
f79d4b8baf scripts/nvmf_perf: fix pylint E741
Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I039a2e22a665e0d52082e6876f2c7c1cd9a336c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6386
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>
Community-CI: Mellanox Build Bot
2021-02-16 08:43:24 +00:00
Ziye Yang
8e039ff3d2 nbd: Continue to read the socket even if the NBD status is not running
In order to make sure we do always response to the kernel module if
there are valid commands in the socket. If we do not see this,
we will see stuck request kernel info in nbd module. And the kernel
will print the timeout message of nbd module again and again.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I2ecc3e9c948231a712778f0126e2ecc6220e1d3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6276
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:40:55 +00:00