Compare commits

...

2958 Commits

Author SHA1 Message Date
3d0d559dbd update dpdk commit 2022-05-27 04:30:06 +08:00
e8a1bac9a1 update dpdk submodule 2022-05-17 01:32:44 -04:00
38644662be update submodules & refs 2022-03-08 04:16:31 +08:00
1edb07ac50 fix build system 2022-03-08 04:08:39 +08:00
Krzysztof Karas
7dc38f83f7 spdk_top: reduce number of global thread data structures
Deletes g_thread_history and g_thread_info to use g_threads_stats
across the whole application to simplify spdk_top code.
Now instead of separate struct, fields last_busy and last_idle are
being used.

get_data() function now uses local structure to get RPC data instead
of filling global one. This has been changed so that g_threads_stats
keeps its last_busy and last_idle fields unchanged.
free_rpc_threads_stats has been moved down so that in future patches,
when multithreading is implemented, there is no need to lock
g_threads_stats during RPC call.

Changes places of allocation/deallocation of g_threads_stats, since
we want to save last_idle and last_busy fields instead of zeroing them
out each application loop.

Changes show_thread() function to use local copy of threads array
instead of pointers to global struct. This is for the convenience
in the future patches implementing multithreading to avoid the need
to lock the global struct for details display.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7587 (master)

(cherry picked from commit 081a4a0943)
Change-Id: I0dc87eac4c1b89fa16f14f5387d94ee176dfdf43
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8110
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>
2021-06-04 22:52:37 +00:00
Krzysztof Karas
464ddc03b6 spdk_top: change where get_data() and free_data() are called
Move part of code with get_data(), refresh_tab() and free_data()
inside show_stats() upwards to make sure data structures are
up to date for pop-up details windows.

Delete get_data(), free_data() calls from show_thread(), show_poller()
and show_core functions.

Add data freeing right before rpc calls inside get_data() to let
pop-up details windows to use updated data before freeing it.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7953 (master)

(cherry picked from commit 22edbe9626)
Change-Id: I0d78eb7a48b0cdff4284815afc1a214b0effd7fc
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-04 22:52:37 +00:00
Krzysztof Karas
b20db89532 spdk_top: move sort_threads function
This function is going to be needed in get_data() in the next patch.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7947 (master)

(cherry picked from commit e2b6cf2f96)
Change-Id: I9368b4567a92ca20d830c3475e3120ee691b84c1
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8108
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>
2021-06-04 22:52:37 +00:00
Michal Berger
10b7805b0f scripts/rpc: Make sure address argument is properly interpreted
In case the addr argument was not an existing unix socket file the rpc
client would consider it to be an actual ip address. As a result
connect() would be called with improper set of arguments. This could
cause the rpc.py to block for undesired amount of time until connect()
finally decided to return (seen on some fedora33 builds).

This was affecting sh wrapper functions like waitforlisten() which
use rpc.py to determine if given app is ready to be talk to blocking
execution of the tests for way too long then intendent.

To avoid such a scenario determine the format of the address and use
routines proper for given address family.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7777 (master)

(cherry picked from commit 6c1a1a3dca)
Change-Id: Iaac701d72c772629fa7c6478ff4781b0c5d485d5
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8018
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-05-31 07:11:13 +00:00
Karol Latecki
fb67ea5148 autobuild: update patches for mainline DPDK
Patches stopped applying cleanly because of dpdk/dpdk changes:
7d5cfaa7508de0fd248b05effbf421a98317006a
4ad4b20a79052d9c8062b64eaf0170c16a333ff8
Needed to rebase custom patches.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7903 (master)

(cherry picked from commit 7908736c22)
Change-Id: I1006f7f6ba21a3cee5b607cfc44adedb4c1d5830
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8017
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-05-31 07:11:13 +00:00
Tomasz Zawadzki
48f6cd39c9 version: 21.04.1 pre
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic08e163c2b37843297dd1b45f341aa8377be8acb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7686
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-04-30 09:19:37 +00:00
Tomasz Zawadzki
8016710153 SPDK 21.04
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id0e3688cf81f2dac4de4ab6c5212f986776ade2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7685
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-04-30 07:11:44 +00:00
Liu Xiaodong
67fab31304 test: add functional test for reactor_set_intr
test script 'test/interrupt/reactor_set_intr.sh' will
do various reactor set intr operations on interrupt_tgt
without spdk_thread and with spdk_thread.

Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7348 (master)

(cherry picked from commit ac0c36d72a)
Change-Id: Ie5af1dc68b0272c34a91e8a66b78088c3794907c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7678
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-30 07:11:44 +00:00
Tomasz Zawadzki
0fdf94cf77 lib/blob: force execution of queued persists
When performing snapshot creation the I/O is frozen
during the process. The blob persists for extent page
allocation is delayed until snapshot creation is finished.

This results in multiple blob persists executing one after
the other, with only intent of writing out updated extent table
pointing to new extent pages.
Since blob->state is marked DIRTY before issuing each persist,
but a single persist completion marks state CLEAR.

Blob serialize correctly expects each persist to contain
dirtied metadata, in order to avoid unnecessary md writes.
Since all other instances of marking blob DIRTY is explicit,
assert in blob serialize is left as is.

Instead when running the queued up blob persists, the blob
state is marked DIRTY.

Side effect is that it will write out same md in some cases.

Fixes #1909

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7640 (master)

(cherry picked from commit 50935184c8)
Change-Id: I39f37299f3f0ebfccbdd4063781b5ecce286e993
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7677
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-30 07:11:44 +00:00
Nick Connolly
00df37cbb6 ut/nvme_ctrlr_cmd: add missing mutex init
Add missing mutex init for ctrlr ctrlr_lock.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7613 (master)

(cherry picked from commit 0fdd826a00)
Change-Id: Ib3d665a28e91a72d1f1f6d09c374583ff731fb6f
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7676
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-30 07:11:44 +00:00
Jim Harris
4f8b83cf51 nvme: reset mapping_length correctly for contig SGL
spdk_vtophys() takes a mapping_length parameter, so
it can return the length for which the returned
virtual address is valid.

But spdk_vtophys() will only return the max
between the valid length and the input mapping_length
parameter.

So the nvme SGL building code for contiguous buffers
was broken, since it would only set the mapping_length
once, before the loop started.  Worst case, if a buffer
started just before (maybe 256 bytes) before a huge page
boundary, each time through the loop we would create
a new SGL for only 256 bytes at a time, very quickly
running out of SGL entries for a large buffer.

Fixes #1852.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7659 (master)

(cherry picked from commit 5354d0c63f)
Change-Id: Ib1000d8b130e8e4bfeacccd6e60f8109428dfc1e
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7675
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-30 07:11:44 +00:00
Jim Harris
35d003dfed nvme: remove IDENTIFY_CNS quirk from normal QEMU SSDs
The IDENTIFY_CNS quirk was applied as part of QEMU
OCSSD handling in commit 6442451b.  But it was applied
not only to the OCSSD dev ID, but also the dev ID
for non-OCSSD NVMe controllers.

Starting with QEMU 5.2, QEMU will allocate a default
256 namespaces, but only some are active (associated
with the backing disks specified by the user).  QEMU
supports IDENTIFY_CNS, but since this quirk was set,
we wouldn't send a real IDENTIFY_CNS and instead
would just populate a fake list where all namespaces
were considered active.  This causes breakage in
a few places - mainly where we iterate through
the active namespaces, and then are surprised that
calling spdk_nvme_ns_is_active() returns false.

It was also breaking bdev_nvme_attach_controller RPC,
since by default we can only support returning 128
names, but since all of the namespaces were deemed
active, it was trying to return 256.

Fixes #1916.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7658 (master)

(cherry picked from commit 6fd1cc3716)
Change-Id: I4fdd27e0e36f0ac07a95f9f29aa83357e8505a45
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7674
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-30 07:11:44 +00:00
Alexey Marchuk
e6e51ea9a2 sock: Deprecate enable_zerocopy_send in sock_impl_set_options RPC
This deprecated parameter will be removed in SPDK 21.07

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7608 (master)

(cherry picked from commit 2fd97e28bf)
Change-Id: I2b2fbcc798bb50fa6f9dfe35045f66e41c1ceaa9
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-27 16:25:00 +00:00
Alexey Marchuk
d9efb8f004 sock: Add new params to configure zcopy for server, client sockets
When zcero copy send is enabled and used by initiator,
it could significantly increase latency in some payloads.
To enable more fine graing configuration of zero copy
send feature, add new parameters enable_zerocopy_send_server
and enable_zerocopy_send_client to spdk_sock_impl_opts to
enable/disable zcopy for specific type of sockets.
Exisiting enable_zerocopy_send parameter affects all types
of sockets.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7457 (master)

(cherry picked from commit 8e85b675fc)
Change-Id: I111c75608f8826980a56e210c076ab8ff16ddbdc
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7638
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-27 16:25:00 +00:00
Niklas Cassel
0859db6b69 bdev/zone: add support for get num zones
There are three modules implementing the bdev-zone API:
bdev_nvme, bdev_ocssd, and vbdev_zone_block.

For all three modules, the number of zones can be calculated using:
block_count / zone_size.

To avoid this calculation being performed everywhere, create a helper
function in bdev_zone.h, together with the other zone APIs, such that
a user can easily get the number of zones.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I2967b15a604ab8bf4420588e7510b9820762f925
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7451
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@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-04-26 16:16:42 +00:00
Niklas Cassel
d69349af6b nvme/fio_plugin: fix zone_append option with multiple files per thread
Each fio thread can have multiple files that it writes to.
Which is why the per thread spdk_fio_setup() fio callback does
for_each_file() {...}.

One of these files can be e.g. a zoned namespace with append support,
another file could be a zoned namespace on another controller without
append support, and a third file could be a conventional namespace
(which never supports the zone append command).

Right now, we will return a fatal error if a thread has e.g. a zoned
namespace (with append support) together with a conventional namespace.

Instead of returning a fatal error, enable zone append only on the
namespaces that support zone append, and allow namespaces that do
not support zone append to continue as usual (using regular writes).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ic6456d408cbe91563acd337a4b70c6e871fe34c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7611
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 16:16:42 +00:00
Niklas Cassel
09dd961b35 nvme/fio_plugin: fix report_zones
Commit f69367c788 ("fio_nvme: defer qpair allocation to file_open
callback") moved the qpair allocation from spdk_fio_setup() to
spdk_fio_open(). This broke spdk_fio_report_zones(), which needs a
qpair in order to get the initial state of the zones.

setup_files() in FIO calls td->io_ops->setup() (spdk_fio_setup()),
followed by zbd_init_files(), which calls zbd_init_zone_info(),
which calls zbd_create_zone_info(), which calls parse_zone_info(),
which calls zbd_report_zones(), which calls td->io_ops->report_zones()
(spdk_fio_report_zones()).

i.e. spdk_fio_report_zones() will always be called directly after
spdk_fio_setup(). .report_zones() is even called before the per
thread ioengine .init() callback.

Therefore, spdk_fio_report_zones() is called before the ioengine
.open_file() callback.

This is done in order to ensure that all threads will share the same
zbd_info struct, which contains the per zone locks.

Since SPDK nvme ioengine no longer initializes the qpairs in .setup(),
create a temporary qpair in .report_zones().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ic376ac7844e40fceff092900ae7e4714bccf38e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7590
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 16:16:42 +00:00
Niklas Cassel
e9e97cb620 nvme/fio_plugin: fix initial_zone_reset
Commit f69367c788 ("fio_nvme: defer qpair allocation to file_open
callback") moved the qpair allocation from spdk_fio_setup() to
spdk_fio_open(). This broke --initial_zone_reset, which needs a qpair
in order to perform the initial zone reset.

While at it, move the initial zone reset from spdk_fio_setup() to
attach_cb(), as this is where all the other fio options are verified.
By placing it in attach_cb(), after the duplicated file check, we
avoid the need to loop through the whole fio_thread->fio_qpair list.

Since SPDK nvme ioengine no longer initializes the qpairs in .setup(),
create a temporary qpair, if the --initial_zone_reset option was used.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I7950304c58aef3ec783f7cd99cfb1e7d7817a197
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7589
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>
2021-04-26 16:16:42 +00:00
Sudheer Mogilappagari
2cbc9d4dff posix: Group connections of sock group on host side based on placement_id
On host side the connections are created and then added to thread's
poll group. Those connections could use different NIC queues underneath.
To route all connections of poll group through single queue a unique
placement id is chosen as group_placement_id and each socket of poll
group is marked with group_placment_id using getsockopt(SO_MARK) option.

The driver could use so_mark value of skb to determine the queue to use.

Change-Id: I06bda777fe07a62133b80b2491fa7772150b3b5d
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6160
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 15:33:03 +00:00
Karol Latecki
c06df11513 autobuild.sh: restore patches for older DPDK versions
Commit e9ebbdaefc updated
custom patches for mainline DPDK, but did not keep their
previous versions. We still need the old patches to build
with older DPDK versions.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ibe222a444bed2fdee63c8dcfcebc8402bb991fbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7610
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-26 14:23:15 +00:00
Ed rodriguez
b1144ce304 nvmf:Return cdw0 over tcp transport for retrieve cmd
tcp transport doesn't send a response capsule when
c2h_success is set even if cdw0 or cdw1 are non-0.

Signed-off-by: Ed rodriguez <edwinr@netapp.com>
Signed-off-by: John Meneghini johnm@netapp.com
Change-Id: Ieba81fcc50342a2009f7931526e6f8392e26b6a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6808
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-26 14:22:38 +00:00
Tomasz Zawadzki
a8d700419d examples/interrupt_tgt: mark reactor_set_interrupt_mode RPC private
The RPC is for testing purposes, as such does not need to provide
documentation in SPDK proper.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia153ad326e4c2ac43b511f9c2fba4aa95f1e3295
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7607
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 08:39:59 +00:00
Liu Xiaodong
74db63dcda interrupt_tgt: add RPC to set interrupt mode
Plugin RPC method 'reactor_set_interrupt_mode' is added
to set specific reactor run in interrupt mode or back
to poll mode.

Based on this RPC, scenarios later can be implemented
to verify interrupt mode functionality.

Change-Id: I9785e6942299bab7c949780faf18216e293f0b1d
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7347
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-26 06:58:36 +00:00
Liu Xiaodong
6c9b7d0896 reactor: call callback if no need to set intr
When do spdk_reactor_set_interrupt_mode, if reactor
already runs in the specific mode, directly call
callback function before return 0;

Change-Id: I1fd8b753e9881755aa128aabe6d1e2749e58b39b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7549
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-26 06:58:36 +00:00
Jim Harris
0e4690236b sock/posix: return error immediately if epoll_ctl fails
We do not want to do any further work on adding
the sock to the group if the epoll_ctl (or kevent)
fails.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I44b6dc86ce5676aa1b8d6c50b86f22758e4e37fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7594
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:48 +00:00
Jim Harris
b9563518c6 thread: do not ignore read() return
This fixes unused-result warning which prevents
building with -Werror.

Fixes: 924d4bf ("poller: add busy wait mechanism for intr")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I074949b65e68405033322af34d90e96a896c8b8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7593
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:48 +00:00
Tomasz Zawadzki
9a3877213e deprecation: add a file to gather all deprecation notices
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I66e442c4d10c1d40f4d9240f4f48374fc6966f29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6591
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:03 +00:00
Tomasz Zawadzki
ea31575578 CHANGELOG: added missing entries for SPDK 21.04
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia43952bbdc5efed7bf009810ff2a5fc5c7026604
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7583
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>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:03 +00:00
Krzysztof Karas
02614b0db3 CHANGELOG: refactor initial changelog entries
Fix typos, add highlighting, sort entries alphabetically,
merge two nvme entries into one, improve document spacing.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I18261326fcdb6f82f8e52e29d123c19136bbb9e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7530
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:03 +00:00
Ben Walker
03a3a5c02d scripts: Add check_format test for JSON-RPC documentation
All JSON-RPCs must be documented in jsonrpc.md

Change-Id: Iec9119a01433fd0cbe4df4477ce94cc2feeb0d54
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4074
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:03 +00:00
Jim Harris
d80267cc17 net: deprecate library
The net library isn't needed - everything these RPCs
do can be done externally to the SPDK application.

This library will be removed in the 21.07 release.

As part of the deprecation, mark the net RPCs as
private.  This will prevent an upcoming patch from
complaining that these RPCs are not documented.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I61118820fd29e410dca763595c3d9fd01a57373d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7592
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-26 06:55:03 +00:00
Ben Walker
365db9ee48 sock/posix: Deal with hung I/O with MSG_ZEROCOPY and interrupt
suppression

When all of the following conditions are met:
- non-blocking socket
- zero copy is enabled
- interrupts are suppressed (i.e. busy polling)
- NIC tx queue is full at the time sendmsg() is called
- epoll_wait sees there is already an EPOLLIN event
then we can get into a situation where data we've sent is queued
up in the kernel network stack, but interrupts have been suppressed
because other traffic is flowing. This makes the kernel miss the
signal to flush the software tx queue. If there wasn't also already
a pending EPOLLIN event, then epoll_wait would have been sufficient
to kick the system out of this state. But when all of this aligns,
it hangs.

We deal with this by detecting the scenario and calling poll(), which
will force the kernel to issue the pending transmits.

Change-Id: Ifb247159b7de16c8fc72a90f0333f5b421c8bd07
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6750
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-04-23 18:31:07 +00:00
Konrad Sztyber
97b0c5d327 doc/nvmf: add note about the issues with RDMA on E810 NICs
Added note to the nvmf documentation about an issue [1] with destroying
qpairs on E810 cards in RoCE mode.  The note needs to be removed once
the issue is resolved.

[1] https://github.com/spdk/spdk/issues/1840

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie03a7a662391bd738848f71e582748a334a6ffd5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-23 18:10:57 +00:00
Liu Xiaodong
5a7d428d0f nbd: add set interrupt mode to poller
Change-Id: I76561561b245f42795fa9eb28967cd486163c589
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5790
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-23 18:09:54 +00:00
Liu Xiaodong
db8ac562b3 vhost-blk: add set interrupt mode to poller
Change-Id: Ie599e445aca8241cf2f71e152ea92a5f92dd4dc5
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5788
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-23 18:09:54 +00:00
Liu Xiaodong
2d36f6f11c bdev_aio: add set interrupt mode to poller
Change-Id: I089241bbb42c047e8ae4f206f2dad72c4a69f1d9
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5789
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-23 18:09:54 +00:00
Liu Xiaodong
924d4bf32d poller: add busy wait mechanism for intr
For pollers that don't natively support interrupts, using
a busy wait mechanism temporarily.
An interrupt falicity for busy wait will
be registered for non-periodic poller.
Internally, an eventfd is created to each busy wait
poller. Write the eventfd when set interrupt mode,
and only read the eventfd when set back to poll mode,
then the busy wait poller will be called repeatly
in interrupt mode.

Change-Id: Iaeae14d1ff69fd9ef7d606a0b0a70193764513e9
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6711
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-23 18:09:54 +00:00
Liu Xiaodong
c74421c1c0 poller: rename timerfd to interruptfd
In next patch, if poller doesn't have a period, eventfd
will be created which's always busy automatically.
This eventfd can be combined with timerfd. So rename
timerfd to interruptfd.

Change-Id: Ibffa30ecfcaa73e55f47e97fac854641b74f2dfb
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7546
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>
Community-CI: Mellanox Build Bot
2021-04-23 18:09:54 +00:00
Liu Xiaodong
c7cf48ddbe poller: add register interrupt function
Defined callback for spdk_poller to adapt itself to
set interrupt or poll mode. The callback can
be registered to spdk_poller by new function
`spdk_poller_register_interrupt`

Interrupt callback operations for period poller are implemented,
so period pollers now are interruptable.

Change-Id: I2aa6ebfdd75f76b85a70af7e42530be4131ddc8a
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5752
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
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>
Community-CI: Mellanox Build Bot
2021-04-23 18:09:54 +00:00
Liu Xiaodong
39527e93d8 thread: refine period poller intr function
These refined functions are prepared to adapt period
poller to following poller switchable API.

Change-Id: I34d2a785fa0e757b97b0dac5ccf24819d75e0184
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7156
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
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>
Community-CI: Mellanox Build Bot
2021-04-23 18:09:54 +00:00
Liu Xiaodong
b763ebfe1d reactor: apply spdk_thread_set_interrupt_mode
The interrupt mode of spdk_thread can be operated
by reactor based on reactor's interrupt mode when
the spdk_thread is scheduled or the reactor is set
into interrupt mode.

Change-Id: Ibeef7ffb759589a7b372bd78e59e3410be061383
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6709
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-23 18:09:54 +00:00
Liu Xiaodong
2d52c6a15b thread: add spdk_thread_set_interrupt_mode func
spdk_thread_set_interrupt_mode can get spdk_thread run
between intr and poll mode. It is only valid when thread
interrupt facility is enabled by
spdk_interrupt_mode_enable(). Currently, this function
is limited that no poller is registered to the spdk_thread.

Change-Id: Iba54accd5976beb6f6e155014903928ce2858e36
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6708
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-23 18:09:54 +00:00
Konrad Sztyber
7ae061d1ea event/rpc: replace spaces with underscores in framework_get_scheduler
All the other RPCs use underscores in the names of their fields, so
`framework_get_scheduler` should also use them instead of the spaces.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0e9edd7c59a4ab61643a7b558a2359e1805ed0b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7557
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-23 18:09:23 +00:00
Karol Latecki
e9ebbdaefc autobuild: Update patches for mainline DPDK
Previous patches stopped applying cleanly at DPDK
21.05-rc1, needed to update.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If276f608c8394439064e9dfe30fed6d5531805d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-04-23 08:16:24 +00:00
Jim Harris
6c75f0a266 env_dpdk: save hotplug timeout timestamps separate from rte_devargs
DPDK recently clarified some semantics on the rte_devargs 'data'
and 'args' fields.  This actually breaks our use of the 'data'
field to store the 2 second timeout timestamp for delaying
attach to newly inserted devices.  Investigating this further,
it does not seem our use of the 'data' field was valid - it just
happened to work until now.

We could use the 'args' field now.  But knowing whether to use
'args' or 'data' would then be dependent on the DPDK version.
We cannot use RTE_VERSION_NUM to decide, because this is a
compile time decision, and it is possible in shared library
use cases that we could actually link and execute against a
different version of DPDK than we built against.

So instead we will create our own env_devargs structure that
will store these allowed_at timestamps. Currently it's just
a linked list (which is exactly how DPDK does it) - we could
make it more optimal with a hash table down the road, but this
code only executes when we are doing PCI enumeration so it is
not performance critical.

Fixes #1904.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3ee5d65ba90635b5a96b97dd0f4ab72a093fe8f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7506
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-04-23 08:16:24 +00:00
Monica Kenguva
204e6278d4 nvme/fio_plugin: fix nvme fio always reporting success
status code and type is inspected and reported
Fix issue #1893

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I6f181d8c9464182b23c658f4c268b900398fd751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7567
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-23 07:58:25 +00:00
Jim Harris
1f5364e821 test/blob: verify number of extent page writes
New UT verifies number of extent page writes for
thin provisioned blobs.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6b52195d26c3c1414ca862b03e8a3043bbe29b42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7017
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-04-23 07:52:25 +00:00
Tomasz Zawadzki
ae10cf633c lib/blob: do not write extent pages during md sync for thin blobs
Before this patch blob persist wrote out all allocated extent pages.

Intended design was to write out extent pages in two cases:
1) Thin provisioned blobs to write out extent pages when necessary
during cluster allocation.
2) Thick provisioned blobs to write extent pages during blob persist
when the blob was resized

This patch implements 1) by inserting extent before issuing blob persist
in cluster allocation path.
See blob_persist_extent_page_cpl() and blob_insert_new_ep_cb().
Blob persist might have to rewrite the last extent page after blob resize.
See blob_persist_start().

Meanwhile 2) was incorrecly implemented since it always re-wrote all
extent pages starting from 0. This was addressed by limiting number
of extent pages written, only to ones that were resized.
Some considerations were needed:
a) blob resize happen on cluster granularity, it might be needed to re-write
last extent page if resize was not large enough to change number of extent pages
b) first extent page to write should be based on the num_extent_pages from
active or clean, depending on resize direction
See blob_persist_start().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibba9e3de3aadb64c1844a462eb0246e4ef65d37f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7202
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>
Community-CI: Mellanox Build Bot
2021-04-23 07:52:25 +00:00
Tomasz Zawadzki
a512214517 lib/blob: update extent pages during snapshot deletion
When both clone and snapshot had already extent pages
corresponding to the same region in cluster map,
the clone extent page was replaced with one from snapshot.

This was incorrect and would result in loss of clusters
from clones extent page. It did not occur in practice
because all extent pages were rewritten anyway during
md sync. Cluster map was correct so updated extent pages
were too.

Cluster map correctness is verified in UT _blob_inflate_rw(true),
at the very end when checking data consistency of inflated blob.

This patch writes out the updated extent page explicitly.
So it would be possible to skip wirting out extent pages
during md sync later in the series.

Note 1)
At this point in series the extent page is written here,
and in blob persists. The later will be removed later in
series.

Note 2)
Errors during updating extent pages are not accounted for,
but neither does syncing them in blob persist.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7deac3c64299f33f8df49e860af1a16295c074e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7438
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>
Community-CI: Mellanox Build Bot
2021-04-23 07:52:25 +00:00
Tomasz Zawadzki
bc9da1c66c lib/blob: rename blob_insert_extent to blob_write_extent_page
The blob_insert_extent() name was confusing, since the function
was actually responsible for writting out the extent page to disk.
Changed to a more fitting name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia312b0ef152100f30d5a1bfe123e55135c8afa6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7561
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>
Community-CI: Mellanox Build Bot
2021-04-23 07:52:25 +00:00
Tomasz Zawadzki
9c3895b6bc lib/blob: refactor extent page updates during snapshot deletion
This patch does not change functionality. It separates
three stages of updating clone during snapshot deletion:
- updating cluster map
- updating extent pages
- removing backing device from clone

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I44869f3be596d9d0f06db4acedfdd7e1500516ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7437
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-04-23 07:52:25 +00:00
Tomasz Zawadzki
0aed63f0e2 ut/blob: avoid modifying blob state in simultaneous sync test
This patch addresses couple issues:
1) Before issuing the md syncs the previous steps in test left
blob state in dirty state already. The resize never had a chance
to apply. This patch adds a proper md sync and polls for completion.

2) Changing blob state is something that should be done via API.
In order for dirty state to apply immidietly set_xattr is now used instead.

3) Verify test state in callbacks to make sure not only the number of
completions is correct, but their order.

This patch is introduced because of the test originally worked
only because of the extent pages always writing out its pages.
The second sync always was delayed because of this.
Meanwhile that should not be the case, since no MD or EP modification
was done.

Later in the series Extent Pages are fixed, but this test remained incorrect.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iac17c27f6ff83f2b79835aa6e48472d5293c44d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7233
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>
Community-CI: Mellanox Build Bot
2021-04-23 07:52:25 +00:00
Monica Kenguva
0fcf6541f6 rpc: fix formating to enable the framework_get_scheduler rpc
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I50947df022301b955332aad87e41f128f31fce07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7568
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-04-22 23:47:43 +00:00
Jim Harris
4ccc9ea3e0 configure: check if liburing is installed
When user specifies --with-uring without a directory,
check that liburing is actually installed on the system.
If it isn't, instruct user to build and install liburing
and exit with error.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7542
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-22 20:28:37 +00:00
Jim Harris
9d2f6f861d configure: wait to configure ISA-L until all deps are checked
Configuring ISA-L takes a bit of time, so it is better
to check dependencies early and bail, rather than
waiting 10-15 seconds to configure ISA-L, only to then
fail because some dependency isn't found.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7541
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-22 20:28:37 +00:00
Krishna Kanth Reddy
e04da24cf6 examples/pmr_persistence: Add PMR example application
Added tests to verify the PMR support.

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: I63f0a18647bfb8b16b8a5fbedb902c2f28b1d36d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6562
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-04-22 20:10:21 +00:00
Krishna Kanth Reddy
c821049d2f examples/identify: Get PMR size
Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: Id0dc422eefc6aa143e63d4630e6e74757df50e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6561
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-22 20:10:21 +00:00
Krishna Kanth Reddy
f98b792db2 lib/nvme: Expose APIs to Access PMR
APIs to get PMR size, enable, disable, map and unmap the PMR.

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: If6ec7f3e2f19bc13b3cbb2def622a41a3d84dc4e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6560
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-22 20:10:21 +00:00
Krishna Kanth Reddy
89858bbf5d nvme/pcie: Add support for Persistent Memory Region (PMR)
Implemented functions to enable, disable, map and unmap the PMR.

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: I580e0b5060cefe1230c3db1361aee1957db457b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6559
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>
2021-04-22 20:10:21 +00:00
Karol Latecki
8d506e8056 autopackage.sh: clean after rpmbuild
"make clean" after finishing rpmbuild. Otherwise leftover
"./configure" options and libraries tend to fail the
next in line "--enable-lto" build.

Fixes #1905

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6a04028bfdfeb03b089c86afe7f81489fd6976f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7562
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>
2021-04-22 17:52:46 +00:00
Maciej Wawryk
4503500e49 scripts/perf: fix measure_bandwidth failed to open outfile error
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I9b9f8c9e407425fdab1e84050354481ad76c19c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6655
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>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2021-04-22 15:53:34 +00:00
Ziye Yang
467148fce5 bdev/rbd: Refactor the parameters in bdev_rbd_init.
Only passing rbd pointer is enough.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I652581879c9ba228f9af0aa3f5353915a286c6c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7548
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>
2021-04-22 15:42:53 +00:00
Krzysztof Karas
ea05f19304 spdk_top: add core frequencies to cores pop-up
Resizes cores pop-up to fit new field - core frequency.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I571ed92ea68a6c42f214caa80bbfab2b2fb3b03a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6766
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>
Community-CI: Mellanox Build Bot
2021-04-22 15:40:30 +00:00
Krzysztof Karas
bc656341b7 spdk_top: add core frequency to CORES tab
Modifies functions and data structures to allow for
core frequency display in CORES tab.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ie3c6eadb090b8e0a6e57968b79d4852f1957b0fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6583
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>
Community-CI: Mellanox Build Bot
2021-04-22 15:40:30 +00:00
Krzysztof Karas
8673a27b46 lib/event: modify RPC to get core frequencies from governor
Modifies RPC "framework_get_reactors" to get core frequency for current
core and insert it into JSON response.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ibb9c25e6e1d28ddb4cde42baa20a7e9808652ae8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6582
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>
Community-CI: Mellanox Build Bot
2021-04-22 15:40:30 +00:00
Krzysztof Karas
84c349e1d8 dpdk_governor: refactor _get_core_curr_freqs
Currently _get_core_curr_freqs returns an index from the array
of available frequencies for given core. This change aims to
make this function execute what its name suggests.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I1143f692e7bbbf2f8f9e1cd4943f8e3ecd70ddea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7452
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>
2021-04-22 15:40:30 +00:00
ChengqiangMeng
dbef0cfd02 app/spdk_top: fix SEGV on unknown address
The index of g_thread_info is equals to the thread ID.
When the thread ID is not continuous, but index of ABC is continuous,
so some elements of g_thread_info array will be empty.

fixes #1899

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Ib90a26dcc2d47792a098b163746906f34043453a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-22 15:40:19 +00:00
Karol Latecki
7db06707f5 doc: add link to SPDK 21.01 NVMe Bdev performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I197e03fdd11a7b2beda8ca301857debfb56a8f18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7555
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>
2021-04-22 14:51:08 +00:00
Jim Harris
de9f4857d0 env_dpdk: add allowed_at helpers for PCI hotplug timeout
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5265f99fc12e134bf156de75de433a739b9ef1ef

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7505
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-22 07:31:07 +00:00
Ben Walker
2f9271b818 sock: Add sock_map_find_free
This function finds a placement_id that does not have a group
associated with it.

Change-Id: I1306690e980fd4661f46dba9fb283f048a962eba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7223
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>
2021-04-22 07:29:26 +00:00
Mao Jiang
d88ccda689 test/nvme_fabric: build nvme fabric unittest file
Include cases for setting/getting nvme fabric properties.

Change-Id: I4757cc38b8e1fe7d6af287b21f02539540a28de9
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6552
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-22 07:27:41 +00:00
Changpeng Liu
29f46e1c85 libvfio-user: update submodule
Also use debug log when the memory region isn't 2MiB aligned,
The QEMU may only use one page for a memory region, we are sure
these memory regions will not be used as NVMe data buffers.

Previously libvfio-user will help us to round up these memory
regions to 2MiB alignment, and it doesn't do it anymore, this
isn't an error case so change it to debug log.

Change-Id: I6c397f50407d4f2a14f78d9f99fffc2e4054ff51
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7545
Community-CI: Broadcom CI
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>
2021-04-22 07:20:22 +00:00
Jim Harris
836565edb4 dpdk: move submodule to eb167868
This picks up:

eb167868: eal/windows: fix debug build with MinGW
3f84d847: bus/pci: set Windows device class and bus

Both of these have been merged into DPDK upstream/main,
but adding them to our spdk-v20.11 branch until we
are ready to upgrade our submodule to a DPDK version
that includes them.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7543
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-22 07:20:02 +00:00
Jim Harris
10feaff299 nvme: only process io_msg in primary process
The io_msg qpair is allocated and managed by the
primary process, so don't try polling it from
secondary processes.

This fixes a bug where an SPDK target has configured
cuse, and we try to run fio (for example) as a
secondary process.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7482
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-22 01:06:02 +00:00
Jim Harris
f69367c788 fio_nvme: defer qpair allocation to file_open callback
All jobs are created at boot, meaning the setup callback
is invoked for all jobs before any are executed.

But it may be useful to put 'stonewall' parameters in
the job file to execute a bunch of workloads in succession,
starting one workload when the previous one completes.
But since qpairs are created currently during setup, the
total number of workloads that can be expressed is limited
since qpairs for all workloads are allocated up front.

So instead defer allocation of the io qpairs until the
file_open callback.  These don't get called until the
job associated with the 'file' (in this case, the
nvme namespace) is ready to execute.

Note that we cannot free the qpairs in the file_close
callback, since fio may 'close' the file before all
I/O have been completed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3c60cf27c3660a3c94042c0de719f5bebdb9b417
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7481
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-22 01:06:02 +00:00
Karol Latecki
9bacb8629d scripts/nvmf_perf: rename remote_nic_ips
Rename to target_nic_ip to better match NVMe-oF
terminology.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0644410cfb063eeea740c54f5860aeefdb52d52d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7089
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:59:40 +00:00
Karol Latecki
ad7833591c scripts/nvmf_perf: copy SPDK from target early
SPDK directory needs to be copied to initiator systems
earlier for set_irq_affinity to run.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0f9ade02e58c9224e0b2ddc75117baaf653be614
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6776
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:59:40 +00:00
Karol Latecki
02cb1fe86a scripts/nvmf_perf: allow ADQ for SPDK mode only
Need more investigating how to properly enable ADQ
for Kernel mode. Do not run Kernel + ADQ configuration
for now.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I700ef417b9b398c067a586a1a5ad9947a92057ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6566
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>
2021-04-21 23:59:40 +00:00
Karol Latecki
b06212cfb5 scripts/nvmf_perf: re-write nvmf perf readme file
Readme was frequently missed when adding new stuff or
updating the performance script, and it is out of date.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1710473be576ffbcc2fa8e3701b196bd46cf6654
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6538
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>
2021-04-21 23:59:40 +00:00
Karol Latecki
c0fc19f36d scripts/nvmf_perf: configure adq traffic classes
Create a default traffic class (tc0) with minimum
needed number of assigned threads and a priority class
(tc1) with number of assigned threads equal to
number of application threads.
Finally run set_xps_rxqs to configure symmertic queues.

set_xps_rxqs script used from Intel ICE driver
package available at:
https://downloadcenter.intel.com/download/29746/
Intel-Network-Adapter-Driver-for-E810-Series-Devices-under-Linux-

Change-Id: Ie0f2db266621a9dabb1621344bfdc5fa64fee03c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6537
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: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-21 23:59:40 +00:00
Karol Latecki
42d2e588d6 scripts/nvmf_perf: Keep track of num_cores for Initiator class
There are multiple cases for counting number of CPU threads
on Initiator side. Keep track of num_cores in all of them.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I4b8d1d79a2aa17706d206b149c1c8e8816ae2ef5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6536
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: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-21 23:59:40 +00:00
Karol Latecki
31c50e110c scripts/nvmf_perf: disable sysctl busy_read timeout
Set busy_poll to 0 for non-ADQ. Having it enabled with
this value results is huge latency increase.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic68ed2b7dc19b8d4b274ce8622194489693863cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7480
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:59:40 +00:00
Alexey Marchuk
754de777a6 perf: Use max_completions when process poll group
Perf tool allows to specify g_max_completions
parameter but it is not used.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ib46aaa949ddda1b0ba25c28849a402986a7a3d8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7373
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:57:57 +00:00
Alexey Marchuk
a3080090b0 perf: Add parameter to set IOVA mode
SPDK app framework supports a CLI parameter to
specify IOVA mode, add support for this to perf

Change-Id: Id72755d02c63c443ae3bced1823fc547d9e4b050
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7372
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:57:57 +00:00
Alexey Marchuk
a7fefe05a5 perf: Use spdk_env_opts struct to parse args
When perf tool parses CLI arguments, it saves
each argument to a global value. Later these
values are checked for non-zero and copied to
spdk_env_opts structure. It can be simplified
by saving parsed arguments directly to env_opts
structure. It is applicable to env options only,
options specific for perf are still copied to
global variables.

Change-Id: I298392348df959d8165ea72333764c6505373fc2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7371
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-04-21 23:57:57 +00:00
wanghailiangx
460bacc914 test/nvmf_tcp: allow tcp cases running in E810 NIC instead of virtual eth
Added nvmf_tcp_init() to run tcp through physical E810 network card.
If there is not E810 in system, tcp will still run on virtual eth.

Change-Id: I9a983c92175b27c45457682d42d72ef307fef260
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2021-04-21 23:55:56 +00:00
Changpeng Liu
6a3cc9140f nvme/quirks: remove NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE for Intel P55XX
The P55XX serial SSDs can support dlfeat.read_value in the identify
namespace data structure, we don't need to add this quirk for it,
just remove it.

Change-Id: I165d89085e246a570e80dbaf05f41dc331b93f0c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7526
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:19:59 +00:00
Changpeng Liu
b46ce57e30 example/nvme: use API to return the dlfeat.read_value
Some earlier NVMe drives don't implement Deallocate
Logical Block Feature(dlfeat) read value field, but
it can return zeroes in deallocated ranges, that's
the quirk NVME_QUIRK_READ_ZERO_AFTER_DEALLOCATE, so
here we use the API to cover earlier NVMe drives.

Change-Id: I6867618c60dd5488a5d4820d663da7f074af229c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7525
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-21 23:19:59 +00:00
balaji
a2a82087b9 NVMe: Defer the notices processing in the AER callback untill all the CQE entries have been processed.
When the format command is issued, the kioxia drives responds with "NS Attr change" notices.
In the callback function of the notice, the CQ Head Doorbell is updated twice with the same
value while issuing the Active NS list & identify NS commands.

Fixes:  #1701

Signed-off-by: G.Balaji <gbalajieie@gmail.com>
Change-Id: I8cc80fba0a226c22753e605ef3129602a9313ce7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7149
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: Ben Walker <benjamin.walker@intel.com>
2021-04-21 23:19:05 +00:00
Monica Kenguva
6d6870c7b6 rpc: Document zone block create and delete
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ib6dcfe3e9fae51266a937454703d526f621ae6d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7425
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>
2021-04-21 19:50:16 +00:00
Monica Kenguva
e2a4288c3c nvmf/rpc: adding private tag to the internal rpcs
private tag added to the experimental or internal rpcs
which might be removed in future or not documented.

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I3e967252412f2491860eea5fa69750a7562b994a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7510
Community-CI: Broadcom CI
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>
2021-04-21 08:25:46 +00:00
Michal Berger
356ca94119 test/vhost: Fix typo
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4f30f53f20563c1516ae50dea149e06f0192b8c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7387
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2021-04-21 08:25:08 +00:00
Changpeng Liu
b03129e710 nvme: return errno instead of assertion when mapping PRPs
Also update the UT.

Change-Id: I6086bf4cafca8a917a467490955d7df0ba8930d5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7495
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>
2021-04-20 20:24:23 +00:00
Changpeng Liu
9bfa9cb8b3 nvmf/vfio-user: report that SGL is supported
Change-Id: Ia9938a3e5a4c8e4a3080039e5e309d5d10b0b77d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2021-04-20 20:24:23 +00:00
Changpeng Liu
55f0d41fce UT/nvme: add map NVMe command SGL UT
Change-Id: If730a82832c675cc9b4b8da8a05dd4f1aa8e3ab6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7316
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-20 20:24:23 +00:00
Changpeng Liu
018f6a8f21 nvme: add the support to remap NVMe command with SGL
Previously we can only remap NVMe command using PRP, now we add
the SGL support.

Change-Id: Iec352d858a07bdd3d5f261336d6fa1167ba7aa79
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7279
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-20 20:24:23 +00:00
Changpeng Liu
3a58a5f19c nvme: add spdk_nvme_map_cmd API
The API `spdk_nvme_map_prps` is used in nvmf/vfio-user to
remap VM's NVMe command data buffer to local virtual address,
and for command using PRP, there maybe multiple pages, when
parsing the PRP list to local IOVs, we need a parameter to check
that the maximum number of vectors can't exceed the IOVs, this API
can't meet the requirement, while here, we add a new API `spdk_nvme_map_cmd`
and with a new parameter `max_iovcnt` to fix this case, and it can
also cover the command using SGL in the coming patches.

Change-Id: I71063524bed16ee3434103867a556d3741e55326
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7278
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-20 20:24:23 +00:00
Changpeng Liu
3a800d19c9 UT/nvme: add map NVMe command PRP list UT
Change-Id: Ibad26dae7bb8513f2e0d317e180cf6b9c16f9cb9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7315
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-20 20:24:23 +00:00
Changpeng Liu
1d3b01e261 nvme: refactor spdk_nvme_map_prps into two functions
Change spdk_nvme_map_prps to a internal fucntion with
a new parameter `max_iovcnt` to protect the IOVs.  Also
for the purpose to keep API compatibility, we still leave
the API here.

Change-Id: I9a638beb87aab20bba5f8a4fa0a9396110d56aff
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7335
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-20 20:24:23 +00:00
Krzysztof Karas
2fd233413b spdk_top: check if SPDK target app has been initialized
Makes spdk_top wait for SPDK target app instead of showing runtime error.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I7cb451afc87f3d21adf55a4bfc984330054711b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7141
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-20 09:16:13 +00:00
Changpeng Liu
1f5cb5b1ae nvmf/vfio-user: failure should return -1 with errno set
This is required by libvfio-user APIs.

Change-Id: I675a3be0a9650d146c8d37e42debf1191656903b
Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7472
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-20 09:16:05 +00:00
Ziye Yang
3df11166e7 accel_engine: fix the bug while computing chained crc32c via hardware engine.
This patch is used to fix the chained crc32c computing when users pass
a vector. Since we use a union in spdk_accel_task structure to differentiate
the usage on "src" and "the vector info" (iovs and iovcnt). So we cannot
directly write the src field while users pass a vector.

And I verified it in the hardware platform.

Change-Id: I85d6e86fa689b261782f80a2f89d908a5d4db84f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7471
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-19 21:27:21 +00:00
Ziye Yang
3727f6ea4a bdev/rbd: Fix the I/O channel leak in bdev_rbd_resize function.
The original code does not free the I/O channel
in bdev_rbd_resize.

Change-Id: I8e48616bea37ba7cece5a179c0f1ca03b3f5cb53
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7466
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-19 19:21:43 +00:00
Ziye Yang
741abc3c8b bdev/rbd: Add the missing "rados_shutdown" call.
Add the missing rados_shutdown call in
bdev_rbd_init function.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I0222d2453d1547cfd735f15237eca124cbc23479
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7430
Community-CI: Broadcom CI
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-04-19 19:21:43 +00:00
Changpeng Liu
62b9210cc5 env_dpdk/memory: don't retrun error for VFIO_IOMMU_MAP_DMA ioctl
There are cases that the valid vfio container doesn't contain
any IOMMU group, so for this case we should not return error.

Fix issue #1855.

Change-Id: I2057dc9a519a31ec16452b1e9d1c470eccfc4992
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7470
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-04-19 19:20:51 +00:00
Karol Latecki
dfe9cee5e3 doc: add link to SPDK Vhost 21.01 performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I12a7586157bfd1c8c06d0fe2a954b03c46d5936a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7297
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.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>
2021-04-19 19:19:57 +00:00
Sudheer Mogilappagari
2974f8d676 posix: replace usage of recv() with poll()
Busy pollng using recv() is dependent on kernel socket buffer being
empty. Instead poll() function busy polls hw queues with no such dependency.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: I1cb101848d51f7778cdf3d4c015d2d03201bdb37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7014
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-04-19 19:13:41 +00:00
Changpeng Liu
5cf9b5c52d nvmf/vfio-user: add request abort callback support
Change-Id: I068e74f5b7d078ad37572eff47e772ad6967b827
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7436
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>
2021-04-19 19:06:56 +00:00
Changpeng Liu
51c8574f01 nvmf/vfio-user: introduce request state
Unlike tcp/rdma transport, the vfio-user transport doesn't need to
wait for the data buffers, so here we add two request states for
now.

The request state will help us for coming request abort API.

Change-Id: Ibbb193fbbd358333f81aa29341493c19ab7bd108
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7435
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>
2021-04-19 19:06:56 +00:00
Changpeng Liu
7abbad3ccf nvmf/vfio-user: reset the request internal fields in the completion callback
Previously we reset them when getting a new request, but it's more
reasonable in the completion path.

Change-Id: I3dab35ce471d2a5bbd37576540d30a09dcf93410
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7434
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>
2021-04-19 19:06:56 +00:00
Changpeng Liu
c7c69c7cc1 nvmf/vfio-user: consolidate request free function
Also rename transport request and controller variables
with "vu_" prefix.

The consolidated function will be used in coming patch.

Change-Id: I5219c13d7089dfdaea4a54e0b15cc5e6ecf2eb16
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-19 19:06:56 +00:00
Changpeng Liu
3d0e22ce9b nvmf/vfio-user: remove unnecessary cid field
Change-Id: I0e941c88626d895e43bc3404b894f62d48d6a0cf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7432
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
2021-04-19 19:06:56 +00:00
Michal Berger
3a1d4786f4 pkgdep/common: Add /usr/lib64 to ld's cache
ld on some distros, e.g., ubuntu1604, doesn't include this particular
path in its SEARCH_DIR list. Add it manually to make sure linking
towards liburing is possible in such a case.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I82d7ed870ec9ff257dc72a386f950addb5476d1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7022
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-04-19 14:15:38 +00:00
Michal Berger
3124e71569 pkgdep/git: Add optional prefix to qemu dirs
This is done in order to distinguish between different flavors more
easily.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9740677c878a8e6ad5abb3e2b5c22b9d41d59fc6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7117
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-04-19 14:15:38 +00:00
Michal Berger
18ee5d7bff pkgdep/git: Add support for vanilla qemu (5.1.0)
This is done as part of a request to run tests on PMR-capable VMs
in the CI pool.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icf64bf07cd81945e519b0d212ca126d79c3fecbc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7020
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>
2021-04-19 14:15:38 +00:00
Michal Berger
0cb256c03d scripts: Add helper script for looking up PMR info under qemu
Added mainly to verify if the PMR setup on the VM is correct.

Example of an output with PMR device size of 32M configured for
two nvme devices, and one nvme device with 128M CMB.

[root@fedora31-cloud-1614680581-9ba06c102 ~]# /tmp/get-pmr
nvme0:0000:00:04.0:64-bit:prefetchable:0xf0000000:0xf7ffffff:0x08000000:cmb
nvme1:0000:00:05.0:64-bit:prefetchable:0xf8000000:0xf9ffffff:0x02000000:pmr
nvme2:0000:00:06.0:64-bit:prefetchable:0xfa000000:0xfbffffff:0x02000000:pmr

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I522cebd8b5a16f8a37c6e0e01a0288fb310467fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7019
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: Ben Walker <benjamin.walker@intel.com>
2021-04-19 14:15:38 +00:00
Michal Berger
45fc211e5f scripts/vagrant: Add support for setting a PMR device
Available in qemu >= 5.1.0. Note that since CMB and PMR share the same
BAR they cannot be used together. If both are specified, PMR setup is
skipped.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia0c6681b5ac7563efc6c32d2fff1808814196676
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-19 14:15:38 +00:00
Michal Berger
505b507234 pkg: Add prompt about pkg/spdk.spec being deprecated
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I235c2aed92d1e4c420e61bda66043066ae82222e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7383
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>
2021-04-19 12:56:09 +00:00
Michal Berger
dc672e78a0 doc: Add doc about building RPMs
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I78c6a1f376a317bd88298f9d19034848790aa667
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7266
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:56:09 +00:00
Jin Yu
fe3869403a unit: add nvme pcie hotplug monitor unit test
Change-Id: I28080699964c10475d4ebb72446dc228cf18947c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7230
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-19 12:55:17 +00:00
Jin Yu
1e58cb9e98 unit: add unit test for the pci event
Change-Id: I147834c61f19da2e61ce5d5df2f49caaf93dc8d3
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7226
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-19 12:55:17 +00:00
Ben Walker
4e347038a8 sock: Maps hold group_impls instead of groups
Since the maps are unique to modules, they can store the group_impls
directly.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7f11db558e38e940267fdf6eaacbe515334391c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7222
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>
2021-04-19 12:54:54 +00:00
Ben Walker
5379aa95e7 sock: Each module now maintains its own sock_map
This allows for different policies per module, as well as overlapped
placement_id values.

Change-Id: I0a9c83e68d22733d81f005eb054a4c5f236f88d9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7221
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>
2021-04-19 12:54:54 +00:00
Ben Walker
42b47742de nvme/tcp: Only flush socket if not part of poll group
If the qpair is part of a poll group, the socket will get
flushed as part of polling that group already. We only need
to explicitly flush to handle the case where the qpair is
not in a poll group.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib2a510b6d26d1622950437d81e0a40f6b15d6b54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7049
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:54:24 +00:00
Ben Walker
6b86039fd9 nvme/tcp: Ensure qpair is polled when it gets a writev_async completion
There was a fix for this that went into the posix layer, but the
underlying problem is the logic in the nvme/tcp transport. Attempt to
fix that instead.

Change-Id: I04dd850bb201641d441c8c1f88c7bb8ba1d09e58
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6751
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-19 12:54:24 +00:00
Ben Walker
6d6959e989 sock/posix: Rename pending_recv to pending_events
This list will hold any socket that has some event pending and needs to
be part of the set returned during polling of the group.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5acf01677e59c1026f93671c7b7b3dc458075bf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6748
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:54:24 +00:00
Ben Walker
fc551b3a62 sock/posix: Make pending_recv shuffle more efficient
Instead of iterating the list, we can just manipulate the list
in a single step.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I0172cdbce9af35a62d62dbccfac573e5d723f43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6747
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:54:24 +00:00
ChengqiangMeng
1649217a53 unittest/nvme_tcp: increase code coverage for nvme_tcp_pdu_ch_handle.
nvme_tcp_pdu_ch_handle code comprehensive coverage

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I15c8f953b2eb444bd058b2340f66120a9d8aa9e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-19 12:52:40 +00:00
Mao Jiang
dcfe4d2d91 test/nvme: cases for nvme parsing functions
Change-Id: I4291b44aabaa6dd2ef598de308dbf53a4eb45848
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7252
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: Jim Harris <james.r.harris@intel.com>
2021-04-19 12:52:29 +00:00
Mao Jiang
41528836b9 test/nvme_qpair: cases for nvme qpair initialization
Change-Id: I327ea27805488c4824caf22d151b3d14f1df1cc1
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6894
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-19 12:49:48 +00:00
Mao Jiang
9ac73cb3b9 test/nvme_ctrlr_ocssd_cmd: check ocssd supported
Change-Id: Ic2c6dfd0f0574e49856bc79b6024596c0d49cc5d
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7380
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-19 12:49:35 +00:00
yidong0635
5a752ae1aa lib/vfio_user: Fix compiling warning of non-debug warning.
Logs are all changed to DEBUGLOG. If you compiles non-debug mode.
Gcc reports error. Using #ifdef DEBUG to exclude them.

Fixes #1903

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idcaf083e430a77845fbd8443acade4b3f0e1efc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7445
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-04-19 12:49:25 +00:00
Mao Jiang
9d99392811 test/nvme_poll_group: cases for getting and freeing stats
Change-Id: I0901ec0317910aff633f1563de930b785bfc21cd
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7385
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:48:52 +00:00
Monica Kenguva
4da33ad390 rpc: Document trace_enable_tpoint_group, trace_disable_tpoint_group
and trace_get_tpoint_group_mask

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I25f29fbd5e2bc425a75bce2d0131bf963df51521
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6649
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-04-19 12:48:37 +00:00
Ben Walker
823bb32026 sock: Null out sock on spdk_sock_close in all success cases
Even if the operation is deferred, null it out if it reported success.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3cc9eaa88bdd7a2e7d13790782f4a9b0966e5585
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6892
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-19 12:48:21 +00:00
Monica Kenguva
86ef8f21c9 rpc: Document create and delete bdev uring
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Id396872112e8fb89eadd8b72cc0f02c543153e7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7329
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-19 12:48:03 +00:00
Michal Berger
ec632be24f check_format: Make use of shellcheck's -x conditional
-x is supported since 0.4.0 release, make a note of that.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icc64132536c18108029f6c5fa2cbdd5b27018d8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7417
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:47:51 +00:00
Shuhei Matsumoto
af661f7844 ut/iscsi: Add Data-OUT PDU sequence test cases
Test scenario is as follows.

Some iSCSI initiator sends a Data-OUT PDU sequence such that the size of
the data segment of any Data-OUT PDU is not block size multiples.
Test if such complex Data-OUT PDU sequence is processed correctly.

Desired Data Transfer Length is 5 * SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2.
Number of Data-OUT PDUs is 4. Length of the data segment of the first two PDUs are
SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 - 4. Length of the data segment of the
third PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH. Length of the data segment
of the final PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 + 8.

Three data buffers should be used and three subtasks should be created and submitted.

The test scenario assume that a iscsi_conn_read_data() call could read
the required length of the data and all read lengths are 4 bytes multiples.
The latter is to verify data is copied to the correct offset by using data patterns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e3939d07cd4f50fe3dcf659a18a9f8fcbe01e07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6584
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>
Community-CI: Mellanox Build Bot
2021-04-19 12:47:40 +00:00
Shuhei Matsumoto
4af8b24ace ut/iscsi: Add test cases for the function iscsi_pdu_payload_read()
Test sharing data buffer among multiple Data-OUT PDUs.

Allocate real data buffers and the iscsi_conn_read_data() stub writes
data patterns into them.

The data pattern is to write offset per 4 bytes. This requires read
length to 4 bytes multiples but the requirement will be acceptable.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I87c673c3bb0ada2afebb9332af9525cd9d7388f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6568
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-19 12:47:40 +00:00
Shuhei Matsumoto
ce43ae2123 lib/iscsi: Merge multiple Data-OUT PDUs up to 64KB in a sequence
Some iSCSI initiators send a Data-OUT PDU sequence whose PDUs do
not have block size multiples data.

SPDK iSCSI target had replied SCSI write error to such initiators
because previously we had sent a write subtask per Data-OUT PDU.
SPDK SCSI library had rejected the write subtask because its data
was not block size multiples.

This patch fixes the issue.

The idea is to aggregate multiple Data-OUT PDUs into a single write
subtask up to 64KB or until F bit is set. MaxRecvDataSegmentLength
is 64KB but MaxBurstLength is 1MB. Hence one Data-OUT PDU data may
be split into multiple data buffers, but the maximum number of split
is two.

When processing the data segment of the Data-OUT PDU, save the data
buffer of the current PDU to the current task if the data buffer is
not full and F bit is not set. In this case, write subtask is not
submitted.

When processing the header of the Data-OUT PDU, if the current task
saves the data buffer from the last Data-OUT PDU, it passes the data
buffer to the Data-OUT PDU.

When reading the data segment of the current PDU, attach the second
data buffer to the current PDU if the first data buffer becomes full.

These are enabled only if DIF is disabled.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib9cfb53fe8c0807a63e58c61bed3bb52f60f4830
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6439
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-19 12:47:40 +00:00
Jin Yu
2f600ca75e virtio-blk: add hotplug rpc
Change-Id: I4ed583d91ae9e820be1ee6f4553f29d6650c4922
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5791
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
2021-04-16 19:21:13 +00:00
Jin Yu
ebea4dd660 virtio_blk: add hotplug support
It can divide to two parts:
1, UIO driver - sigbus error handling and uevent
process.
2, VFIO - request notify handling.

sigbus error process is in previous patch.

Change-Id: Idc09754b83ae9ddcaea1f2afcbc13e528ead9863
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5768
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: Ben Walker <benjamin.walker@intel.com>
2021-04-16 19:21:13 +00:00
Jin Yu
5957f2c479 env: extend the use of event listen
struct sockaddr_nl {
    sa_family_t     nl_family;  /* AF_NETLINK */
    unsigned short  nl_pad;     /* Zero */
    pid_t           nl_pid;     /* Port ID */
    __u32           nl_groups;  /* Multicast groups mask */
};

nl_pid is the unicast address of netlink socket.  It's always 0
if the destination is in the kernel.  For a user-space process,
nl_pid is usually the PID of the process owning the destination
socket.  However, nl_pid identifies a netlink socket, not a
process.  If a process owns several netlink sockets, then nl_pid
can be equal to the process ID only for at most one socket.
There are two ways to assign nl_pid to a netlink socket.  If the
application sets nl_pid before calling bind(), then it is up to
the application to make sure that nl_pid is unique.  If the
application sets it to 0, the kernel takes care of assigning it.
The kernel assigns the process ID to the first netlink socket the
process opens and assigns a unique nl_pid to every netlink socket
that the process subsequently creates.

Change-Id: Ic0688228105ea6ba4ebae1d130b9271126c37b0e
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7367
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-16 19:21:13 +00:00
Jin Yu
5ee049eeec virtio_pci: add sigbus handler
Add the sigbus handler to virtio pci device
such as virtio_blk and virtio_scsi.

Change-Id: I07f2f175a585a425ef14050e2bf83bacb6e4c3bc
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5769
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-04-16 19:21:13 +00:00
GangCao
303d670f8e Env: close the FD in failed case
Change-Id: I290571bf11ff7365fb7b56282b0e60c20871d9ff
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7428
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-16 16:00:24 +00:00
G.Balaji
391d89b873 nvme: move AER handling to a separate function
This prepares for an upcoming patch to fix issue #1701 which
requires handling async events outside of the check
completions loop.

Fixes:  #1701

Signed-off-by: G.Balaji <gbalajieie@gmail.com>
Change-Id: I4985d814903143511383172b1a443580db33a78f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7416
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>
2021-04-16 15:01:33 +00:00
GangCao
ebeac5decc event: add an assert check for obtained reactor
In the case that reactor is needed to be valid, add an
explicit assert there.

Change-Id: Ic47030d50a6a940ddf87a3744bae38c94dd7252e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7320
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-04-16 05:05:19 +00:00
Mao Jiang
567a3da8ca test/nvmf/subsystem: cases for reservation registrant adding and removing
Change-Id: I4ea45b6a1ccfc252f2a230a7163b765b79e1e927
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7301
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: Jim Harris <james.r.harris@intel.com>
2021-04-16 05:04:57 +00:00
Ben Walker
da831cf82a sock: Add pointer to group from group_impl
This makes it possible to traverse from the group_impl to
the group. It hasn't been necessary so far but will be in an
upcoming change.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2bf119461bfd5ac5c8a63a3f1f4560d32e695c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7218
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>
2021-04-16 05:04:29 +00:00
Ben Walker
b77db23ef9 sock: Map operations are now part of the module API
Individual modules will need to mantain their own placement maps for
this to work correctly, especially if modules have different algorithms.
This is a step toward allowing them to do that.

Change-Id: Ie798baa50b94f1e99d6690adb606b936c7b30da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7217
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>
2021-04-16 05:04:29 +00:00
Ben Walker
b18fdef111 sock: sock_map_lookup now takes map as first parameter
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id294ed4b25352735309bf04e83d09eb455c1b8cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7216
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>
2021-04-16 05:04:29 +00:00
Ben Walker
706c81e21f sock: sock_map_release now takes sock map as first parameter
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iad82b0f263e1c8130056084145d704549a182ae7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7215
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>
2021-04-16 05:04:29 +00:00
Ben Walker
5a11b6a64b sock: sock_map_insert now takes the map as the first parameter
This is a step toward allowing for multiple maps. Each module may have a
different meaning for placement_id with different uniqueness rules. They
can't all be in the same map.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I608680a08b947a5d5c0818ff66505ed64e1b891e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7214
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>
2021-04-16 05:04:29 +00:00
Ben Walker
d3f7d076a6 sock: Add struct spdk_sock_map to hold map related globals
Change-Id: I24bb5529ea83142fc8569963365fde043c4f271e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7213
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-16 05:04:29 +00:00
Ben Walker
e8bcf36a81 sock: Don't cache placement_id in generic sock struct
Instead, move it down to the modules. This allows modules
to potentially change the value, if they are able.

Change-Id: I08f5fbadf5d1e96b489ddaaca72aa051ce2cb85c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7212
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-16 05:04:29 +00:00
Ben Walker
1d2613fe36 sock/posix: Eliminate so_priority
This value is already available in the options structure.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I140dc79da1fa5f155a39f1f9e2f54f46d93b6c1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7211
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-16 05:04:29 +00:00
Ben Walker
21c06bac09 sock: Release sock_map entries before shutdown
There are a small, bounded set of placement_ids that the socket layer
will ever encounter, and they remain valid for the lifetime of the
program. The association between a poll group and a placement_id is now
correctly broken when the reference count drops to 0 (in response to
sock_map_release calls), so do not free the entry when the poll group is
destroyed so that it may be reused again.

Change-Id: Iad90e2da7d0860fa8c5cff24f9699bef30cd7bc2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7210
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-16 05:04:29 +00:00
Ben Walker
4ce63b9877 sock: Allow null entries in sock_map
Allow the map to have entries with a valid placement_id, but no group.
This will be useful later when the order of placement_id discovery and
group assignment may be reversed.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia39adb3a030135940aeb9eeadf9df78056e59c0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7209
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-16 05:04:29 +00:00
Monica Kenguva
b997e957d8 rpc: Document bdev_error_inject_error
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I42d11341df2c364b0ad0c948c195e13448426c59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6633
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>
Community-CI: Mellanox Build Bot
2021-04-15 21:41:16 +00:00
Monica Kenguva
a89ea97204 bdev/error: properly initialize value of num for inject_error RPC
Updated to represent default value of number of errors injected.

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: If3f7a5f4a222fa1180635beb671d9479eede0435
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7246
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 21:41:05 +00:00
Changpeng Liu
44c70f8215 scsi: return scsi error status for invalid SCSI CDB
We can return error status when processing RELEASE2 without
a reservation, also add a UT to cover this case.

Fix issue #1898.

Change-Id: I56ffa8eabfc0409307500f8740cb627aab9d2f0b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7379
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 20:25:28 +00:00
Jim Harris
ba9853b9ba Revert "env: Register external memory with DPDK"
This reverts commit aaac48880d.

This patch was showing issues with SPDK vhost mappings
when handling larger numbers of VMs.

Fixes issue #1901.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I81bd311d26037dcb9340d85abcb4ea45b20a5170
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7424
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 20:22:26 +00:00
Shuhei Matsumoto
476b66614d ut/bdev_nvme: Use attach/detach ctrlr for test_pending_reset()
This is necessary to the following patches to test reset continuation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20e0a6b96694eb06adadfbe8e20f73380645ea43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7326
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>
Community-CI: Mellanox Build Bot
2021-04-15 18:57:54 +00:00
Shuhei Matsumoto
f56563add2 ut/bdev_nvme: Use const variable for string array to avoid raw number
It is more readable to use const variable rather than raw number.
memset is the way to initialize variable size array.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42f3f34422ea96e06a99bd6cc02e0e91349a4009
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7323
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-04-15 18:57:54 +00:00
Shuhei Matsumoto
b96c0b2707 ut/bdev_nvme: Populate namespaces by default when attaching ctrlr
Previously when attaching a ctrlr, all namespaces had not been
populated. Hence we had to populate each namespace manually.

It is more normal if all namespaces are populated when attaching the
corresponding ctrlr.

This patch does such change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I55d9c444c492ba6e44a609eac81b1ef25a7190a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7313
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-15 18:57:54 +00:00
Shuhei Matsumoto
924081cec9 ut/bdev_nvme: spdk_nvme_probe_poll_async() stub processes only a ctrlr whose trid matches
Previously spdk_nvme_probe_poll_async() had processed all attaching
controllers. Hence it was not easy to attach multiple controllers in
unit tests.

Besides, add a check to exclude duplicated controllers into ut_attach_ctrlr().

If the target is any SPDK library, we should insert another patch
only to do code movement, but this is a unit test file, and so it
will be acceptable to include code movement in the same file.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e8eba6a67b2a6d0df384214ff84aa5b0c602217
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7312
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-15 18:57:54 +00:00
Karol Latecki
4b3a60daee scripts/nvmf_perf: rename SPDK Target num_cores to core_mask
num_cores name was misleading, as the parameter actually
contained core mask (or core list). Create separate
class attributes with core mask and number of cores.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ibfae7770aea2f2c1c720abf567400deb50028ab4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6535
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: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
128df53566 scripts/nvmf_perf: save subsystem info
Save info about subsystems created subsystems (target
side) and remote subsystems (initiator side) into
a list.

Change-Id: I7ec1c6a4d1f75060b69b68e0b8e0dd61789fc9e0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6374
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
696d55bf94 scripts/nvmf_perf: run set_irq_affinity
Run set_irq_affinity script after irqbalance service
is disabled and manually tune IRQs to be run only on
the CPUs local to NIC NUMA node.

set_irq_affinit.sh script must be manually downloaded
as part of https://github.com/Mellanox/mlnx-tools/tree/master/ofed_scripts
package before running tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I67b3c851bcf283caea29ad36f6d4bc0322ca0d27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6534
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
3992eb2896 scripts/nvmf_perf: set cpu governor to performance
In performance tests always use best performance policy.
Previously this was manually managed on test systems,
but it's better to do this automatically every time.

Change-Id: Iff81863cf8d9cc713a3c4cce1d8edf7ebbf81c84
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6373
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: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
2f9103304f scripts/nvmf_perf: add configure_tuned method
Modify CPU power management settings to achieve high,
consistent results.

Change-Id: I3602ae7523c5b83878238928caaeb453f7d2533e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6372
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
81ccc81dde scripts/nvmf_perf: add configure_sysctl method
Tune sysctl parameters for TCP testing. Restore previous
settings after tests have finished. For ADQ-enabled tests
also set proper value for busy_read option.
Commit includes a fix to initiator exec_cmd() method to
allow using command parameters which contains whitespace,
otherwise it's not possible to set some of sysctl params.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3376b69b8d7c0d8a282765db4fe55824f55f9e05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6265
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
a35f2b34dd scripts/nvmf_perf: add configure_services method
Disable all unnecessary services which might affect
tests performance.
Managing services implemented in a very simplified way
usign subprocess and configparser modules (because json
output is not available). Proper implementation would
need to use a proper dBus API, but this seems like an
overkill for such a script.

Change-Id: I72feec4293b77442a9d2c9b4afaa032df1c4d5e1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6264
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
2c5849c7be scripts/nvmf_perf: add adq_configure_nic method
Configure NIC settings as per ADQ configuration guide.

Change-Id: I957aada267474c2a1448c89a1b7c81d4dd261ca6
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6263
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 16:33:26 +00:00
Karol Latecki
3c09b2fb99 scripts/nvmf_perf: add adq_load_modules method
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If2784b74ece6c48b81cc53e63412cd2bc618ffef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6262
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 16:33:26 +00:00
Alexey Marchuk
b07a04118a ut/rdma: Fix GCC 10.2.0 warning
rdma_ut.c: In function ‘test_spdk_nvmf_rdma_request_parse_sgl_with_md’:
rdma_ut.c:1152:54: warning: array subscript 10 is outside array bounds of ‘struct spdk_nvmf_rdma_request_data[1]’ [-Warray-bounds]
 1152 |  aligned_buffer = (void *)((uintptr_t)((char *)&data + NVMF_DATA_BUFFER_MASK) &
      |                                       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
rdma_ut.c:834:37: note: while referencing ‘data’
  834 |  struct spdk_nvmf_rdma_request_data data;
      |                                     ^~~~

The fix is to use array instead of spdk_nvmf_rdma_request_data
structure

Change-Id: I81bd311d26037dcb9340d85abcb4ea45b20a5171
Reported-by: G.Balaji <gbalajieie@gmail.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7365
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-15 11:25:36 +00:00
yidong0635
278bcad4ca perf: remove unused g_tsc_us_rate.
Not only in accel_perf, but also in test event_perf.
Remove them.

Fixes #1895

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I2af1d9f6f077f3ae775af994567804633fc8f050
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7370
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-15 11:25:21 +00:00
Michal Berger
3bc0002511 autobuild: Add test for building SPDK RPMs
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iea87c87367d2ed49b00e896df046e0572fecec98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6549
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>
2021-04-15 11:24:57 +00:00
Michal Berger
7a5cc6cad5 rpmbuild: Add script for building .rpm packages out of the SPDK repo
For now this is kept at its very basics. Dependencies are handled
via pgkdep, they are not explicitly defined by the .rpm itself.
Currently, up to four .rpm packages are being built:

spdk
spdk-devel
spdk-libs
spdk-dpdk-lib

Together they include all binaries|libs|header files + some setup
scripts which are commonly used throughout the repo. Installation
paths are hardcoded to:

/usr/local/{bin,lib{,/dpdk},include}:
  - binaries
  - libraries
  - header files
/usr/libexec/spdk:
  - scripts
/etc:
  - configuration files

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic5f067c4e7b8da3d697ee469bc9c794d5a0a035b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6436
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>
2021-04-15 11:24:57 +00:00
Alexey Marchuk
a6b92896ff perf: Fix memory leak when IO submit failed
When submit_io cb returns bad status, current
task is dropped and allocated memory is not cleaned.

Change-Id: Ibc33e76e6800644c29eaeb826a3401ad5d5fd582
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7376
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>
2021-04-15 11:24:21 +00:00
Alexey Marchuk
364ad5aedc perf: Cleanup ns_worker_ctx after draining IO
Function cleanup_ns_worker_ctx is only called for
ns_ctx which have outstanding IO, so when draining
phase is started and some context doesn't have
outstanding IO, it won't be cleaned properly.

To fix this problem, call cleanup_ns_worker_ctx for
every context when drining is finished.

Fixes issue #1880

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I3ce4716ed6ac1369b6f72b03cbcfd7d407f7de55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7282
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: <dongx.yi@intel.com>
2021-04-15 11:24:21 +00:00
Michal Berger
0c78378a63 test/setup: Make sure big enough drive is selected for the tests
Look for drives with 2GB of space at minimum.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic326229120ffc5d839bbf465855d8be857ab4f73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7377
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-15 11:24:08 +00:00
Changpeng Liu
9c7f460f55 vfio-user: optimize notice log to debug log
Change-Id: I2e47b148209ce4c232dbdc5f20c90548be995e1a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7334
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>
2021-04-15 11:23:47 +00:00
Changpeng Liu
b163a88715 nvmf/vfio-user: calculate MDTS based on transport iovcnt
This will ensure that we can't exceed the iovcnt when parse
NVMe PRP list to req->iov.

Also comment that the iovcnt in vfio-user transport is used to track
each gpa_to_vva map, for NVMe PRP list command, the PRP2 itself also
will use one entry, so we need add one more entry for this case.

Fix issue #1864.

Change-Id: I06c7137e2c4637c9501f82a9eb1c8e4395d819cd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7264
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-15 11:23:47 +00:00
Changpeng Liu
bc279db48a nvmf: add one more iov entry for unaligned first page
For NVMe PRP list command, if the first PRP entry wasn't page
aligned, the number of IOV should add one more entry.

For VFIOUSER transport, a 128KiB PRP command may use 33 entries,
so we add one more entry here to address this case.

Change-Id: I9e30b301ef3ab62d7667adf336f38be9df699929
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7263
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-04-15 11:23:47 +00:00
Changpeng Liu
45aaf0db1d nvmf/vfio-user: register external DMA memory regions to SPDK
For NVMe backend device, we should use vtophys to calculate
physical address when doing DMA from/to VM to drives.

Fix #1822.

Change-Id: Ib8fbc371e19e77a20202d408340e7d65644b1eeb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7261
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>
2021-04-15 11:23:47 +00:00
Changpeng Liu
275c5dec0f nvmf/vfio-user: apply new DMA add/remove APIs
Change-Id: I8d54b4c2e218995701efc6650b3e5fbe8c6071af
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7260
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-15 11:23:47 +00:00
Changpeng Liu
addfab0101 nvmf/vfio-user: start a MMIO poller to poll MMIO access
Previously we poll the MMIO callbacks in the context of ADMIN queue's
poll group, here we do some improvement to start a poller to do MMIO
poll, then the group poll will only process NVMe commands while the
MMIO poller will process MMIO access.

This is useful when doing live migration, because the migration region
defined by VFIO is a BAR region, we should stop polling queue pairs
but ack the MMIO accesses during the live migration.

Change-Id: I63bac44889cbe0c31d47599810aab8335dfd4ff5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7251
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-15 11:23:47 +00:00
Changpeng Liu
342f9b985f nvmf/vfio-user: move up the code to before the caller
Just code movement for the coming patch.

Change-Id: I7e844bc27a037e086796f9659351f20cdbb517fb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7333
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>
2021-04-15 11:23:47 +00:00
Changpeng Liu
a43a0b7798 nvmf/vfio-user: free qpair to fix the memory leak
Change-Id: I92550cfa6857aba471ac1b2afed7e8acef3453d9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7250
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>
Reviewed-by: <dongx.yi@intel.com>
2021-04-15 11:23:47 +00:00
Ziye Yang
3a093d82c3 idxd: Update the definition of register according to the new spec.
This patch is used to update the field definition related with
work queue in the header file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I68b81d9dfc2497db89e96f0730785be03dcb8add
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7225
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: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-04-15 04:35:09 +00:00
Michal Berger
c6eda94181 test/vhost: Make sure block devices are cleaned up after the test
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icdfa78572e5cbf1ed14e559b450e7d9ba98c585b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7321
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>
Community-CI: Mellanox Build Bot
2021-04-14 23:41:14 +00:00
Michal Berger
c5cba2c16a test/vhost: Cleanup the way how nvmf_tgt is handled in migration test
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7e739a4e085d150b0be73cd890f0cf85f05ab7fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7200
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-04-14 23:41:14 +00:00
Michal Berger
bfdb9de3f0 test/vhost: Extend fio runtime during migration tests
Migration can take longer than 10s, hence we need to give fio more
time to spin in order to make sure it's still running on the target
vm after migration is complete.

On the other hand, reduce the timeout used to wait for fio after
the migration is done - there's no need to wait almost a minute,
half that time.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1b53682d5c8bc72336a9eead28c395f97cd81fe7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7199
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: Karol Latecki <karol.latecki@intel.com>
2021-04-14 23:41:14 +00:00
Jim Harris
c2e0da84c6 nvme: improve comment for nvme_pcie_ctrlr_get_max_xfer_size
NVME_MAX_PRP_LIST_ENTRIES has changed over time, so let's
just remove the reference to the exact value here.  Also
explain a bit more why the max size isn't
(NUM_ENTRIES + 1) * page_size.

While here, do a small whitespace cleanup as well.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib75813788abdd3dbb43192f9fdc27f99b33aeadf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7328
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-14 15:35:08 +00:00
Jim Harris
17fdcd7116 test/unit/nvme: relax some nvme_ns_cmd_ut asserts
We only need SPDK_CU_ASSERT_FATAL to check for
NULL pointers.  Other checks should just use
CU_ASSERT and variants.

There are some nvme_ns_cmd_ut checks that are
using SPDK_CU_ASSERT_FATAL unnecessarily.  Let's fix
them.

Found during investigation of issue #1882.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0b313e44e2ed05554783933e7d4bbc5f07a7e84a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7290
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-14 15:35:08 +00:00
Jim Harris
ba6f6c5eb0 nvmf: wait for qpair disconnect cbs when removing subsys
nvmf_poll_group_remove_subsystem_msg() disconnects all
qpairs associated with controllers in the specified
subsystem.  If it finds any controllers that need to
be disconnected, it sends a message to the running
thread to execute the same function again later.

But when it runs again later, the qpair may no longer
be in the poll group, but there could still be
outstanding messages being sent between threads.  For
example, _nvmf_qpair_destroy() needs to send a message
to the ctrlr->thread to clear the qpair mask bit.

All of this could result in the nvmf target starting
to destroy poll groups prematurely.  Destroy poll
groups results in the nvmf spdk_threads exiting. If
there are still messages being processed from
the STOP_SUBSYSTEMS target state, we can get
use-after-free errors since processing of those
messages could access freed memory associated with
the exited thread.

Fixes issue #1850.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1e63b9addb2956495a69b5108a41e029f6f9a85d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7275
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-14 15:35:08 +00:00
yupeng
530646f60c nvme: add NVMe Host Behavior Support
Host Behavior Support is defined in 5.21.1.22 of the NVME spec. This
patch adds the related data structures.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I99b2c1e55e23cadcd967b7adf5f8e75a2d799519
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7338
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-04-14 07:26:20 +00:00
Jim Harris
df902b1d2e include: remove util.h include from queue_extras.h
This include isn't needed in queue_extras.h itself.
There were a few places that were implicitly
depending on this include, so fix those to include
util.h explicitly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia962ae5a4403ee8ae15f3106d0d5e7d7412a4535
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7172
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-14 07:25:21 +00:00
Alexey Marchuk
558be98fd3 nvme/pcie: Add statistics per poll group
Check if qpair has a poll group during the connect process,
use poll group's statistics or allocate own structure per
qpair. That is done due to not all applications use poll
groups and we want to avoid "if (qpair->group)"
conditions in data path.

Admin qpair always allocates its own statistics
structure but the statistics are not reported
since this qpair is not attached to a poll group.

Statistics are reported by spdk_nvme_perf tool
if --transport-stats and in bdev_nvme_transport_statistics
RPC method.

Change-Id: I58765be161491fe394968ea65ea22db1478b219a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6304
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-04-13 21:30:52 +00:00
Alexey Marchuk
5c33437b99 bdev_nvme: Add RPC to dump transport statistics
The new RPC bdev_nvme_get_transport_statistics is added.

Change-Id: Ic13d096717c041fd3e0b77eaebca6ae09239698b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6303
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-04-13 21:30:52 +00:00
Alexey Marchuk
331f9755cf perf: Add option to print transport statistics
Statistics are dumped in the end of perf tool work,
enabled using long option --transport-stats

Change-Id: Ice3755ba82ebcdacfa72ceb9b3d5a1caee911811
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6302
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>
Reviewed-by: <dongx.yi@intel.com>
2021-04-13 21:30:52 +00:00
Alexey Marchuk
6dd6a3cc37 perf: use getopt_long
I was trying to find a free character to add
statistics reporting and didn't fine a suitable
one. Since perf provides a lot of short options,
let's change it to also use long options.

Change-Id: I2a7fd5619e996a40b2d432017992d5f888abb656
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6301
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>
Reviewed-by: <dongx.yi@intel.com>
2021-04-13 21:30:52 +00:00
Alexey Marchuk
e966937625 nvme: Add functions to get/free poll group statistics
These are interface functions that can be used by
an application e.g. spdk_nvme_perf or bdev_nvme
library. The next patches will add usage of these
functions.

Change-Id: I33b88e0e713c2ea5967f9241885e3257c5070577
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6300
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-13 21:30:52 +00:00
Alexey Marchuk
3fcda8e779 nvme: Add transport intrafce to get/free stats
The new 2 API function allow to get and free stats
per poll group. New function to get transport name
have been added to report not only transport type but
also the name.
For now only RDMA transport reports statistics,
other transports will be added later.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I2824cb474fde5fa859cf8196dabac2c48c05709c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6299
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-13 21:30:52 +00:00
Alexey Marchuk
50569293ef nvme/rdma: Add poller statistics
New statistics include number of poller calls,
number of idle polls and total number of completions.
These statistics allow to estimate % of idle polls
and the number of completions per poll.

Since nvme_rdma_cq_process_completions function
returns number of completed NVMF requests and each
NVMF request consumes 2 RDMA completions (send+recv),
this function was extended to return the number of
RDMA completions.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ifdc1e2e467f645adb5d66d39ff2a379e161fbd77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6298
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-13 08:41:39 +00:00
Alexey Marchuk
527f406b6b nvme/rdma: Use RDMA statistics
These statistics allow to estimate WRs batching
efficiency. The number of send WRs equals the total
number of submitted NVME commands.

Change-Id: I96c9836cd6b9070cf5f62e43b4d2738506866e94
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6297
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-04-13 08:41:39 +00:00
Liu Xiaodong
4e8032ab04 thread: ack msg_fd directly in intr_msg_proc
Although currently acking msg_fd inside function
msg_queue_run_batch() will also ack critical_msg's
notification, it is easier to understand the code
if moving acking msg_fd code into
thread_interrupt_msg_process().

Change-Id: I98267c5c28358334a2c1133e3dbc125788de77ab
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7265
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-13 08:41:08 +00:00
Liu Xiaodong
53429c7f44 thread: distinguish intr enabled and set
As a start of combining interrupt ability into poller,
it aims to get spdk_thread & spdk_poller runnable between
poll mode and interrupt mode with dynamic switching.

spdk_interrupt_mode_is_enabled() indicate whether interrupt
mode is enabled and dynamic switching is permitted. So
spdk_interrupt_mode_is_enabled==true leads to set up
interrupt mode related resources;
in_interrupt flag indicates whether one spdk_thread now
is running in intr mode.
It is possible that spdk_interrupt_mode_is_enabled==true
but in_interrupt==false. this means spdk_thread & spdk_poller
switched to poll mode from interrupt mode due to heavy
workload coming.

To align with spdk_reactor, use "in_interrupt" to
indicate whether one spdk_thread now runs in intr.

Change-Id: I2cd806bf4dec9969f3df88fac7f6b0c0b716d907
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6540
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: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-04-13 08:41:08 +00:00
Liu Xiaodong
8c4c8c3967 thread: extract send_msg_notification func
Change-Id: Ib83c53b138614ba9889969c1f98e1a5bdf7fee42
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7153
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-13 08:41:08 +00:00
Liu Xiaodong
fbd6c30b8b intr: call intr_enable before thread lib init
Restrict spdk_interrupt_mode_enable must be called
once prior to initializing the threading library.

Change-Id: I833ff63fae19882e82154195d03dd7ce56ffb1de
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6707
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-13 08:41:08 +00:00
Karol Latecki
26d7e3d4bb scripts/nvmf_perf: use common method name for calling subprocesses
Use common method name and parameters for calling
subprocesses for local (Target) and remote systems
(Initiators) instead of using "check_output" (from
subprocess module) and "exec_command" (from paramiko)
separately.
Having these functions wrapped by a single common
method will allow to create common methods in Server
class more eaisly, instead of creating two copies in
Target and Initiator classes.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1c10f6a88f3d7300c227e969ad6fd901763ac52c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6261
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-13 08:40:32 +00:00
Karol Latecki
f9dd94b515 scripts/nvmf_perf: add adq_enable option to configuration file
Parse the config file for "adq_enable" flag and enable
the option in SPDK Target and SPDK Initiator configuration.
At this point the flag has no effect on the generated
traffic, as the system and priority queues are not
configured properly. These settings will be added
gradually in following patches.

Change-Id: I5d7bc892f3aa7bbe691b7e0983294b56fcf994f5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6260
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-13 08:40:32 +00:00
Karol Latecki
ddb4d24b1d scripts/nvmf_perf: get detailed info about NICs in servers
Get detailed info about NICs installed in servers. This
is using lshw utility to make things easier and not
implement the whole logic for parsing /sys objects and
pci.ids listing in system.

Change-Id: I97871fdc9feaae1c2485574a7b488b88ac3afc4f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6259
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-04-13 08:40:32 +00:00
Karol Latecki
9fec8853fb scripts/nvmf_perf: re-work managing test options
The number of options for test execution grew high,
and we still need to add more. This results in a lot
of parameters to pass around in constructors, which
is hard to read and causes pylint to complain.

Instead of passing each option individually as a
separate parameter, pass them as dictionaries just
like they're defined in .json config file. This
makes managing the default values a bit harder, but
is more readable.

Change-Id: I5d88a2b7fe51d2df93edd9130678a937d34facdd
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6207
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-13 08:40:32 +00:00
Shuhei Matsumoto
3685228e72 lib/iscsi: Factor out submitting write subtask for Data-OUT PDU
This will be helpful to simplify the upcoming change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1f170fe48d2ec1b5ea05da6a8aa3589060c5c32d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6438
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-13 08:38:51 +00:00
Shuhei Matsumoto
b3a3e78a86 lib/iscsi: Track current offset of large write I/O to submit subtasks using current_data_offset
Use current_data_offset of task to track the current offset of
large write I/O by following the last patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iec3a371c6050fe11478b6f158259d8f4013f5238
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6424
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-04-13 08:38:51 +00:00
Changpeng Liu
ff5c19b136 nvmf: call transport abort callback when it's not empty
Custom transport may not provide the `qpair_abort_request`
callback function, so here for transport API we will just
call it when it's not empty.  We will add the callback
support with vfio-user in another patch.

Fix #1883.

Change-Id: Icd82a26bde4ed90068bc85ee04cce9642cb6135d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7291
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-13 08:37:57 +00:00
Maciej Wawryk
1fc0c2d8b9 test: move spdk_test_image.qcow2 to spdk_dependencies dir
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8d75f5fa22e79c93d1f8929b6df048b440d9fb8a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6940
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-13 05:13:50 +00:00
Maciej Wawryk
1794286d30 test/common: Update fedora version in readme
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I27261ed2c1f2a18c06b331c226ca08617ad57077
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6939
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-04-13 05:13:50 +00:00
Maciej Wawryk
67dd38285f test: removal deprecated sys_sgsw user location
Replace old '/home/sys_sgsw' location by new created
'/home/sys_sgci/spdk_dependencies'
Also update readme with current user name.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ifcea15f704183c7ae0044ee02bd28b6bd891b262
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-04-13 05:13:50 +00:00
Mao Jiang
dad0a60778 test/nvme_ctrlr_cmd: cases for adding requests abort
Change-Id: Ie0c0b4a183922bc190ebfb0dcb513cd6fb7c467d
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7003
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: Jim Harris <james.r.harris@intel.com>
2021-04-12 22:43:24 +00:00
ChengqiangMeng
f673969dbb unittest/nvme_rdma: increase code coverage for nvme_rdma.c
nvme_rdma_validate_cm_event
nvme_rdma_register_reqs
and nvme_rdma_unregister_reqs code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Ia002b750319c2cb7583e2d4cd4dc30e85c694eec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6956
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>
2021-04-12 22:40:33 +00:00
Evgeniy Kochetov
47a6653fdd ut/nvme: Fix uninitialized controller structure
Fixes #1882

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I5668f2a5d272f5260f4aaf22f5a08469ea903315
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-12 20:59:51 +00:00
Changpeng Liu
912b2116da nvmf/vfio-user: fix the race condition when creating new connection
We used the controller ready field to indicate ADMIN queue connection,
but the accept poller and ADMIN poll group may run in different
threads, this may lead vfu_attach_ctx() be called several times, so
change the 'ready' to true when a new socket connection is created.

Fix issue #1854.

Change-Id: Iab6ffd6dffb3fff5cf893e79774bc28fe0b2830c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7073
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>
2021-04-12 19:33:24 +00:00
Changpeng Liu
8c4ac1f2ff nvmf/vfio-user: use a better input parameter for vfio_user_map_prps
This will make the code easier to understand.

Change-Id: I7112d3fd5f0d6dce9b66d44375b68ce7d1e8951d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7072
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>
2021-04-12 19:33:24 +00:00
Changpeng Liu
e7f3142ca2 nvmf/vfio-user: eliminate unmap_q function
unmap_q is only be called in unmap_qp, so remove this function to make the
code more clear to read.

Change-Id: I627c7a1efdcb85476cb618fced8b0bfc2d8f1f62
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6886
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-12 19:33:24 +00:00
Changpeng Liu
43b63c68b9 nvmf/vfio-user: destroy controller when remote client is dead
When killing QEMU or remote client is terminated normally,
we can release current controller related data structure,
users may restart QEMU to connect the same socket file
again, for the new connection, vfio-user will create
a new controller data structure for it.

Here we add a lock in the endpoint data structure to protect
number of connected queue pairs variable, because controller
data structure is like a session, while endpoint is related
with the socket file, so it's safe here.  Moreover, we can
use this lock to protect live migration related data
structures in future.

Change-Id: Ie7060041a253604e7a2242813ec284eae46fe4e8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6862
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-12 19:33:24 +00:00
Jim Harris
3a3eb25ebb examples/nvme/identify: remove -v from usage text
This option may have been valid at one point, but is
not any longer.  So remove it from the usage text.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I83747968085a77fb52d735026294bf5f82517ffc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7276
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-12 19:15:55 +00:00
Shuhei Matsumoto
67a03bc73a ut/bdev_nvme: spdk_nvme_detach() stub calls ut_detach_ctrlr() if ctrlr is attached by ut_attach_ctrlr()
bdev_nvme_delete() calls spdk_nvme_detach() in the end. However,
previously spdk_nvme_detach() stub did nothing and ut_detach_ctrlr()
was called separately if ctrlr wass attached by ut_detach_ctrlr().

This was to differentiate the two cases, ctrlr is statically assigned
or dynamically attached by ut_detach_ctrlr().

This might be a little confusing. Hence by adding a flag, attached,
to ctrlr, merge ut_detach_ctrlr() into spdk_nvme_detach(), and remove
ut_detach_ctrlr() calls.

Besides, change one SPDK_CU_ASSERT_FATAL to return NULL because the
other cases do that and the callers for ut_attach_ctrlr() already have
SPDK_CU_ASSERT_FATAL.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2a73f57c6031819d3ae441a6874127ff5d53fc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-12 09:51:03 +00:00
Shuhei Matsumoto
d9e3ffea48 ut/bdev_nvme: Use bdev_nvme_find_io_path() in unit tests
This will make the following change simpler and testing
bdev_nvme_find_io_path() will be good.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac82bdba88e4abfa41c2ce04f10ce41a6b7dbd71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-04-12 09:51:03 +00:00
Shuhei Matsumoto
e5cb3d3fba bdev/nvme: Factor out getting admin path into a helper function
Factor out the operation to get ctrlr pointer to submit an admin
command into a helper function bdev_nvme_find_admin_path().

This will make the following changes transparent.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idabfa5874ad95414f24d414702205b0cdbc98ddb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7105
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>
2021-04-12 09:51:03 +00:00
Shuhei Matsumoto
42ae4267b6 bdev/nvme: Merge completing reset_io into _bdev_nvme_reset_complete()
reset_io is stored into nvme_bdev_ctrlr->reset_bio now. Hence we can
merge completing reset_io into _bdev_nvme_reset_complete() easily.
i
As a few minor changes, to reduce the size of the following patches,
clear reset_bio before calling spdk_bdev_io_complete(), and call
spdk_bdev_io_complete() after completing ctrlr reset.

The following patches will retry pending reset_ios if reset is internal,
abort reset_ios if reset is external and fails, or succeed reset_ios
if reset is external and succeeds.

This clean-up will be helpful for such enhancement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e0b4e04b19f4f4f3b21b2db4dc6a2b948b29c67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7241
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2021-04-12 09:51:03 +00:00
Shuhei Matsumoto
888def105f bdev/nvme: Further clean-up of bdev_nvme_reset()
nvme_bdev_ctrlr->reset_bio is accessed only by the thread which called
spdk_for_each_channel() and the callback to spdk_for_each_channel()
is called after unwinding stack via message.

Hence bdev_nvme_reset() can call _bdev_nvme_reset() rather than
_bdev_nvme_reset_start() and store bio into nvme_bdev_ctrlr->reset_bio
after _bdev_nvme_reset() returns zero.

Then inline _bdev_nvme_reset_start() into _bdev_nvme_reset() because
_bdev_nvme_reset_start() has only a single caller now.

The following patches will introduce subsystem and bdev_nvme_reset()
will reset all controllers of a subsystem sequentially. These further
clean-ups will be helpful for such enhancement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I25abaa5be511c967ce20c92e4caa7dfeb3e09dd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7240
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2021-04-12 09:51:03 +00:00
Shuhei Matsumoto
6d573781b5 lib/iscsi: Rename current_datain_offset of task by current_data_offset
The following patches will aggregate multiple Data-OUT PDUs into a
single write subtask and we will not be able to use reqh->buffer_offset
to track the current offset of large write I/O to submit write subtasks.

On the other hand, each iscsi_task or iscsi_subtask is only read or write

Hence rename current_datain_offset of iscsi_task by current_data_offset
in this patch.

The next patch will use it to track the current offset of large write I/O

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I922582c5b9474a3c512f81d0f0425158a38a9a8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6423
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-12 09:49:31 +00:00
Shuhei Matsumoto
00508c8ef1 lib/iscsi: Add data_len to mobj and use mobj to create write subtask
The following patches will aggregate multiple Data-OUT PDUs into a
single SCSI write up to 64KB. Any variable to accumulate data length
is necessary.

Hence add data_len to mobj and accumulate read data length into
mobj->data_len, and then refer mobj instead of pdu->data and
pdu->data_segment_len to submit write subtask.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6354534769e67c0fd995bbc3c2b4a80d21a23915
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6422
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-12 09:49:31 +00:00
Shuhei Matsumoto
7a783b5b38 iscsi: Factor out getting data buffer from mempool into helper function
Wrap an operation to get a data buffer from mempool into a helper
function iscsi_datapool_get() and wrap an operation to put a data
buffer to mempool into a helper function iscsi_data_pool_put().

Use inline for both functions.

Besides, as a minor fix, remove duplicated file inclusion between
iscsi.c and iscsi.h.
7

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia3005dffaa93a6bca16f19bb467fb5b64ae1aad2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6366
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-12 09:49:31 +00:00
Shuhei Matsumoto
3de09f8ece lib/iscsi: Support data split case for CRC32C computation
Add crc32c to struct spdk_iscsi_pdu and initialize it by SPDK_CRC32C_INITIAL,
and then use it as the initial value of _iscsi_pdu_calc_data_digest().
Separate finalization of crc32c into _iscsi_pdu_finalize_data_digest().

Move the definition of related macro constants from iscsi.c to iscsi.h.

iscsi_pdu_calc_data_digest() is used for read too. So setting
pdu->valid_data_bytes before calling iscsi_pdu_calc_data_digest()
for read.

Data split will be supported only if DIF is disabled, and hence
DIF case is not changed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9d24f605fd0d452782e17695b613cd2f63d2e42f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6421
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-12 09:49:31 +00:00
Shuhei Matsumoto
acdeb53f4b lib/iscsi: Increase buffer size to 64KB at most when more Data-OUT PDUs follow
The following patches will want to aggregate multiple Data-OUT PDUs
into the same data buffer, but it will be 64KB at most.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I72eabbeae0b027c2fbff2a5837d180b06b0a1b49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6418
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-12 09:49:31 +00:00
Shuhei Matsumoto
2ef97692bc lib/iscsi: Create subtask after reading data segment for Data-OUT PDU
The following patches will change the handler for Data-OUT PDU to
submit subtask only when 64KB data is read or F bit is set.

Previously, we had created a subtask when processing header and
before reading data segment.  Creating a subtask beforehand is not
convenient for the following changes.

Hence create a subtask after reading data segment.

If LUN is removed while processing the Data-OUT PDU, the corresponding
primary task will be terminated by iscsi_clear_all_transfer_task(),
and any subtask completion is not sent to initiator. Hence we can
reject the received Data-OUT PDU safely.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb6d6988676080b458b31d12fef065f3c1de0cb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6415
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: Changpeng Liu <changpeng.liu@intel.com>
2021-04-12 09:49:31 +00:00
Jin Yu
59237d22b8 lib: add a hotplug lib for device
The hotplug lib can be used for pcie devices
such as nvme, virtio_blk and virtio scsi.

For the sigbus handler, there is only one in a
process and it should handle all the devices.

And align nvme to the hotplug lib

Add the ADD uevent support for allowing the
device hotplug.

Change-Id: I82cd3b4af38ca24cee8b041a215a85c4a69e60f7
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5653
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: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-12 09:48:21 +00:00
ChengqiangMeng
1c3bc9d64d rdma/common.c: Fix possible memory leaks
Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I134f3ca3dfb0c747b0ca8544068961a53470106f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7262
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-12 09:44:41 +00:00
yidong0635
35dfd3eafb memory: Fix memory leak of g_vtophys_map allocated failed.
if g_phys_ref_map allocated successfully and g_vtophys_map
allocated failed. It reports memory leaks. so add
spdk_mem_map_free(&g_phys_ref_map).

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I06149c98f158d1c679e5045e279beccbdea10e55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Chengqiang Meng <chengqiangx.meng@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-04-12 09:44:13 +00:00
Michal Berger
f40b0b1629 pgkdep/git: Upgrade ice driver to 1.4.11
The old 1.2.1 version doesn't compile against latest 5.11.x kernels
(e.g. due to recent changes in include/net/xdp.h) so upgrade to the
latest compatible release.

Also, move the url to sourceforge since ice is released more often
there under e1000 project.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I08b7beae922addeb877fe321679151b02bd253db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7011
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2021-04-12 09:43:31 +00:00
Michal Berger
0f8bff29f8 pkgpdep/git: Patch QAT to adjust for changes in recent kernels 5.11.x
Most notably, crypto/sha.h was split into two separate header files,
crypto/sha1.h and crypto/sha2.h.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I43ae61034f743bf4aae7f2f29919eec92d851f01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7010
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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-04-12 09:43:31 +00:00
Michal Berger
c09b139e61 test/nvmf: Use rxe_cfg to get rxe-enabled net devices
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iafc067f880525f25363db1adf9a94a9fc9215455
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6994
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-12 09:41:20 +00:00
Michal Berger
4d52dae32a scripts/rxe_cfg: Add env switch to skip printing status header
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ibc3149b5b9591826ff9aeed38457c2aa9ff747e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-12 09:41:20 +00:00
Michal Berger
e99cfdb6c9 scripts/rxe_cfg: Split collect_devices()
collect_devices() is split into two functions:

 - collect_net_devices(): Collect ethernet net devs from the
                          net class.
 - collect_rxe_devices(): Collect all rxe devices from the
                          infiniband class.

This is done in order to make handling of some conditions easier.
Case and point, in newer kernels, device/net link is not anymore
created for the soft roce devices, instead only ./parent attribute
is available. collect_rxe_devices() is adjusted to handle such
a condition.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Idefa39c4a62c9e650a03e237f49940461e9782a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6992
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-12 09:41:20 +00:00
Monica Kenguva
132d80be05 rpc: Document scsi_get_devices
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Id7febeb8e4cad2f8f7e98366e38b6117afa7d7d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6916
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-04-12 09:40:19 +00:00
Monica Kenguva
039ab97c48 rpc: Document split bdev create and delete
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I3aba1fe4420830a06c9813d224417201e6ba594d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6753
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>
2021-04-12 09:39:29 +00:00
Ben Walker
2ab0506ef7 test/nvmf: Don't load kernel modules for custom transports
For custom transports, skip the kernel module loading and
unloading steps.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I193c62ffa0a9a5060b4bc504b39db3b6f660e1a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3584
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@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>
2021-04-10 03:49:40 +00:00
GangCao
01f45ecd8c NVMe: add the prefix of ctrlr identification for diagnosability
Introduce new utilities NVME_CTRLR_ERRLOG, NVME_CTRLR_WARNLOG and so
on to output the ctrlr's identification  at different log levels.

For RDMA and TCP, the subnqn will be output and for PCIe and custom,
the traddr will be ouptput.

Change-Id: I81a112463bf752999aa1fe4e0c867d88e09a2f64
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7057
Reviewed-by: Xiaodong Liu <xiaodong.liu@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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-09 17:29:21 +00:00
GangCao
415d664029 NVMe: fix the potential issue of dereference NULL pointer
Change-Id: Icb81239e64faa5e9c0daf361798b68e153effcee
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7154
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-09 17:29:21 +00:00
Ben Walker
e3e8fadca4 sock: Eliminate init parameter of sock_map_insert
This can be handled in a cleaner way by having the sock group
create/close operations take an extra reference.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id701b6dd9a19b01cd40e0d95eb870aef977eea99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7208
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-09 17:15:57 +00:00
Ben Walker
4bcafd5b15 sock: Delay asking a socket about it's placement_id until after it is
added to a group

The process of adding a socket to a group may, in some scenarios, change
the placement id.

Change-Id: I879d9641099d86978ede5d5e2be1a72eda65a79b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7207
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-09 17:15:57 +00:00
Ben Walker
141a95aa36 sock: Placement Ids may only map to a single group
Change-Id: Ib917f2e95f93f4cb48d53e35f3273b0c42ba1a4f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7206
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
2021-04-09 17:15:57 +00:00
Ben Walker
28b3889c8e sock: Use an enum for placement modes
Easier to read than integers.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ie9b8b16e1916b393a257e9ed0180ef9837f20cd2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7205
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-04-09 17:15:57 +00:00
Ben Walker
0254ef6d2b sock: Fix return code for adding a socket to a group twice
Also fix the comment. It's never going to make sense to add a socket
to a group twice.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id4845b77114aef32bbe4ea0e53d2e1fde8e116f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7204
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-09 17:15:57 +00:00
Konrad Sztyber
c6b9113ba7 nvmf/tcp: use free() to release transport when create fails
Using nvmf_tcp_destroy() would destroy ttransport->lock, which hasn't
been initialized by that point yet.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie9ced97ef520236dddaa70453b6807e8382ce534
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7235
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-04-09 17:13:57 +00:00
Michal Berger
c84ecccca3 vhost/windows: Make sure host drive is properly cleaned up
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I53ec43c62f5ab7bef2719119252eec3c7c6b90d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7269
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-04-08 16:38:39 +00:00
Shuhei Matsumoto
0247a9945a thread: Add spdk_io_channel_get_io_device() to get io_device from io_channel
This will be useful as the same purpose as
spdk_io_channel_iter_get_io_device() and will be used in the
following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id45f5980c65543703b91df2afeb47448232fe503
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7237
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
b3f998e58b bdev/nvme: Get current thread simply by spdk_get_thread() to set bio->orig_thread
These are not performance critical and we can get the current thread
simply by spdk_get_thread().

This change will make the following changes a little simpler.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide79b1275ec0122f7f9812fe53c08a83d0aafeda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7162
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
48cf3e9bbd bdev/nvme: Factor out deleting nvme_bdev_ctrlr into a helper function
This change will make the the upcoming changes a little easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I51776c8ab91a0dfd9150f17e567f8be795b9f4b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7046
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-04-08 16:10:26 +00:00
Shuhei Matsumoto
61532e08ed bdev/nvme: Rename nvme_bdev_ctrlr_do_destruct() by nvme_bdev_ctrlr_unregister()
Probably nvme_bdev_ctrlr_unregister() is more appropriate name.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3a0d3622c084df909e5daeb548726cd9bd826ad8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7045
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-04-08 16:10:26 +00:00
Shuhei Matsumoto
1a0144b7c4 bdev/nvme: Deleting OPAL and OCSSD after completing unregistration of io_device
Deleting OPAL device and OCSSD ctrlr after completing unregistration
of io_device will be safer and be helpful for the upcoming patches
to introduce subsystem.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7eb11d5c19bf50903496a7fb936c77aa05089046
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6889
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-04-08 16:10:26 +00:00
Shuhei Matsumoto
68a8502f1c bdev/nvme: Remove nvme_ns->ref and use nvme_ns->populated and nvme_ns->bdev instead
As said in the previous patches, nvme_ns->ref is 2 at most, and
first is for populating namespace and second is for nvme_bdev.
On the other hand, nvme_ns->populated is for populating namespace
and nvme_ns->bdev is for nvme_bdev.

Preparation was done by the preceding patches. Let's remove nvme_ns->ref
and use nvme_ns->populated and nvme_ns->bdev instead.

We have unit tests for both normal case and shutdown case now.
So regression will be avoided.

These changes will be helpful for the following patches to support
multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I279ca21a41d6ee2c07bbbeb62866e28423fcc6d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7097
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
2bed9983e2 bdev/nvme: Merge clearing nvme_ns->populated into nvme_ctrlr_depopulate_namespace_done()
Merge setting nvme_ns->populated to false into
nvme_ctrlr_depopulate_namespace_done(). This will simplify the
further changes.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4bb8347b085ec5855690f6dbde243269cedee706
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7136
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
b1d6c2f3cb bdev/ocssd: Add ocssd_ns->depopulate_pending to complete pending depopulation
The following patches will remove nvme_ns->ref and use nvme_ns->populated
and nvme_ns->bdev instead because nvms_ns->ref is two at most and
each count of nvme_ns->ref corresponds to nvme_ns->populated or
nvme_ns->bdev.

To do that, we need to ensure nvme_ns->populated is cleared after
spdk_bdev_unregister() is called, otherwise nvme_bdev_ctrlr_destruct()
is called twice.

However OCSSD namespace had used nvme_ns->populated to free resource
after getting log page completes.

To keep such deferral, add the depopulate_pending flag to struct bdev_ocssd_ns
and use it. Then clear nvme_ns->populated in bdev_ocssd_free_namespace()
after spdk_bdev_unregister().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I93199dbd504145bd1e5ea59f5914422c6c5bc938
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7102
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
f26d6c73e1 bdev/nvme: Set nvme_ns->populated to true just after nvme_ns is available
A few patches including this patch will remove nvme_ns->ref by
nvme_ns->populated and nvme_ns->bdev and remove nvme_ns->ref.

In this patch, set nvme_ns->populated to true when nvme_ns->ref is
incremented, i.e., nvme_ns is available. nvme_ctrlr_populate_namespace_done()
clears nvme_ns->populated if creating bdev failed by memset().
And add assert to nvme_ctrlr_depopulate_namespace_done() to ensure
nvme_ns->populated is false when nvme_ctrlr_depopulated_namespace_done()
is called.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I536933abb516c0a29231149ab564dc8b84245b10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7096
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
8cc81fa07a bdev/nvme: Inline nvme_bdev_ns_detach()
The nvme_ns->ref was added to nvme_bdev_ns to support both multipath
and OCSSD range. OCSSD range was to split a namespace into multiple
partitions.

However, OCSSD range was not used and removed to simplify multipath.

When namespace is not split, nvme_ns->ref is 2 at the maximum. First is
for populating namespace and second is for nvme_bdev. nvme_ns->populated
is for populating namespace and nvme_ns->bdev is for nvme_bdev.
Hence we can use nvme_ns->populated and nvme_ns->bdev directly instead of
nvme_ns->ref.

A few patches from this remove nvme_ns->ref and use nvme_ns->populated
and nvme_ns->bdev instead.

dThis patch inlines nvme_bdev_ns_detach() into the callers and remove it.

The following patches will adjust the locations to update nvme_ns->populated
and nvme_ns->bdev and then remove nvme_ns->ref.

Removing nvme_ns->ref will be helpful to associate multiple namespaces
into a single nvme_bdev for multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I87581d39769681adc5e1fdf0b33680e31d958e47
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7095
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
2b8661d6ac bdev/nvme: Move nvme_ctrlr_depopulate_namespace_done() to common.c
Moving nvme_ctrlr_depopulate_namespace_done() to common.c removes the
stub from bdev_ocssd_ut.c and will simplify the upcoming changes.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia94a88ca77518c7df08b52aa9298cdea5997ca1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7135
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
610dd86b8c bdev/nvme: Inline nvme_bdev_ns_to_bdev() and remove it
nvme_bdev_ns_to_bdev() was introduced because nvme_ns->bdev may be
removed to support multipath. However, it is unlikely now.

Hence it is easier to read to stop using nvme_bdev_ns_to_bdev() and
access nvme_ns->bdev directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaf35455218761bafd03060a21110ad1c4098b1db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7098
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
45d8309e52 bdev/nvme: Factor out deleting secondary trid into a helper function
Factor out deleting secondary trid from bdev_nvme_delete() into a
helper function bdev_nvme_delete_secondary_trid().

This will make the following changes simpler.

Besides, fix a typo, the case should be not 1B but 2B.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iba21efa0d8036ed15d2743a2548df05e866089d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7123
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
08e2210ace bdev/nvme: Merge callback and spdk_nvme_detach() into bdev_nvme_add_trid()
This change separates failover case more clearly, and will make
the following changes simpler.

Merge spdk_nvme_detach() and populate_namespaces_cb() into
bdev_nvme_add_secondary_trid(). Then change the return type of
bdev_nvme_add_secondary_trid() to void and move the comment to the
head of it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0eb706728cf1b9ad7031eb66e11880a47e2ba767
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7044
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Shuhei Matsumoto
0e3de45def bdev/nvme: Refactor add_trid() and rename it by add_secondary_trid()
Clean up bdev_nvme_add_trid() by factoring out comparison of namespaces
and comparison of trids into helper functions, bdev_nvme_compare_namespaces()
and bdev_nvme_compare_trids(), respectively.

Then rename bdev_nvme_add_trid() by bdev_nvme_add_secondary_trid().

Rename is for clarification and clean-up is for the next patch.
The next patch will merge spdk_nvme_detach() and populate_namespaces_cb()
into the renamed bdev_nvme_secondary_trid(). Clean-up makes the
next patch simpler.

One note is that checking if the type of trid is not PCIe is done
by holding mutex now to prioritize clean up.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idc8652329dd2c721d101a724ec1a57a66c4174a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7094
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
Karol Latecki
7366e569fb build/fio: disable warning for fio clang-11 builds
Fio 3.19 fails to build with Clang 11 because of
implicit-const-int-float-conversion error.
Disable -Werror checking for now.

Fixes #1848

Change-Id: I0f3922d7af412de35d9f79f3f5413af146996bf3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6991
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-04-08 16:09:00 +00:00
Alexey Marchuk
c3853598b1 nvme/ut: Add test to cover failed split of SGL list
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Iff99d5402ffaf3a526a2ac04539672d47a0a1ccb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7093
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-05 22:58:57 +00:00
Alexey Marchuk
c7bb68aa3e nvme: Handle errors returned by submit function
When a request is submitted, it may have incorrect iov
alignment that doesn't fit PRP requirements. In the
current version an internal function fails such a request
and returns a NULL pointer. This is mapped to -ENOMEM
error which is returned to generic bdev layer where
such a request is queued in a "nomem_io" queue and
later can be resubmitted. That is incorrect and such
a request must be completed immediately. To fail the
request, we need to differentiate between -ENOMEM and
other cases, so we pass a pointer to a result to
local nvme functions

Change-Id: I7120d49114d801497a71fca5a23b172732d088de
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7036
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-05 22:58:57 +00:00
Alexey Marchuk
a1f848b057 nvme: Add a function to handle error case in IO functions
This function will be used the next patch, current
behaviour remains unchanged

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie74c7395f67a08b0cac018eb5114f358a6b583cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7092
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-05 22:58:57 +00:00
Monica Kenguva
90db6167ce rpc: Document enable_vmd
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I04f58517ecae09e810d95d22bebc7215028cf016
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6852
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>
2021-04-02 08:23:05 +00:00
Michal Berger
7347f60bbc autotest: Use rpc_cmd() for rpc plugin-based tests
Also, create a common dir which will hold symlinks to all existing
plugins used in the tests. Location of the actual lib is not changed
so the relation to the given test suite is clearly preserved.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icb70bbc61fbfa3325a357d5dd93f554ff132a3b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7146
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-02 08:22:42 +00:00
Michal Berger
5ddb210e61 scripts/rpc: Support loading plugins in --server mode
Put plugin parser into a separate function and use it to additionally
parse arguments passed to rpc.py via stdin.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I170d762ed9f5483d92b298f4804ee4e9f227a751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7145
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-04-02 08:22:42 +00:00
Michal Berger
31f8d52d13 test/bdev: Switch to rpc_cmd()
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I01eb2e6b6da1e633278a1998ca8982ea8a132720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7088
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-04-02 08:22:42 +00:00
Michal Berger
08d4dce28c test/common: Allow rpc_cmd() to execute multiple commands
This allows to pass to rpc_cmd() sets of commands via stdin. E.g.:

rpc_cmd <<-CMDS
	bdev_malloc_create -b Malloc0 32 512
	bdev_malloc_create -b Malloc1 32 512
	bdev_malloc_create -b Malloc2 32 512
CMDS

Since rpc.py is already running in a server mode, this is slightly
faster than grouping commands and running scripts/rpc.py directly.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I29fbcf3f2751400980d35b4de2cce2da1cd2bf2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-04-02 08:22:42 +00:00
Michal Berger
9aa3c063da test/common: Don't disable unit tests for scan|auto builds
Unittest job is now split into three smaller jobs, each of them
requires unit tests to be built.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ibc0dfbf6f7395a9dfe23242b532fb5cb1f8dd8f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6839
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-04-01 11:20:35 +00:00
Michal Berger
63330f68b4 autobuild: Ignore warnings comming from doxygen 1.8.20
This particular version reports plenty of false positives causing the
test to fail. Example:

nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ctrlr_alloc_io_qpair()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ctrlr_get_ns()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_read()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_readv()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_read_with_md()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_write()\ilinebr' not found
nvme.md:2: warning: @copybrief or @copydoc target 'spdk_nvme_ns_cmd_writev()\ilinebr' not found

This is potentially a regression in caused by the following issue:
https://github.com/doxygen/doxygen/issues/7948

The above seems to be resolved in latest releases, however, until
they are shipped as part of distros we support, similar mitigation is
in order.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1e39c94f9f388de99e1106bcf15750e4b39384e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7160
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-04-01 11:18:53 +00:00
Michal Berger
20244a18b8 doc: Disable doxygen options marked as obsolete in newer versions
Next step would be to upgrade the entire Doxyfile to meet the new
specs.  For now, prevent doxygen from generating warnings about
these opts.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I2761675a435beb49abede89bc520c12a2cdc2dff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7134
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>
Community-CI: Mellanox Build Bot
2021-04-01 11:18:53 +00:00
Michal Berger
d58c945568 doc: Rename #index label to #mainpage
For some reason, newer versions of doxygen started to complain about
the following:

 warning: multiple use of section label 'index' for main page

To mitigate, use alternative name for the label.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6387a7c644c6626dd646c9fdd0e9ed1d430881f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7132
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>
Community-CI: Mellanox Build Bot
2021-04-01 11:18:53 +00:00
Jim Harris
8617ddc9d6 doc: fix bdev_nvme_cuse_register reference for bdev.md
The -p option was removed a while ago, all CUSE devices
are automatically created under /dev/spdk now.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iffc55e98957d5224bf15a435100610ce5a3cfb28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7152
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-04-01 11:17:53 +00:00
Konrad Sztyber
471300a31f doc/nvmf: reorganize target configuration section
Moved the subsections on configuring SPDK's NVMe-oF target to be under
the appropriate section instead of being attached to the one on FC
transport support.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I56070fa7aec00b96b2c34cfa6f5ec0d64fd0aee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6773
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-01 11:17:09 +00:00
Maciej Szulik
6497b0774e nvmf: add max_io_size validation
The max_io_size transport option should be a power of 2 and be >= 8KB.

Max data tranfer size is defined in NVMe-oF spec as 2^(mdts cmd field) * 4KB.
Mdts cmd field is calculated as spdk_u32log2(transport->opts.max_io_size / 4096),
so max_io_size < 8KB results in mdts=0, which means no size limit (according to spec).

User can set max_io_size = 0 explicitly to allow no size limit.

Signed-off-by: Maciej Szulik <maciej.szulik@intel.com>
Change-Id: Id88a77efce5f217e1fc7750f61c0bd330aaa3791
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6384
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-01 11:16:56 +00:00
Karol Latecki
201ad2f917 doc: add links to 21.01 NVMe-oF performance reports
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ie436a4f02f774ec9128e6e0a0b3c6639d427d5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7103
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-04-01 10:04:16 +00:00
Jin Yu
0ccf4a9ce6 env_pci: fix device_allow small issue
The dbdf format is xxxx:xx:xx.x and with the wrong
format the rte_devargs_parse always fails.

Change-Id: Ia34bc5e68f6401bb25907d5d07c65636b4f491b5
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7140
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: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-03-31 08:55:59 +00:00
Mao Jiang
b69356a85d test/nvme_ctrlr: cases for ctrlr adding and removing process
Change-Id: Ie3a5d31e8d5da50935491804e31b2078e6893a1f
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7077
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-31 08:52:08 +00:00
Alexey Marchuk
c4a1b3431a nvmf: Fix bug when subsystem failed to pause
We can send a message to repeat subsystem pause
and free a context that will be used later

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ia5e8b0ff43f5e38bd8e659a8a64d42926e1d3c6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6661
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-31 08:49:55 +00:00
Michal Berger
d22233ac59 autopackage: Make lto build dependent only on RUN_NIGHTLY flag
This is done in preparation for the RPM tests.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I93cd0d3d7ddeff54387e2a270e9713b2415845b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7142
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>
Community-CI: Mellanox Build Bot
2021-03-31 08:49:44 +00:00
yidong0635
13cd7c597a example/abort: Fix missing optarg.
Optargs are  missed about -G and -T
which are used to trace and debug.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I3624b80f52c1b603acf1bc96126b73d1042f1b34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-03-31 08:49:37 +00:00
Ziye Yang
f0956d33fb nvmf/tcp: Move the accel_engine into the poll group.
With this change, each polling group will use one
accel_engine channel. This change will be more suitable
to utlize the underlying accelerated device.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ibab183a1f65baff7e58529ee05e96b1b04731285
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7055
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-30 11:50:20 +00:00
Michal Berger
85d48c64a9 autotest: Make sure core dumps are generated for ASAN and UBSAN
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7d85daa3a5c90cdc250caca386a14078928df4c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6997
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-30 11:49:17 +00:00
ChengqiangMeng
dfe8d308a1 unittest/nvme_ns: increase code coverage
nvme_ns_has_supported_iocs_specific_data and nvme_ctrlr_identify_ns_iocs_specific
and nvme_ns_free_zns_specific_data code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I2a3d26fbfbdd052978c7af282ce88ca4f3da83b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6719
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-30 11:48:54 +00:00
Changpeng Liu
dc03266366 nvmf/vfio-user: unmap queue pairs when removing memory region
Actually we already do this when removeing a memory region, but
the check for it is too strict, we should unmap queue pairs when
the queue pair is in the memory region.

Change-Id: Ia646a0255e32ecdd0a70537a8011ce622eb59195
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6861
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>
2021-03-30 11:46:32 +00:00
Changpeng Liu
adfec326b6 nvmf/vfio-user: handle connect response error correctly
The error response should be processed at the beginning of this
function.

Change-Id: Id583951c82981cf58984ab68b23ad6f7ea80cd3f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6859
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-30 11:46:32 +00:00
Changpeng Liu
62f54005c0 nvmf/vfio-user: optimize the error log
When starting VM, there are error logs such as:

vfio_user.c: 510:acq_map: *ERROR*: Map ACQ failed, ACQ 3ffde000, errno -1
vfio_user.c:1043:map_admin_queue: *ERROR*: /var/run/muser/domain/muser1/1: failed to map CQ0: -1
vfio_user.c:1103:memory_region_add_cb: *NOTICE*: Failed to map SQID 1 0x3ffd8000-0x3ffdc000, will try again in next poll

This isn't the error case, because when the Guest memory hot add/remove from QEMU, vfio-user
target will stop and unmap all queue pairs and remap them again, so let's use a more friendly
log instead.

Also use a notice log when adding listener.

Change-Id: Iaa4dc29e02523b5e85ec716d200ec355f8a575ed
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6650
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-30 11:46:32 +00:00
Changpeng Liu
5922706ccb test/nvmf_vfio_user: simplify the creation of Unix domain socket
We only need to create an empty directory for vfio-user device,
the softlink isn't required anymore, so remove it.

Change-Id: Ie3f9ce73d287be3651f4ac06483888ac0f693700
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6954
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-30 11:46:32 +00:00
Jim Harris
a0aa389e13 thread: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I86fc41a0d1ec31971f9c85d2b146501e338d44c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7131
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-30 11:45:50 +00:00
Jim Harris
2dad66a16f nvmf: cleanup Doxygen comment
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3026abce2689e26f5b82c09714b114f51beae405
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7130
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-30 11:45:50 +00:00
Jim Harris
df3299113c nvme: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib41e71d4288c03b67db37878a073ea143d369dd3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7129
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-30 11:45:50 +00:00
Jim Harris
3f858eeb38 jsonrpc: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4d25092c37044abd7aa157342fc44e02c4a65df6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7128
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-30 11:45:50 +00:00
Jim Harris
45128fe64b blobfs: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I39b811a379e44faf9170892812b835f9115976e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7127
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-30 11:45:50 +00:00
Jim Harris
163ce7feca blob: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8aaca0ac0f1c1a0da1227b980d2f5a864b1077e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-03-30 11:45:50 +00:00
Jim Harris
1d94d1cbda bdev: cleanup Doxygen comments
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id6eb0b09297d654689714426ae6cb6baf75c2dca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-30 11:45:50 +00:00
Shuhei Matsumoto
1aa2537480 bdev/nvme: Merge populate_namespaces() and its callback into nvme_bdev_ctrlr_create()
The following changes will require nvme_bdev_ctrlr_create() to be
asynchronous. As a preparation, merge nvme_ctrlr_populate_namespaces()
and populate_namespaces_cb() into nvme_bdev_ctrlr_create().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I623f927da072d746b4bd83314c0f5bcb9cc34ef0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7043
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
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>
2021-03-30 11:43:24 +00:00
Shuhei Matsumoto
cd820331a2 bdev/nvme: Move up populate_namespaces_cb() in a file
This will reduce the size of the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I81d7c90d8676a42aff3ffe73932d5612642a4114
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7042
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
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>
2021-03-30 11:43:24 +00:00
Shuhei Matsumoto
90f434b9a0 bdev/nvme: Factor out destroy qpair operation into a helper function
Factor out the operation to destroy qpair into a helper function
bdev_nvme_destroy_qpair().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5ac9215407e0b4f4368a68bc58d8e3daac029393
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6783
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
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>
2021-03-30 11:43:24 +00:00
Shuhei Matsumoto
444677f3b4 bdev/nvme: Pass nvme_bdev_ctrlr to the callback to for_each_channel() in reset processings
Pass nvme_bdev_ctrlr to callback to each spdk_for_each_channel() call
in reset processing.

The following patches will register nvme_bdev_subsystem instead of
nvme_bdev_ctrlr as io_device. Hence we need a different way to pass
nvme_bdev_ctrlr to the completion functions of spdk_for_each_channel().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ief31dbbc145b5850e4e5b2e4c9ad7287128ce870
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6950
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-30 11:43:24 +00:00
Shuhei Matsumoto
20839ad6a0 bdev/nvme: Hold bdev_io which submits reset into nvme_bdev_ctrlr
Hold the bdev_io which submits the reset request into the nvme_bdev_ctrlr.
as reset_bio. Then differentiate the callback function between
_bdev_nvme_complete_pending_resets() and _bdev_nvme_abort_pending_resets()
to spdk_for_each_channel() in _bdev_nvme_reset_complete().

The next patch will pass nvme_bdev_ctrlr to for_each_channel() instead.

The following patches will register nvme_bdev_subsystem instead of
nvme_bdev_ctrlr as io_device. Hence we need a different way to pass
nvme_bdev_ctrlr to the completion functions of spdk_for_each_channel().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7a3386815429e8ed44f4e9e5365a21bd97e7fb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6913
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
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>
2021-03-30 11:43:24 +00:00
Shuhei Matsumoto
cb8aa8abc5 bdev/nvme: Not try freeing qpair when it is NULL, and add test scenario
The API spdk_nvme_ctrlr_free_io_qpair() returns immediately if the
passed qpair is NULL, but calling spdk_nvme_ctrlr_free_io_qpair()
with NULL should be avoided.

This patch cleans up the code to ensure that nvme_ch->qpair is NULL if
disconnected and spdk_nvme_ctrlr_free_io_qpair() is called only if
nvme_ch->qpair is not NULL.

Then add a test scenario that two reset requests were submitted
simultaneously and the first reset request failed and then the second
reset request also failed. This verifies the refactoring done in the
next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iae461f7f826b0e1a4607a17e528c04a642242d6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7041
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-30 11:43:24 +00:00
Niklas Cassel
059dcf1da1 bdev/nvme: add support for zoned namespaces
Add support for zoned namespaces in the bdev/nvme module.

Query the namespace type, and if a zoned namespace is found, set the
bdev struct members needed by the bdev_zone.h APIs.

Note that while vbdev_zone_block and bdev_ocssd have zone locks,
bdev/nvme does not need any kind of zone lock, because NVMe ZNS
supports append natively.

The whole point of the zone append command is that you don't need any
locks, even when having multiple writers, since the drive will return
back the Assigned LBA where the blocks were actually written.

If a SPDK application will utilize writes instead of zone appends,
the SPDK application itself will need a per zone lock in order to
make sure that there is only one outstanding write.

Adding zone locks in bdev/nvme would reduce the performance of zone
appends, for no reason at all.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ibacdb9b6e839624aba869c9949231343db5914be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6911
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-03-29 10:17:45 +00:00
Niklas Cassel
9f5852d049 bdev/zone: add support for max zone append size
Add support in bdev_zone.h for getting the maximum zone append data
transfer size.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I61203e64d51601232c6578a090fa52975364c1f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6910
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-03-29 10:17:45 +00:00
Niklas Cassel
20a01a0495 nvme/fio_plugin: use calloc to allocate zone report buffer
spdk_nvme_zns_report_zones() is implemented using
nvme_allocate_request_user_copy(), which under the hood will do
a spdk_zmalloc() with the SPDK_MALLOC_DMA flag set, and will copy
over the result to our buffer.

Therefore, it is redundant for us to use spdk_dma_zmalloc(),
because it will cause us to allocate twice the amount of memory
from the precious DMA pool than needed.

Changing this zone report buffer allocation to a calloc also
has the benefit of making the code uniform with all other
spdk_nvme_zns_report_zones() call sites in the SPDK codebase.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia354fa51c66ae07a38a9a57b07c15d145dd609f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7005
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-03-29 10:17:45 +00:00
Niklas Cassel
7ce5dd62f7 nvme/identify: use calloc to allocate zone report buffer
When support for printing the zone report was added,
the zone report buffer was allocated using calloc().

This was intentionally changed to a malloc in commit
5ef79a17ec ("examples/nvme/identify: add an option to dump
the full zns zone report").

While we shouldn't need to zero the buffer, since the drive
should write  the "Number of Zones" field in zone report header,
and we should never read zone descriptors beyond this value,
the ZNS spec also states that reading beyond the last zone
descriptor has undefined results.

Considering that "Number of Zones" field in the zone report
header will only represent the number of zone descriptors
in the buffer when the partial bit was set to true,
always use calloc(), to avoid the chance that someone might
copy this code and call spdk_nvme_zns_report_zones() with the
partial bit set to false.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia39c5235aa5c62a4ec42285f53f4bc80f7ec370f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7004
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-03-29 10:17:45 +00:00
Niklas Cassel
f6bbec8ba9 bdev/hello_world: for zoned bdevs, reset the zone before write
If the bdev is a zoned bdev, reset zone 0 (containing offset 0),
before doing the "Hello world!" write to offset 0.

This is done to ensure that the write pointer for the first zone
is at offset 0.

If we don't do a zone reset before doing the write, the write
would fail if there already were data written to the first zone.
(E.g. if the user ran the hello_bdev example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52b6fc9cf6e86fef9aeb19482eafd1f857ba1478
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6943
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-03-29 10:17:45 +00:00
paul luse
346c43edd3 doc: Add accel_fw section and RPCs to jsonrpc docs
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4f680c5fe72312224ce6722197a70a49886c9db1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4187
Community-CI: Mellanox Build Bot
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>
2021-03-29 07:44:01 +00:00
Sudheer Mogilappagari
4ac5ca6558 posix: add sock to pending_recv list only if not already added
Currently there is possibility of adding a sock to pending_recv
list again if sock->pending_recv is true. Check if flag is false
before adding to the list.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: Ie23e1e8dbe1aa5594d9ddea30e7f235e3bf8ddad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6381
Community-CI: Mellanox Build Bot
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: Ziye Yang <ziye.yang@intel.com>
2021-03-29 07:43:08 +00:00
Tomasz Zawadzki
83601f77bc CHANGELOG: add entry on iscsi_parse_params fix
Add CHANGELOG entry for
(f3fd56fc)lib/iscsi: return immediately from iscsi_parse_params if len is 0

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I96500e26dba231b4e5d60ae8f95011b071a78cd0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6778
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:42:52 +00:00
paul luse
30d83eb617 bdev/raid: remove deprecated parameter strip_size
For bdev_raid_create RPC, the deprecated parameter strip_size
was removed.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie9b8d133e29e82e04f92e4a9336b30d8882e37cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6742
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-03-29 07:41:09 +00:00
Maciej Wawryk
0872c7edbd nvmf/perf: Fix type error
TypeError: expected str, bytes or os.PathLike object, not int

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0b395035b43fd4ef5e10ae152889c737ccf66c03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7054
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:40:16 +00:00
Rafal Stefanowski
25bc25b9a0 ocf: update submodule to v20.12.2
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: Iaadd551452f7dff75d507af158e70aa2899ff9d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6976
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-29 07:40:02 +00:00
Changpeng Liu
04cd292237 nvme/quirk: add MDTS excludes interleaved metadata quirk
The specification for Maximum Data Transfer Size (MDTS) says this field
should include the length of metadata, if metadata is interleaved with the
logical block data.  However, some drives can support MDTS without counting
the interleaved metadata, so for this case SPDK will only use data length
without interleaved metadata length.

Change-Id: I29920a25885699e2689be043b87122367be0e416
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6813
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>
2021-03-29 07:38:37 +00:00
Changpeng Liu
075f321be8 nvme/fio_plugin: exclude PRACT&&MD=8&&Extended LBA metadata size
If PRACT is enabled, and metadata size is 8 bytes, for extended
LBA format, the controller will insert/strip the metadata, so
we don't need to pass the metadata buffer, so we should exclude
this metadata buffer from host buffer.

So here add a function to calculate host buffer size.

Change-Id: I42d8d9cbfbf7ba2bc4bf64d65260c6cfe9bd4cb1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6789
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-29 07:38:37 +00:00
Mao Jiang
cd468b987d test/nvme_io_msg: cases for io_msg_ctrlr register and unregister
Change-Id: Icd91870712ee977c3f9d803e68e8cb4c4b2ff0e6
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6797
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:35:04 +00:00
Karol Latecki
b7423187a2 autotest.sh: call rdma_device_init only for RDMA tests
Check test flags before calling rdma_device_init if
it's really needed, so that we don't call it when doing
TCP tests.

Change-Id: I2675a008cf84c7c4084cb83b44c279d2a497c3cb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6998
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:34:38 +00:00
Krzysztof Karas
8f05269572 spdk_top: fix a bug on minimal size spdk_top window
Fixes a bug that occurs when spdk_top window is just big enough
to print empty line in data area, but unable to fill the line with
actual data, resulting in application crash.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Id39267a9587b9e0ab74a43f5010927af6faff512
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6216
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>
2021-03-29 07:33:04 +00:00
Karol Latecki
de21d8f4e4 lib/nbd: fix deadStore issue in nbd_cleanup_io()
Although the value stored to 'rc' is used in the enclosing
expression, the value is never actually read from 'rc'

Fixes #1860

Change-Id: Id1001552e635968e373cad0fd27d7bda41d887cd
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7082
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2021-03-29 07:29:57 +00:00
Ben Walker
b67aa514a4 sock/posix: No longer remove sockets from pending_recv in poll
This seems to be cleaning up the pending_recv list to account for the
missed cases in the previous patches in this series. Now that we're
correctly cleaning up the list, don't do this.

Note that if an EPOLLIN event is received but the application never does
a read/recv, the socket will remain in the pending recv list. The next
poll will get another EPOLLIN event, but the logic already handles that
case.

Additionally, left a TODO for a performance optimization.

Change-Id: I1cdde500a5c76554401a89de766d35b7a486b207
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6746
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-03-29 07:28:35 +00:00
Ben Walker
8ac5f9e924 sock/posix: Fix read logic to avoid double-adding socket to pending_recv
Also write some better comments

Change-Id: I81d59307c5eacc5a71879a83e5040da667909d96
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6745
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-03-29 07:28:35 +00:00
Ben Walker
01aa5cb385 sock/posix: Clear sock from pending_recv even if user does large read
If there was an EPOLLIN event the socket gets adding to the pending_recv
list. But if the application then does a very large read, it will bypass
the logic that clears the socket from the pending_recv list. Fix this.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia0ba86012f7c6dfd14eb43ba6eeed94dbbce90ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6744
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-03-29 07:28:35 +00:00
Ben Walker
8e7d559283 sock/posix: When a socket has no recv_pipe, reading should still clear
from pending_recv list

If the upper layer performs a read/recv, it should still remove the
socket from the pending_recv list.

Change-Id: I32ca8ecccbfe1e53ecc7d6f57343c2727e84b851
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6743
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-03-29 07:28:35 +00:00
Michal Berger
18020ec73b test/setup: Add tests for different block devices' setups
nvme_mount - basic test verifying if setup.sh sees mounted nvme
             devices (either partitions or the entire drive).

lvm_mount - test verifying if setup.sh sees nvme devices when
            they are part of dm setup.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id250b4081b3e04a7f5b26401d2ae1b226fdb2d8f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5311
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>
Community-CI: Mellanox Build Bot
2021-03-29 07:24:14 +00:00
Michal Berger
d69b091262 test/setup: Check if correct driver is in use
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9023a311442c01ef18d05903bed2eb1513f58a0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5310
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-03-29 07:24:14 +00:00
Michal Berger
d60bc77142 test/setup: Add tests for hugepages allocation
These tests are meant to "predict" the right number of hugepages
given setup.sh instance will set, depending on its environment
options (HUGENODE, HUGEMEM, etc.).

Change-Id: Iaf441e69d25dd59941891e1d5c3c2b0dbd77644d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-03-29 07:24:14 +00:00
Michal Berger
ec94874c1e test/setup: Add initital tests for setup.sh
This is first commit from the series introducing funcrional tests
for setup.sh. Issues like #1689, #1691 showed that major changes
to setup.sh may result in quite unexpected behavior. thus to avoid
any regression, we should make sure  the core of its functionality
is properly tested.

For now, only Linux systems are supported tests-wise.

The tests are explicitly run after all OCSSD are put into PCI_BLOCKED
to make sure they won't be picked up by the tests.

Change-Id: Iac036e693bdbaac476faea3d2128cf4d95434cb2
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5308
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-03-29 07:24:14 +00:00
Karol Latecki
cd94246487 test/common: remove sed commands in vm_setup.sh
Some time ago Qemu submodules links were changed to
use https:// instead of git:// so there's no need
to sed this.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If4b16e7b887af5028d208498da8d81c2fa2101d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6847
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2021-03-29 07:20:50 +00:00
Karol Latecki
253c1785e5 test/common: install vfio-user-pci capable Qemu fork
Fork needed to run Vhost tests using vfio-user.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iedfa85083e51c08592c9f512c6650415b49deda8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6846
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2021-03-29 07:20:50 +00:00
Karol Latecki
5c3852713c test/vhost: add vfio-user option
Add option to connect Qemu VMs to vfio-user sockets.
This needs additional option to vhost_run to run nvmf_tgt
instead of vhost binary (currently the only way to create
vfio-user sockets) and an additional function to find
connected devices in the VMs.

Change-Id: Iaae234a11f4431a307e1da9c9a2eee123290f5a3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6700
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:20:50 +00:00
Karol Latecki
9f5f5da819 test/vhost: use getopts in vhost_run function
Use getopts instead of using positional args. This
will be needed in future commits when more optional
parameters will be added.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If575fd871f906de5f9d89b2f3972fa54e3208147
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6682
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-29 07:20:50 +00:00
wanghailiangx
b33da506b5 lib/iscsi: add a comment for iscsi_parse_params()
When param len > 0, param data must not be NULL.
So we add a comment to make it clearer.

Change-Id: I053c3e45ddb8fa23fb67ce899d32dadd8e286946
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6618
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-03-26 21:06:15 +00:00
Karol Latecki
f88416a1de scripts/ceph: load loop module explicitly
Older losetup versions loaded "loop" in background, but
with 2.36.1 this doesn't happen. We know we're going to
use this module so let's load it ourselves.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If3364e92817ae9f09e9897872bd61ca9167184a1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7086
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-26 18:46:13 +00:00
Ziye Yang
a620cd198f nvme/tcp: Fix the zero copy enablement issue.
Remove the polling group check. Because at this moment,
the qpair is not added into a polling group. If we do
not remove it, we will never enable zcopy feature for
I/O qpair.

And in sock implementmentation, we already fixed the zero copy
handling if a socket is not in a polling group. See
posix_sock_flush function. So we can fix this issue if we directly
remove this check.

Reported by: Aleksey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I969936c4b6c7f13cbfa4d6eb479010c53f3e384a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7056
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-03-26 08:22:53 +00:00
paul luse
48c057814b test/idxd: fix allocation issue with unit test
Fixes issue #1847

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I34109935b5e8187192239fa34ff43946d0e7632f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-26 08:22:41 +00:00
paul luse
26fdb2d8b3 lib/idxd: remove unsed config elements and add a config print
Add print to confirm how groups/queues/engines are being
programmed based on the init RPC used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic9462c19c6899478a803433f90d9db9249dd5ca1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6325
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>
2021-03-26 08:22:33 +00:00
root
de8f3a50ee mk: Fix debug build error on ARM ThunderX2 and neoverse N1 platform
When building spdk on ARM platform like thunderx2 with --enable-debug,
there are following error:

/tmp/ccOBb4AF.s: Assembler messages:
/tmp/ccOBb4AF.s:45: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
/tmp/ccOBb4AF.s:77: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
/tmp/ccOBb4AF.s:109: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
/tmp/ccOBb4AF.s:141: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'

The reason is that DPDK is built with -march=armv8.1-a or -march=armv8.2-a+lse which
have these instructions while SPDK is built with -march=armv8-a+crc which does not support
them. Change spdk build machine to native can fix this.

Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I759d4ce2c557ce5ff73a802d7a4b6579c4ba64f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7025
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-25 08:29:09 +00:00
ChengqiangMeng
844d94b8a7 unittest/nvme_rdma: increase code coverage for nvme_rdma_req
nvme_rdma_req put/get/init code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I5ee5ec43410a8eef7a82f8ee304fd28393a46618
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6925
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-03-24 12:00:23 +00:00
Maciej Szwed
aaac48880d env: Register external memory with DPDK
DPDK has added APIs for registering externally allocated
memory regions. Use them instead of doing our own thing.

We have to postpone spdk_mem_unregister call in
memory_hotplug_cb() because SPDK mutex (g_spdk_mem_map_mutex)
and DPDK mutex (memory_hotplug_lock) may overlap
and cause deadlock when one thread is calling spdk_free()
(locks memory_hotplug_lock first and then tries to lock
g_spdk_mem_map_mutex) and another one is calling
vhost_session_mem_unregister() (locks g_spdk_mem_map_mutex
first and then tries to lock memory_hotplug_lock).


Change-Id: I547b4ffc3987ef088a1b659addba1456ad760a71
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3560
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>
2021-03-24 11:59:59 +00:00
GangCao
09a1028e0f nvme: fix double free of g_hotplug_probe_ctx
Add a check and only free g_hotplug_probe_ctx once.

This is to fix below issue:
https://github.com/spdk/spdk/issues/1849

Change-Id: I7387495890830badd06a7341d9ac4d149ca1c9f4
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7002
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-24 11:59:39 +00:00
Michal Berger
0968ee2fcf scripts/check_format: Run shfmt against all bash files
Currently, reference repos which are used to clone the SPDK repo in
the CI pool's systems don't provide master head refs, hence there's
no easy way to diff against it.

Instead, simply run shfmt against all the bash files in the repo.
Impact on the performance should be minimal.

Also, cleanup some related code which is not used anymore.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie0d4e35b8ad214ceed1b4ea29b01a7423b8ff73b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-23 11:03:21 +00:00
Ziye Yang
d515bf739d bdev/nvme: Use the accelerated_engine
This patch really uses the accelrated engine.
Currently, we only offload the crc32c caculation,
but it can be extended.

Change-Id: If0e4c6a44b6e1e10e03f7eca355bed418d67326b
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6760
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-23 10:09:39 +00:00
Michal Berger
9239ed33f6 mk: Don't use mime-type to determine type of the lib file
Some versions of the file (e.g. 5.33) confuse the sharedlib files with
pie-executable ones when they already have the executable bit set.
Since this particular bit is already set on the .so.* when they are
built, file may report the type as "application/x-pie-executable"
instead. As a result, lib files won't have proper permissions set
when installed.

This is a bit problematic for building the RPMs since when
find-provides kicks in to determine the dependencies, said files
are not picked up at all - package ends up with empty "provides:"
data breaking the dependency lookup during installation of other
packages which may depend on the broken one.

To mitigate, don't use mime-type, simply run file against the lib
in default mode and look for "shared object" string - this should
work for most of the file versions available on the supported
distribution.

Spotted on Fedora31.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If9974f5acbdad6eb1204b64f0ee1ac9b2e20f85b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6703
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-03-23 10:08:51 +00:00
Michal Berger
bfe83fd373 pkgdep: Add rpmdevtools package
Tools from this package are needed to handle the RPMs build.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I516341e0917998eae9c54d3194f1e091f4e5e9df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6548
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-03-23 10:08:51 +00:00
Michal Berger
9433190fd0 scripts/vagrant: Move the proxy, tsocks and nfs setup to deploy_test_vm()
This is done in order to minimize vagrant work on the CI side. Users
may still provision given VM with full configuration includin these
pieces by running create_vbox.sh with -d argument.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7f494958e06d4e3b047938dda0bd102da824d235
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6733
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-23 10:08:37 +00:00
Michal Berger
ca31f3c512 scripts/vagrant: Run vm_setup.sh directly from the synced repo
vagrant's shell provisioner uploads files to /tmp, however,
vm_setup.sh must be run from the repo to find all the source
files. This requires the repo by synced over to the VM as well.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iaf16f066af10739589aa584f57c2b89f5c5202e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6734
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-03-23 10:08:37 +00:00
Michal Berger
07596cf183 check_so_deps: Make sure number of processed .so files is updated
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ibb5a7fd6cce53a14ce4acd63085e066db32b059b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-23 10:08:37 +00:00
Michal Berger
432eb6c21d pkgdep/git: Update location of the irdma driver
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1074c18998fc758baa2a27449d32e7a3f9538c67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6896
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: Ben Walker <benjamin.walker@intel.com>
2021-03-23 10:05:00 +00:00
Ziye Yang
1e27c23d09 sock: set the default placement_id to -1
Purpose: The default value of placement_id in spdk_sock
should be set to -1 in spdk_sock_connect_ext. If we still let it to 0 and call
sock_get_placement_id for the spdk socket used in the initiator side,
we will never get the correct placement_id when enable_placement_id configuration
is configured, because we will always get placement_id = 0
instead. And the same comments in spdk_sock_accept function.

And this patch also change the judgement of placement_id in other related places.

PS: Why we need to explictly set default placement_id = -1, because when use
"enable_placement_id=2" for the socket, placment_id=0 is a valid value.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9fcc3a1c6a5007c22d11da5aeed0022577652a76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6955
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-03-23 10:04:36 +00:00
Alexey Marchuk
f209637c9d nvmf/rpc: Don't stop listener if it was failed to remove
nvmf_subsystem_remove_listener RPC handler may fail to remove
the listener (e.g. it doesn't exist) but in eror case we
spdk_nvmf_transport_stop_listen_async and send an error
response. In a completion callback passed to
spdk_nvmf_transport_stop_listen_async we try to send a
response again but the response handler had already been
released and we dereference a NULL pointer.

The fix is to skip spdk_nvmf_transport_stop_listen_async
in error case and continue with the subsystem resuming.

Fixes github issue #1821

Change-Id: I8d96b943cca25d9f95d19e8ea600242f019e6b21
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6699
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-23 10:03:38 +00:00
Pawel Piatek
191e6ab8d2 test/nvmf: fix non-root mode
- pass LD_LIBRARY_PATH
- use $SUDO_USER instead $USER
- support --huge-dir param via $SPDK_HUGE_DIR environment variable

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ib42fe8a10b2c5b7d8a888605da04fee98a600515
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6171
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-23 10:03:11 +00:00
Liu Xiaodong
b8db1af4e2 thread: criticalmsg also indicates valid event
Change-Id: I32296be76dfdde725249f43a96f5031c9c2613ae
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6721
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-22 09:50:27 +00:00
Liu Xiaodong
1bd39bb5ee thread: remove stat update in intr msg process
Updating thread stat directly in spdk_thread_poll()
will cover the time spend in msg process in interrupt
mode.

Change-Id: I9b71790281f10fb784ef4fd4059c41438bbaabac
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6722
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2021-03-22 09:50:27 +00:00
Liu Xiaodong
3690dbbd2e thread: remove redundant set_thread in intr
thread_interrupt_msg_process is registered to thread's
fd_group, so it will be called inside spdk_thread_poll.
Since spdk_thread_poll will set/restore tls_thread,
there is no need to set or restore it again here.

Change-Id: Ida10c736ef904ff975eeb42fd0cccad9fd8317cf
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6720
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-22 09:50:27 +00:00
Liu Xiaodong
ba7aac83ed reactor: get_rusage directly in reactor_run
Move get_rusage directly into reactor_run(), then both
poll mode and interrupt mode can check rusage info.

Change-Id: Id5926752cfb19c13cb969fbfbb35f643e5d49d9a
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6718
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2021-03-22 09:50:27 +00:00
Liu Xiaodong
ee4a83360f reactor: update tsc records in intr mode
In interrupt mode, reactor spends its valid cpu cycles
to process registered thread interrupt function. So we
can count idle_tsc and busy_tsc in it, and update
reactor's last_tsc in it.

Change-Id: I65f4ae7d3b1e5c7c5c06937d6855f5d1b5c0349f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6716
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-22 09:50:27 +00:00
Mao Jiang
4825fce4bf test/nvme_pcie: cases for building qpair metadata
Change-Id: Ibab880df6f182439236c91e600d5bc6fc37f34d3
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-03-22 09:46:56 +00:00
Mao Jiang
550a0b95f4 test/nvme_pcie_common: build nvme_pcie_common unittest file
Change-Id: I321e558ff23e1942cbf17f8cd6d3ce04eb6e58d0
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6763
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:46:48 +00:00
Nick Connolly
1b9414f8b9 ut/nvme_io_msg: Add missing mutex init
Add missing mutex init for ctrlr external_io_msgs_lock.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Id87838878b57939a949f0b8cb2dc7ff160c7a826
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6887
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:46:26 +00:00
Mao Jiang
5ccd31aedc test/nvme_transport: cases for adding and removing poll group
Change-Id: Idd311e3e49255f4571151fb760aa06b1f5db979a
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6953
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-22 09:46:18 +00:00
Shuhei Matsumoto
26c5cc5259 bdev/nvme: Remove ctx parameter from _bdev_nvme_reset()
Separate bdev_nvme_reset() and _bdev_nvme_reset() by making
bdev_nvme_reset() call _bdev_nvme_reset_start(), and then
remove the ctx parameter from _bdev_nvme_reset().

This clarifies the next patch and reduces the size of the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I76b0f2f5b83445845a313203e594dca0be150bc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6949
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:45:53 +00:00
Shuhei Matsumoto
f84b70f6b1 bdev/nvme: Separate start and for_each_channel operations of _bdev_nvme_reset()
We need to pass bio only when the reset request came from the upper
layer. Previously, bdev_nvme_reset() called _bdev_nvme_reset() and
_bdev_nvme_reset() had the second parameter, ctx, to pass bio to
for_each_channel(). However, it was not clean.

Let's separate bdev_nvme_reset() which processes a reset request
came from the upper layer and _bdev_nvme_reset() which proesses
an internal reset request by adding a helper function
_bdev_nvme_reset_start().

The next patch will remove the second parameter, ctx, from
_bdev_nvme_reset() for clarification and further refactorings.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2bd00e3abb56fe8d540b8af55743ee92ca9cd526
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6948
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:45:53 +00:00
Shuhei Matsumoto
d22497a72c bdev/nvme: Process pending destruct ctrlr request by adding an new variable
The recent refactoring removed the destruct poller and change the
reset processing to destruct ctrlr after its completion by conditionally
sending message.

But differentiating callback function is difficult if we reset multiple
ctrlrs.

If nvme_bdev_ctrlr->destruct is set, any new reset cannot start. So we can
use an new variable and always execute the callback function.

Add an new variable pending_destruct to struct nvme_bdev_ctrlr, and set
pending_destruct if ctrlr->ref is zero and ctrlr->destruct is true, and
then start destruct ctrlr if ctrlr->destruct_after_reset is set after
clearing pending resets.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9f34c42a40c5a5da54611e7871aef8c58117a56a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6714
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:45:53 +00:00
Shuhei Matsumoto
21bff99197 bdev/ocssd: Get spdk_nvme_ctrlr from not nvme_bdev_ctrlr but spdk_nvme_ns in I/O paths
The following patches will cache and use spdk_nvme_ns pointer rather than
nvme_bdev_ns pointer in I/O paths. As a preparation, change a few cases
to get spdk_nvme_ctrlr pointer from spdk_nvme_ns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ief5f01f85f46e2ad822af5b5abb13a14f28a0c6a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6834
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-22 09:45:53 +00:00
Shuhei Matsumoto
929a207b37 bdev/ocssd: Get nvme_ns from not nvme_bdev but nvme_ch for callback to get zone info
This will make the following changes a little easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I97ce4fb03d02679f5be152b04c33650bf5164f2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6833
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-22 09:45:53 +00:00
Shuhei Matsumoto
71c0065567 ut/bdev_nvme: Add test case for SPDK shutdown
When there still exists any NVMe bdev, if the bdev subsystem starts
shutdown, spdk_bdev_unregister() is called first. To avoid regression
for this scenario, add a test case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f484bda2ee2f3eaca364968a79ec7bf50267980
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6936
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-22 09:45:53 +00:00
wanghailiangx
05d1130d3a test/nvme_rdma_ut: add a semicolon for DEFINE_STUB
Although this is not a mistake, it's better to add a semicolon to
be consistent with other DEFINE_STUB.

Change-Id: I5953b4612659d4115cb7735b1617eb8c13400798
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6653
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: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-19 08:30:30 +00:00
Alexey Marchuk
95fc1ac759 nvmf: Rework qpair disconnect when subsystem is removed
When we iterate qpairs that belong to a subsystem
and try to disconnect them, there is a chance that
some qpair can be disconnected on transport level,
e.g. the initiator may receive a disconnect for
the first qpair and disconnect others. That may lead
to a dead loop when we call spdk_nvmf_qpair_disconnect
with a callback, the callback is called immediatelly
and tries to disconnect the qpair again.

To solve this problem, move part of nvmf_poll_group_remove_subsystem
function to another function nvmf_poll_group_remove_subsystem_msg
which disconnects all qpair at once without any callback
and calls itself via thread_send_msg untill all qpairs are
disconnected.

Fixes github issue #1780

Change-Id: I1000cda73e6164917fc13f7f374366af90571b99
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6597
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-19 08:24:20 +00:00
Niklas Cassel
a5b784fb2a bdev/zone: add offline as a new zone action
bdev_zone.h already has support for offline in enum spdk_bdev_zone_state.

Therefore, a user can call spdk_bdev_get_zone_info() and see that a
zone is in state offline, but the user has no way of putting a zone
in that state.

Add SPDK_BDEV_ZONE_OFFLINE to enum spdk_bdev_zone_action, so that a
user can call spdk_bdev_zone_management() to put a zone in zone
state offline.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I733a815949d7db0fdce293ba0d762e75a545ba76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6909
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-19 08:23:09 +00:00
Niklas Cassel
ee4868de68 bdev/zone: add support for max active zones
The NVMe Zoned Namespace Command Set Specification has, in addition to a
Max Open Resources limit, a Max Active Resources limit.

An active resource is defined as zone being in zone state implicit open,
explicit open, or closed.

Create a function spdk_bdev_get_max_active_zones() in the generic SPDK
zone layer, so that this limit can be exposed to the user.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I6f61fc45e1dc38689dc54d5649c35fa9b91dbdfc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6908
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-19 08:23:09 +00:00
Niklas Cassel
82d797af1a bdev/zone: add zone state explicit open
Add a new zone state to represent an explicit open zone.

Many zoned specifications like ZBC/ZAC/ZNS have two different
zone states to represent an open zone: explicit open and
implicit open.

In e.g. ZNS, a zone is transitioned to explicit open when a
Zone Management Send is sent with a zone send action of open zone.

In ZNS, writing to e.g. an empty or closed zone, without first
sending a zone send action of open zone, will instead transition
the zone to implicit open.

The OCSSD specification only has a single open zone state.
In OCSSD, you can only transition to the open state by doing a write.
There is no separate function call to transition a zone to the open
state. Therefore, the OCSSD open state is most similar to the ZNS
implicit open state.

Since we cannot remove the SPDK_BDEV_ZONE_STATE_OPEN identifier,
for backwards compatibility reasons, make the SPDK_BDEV_ZONE_STATE_OPEN
identifier an alias to the new SPDK_BDEV_ZONE_STATE_IMP_OPEN identifier.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I98f3a280cd9e595100155568a3c0332c667a834b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6907
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-19 08:23:09 +00:00
Niklas Cassel
409cc6ecbc bdev/zone: assign values to enum spdk_bdev_zone_state
Assign values to enum spdk_bdev_zone_state.
This change will simplify a follow-up patch that will add new
identifiers.

If the first enumerator has no =, the value of its enumeration constant
is 0.

No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I1dc1cbcf262a8c6384a7133042f864074e1b992c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6906
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-19 08:23:09 +00:00
Maciej Szulik
8dfa1067a4 nvmf: Allow transport specific statistics dumping into JSON
This change refactors the way nvmf_get_stats RPC works.
The RPC layer passes JSON write context to custom dump function defined within transport ops.
The RPC layer no longer needs to know the structure of transport poll group statictics.
Functions and structures used in the previous flow have been deprecated and will be removed.
JSON returned for RDMA transport should be the same as before this change.

Signed-off-by: Maciej Szulik <maciej.szulik@intel.com>
Change-Id: I03308c45be120793d316bf79814a1295afd9fb95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6681
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-19 08:23:01 +00:00
Liu Xiaodong
e2d061fb98 reactor: update core mode from master core
Current update_core_mode is started from the next
core of the master core.
For futher's new scheduler, starting from master
core is required. This change won't impact current
schedulers' behavior.

Change-Id: Ibffd2c93a4288b5e87945ae523ccba88091c4031
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6757
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-18 14:49:41 +00:00
Michal Berger
b2ff542576 pkgdep/git: Apply pci_aer_centos patch
The latest QAT driver version which we support attempts to define
pci_cleanup_aer_uncorrect_error_status() whenever <= 5.7.0 kernels
are detected. However, in case of centos8, the latest 4.18 build of
the kernel which is available there includes patches which completely
removed use of this call.

To make sure this function is not built into the driver, apply the
patch on top of QAT which will remove this definition entirely. This
patch is meant to be applied only in case <= 5.7.0 kernel are picked
up and which are missing pci_cleanup_aer_uncorrect_error_status()
symbol definitions.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ieb09d5a1dc8936d6e266c6cadfdf9d70620a3bca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-18 14:43:22 +00:00
Michal Berger
a5fe2a6499 pkgdep/git: Update location of the ice driver
The package was moved, update the url accordingly.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id26bc35330fe3155e33017e64fb92c98ecdc6d65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6619
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-03-18 14:43:22 +00:00
Tomasz Zawadzki
fe8af2281b lib/nvmf: remove deprecated API
spdk_nvmf_subsystem_add_ns() was deprecated in SPDK 20.10.
spdk_nvmf_tgt_listen() was deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2e447a50713e71a70030d094e6cc0bf427635ef7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6631
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 14:43:08 +00:00
Tomasz Zawadzki
144eac1362 lib/fc: move to spdk_nvmf_tgt_listen_ext()
spdk_nvmf_tgt_listen() is deprecated, so moved
the remaining instance to spdk_nvmf_tgt_listen_ext().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I32b54e99f83fa10f1074f80aad82bb0608c9ae11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6630
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.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>
2021-03-18 14:43:08 +00:00
Tomasz Zawadzki
38d13d06a8 lib/opal: remove deprecated spdk_opal_supported()
This API has been deprecated since SPDK 20.07,
see commit (b2947f52).

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idb45906c81ea5682c6a67def0265910266d861b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6629
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>
Community-CI: Mellanox Build Bot
2021-03-18 14:43:08 +00:00
ChengqiangMeng
2770a5d7f8 spdk_top:fix a bug of disabled Columns.
Return the previous state of the column when we press Q or ESC.

Fixes issue #1829

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: If049c0dcebfa3d71ac9c5266541083108df1d883
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6893
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2021-03-18 14:42:48 +00:00
Ziye Yang
f1f4f7d3bc nvme/tcp: Use the async manner to send pdu when crc32c enabled.
This patch refactor the pdu sending logic with the async manner,
then if the group contains the accel engine, we can use it.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I2d669c0a3255d7a8898441e406906add2f3a3556
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6759
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 14:42:35 +00:00
Ziye Yang
6153b4aa8f nvme: Add a new parameter in spdk_nvme_poll_group_create
Purpose: To setup an accelerated function callback
for created spdk_nvme_poll_group. In this patch,
we just create the interface. The real usage of this
call back will be provided in the other patch.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I0d936aa4eba4dbfcc0137942156b9f2919eb5b78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6758
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 14:42:35 +00:00
Jim Harris
8f5e4bfe2e nvme: clarify required action when free_io_qpair fails
A very heinous error case is when a delete_io_sq or
delete_io_cq command fails when freeing a PCIe IO
qpair.  In that case we return an error to the caller,
and the resources are not freed.

Instead of trying to 'fix' this error case, let's
just tell the user that if freeing an IO qpair fails,
the user should reset the controller and try again.

Resetting the controller will do one of two things:

1) The subsequent create_cq/create_sq will succeed,
   at which point, trying to delete again should work
   fine.  (If it doesn't, it indicates some kind of
   horrendous SSD.)
2) The subsequent create_cq/create_sq will fail,
   at which point the entire ctrlr would fail and
   need to be detached. This could result in some
   leaked memory, but seems unavoidable.

Closes issue #716.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I218564080abec4d6b5ac0b861869ebfc7d99f2c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6918
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>
Reviewed-by: <dongx.yi@intel.com>
2021-03-18 14:41:44 +00:00
Jim Harris
6156777bd4 nvme: assert if user tries to delete NULL tcp qpair
It is invalid to try to delete a NULL qpair, so do
not check for it in nvme_tcp_ctrlr_delete_io_qpair and
return an error when NULL.  Just change it to an
assert instead.  This makes it consistent with pcie
and rdma.

While here, add an assert in rdma as well.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic2f76deecb21b78749dac85e33fb1fa0d14a1239
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6917
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>
Reviewed-by: <dongx.yi@intel.com>
2021-03-18 14:41:44 +00:00
Shuhei Matsumoto
56d9683585 ut/bdev_nvme: Add test case for bdev_nvme_get_ctrlr()
There was no unit test for bdev_nvme_get_ctrlr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia69f0afdba2d3fb31bc38526834edcfc56a69c71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6921
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: <dongx.yi@intel.com>
2021-03-18 14:41:13 +00:00
Shuhei Matsumoto
9937ba0b5f bdev/nvme: Fix the RPC bdev_nvme_send_cmd to pass the registered io_device, nvme_bdev_ctrlr, correctly to get io_channel
Previously, not nvme_bdev_ctrlr but spdk_nvme_ctrlr pointer had been
passed to spdk_get_io_channel() in nvme_rpc_io_cmd_bdev_nvme().

There was no unit test for bdev_nvme_get_io_qpair(), and so add
unit test for it to guard us from degradation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I00fdc14ea6467162c5fb90d04389883d7c409a17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6920
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>
2021-03-18 14:41:13 +00:00
Shuhei Matsumoto
05f8643e15 bdev: Correct the bdev_io status to ABORTED when aborted in NVMe bdev module
spdk_bdev_io_complete_nvme_status() had set the bdev_io status to
NVME_ERROR even if it is aborted, i.e, sc is ABORTED_BY_REQUEST.

Fix it to ABORTED, and verify the fix by unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b22547105a6d7986747053f93875854336959b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6884
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 14:41:13 +00:00
Shuhei Matsumoto
8c6c7efe4a ut/bdev_nvme: Add test case for abort request
Add test cases for abort request. Both success and failures cases
and both NVMe and admin request cases are added.

The next patch will fix a bug that the status of the bdev_io which
was aborted was set to SPDK_BDEV_IO_STATUS_NVME_ERROR. The status
should have been SPDK_BDEV_IO_STATUS_ABORTED.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4fa885b874507e1a4cf9d70f45e37c4aaef2134a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6883
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-18 14:41:13 +00:00
Shuhei Matsumoto
5eb53691c3 ut/bdev_nvme: Add test casde for admin command passthrough
Add test case for admin command passthrough to test redirection
of completion processing.

Change the type of opc to uint16_t to cover admin commands.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id01cb924e7778878dcfaf8766b05af1ae52623eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6882
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: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-03-18 14:41:13 +00:00
sunshihao520
45b6720bef nvme : Add OPTPERF definition to nvme_spec.h
When ns set OPTPERF to 1, use NPWG and NPWA to set sectors_per_stripe.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Iaf72ba5a7f21b33c357fba8deced9616e0bfaca6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6613
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-18 14:40:27 +00:00
Rafal Stefanowski
5bdaec6322 ocf/rpc: Add bdev_ocf_set_cache_mode method
This method allows to dynamically switch cache mode on OCF bdev

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I933273e35bb9f29528657f8f6800c6b52dde32e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6547
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 14:39:09 +00:00
Dantali0n
1b837766f0 docs: Improve documentation around linkage requirements
The documentation around static linking in doc/libraries.md is improved.
This is achieved using examples and explaning the requirements that arise
from the use of constructor functions. Additionally, the documentation
around the same subject is improved in doc/pkgconfig.md

Signed-off-by: Dantali0n <info@dantalion.nl>
Change-Id: I3b11db441d14d2e8d792a22de2bd17fe5c2389fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6798
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-18 14:37:46 +00:00
Michal Berger
360fd2cc5a pkgdep/rhel: Fix typo in alternatives path
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6d3b7c6855899e3a9d355368c41e4d585db7f382
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6767
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 14:36:44 +00:00
Rafal Stefanowski
ba2fed77b4 doc/jsonrpc: Add missing info about OCF cache modes
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I7654bffdcbbe85dd17918575c8676a811ef77669
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6432
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 14:34:10 +00:00
Rafal Stefanowski
37028231db bdev/ocf: OCF 20.12.1 requirements
OCF now includes on its own only small part of env, that is crucial for
compiling headers for casadm - an OCL management tool. The idea behind
this is to reduce the amount of included stuff when it is not needed.

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I58fef2be3ccb1cce743093ed973ba54cdbb605e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6413
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 14:33:55 +00:00
Michal Berger
631cea63d0 test/scheduler: Print minimum supported frequency by given cpu
This is done in order to easier troubleshoot issues like #1784.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icabccab92dd48aa85a505d34013181e66c89fa1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6800
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 13:25:09 +00:00
Michal Berger
f58afe93b8 test/common: Don't enable werror on FreeBSD
Facing similar issue as with 9ab2855d - can't build SPDK against fio
3.19.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4ea22e4f068a19d8d87be836454ec8deeeb2d48a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6805
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 13:24:50 +00:00
Pawel Piatek
1726cdfcf5 test/check_so_deps: avoid second read of config file
Proper configuration file was already read in line 20,
where it's path is passed as required first argument.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I0523bd6d5ad764c13d900c4bd788a5695095c11e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6830
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 13:23:59 +00:00
Monica Kenguva
72d94ca821 rpc: Document env_dpdk_get_mem_stats
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: If66d05c14e5758f1b27000d33b4098d73c7a51b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6851
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-18 13:23:03 +00:00
Klaus Jensen
465dbb040c test/nvme: fix e2edp tests when md_size > 8 bytes
The e2edp test `dp_with_pract_test` includes code to modify the data
length if the size of metadata is 8 bytes, but fails to set
req->use_extended_lba if we actually need to pass an extended LBA
(md_size > 8).

Similarly, the `dp_guard_check_extended_lba_test` miscalculates the CRC
when md_size is > 8. The CRC must be calculated over both data AND the
first md_size - 8 bytes of metadata.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Change-Id: I5252c1fe02908745d6aa68799859ed85f32e87ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6891
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>
2021-03-18 13:20:41 +00:00
Niklas Cassel
38fa9d82c8 nvme/identify: print the command set identifier per namespace
For each active namespace, print the command set identifier.
This will work on namespaces that do not support or report a namespace
type, as spdk_nvme_ns_get_csi() will return SPDK_NVME_CSI_NVM for such
cases.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I05fa7fd6bb3d9ea32dac236c98baef90347094ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6905
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-18 13:19:16 +00:00
Ben Walker
09b0c84f1b event/nvmf: Remove use of spdk_app_stop()
This is the only reason the event.h header is included here
and it isn't necessary.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I4c0a9828cfede1ccd1c9263ad66b354ba167f434
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6919
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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-18 13:18:29 +00:00
yidong0635
fd35993219 vfio_user_pci: put close(device->fd) in cleanup.
These three goto cases are using device->fd,
so put them in cleanup, it has no impact on
vfio_user_dev_setup failed.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I28028dda2977cf8158e703afa5b8af38c48f3d85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6922
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>
2021-03-18 13:17:35 +00:00
Jacek Kalwas
6e2c2306f9 build: install generated pkg-config files
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I191ad5e3b153fb563256eba1aa695716f66db788
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6377
Community-CI: Broadcom CI
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>
2021-03-17 11:10:45 +00:00
Niklas Cassel
e7f161a7d6 bdev/hello_world: remove bdev_module.h include
bdev_module.h should only be included when implementing a bdev module.

hello_bdev.c is not a bdev module implementation and therefore should
not include the bdev_module.h header.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I6a8b9989b21311ae8526b13d7a58603b68a433cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6904
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-17 08:15:46 +00:00
Jin Yu
af2bf0ebfb env: fix a samll issue for doxygen
The space should not be there. The doxygen
will not generate proper docs with it.

Change-Id: Id7e6fb2228abf1717e7e4097a9454c7820884655
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6881
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-17 08:15:28 +00:00
Mao Jiang
cb6b0658b8 test/nvme_rdma: cases for constructing ctrlr
Make stub for external APIs, cases for getting lkey
and constructing ctrlr.

Change-Id: I1b453139e98b297616d839de66690947c6f19738
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6529
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-17 08:15:16 +00:00
Michal Berger
70c7114958 test/vhost: Fix SPDK cpumask for distribute_cores
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I474b6c9ac755626958bc51f491f0ce2dc63a0475
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6731
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-15 09:29:47 +00:00
Nick Connolly
a4e1d715f7 mk: support file extension for executables
Some platforms require that a specific file extension is used for
executables. Append $(EXEEXT) to $(APP) definitions to accommodate
this. The name EXEEXT has been chosen for consistency with automake
which uses the same variable for the same purpose.

Add extensions for generated files used by Windows to the 'clean' target
(.obj, .lib, .pdb) and add output files to .gitignore.

Tested using a cross compiler that forces a .exe suffix and verifying
that all LINK messages include the correct suffix and that a second
call to make does nothing (showing that the targets match the
generated executables).

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ief012f6294d2f94b23c8b4f9747e21a0dfb91e96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6494
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-03-15 09:29:10 +00:00
Nick Connolly
9854c138f7 mk: add support for mingw builds
MinGW builds require a thin layer above the standard libraries to
provide POSIX functionality that is missing on Windows. Add support
for building this.

MinGW cross builds are experimental and work is ongoing to integrate
them into the CI and test environment. Including the changes at this
stage is being done to facilitate that process.

The layer has been arranged in the same way as DPDK and is
accessed as an external build using ./configure --with-wpdk=<dir>.
Support has also been added for using a default ./wpdk in
preparation for reaching the required level of stability.

The help text for ./configure indicates that support for --with-wpdk
is experimental.

Further details and instructions can be found at https://wpdk.github.io.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iff0f705789f19fb193dcb3c9090c3e90613a8d9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6589
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>
2021-03-15 08:55:11 +00:00
Monica Kenguva
7e42c6d826 rpc: Document ocssd create and delete bdev
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic1b73fbfe3c2cb6b0434422c190e16e9d40ec21b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6850
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: Jim Harris <james.r.harris@intel.com>
2021-03-15 08:54:51 +00:00
Maciej Szwed
fa67893428 rocksdb: Switch default RocksDB branch to latest (6.15.fb)
!Do not merge this patch before RocksDB patches are merged:

https: //review.spdk.io/gerrit/c/spdk/rocksdb/+/6485
https: //review.spdk.io/gerrit/c/spdk/rocksdb/+/6486

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie13ff102ddf627026013dcb8b41cb3ee205eaaeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6761
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>
2021-03-15 08:53:39 +00:00
Ben Walker
f046750c32 event: Add return code to spdk_rpc_initialize
This is an internal API used in several places. The call can fail, so
make sure it can report that correctly.

Change-Id: Iac0ed2c8299c9dd3d2556070278a2224c3807b7b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-12 08:38:10 +00:00
Ziye Yang
0731c2273d bdev/rbd: Change some function type from int to void
Purpose: Make the code clean and remove duplicated code.

Change-Id: I6cc8b94af24f89301531bd38d766afb53898e0ed
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6811
Community-CI: Broadcom CI
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-12 08:36:11 +00:00
ChengqiangMeng
df2b5b8983 unittest/nvme_tcp: increase code coverage for nvme_tcp_qpair_send_h2c_term_req
nvme_tcp_qpair_send_h2c_term_req code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Ic562bf2b6f895667143f98bb504a7abef8cfda23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6791
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-12 08:35:21 +00:00
Mao Jiang
11f119e25d test/nvme_cuse: build nvme_cuse unittest file
Include cuse_nvme_submit_io_read/write cases.

Change-Id: Id55ec798167a36a7fb6e1d9ddb032299d476962e
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6651
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-12 08:31:11 +00:00
Monica Kenguva
5678c2f472 rpc: Document bdev_nvme_apply_firmware
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ie022f1a6f03e58514283e37b9428670d28f68bbf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6634
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-12 08:30:34 +00:00
Mao Jiang
35a33d8c69 test/nvme_transport: cases for nvme_transport polling group
Change-Id: I2cc0ea6207de37815e88dd6aad00e43e6596b64d
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6730
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-12 08:30:21 +00:00
ChengqiangMeng
001afcbdb7 unittest/nvme_ns: increase code coverage for nvme_ns's several func
include test_nvme_ns_set_identify_data,
test_spdk_nvme_ns_get_values(Most functions that simply get values),
test_spdk_nvme_ns_is_active,
and spdk_nvme_ns_supports(Judge whether extended_lba and compare are supported).
The above func is completed.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I916173a195692045ee0ee3fa408a1696e0eb5b1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6511
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>
Community-CI: Mellanox Build Bot
2021-03-12 08:21:23 +00:00
Liu Xiaodong
22412af1d2 nbd: get nbd_stop procedure in async
It is possible that nbd pthread is created but not executed,
then spdk_nbd_stop is call before nbd_pthread's execution,
but nbd pthread starts to execute while nbd is totally stopped.

This patch can get spdk_stop_nbd aligned with nbd pthread.

Change-Id: I57cc92b94d36cd706616c9058134f716f0812892
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6278
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-03-12 08:21:00 +00:00
Liu Xiaodong
4c6c794be3 nbd: use retry_poller and retry_count
This is better naming to represent their usage.
retry_poller and count can also be used to do
async nbd_stop procedure in the following patch.

Change-Id: Ie5a74e4add3f1a6c7257df00aded8b5d52a09955
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-03-12 08:21:00 +00:00
Shuhei Matsumoto
2c436c00a0 bdev/ocssd: Get io_channel from not nvme_ch but bdev_io when processing pending requests
The next patch will add nvme_bdev_channel and we will not be able to
io_channel from nvme_ch anymore.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ba93e66657d21da58df63f3ad6dde4b155fc174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6612
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-12 08:20:46 +00:00
Shuhei Matsumoto
e1489743ed bdev/nvme: Add mutex per nvme_bdev_ctrlr
Add mutex per nvme_bdev_ctrlr and replace g_bdev_nvme_mutex by it
for possible cases. These are just drop-in-replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib1d5eebd65e514cfe96ad60a9004d9bace7b4f6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6693
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-12 08:20:46 +00:00
Shuhei Matsumoto
83f27434d3 bdev/nvme: Merge bdev_nvme_remove_trid() into bdev_nvme_delete()
This will make us easier to maintain the operation to delete
nvme_bdev_ctrlr and its trids. The added unit test cases guard us
from degradation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I400d4092020e89bacaebc7be045a456b8760ed8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6688
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: Changpeng Liu <changpeng.liu@intel.com>
2021-03-12 08:20:46 +00:00
Shuhei Matsumoto
3eb0b6b167 bdev/nvme: Factor out the common part of remove_cb() and bdev_nvme_delete()
By adding the second parameter, hotplug, factor out the common part
of remove_cb() and bdev_nvme_delete() into a helper function
_bdev_nvme_delete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5becbc7a7a94e852510e6a2745afb9c533d21713
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6692
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-12 08:20:46 +00:00
Shuhei Matsumoto
620e0ea043 ut/bdev_nvme: Add test cases for bdev_nvme_remove_trid()
The following patches will refactor bdev_nvme_remove_trid() and merge
it into bdev_nvme_delete(). Add test cases for bdev_nvme_remove_trid()
to avoid degradation by the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42da17c62843ead9a30ab9a06463df4b679e561d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-03-12 08:20:46 +00:00
Tomasz Zawadzki
13f868977e module/bdev: remove deprecated API
spdk_vbdev_register() was deprecated in SPDK 19.04.
config_text field in spdk_bdev_module was deprecated in SPDK 20.10.
spdk_bdev_part_base_construct() was deprecated in SPDK 20.10.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib795ccdf61154c168032ccf8b81ea77e5e663851
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6628
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-09 08:54:53 +00:00
Tomasz Zawadzki
99935996f2 lib/bdev: move to spdk_bdev_part_base_construct_ext()
spdk_bdev_part_base_construct() is deprecated so this patch
moves remaining instances to spdk_bdev_part_base_construct_ext().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iccd4b15933bec41885adfaf4fc4ce2abedd2d6c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6627
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-09 08:54:53 +00:00
Tomasz Zawadzki
a6b1e2c57d lib/bdev: remove deprecated spdk_bdev_open()
spdk_bdev_open() was deprecated in SPDK 19.10.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I12f51a237ddc43219d35b5c647dc60d10461d429
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6626
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:54:53 +00:00
Alexey Marchuk
47afb9280f nvme/rdma: Use RDMA provider API to post recv WRs
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I47cc1a21af1104f681519e542edaf66e363bb214
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6296
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-03-09 08:54:12 +00:00
Alexey Marchuk
3caf2e710f nvmf/rdma: Add new statistic to count idle polls
This statistic is incremented when we don't reap
anything from the CQ. Together with the total number
of polls it can be useful to estimate idle percentage.

Change-Id: I61b51d049b0bc506fb8a896e225187e46e75a564
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6295
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>
2021-03-09 08:54:12 +00:00
Alexey Marchuk
36ac75b94c nvmf/rdma: Use new RDMA statistics
Change-Id: I11c7793301be9dbe9d4c92e482a97fc6146cc355
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6294
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>
2021-03-09 08:54:12 +00:00
Richael Zhuang
201aa63471 sock: introduce SO_INCOMING_CPU to get placement_id
Leverage SO_INCOMING_CPU to get the CPU affinity of connections
(sockets). And allocate the connections to specific poll groups,
which aims to utilize cache locality.

From our test:
6 P4600 NVMe on target,target uses 8 cores, NIC irqs are bound to
these 8 cores, and initiator side uses 24 and 32 cores,
we can get 11%~17% randwrite performance boost for posix, and 8%~12%
for uring.

Change-Id: I011e0a21502c85adcccd4a14fbe9838b43f54976
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5748
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-09 08:53:52 +00:00
Jim Harris
9713bfe90d rpc.py: print better message if cannot connect
We need to catch the JSONRPCException when we cannot
connect, so that the error message can be printed
more cleanly. Also suggest to the user that maybe
they don't have an SPDK application running when
it cannot connect.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I497bed86573d5bf07a2b48b3d6682a2427aa4987
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6754
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: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-09 08:53:36 +00:00
Jim Harris
38736d993d nvme: zero shadow doorbell registers when freeing qpair
The shadow registers need to be zero when the qpair is
created.  This happens automatically when a given qid
is used for the first time, since the page is allocated
with zmalloc. But if a qid is reused, we need to make
sure its shadow registers are cleared *before* we create
the qpair again with the same qid.

So clear the registers in nvme_pcie_ctrlr_delete_io_qpair,
just after the cq is deleted.

Fixes issue #1795.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I08c30d1ea248559a01b802cd132dd57199b491b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6752
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-03-09 08:53:36 +00:00
ChengqiangMeng
34429830bd unittest/nvmf_rdma: increase code coverage for nvme_rdma_qpair_process_cm_event
nvme_rdma_qpair_process_cm_event code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I15a8aef83a8919124eee89111a0134fee8853fcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6689
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-03-09 08:53:27 +00:00
Jim Harris
22e5037e0c scsi: relax spdk_scsi_task_gather_data assert
If the iov_len is 0, it is OK for the iov_base to be
NULL.

Reported-by: Yi Ren <yunye.ry@alibaba-inc.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I45c9be68fc2975bf2abd91a9d77935ce516c5210
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6706
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-09 08:53:21 +00:00
Maciej Szwed
24014d63bd rocksdb: Change absolut SPDK path in RocksDB build to relative path
Because of recent changes in RocksDB Makefile we cannot
use absolute path during its build any more. Change it
to relative path.

RocksDB Makefile change:
80f71b5863 (diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R463)

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I3a4fd010b2d9d8eb0dd3b7bf159d582aa5032669
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6735
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-03-09 08:50:27 +00:00
Konrad Sztyber
b665fd8672 test/external_code: out-of-tree NVMe driver tests
These tests compile the driver both as a shared object and statically
linking it to the identify application.  Additionally, in both
configurations, the app is used to list all available NVMe controllers,
as well as print information about each one indivdually.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I127caf08acad11241bf685b392617ab4b810226b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6680
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>
Community-CI: Mellanox Build Bot
2021-03-09 08:28:22 +00:00
Konrad Sztyber
ae53ab2ddd test/external_code: renamed test case titles
Replaced the "_tc[0-9]+" suffix with a more descriptive title describing
the test case being executed.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id1c2f6dcf155d8ae99dc490983ab4bb1451bfefd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6764
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>
Community-CI: Mellanox Build Bot
2021-03-09 08:28:22 +00:00
Konrad Sztyber
a115aeff36 test/external_code: bind to all PCI devices
Removed the PCI_ALLOWED="NONE" line from setup.sh calls to bind to all
available PCI devices.  It'll allow the out-of-tree NVMe driver tests
from the following patch to execute properly, as they require NVMe
devices to be attachable from SPDK.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I56e89a6b853f02343803bb6ec704ea3c0a8bd12f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6679
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
183ac8884d external_code/identify: print controller identify data
The application will now print some of the fields from the identify
controller data.

The code has been copied from `examples/nvme/identify`, but, for the
sake of simplicity, trimmed down to printing reduced number of fields.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I838c47deffb0b877344f3cad0e88b6aca19790ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6678
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
e4d271f302 external_code/nvme: send identify controller during init
Now that it's possible to both submit the identify controller command
and process its completion, the initialization flow has been updated to
issue that command and update controller's identify data (which can be
retrieved via nvme_ctrlr_get_data()).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iee0e85f431275a5e6f1767db1d807de7fba6cdcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6677
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
71c69ddfc3 external_code/nvme: process completion queue
Added function that check the completion queue for completed commands,
executes their callbacks, and puts the associated requests back onto the
free request queue.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0f04c0d173a7058d4d4f7e59e573ce48130ff024
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6676
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>
Community-CI: Mellanox Build Bot
2021-03-09 08:28:22 +00:00
Konrad Sztyber
c4d01aa5b7 external_code/nvme: identify command submission
This patch adds code required for sending identify controller admin
command.  It means allocating an NVMe request, filling spdk_nvme_cmd
structure, and submitting the command by writing the command to the
submission queue and ringing the doorbell.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I69934213a350df03852860eeaeadc2a456c7673c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6675
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>
Community-CI: Mellanox Build Bot
2021-03-09 08:28:22 +00:00
Konrad Sztyber
48a89ec7d3 external_code/nvme: introduced nvme_ctrlr_get_data()
This function allows the user to retrieve the controller's identify
data.  Currently, that buffer is zeroed, but it'll be populated by the
identify command.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I91a99feef25ecf94c43cf144c12ac3c541c76cd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
5555513653 external_code/nvme: basic controller initialization flow
Added a simple controller enablement state machine based on the CC.EN
and CSTS.RDY bits.  The admin queue registers are also filled during
this process, so it's now possible to send admin requests.

To simplify the code, there are no timeouts for a controller to
transition from a specific state to the next one or for the whole
initialization process.  This means that if a controller gets stuck, the
code will hang indefinitely too.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I93f5a5931d7b24780da242e601dcdf2bec5f6552
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
a2d3ea8cb3 external_code/nvme: initial controller initialization definitions
After enumerating and attaching NVMe controllers, they're now
initialized at the end of nvme_probe()/nvme_connect().  For now, they're
immediately marked as initialized, but subsequent patches will replace
it with an actual initialization.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I22137bb10e871c7e79c28053c8ec98a835e11147
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
07dc433a2f external_code/nvme: queue pair initialization
This patch adds NVMe submission/completion queue pair definitions.
These definitions are required to keep track of outstanding NVMe
requests.  The admin queue pair is now instantiated with the minumum
number of entries (2).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2ced3ce7d210408d66cc17de1e66d86b1a1dbf79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6671
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
210e0db7e0 external_code/nvme: retrieve page size and doorbell stride
These values are needed for managing a submission/completion queue pair,
which will be added in the subsequent patch.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I80ac0d607160f06a13014b7dea95ae8172290aee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
7da17fb378 external_code/nvme: enable PCIe bus master and disable INTx irqs
It allows the controller to issue memory read/writes (the bus master
enable bit) and disables the ability to generate INTx interrupts which
won't be serviced.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3b041f1ea7c2bc275b609afcc3d1e4f655aee4c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6669
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
ad9ccbbf52 external_code/nvme: controller register access functions
Added getters/setters providing access to several of the NVMe
controller's registers.  Only the registers that are needed for the
initialization are implemented.

For now all of them are unused, so they're marked as external to avoid
the -Wunused-function warnings.  The subsequent patches will make use of
them and mark as static appropriately.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7012583f74e87720f6915afca69474ad1bb1e377
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6668
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
c2ca187c1e external_code/nvme: map controller's registers
The controller's memory register space (located in the first BAR) is now
mapped.  The functions for accessing individual registers from this area
will be added in the following patch.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie5f88079a46152ba8d68e534d5e4c0c2bef84ef3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
86b1b71f5f external_code/identify: use nvme_connect() if an address is provided
The identify app can now be used in two modes:
 - without any parameters it'll attach to all available NVMe controllers
   and print each one out,
 - with a single parameter specifying the BDF address of the controller
   it'll only attach and print out information about that controller.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I02c7a8a072f1db5fdfd428a5ab84163f26338a09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6666
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
5802856ece external_code/nvme: direct NVMe device connect
Added interface, nvme_connect(), for connecting an NVMe device specified
by a BDF address.  Similarly to spdk_nvme_connect(), it returns a
pointer to an NVMe controller representing requested device.

Under the hood, it uses spdk_nvme_pci_device_attach() to attach the
PCI device.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I15c7cabae07539cb97aba810385d26f223abfd6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6665
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
29342a9ed8 external_code/nvme: device attach/detach
The NVMe devices can now be enumerated, attached, and detached.  To
simplify the driver, the probing step has been omitted - all available
controllers are attached and need to be detached later.

The driver registers itself as a PCI driver via a call to
SPDK_PCI_DRIVER_REGISTER() and then uses spdk_pci_enumerate() to
enumerate available NVMe devices and attach them.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id03e2f4365f4f7ca98178be70278d0c4b7b34b26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6664
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
91b30e7aec test/external_code: initial definitions for basic NVMe driver
This patch introduces initial definitions for a stripped down version of
an out-of-tree NVMe driver.  It's purpose is to showcase SPDK's
interfaces for writing user-space drivers for various types of devices.
The choice of NVMe as the example is based on the fact that it can be
emulated by QEMU and the code can be borrowed from SPDK's regular NVMe
driver.

This driver will only provide the most basic functionalities (e.g.
device probing, controller initialization, only admin queue support,
etc.) and won't have support for any device quirks.  Therefore, it's
only intented to be used with emulated devices.

In addition, an application utilizing the driver to list all available
NVMe controllers and print their identify data will be added.  It'll
be a very basic, stripped down version of `examples/nvme/identify`.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I67c748aabf75a37ca72dfb74301a610f7c4ae2bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6663
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Shuhei Matsumoto
e8cde79560 bdev/nvme: Return the created ctrlr directly from nvme_bdev_ctrlr_create()
This also simplifies the code.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I32ca5e24779dc60e0ff4cf2610951cce55d06c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6622
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: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:54 +00:00
Shuhei Matsumoto
949b21f143 bdev/nvme: Add nvme_bdev_ctrlr parameter to nvme_ctrlr_populate_namespaces_done()
nvme_bdev_ctrlr is valid while populating namespaces of the
nvme_bdev_ctrlr regardless of the result. nvme_bdev_ns holds
nvme_bdev_ctrlr by its pointer, ctrlr. Hence it is not necessary for
nvme_ctrlr_populate_namespaces_done() to use nvme_bdev_ctrlr_get_by_name()
to get nvme_bdev_ctrlr.

To simplify the code, add nvme_bdev_ctrlr parameter to
nvme_ctrlr_populate_namespaces_done() and remove the
nvme_bdev_ctrlr_get_by_name() call from nvme_ctrlr_populate_namespaces_done().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic2013842fad16ea0de49c18b5b853d147c23a6b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6621
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:54 +00:00
Shuhei Matsumoto
4fa4e4cc3f bdev/nvme: Use bdev_nvme_find_io_path() to a remaining case, no_pi_readv()
bdev_nvme_no_pi_readv() had not been used for bdev_nvme_no_pi_readv() yet.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9bf815b36ef0daa2f1248f618a9c7e2f1ea62346
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6603
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>
2021-03-08 10:49:54 +00:00
Mao Jiang
2b2a297de1 test/nvme_io_msg: build nvme_io_msg uinttest file
Cases for IO message sending and processing.

Change-Id: Id9085c016d4379401f8e203006e11a268518d0e2
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6215
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: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:45 +00:00
Changpeng Liu
17c5843d5a nvmf/vfio-user: don't block DSM command in vfio-user
Previously we only process Read/Write/Flush IO commands, we should
not block the DSM command in vfio-user layer if the backend block
device can support it.

Change-Id: Ia6b90397adcc36015f331f011a5bdf3e3d6562d8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6525
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-03-08 10:49:32 +00:00
Monica Kenguva
d5bcc16d09 rpc: Document bdev_set_qd_sampling_period
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic95eb98eeafe536fe3ac74f88229bbfdcf5daccb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6632
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>
2021-03-08 10:49:23 +00:00
Michal Berger
9801533f8a scripts/setup: Use uio_pci_generic if it's loaded/compiled in
Also, for consistency, use check_for_driver() while checking if
igb_uio is loaded too.

Change-Id: I00302b3cab169c77032fc0cef0ea384e9e5eb5be
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5303
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-08 10:49:11 +00:00
Michal Berger
fcc35c86cd scripts/setup: Attempt to load uio driver only when igb_uio is picked up
Change-Id: I5c4860c69ccfdae4532498aaea8886ed3905d899
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5302
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-08 10:49:11 +00:00
Maciej Wawryk
46f5120c56 test/vhost: fix cgroup path
new fedora33 is using cgroup-v2 and old path in script give us error Permission denied

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I238c1eae0e4708003726a721c445a0b62dc0cff7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6425
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>
2021-03-08 10:48:53 +00:00
Krzysztof Karas
6c0cebf1c9 spdk_top: update spdk_top docs for spdk.io
Updates spdk_top documentation page to explain and present new features.
Images are being deleted to make versioning easier.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I6c3c172ed54423afc3afa4566b71ed19f0bc2e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6095
Community-CI: Mellanox Build Bot
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>
2021-03-08 10:48:47 +00:00
Maciej Wawryk
02da8ebd2e test/openstack: retry git clone when failed
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If0c814b36c29aa301a6b77a3b5e74465cccfc0bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6195
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-08 10:48:36 +00:00
Maciej Wawryk
c4dfdeefdb test/openstack: clone only recent revision
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I81581ebe46f172f0fbbeb542dfb4b513326a3566
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Mellanox Build Bot
2021-03-08 10:48:36 +00:00
Tomasz Zawadzki
739d541362 lib/bdev: move to spdk_bdev_open_ext()
spdk_bdev_open() is deprecated, so this patch moves
remaining instances to spdk_bdev_open_ext().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7e8648efbf166665bf1c3700a11a6dc81fd051c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6625
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: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
3e15b356f3 module/blob: remove deprecated spdk_bdev_create_bs_dev/from_desc()
spdk_bdev_create_bs_dev was deprecated in SPDK 19.10
spdk_bdev_create_bs_dev_from_desc was deprecated in SPDK 20.10

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1290958923f7833579d098a693454e7ab7656307
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6624
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
a38d241cd6 lib/event: remove deprecated fields from spdk_app_opts
max_delay_us was deprecated in SPDK 19.04.
config_file was deprecated in SPDK 20.10.
master_core/pci_blacklist/pci_whitelist were deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie8be4c347de58044a7c3d5b1329d96e47ce084b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
4fb0b89625 lib/env: remove deprecated fields from spdk_env_opts
The fields were deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If6b946024bf1ce4c106cdf493bcb5662a3b21b13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6592
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Nick Connolly
292b8e0c3e ut/bdev_nvme: fix 'used uninitialised' warning
On some platforms, GCC identifies that opts.io_queue_requests is used
uninitialised in bdev_nvme_create_qpair due to the stub function
spdk_nvme_ctrlr_get_default_io_qpair_opts which would normally zero the
qpair opts. Whether the warning appears is likely to be determined by
how effectively the platform garbage collects unused code.

Replace the stub with a minimal implementation that zeros the qpair
opts to avoid the warning.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I2b8c2d657ae5401c3b35ca66938a966906cdc846
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6595
Community-CI: Mellanox Build Bot
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>
2021-03-05 08:33:30 +00:00
Changpeng Liu
2f579469b6 nvme/tcp: pass correct parameter to nvme_tcp_qpair_send_h2c_term_req_complete
Previously the callback parameter for this function is NULL, this will
cause segment fault, so pass the correct parameter here.

Fix #1817

Change-Id: Ie768b7bf4a72862d16a44742ab3032803d0939a2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6690
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:18 +00:00
Jin Yu
17a286baff pci: fix rte dev remove handling
Can not remove device in the remove event
callback as we can not unregister the remove
callback. So use the alarm_set to fix this issue.

Fixes #1809

Change-Id: Ib86bc4eeecc0fe2bc51538e28684d015405e8835
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6553
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:11 +00:00
ChengqiangMeng
6de10dfc01 unittest/nvme_tcp: increase code coverage for nvme_tcp_parse_addr
nvme_tcp_parse_addr code comprehensive coverage.
res->ai_addrlen is returned by getaddrinfo(), and it is an IPV4 or IPV6 address, so its maximum length is not more than 46.
And sizeof(*sa) is always 128,so ai_addrlen cannot be greater than sizeof(*sa).

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Id432a39c1461c484ea871e7e9d8d3ed7a8391200
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6512
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:02 +00:00
Krzysztof Karas
6a34348219 spdk_top: fix app crashing on tab selection with TAB key
Fixes spdk_top crashing problem upon selecting a row in one tab,
then switching with TAB key to a different tab with fewer rows
and calling pop-up details window with ENTER key.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I52c5729eca0ce0eaad88767ff3add471a780140a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6367
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2021-03-05 08:02:10 +00:00
Monica Kenguva
97ef870100 nvmf/rdma: add RPC parameter to specify CQ size with RDMA transport
nvmf_create_transport rpc parameter to configure the CQ size helps
if the user is aware of CQ size needed as iWARP doesn't support CQ resize.

Fixes issue #1747

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ia9ba2b5f612993be27ebfa3455fb4fefd80ae738
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6495
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-04 08:14:57 +00:00
Michal Berger
7ecf76e02e scripts/vagrant: Drop vagrant-cachier
There's almost no benefit coming from it CI-wise since all our VMs are
already fully provisioned. The speed up of nightly jobs, which do run
package updates, is minimal. Overall, it only slowers deployment of the
autotest VMs.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I68d9530533f0b0d7d2fb72ce82706d6bc0cf2e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6637
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-04 08:12:54 +00:00
Michal Berger
344cc21e69 scripts/vagrant: Drop support for FreeBSD 11.x
These releases reached their EOL already.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic30b343b63620a2fb80870a6c192c4931936421e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-04 08:12:54 +00:00
Michal Berger
b5212f04e7 scripts/vagrant: Drop support for Clearlinux
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Idc0ca75b48cd680bacdd455206b88df6b99d0bff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6635
Community-CI: Mellanox Build Bot
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>
2021-03-04 08:12:54 +00:00
Michal Berger
ee191fa807 test/vhost: Don't fetch .qcow2 image needed for tests
Simply fail. It's expected to have this image already installed on
the system.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie7bbde84fe633c8b5a4d41bd6dcbee66d6f4a0c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6375
Community-CI: Mellanox Build Bot
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>
2021-03-04 08:09:43 +00:00
Michal Berger
3e4b33ab9f test/vhost: Drop nested-lvol from the tests
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I815cdd18281b7c63aadd287cdd277bb9eb8d9489
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6596
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-04 08:09:43 +00:00
Michal Berger
e0335bb121 test/vhost: Drop support for multiple nvme controllers
This test path is currently not being run through CI, hence no need
to support it.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9a7cc7005c4e20f25724d2a0a417656deb09abb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6543
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2021-03-04 08:09:43 +00:00
Michal Berger
3369ef457f test/vhost: Remove tests dependent on centos image
Said image is not used by the CI at all, drop support for it.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3493e8c5f808e56cfb0304a04cfa90ab3700018c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6542
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2021-03-04 08:09:43 +00:00
Shuhei Matsumoto
5261f638cb lib/iscsi: Call iscsi_reject() in return statements in iscsi_pdu_hdr_op_data()
iSCSI library had used goto label to consolidate iscsi_reject()
calls but calling iscsi_reject() in return statements will be simpler
and easier to read. This patch series focuses on Data-OUT PDU processing,
and so change goto label to function call in return statements for
Data-OUT PDU first.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f30aff764820aab87233ea8cf22263611591a96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:17:33 +00:00
Nick Connolly
b8d548911b app: exclude spdk_top from mingw cross builds
Temporarily exclude spdk_top from mingw cross builds until curses
support is resolved.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I1db9a9d592de06e45e1ec496369c629d66f0a50c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6580
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: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:16:54 +00:00
Nick Connolly
2a8065b554 mk: add mocking for mingw cross builds
On Windows there has to be a thin layer above the system calls to
provide POSIX functionality. When wrapping system calls, the name needs
to be prefixed with wpdk_ to ensure that the layer is called.

Re-arrange the definitions to facilitate wrapping and prefix with wpdk_
for mingw. For other compilers targeting Windows, the --wrap flag is not
supported and the layer above the system calls implements an alternative
mechanism to enable the mocking.

Tested with $(info LDFLAGS) added to spdk.mock.unittest.mk combined with
visual inspection and running the unit tests.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: If00504740229362c40bee4ae171d35489afb2e77
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6577
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:16:54 +00:00
Nick Connolly
3399171388 mk: workaround for mingw stack-protector bug
Add -mstack-protector-guard=global to work around GCC bug 86832,
where -fstack-protector will attempt to use native TLS, but mingw only
supports emulated TLS. This causes a segmentation violation at the start
of any function protected by stack-protector. The issue exists in GCC
versions prior to 8.3.

Enable -mstack-protector-guard=global which uses a global variable for
the guard value. This is the behaviour with the fix, so there is no
downside to enabling it for all versions of GCC on Windows.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I85bc831043585071b0d8b0a3dd637b8d9ff26dab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6575
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-03 08:16:54 +00:00
Nick Connolly
af17c1d44d mk: adjust options for mingw cross compilation
Check compiler target triplet for the strings 'windows' or 'mingw'
and set OS to Windows. If found, adjust basic parameters:

Set EXEEXT to indicate executables have .exe suffix.
Exclude 'relro' and 'now' flags which are not recognised on Windows.
Exclude 'noexecstack' flag which is not recognised on Windows.
Exclude -pthread flag because Windows doesn't have POSIX threads.
Include libssp.a to support stack-protector and _FORTIFY_SOURCE.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I94a45d3123ebc81f5529006fa07b05da897e5866
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6574
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-03 08:16:54 +00:00
Pawel Piatek
b3139d716b scripts/vagrant: change owner also on ocssd_md file
For OCSSD disk case we create two files, but only one was later
chown-ed.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I411f0717f5416ba012e2e90582b60ec892d2744e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-03-03 08:13:20 +00:00
Pawel Piatek
86475967d3 scripts/vagrant: create nvme refactoring
- throw error instead of silently skipping create disks on
  non-linux OS
- early return/exit from script
- add quotes around disk name
- use case/esac to check WHICH_OS
- other small syntax changes

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I71879bf635ecb275e805b6fcb3ec9d6bc3bc299f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6169
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:13:20 +00:00
Michal Berger
0081cfeaae pkgdep/git: Put sources installation into a separate function
This allows other entities to source pkgdep/git and safely use other
available routines.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I81c87ef124bdfc6d8cc548bc3a0ff4c19867c232
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6339
Community-CI: Mellanox Build Bot
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>
2021-03-03 08:12:26 +00:00
Michal Berger
fc7d5d4e27 scripts/rxe_cfg: Try to get status from all infiniband devices
Also, add some minor tweaks for the add|rm routines.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I39cdbec2c0aca12e7077d8db161e65fdce7ca19f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6241
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:12:26 +00:00
Michal Berger
940cd3ae37 test/nvmf: Make sure RoCEv2 protocol is used by irdma platform
This is done in order to avoid hitting issues similar to #1747
for which https://review.spdk.io/gerrit/c/spdk/spdk/+/6106 was
submitted.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I95817f63287795f438f1d392cf1fb2894226ce0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6240
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-03 08:12:26 +00:00
ChengqiangMeng
8b4d6736d8 unittest/nvme_tcp: increase code coverage for nvme_tcp_qpair_set_recv_state and nvme_tcp_alloc_reqs
nvme_tcp_qpair_set_recv_state and nvme_tcp_alloc_reqs
and nvme_tcp_free_reqs code comprehensive coverage.
Except for calloc and spdk_zmalloc failed branches.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Id300ecd0d4251603474ac934c7c38cca793b3c51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6600
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-03-03 08:11:46 +00:00
Evgeniy Kochetov
6005775622 nvme: Move nsdata_zns to namespace structure
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I3f7508d14075c23d9b850da20da6d86c36e08450
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6501
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-03-02 08:06:15 +00:00
Evgeniy Kochetov
3a8852d384 nvme: Move nsdata to namespace structure
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I6083331a24dbf90170096cb98e6371ef2d4e6f9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6500
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-03-02 08:06:15 +00:00
Evgeniy Kochetov
030b9f2608 ut/nvme: Add unit test for nsdata
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I9217eae7de8e9705052599a3f0ba0b6e4ca2be38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6499
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-03-02 08:06:15 +00:00
Evgeniy Kochetov
6231798dca ut/nvme: Fix struct initializers
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I345cbdb695a8f4724132e97290c2a5af4cdc3f75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6498
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2021-03-02 08:06:15 +00:00
yidong0635
a497ee9b56 splite/vbdev_split: Free base part bdev on the error path.
spdk_bdev_part_base_construct_ext is called by spdk_bdev_part_base_construct.
there's already an example if a base bdev is an abnormal case we need to do
spdk_bdev_part_base_free to close the base bdev.

From constructing a successful part base bdev util finishing vbdev_split_create.
there're except failure cases to exit.

if a bdev is open and when runs into bdev_unregister_unsafe, it's in an EBUSY
state, bdev will not finished from the list. That spdk_io_device_unregister
will no be executed in spdk_bdev_unregister.

That a subsytem with it callback which is app_reactors_stop can't be finished.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idc156557f936da5f2618421ede2619f1f2e29c51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6599
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-02 08:02:58 +00:00
Nick Connolly
81525cc449 dpdkbuild: improve portability
Default to the more common Linux/GNU 'sed' edit in-place argument,
unless the platform is FreeBSD.

Tested by visually checking rte_build_config.h to confirm that the sed
in-place worked correctly.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I68be69658930fb20318ac3aa2413bbf4a358e9bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6531
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-02 08:02:52 +00:00
wanghailiangx
9c6548838a test/fio: add bs=4096 for fio_nvme
Since 'bs=4k' was removed from example_config.fio, although the
default bs value is 4096, but it would still be better to just
specify bs=4096 here.

Change-Id: I7c3bf10c10e42573ecb6683a371c3e81d3241cec
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6251
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-03-02 08:02:46 +00:00
Tomasz Zawadzki
f3fd56fc3c lib/iscsi: return immediately from iscsi_parse_params if len is 0
The spec does not disallow TEXT PDUs with no data.  In that
case, just return immediately from iscsi_parse_params.

This avoids a NULL pointer dereference with a TEXT PDU that has
no data, but CONTINUE flag is set.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2605293daf171633a45132d7b5532fdfc9128aff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-03-01 14:13:48 +00:00
ChengqiangMeng
ae92e7f585 unittest/nvme_rdma: increase code coverage for nvme_rdma_poller_create
nvme_rdma_poller_create code comprehensive coverage.
Except for calloc and ibv failed branches.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I5b308e63d12aa8d45d0268e67fd0bb98f449b79a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-01 12:08:40 +00:00
Jacek Kalwas
77d4cc6bef build: fix spdk_env_dpdk.pc creation
instead appending to output file (which occurs on each make execution)
sed is used to modify `Requires` section of the *.pc file

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1a8cb1ec35bf583293c7174a413302191bbbd735
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6460
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-03-01 12:08:21 +00:00
Changpeng Liu
b5fe146a9c bdev/malloc: check block size when creating a new block device
Fix #1808

Change-Id: Iee2ca197ecfd096ffda9ea067bd13f8995792ff3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6578
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-01 12:07:09 +00:00
Jim Harris
3d9e67b07d perf: use elapsed time when test run ended early
If the test run is aborted early (i.e. Ctrl-C), we
should use the elapsed time as the divisor instead
of the originally specified time.

Fixes issue #1800.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3312cc83f3422ec46ad584e3ee2b40f3ad9ec6f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6474
Community-CI: Mellanox Build Bot
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: <dongx.yi@intel.com>
2021-03-01 12:06:59 +00:00
Alexey Marchuk
1eae58ff6d rdma: Add statistics per qpair
These statistics can help to estimate efficiency of
Work Requests batching and show busy/idle polls ratio.

Send: the doorbell updates statistics for verbs
provider are incremented per each ibv_post_send call,
for mlx5_dv per each ibv_wr_complete call.

Recv: the doorbell updates statistics for both
providers are updated when either ibv_post_recv
or ibv_post_srq_recv functions are called.

Each qpair on initialization accepts an optional
pointer to shared statistics (nvmf/nvme poll groups).
If the pointer to statistics is not provided then
qpair allocates its own structure. That is done
to support cases when NVME RDMA initiator doesn't
use poll groups, so we can avoid checks that qpair
has statistics in IO path

Change-Id: I07dea603cb870b85ea23c42e8e2c4520b1c66252
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6293
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-03-01 10:17:13 +00:00
Alexey Marchuk
d9ff7d09ed nvmf/rdma: Use RDMA provider API to post recv WRs
Change-Id: I782698bb12f8bbe9dc3bf06db8d83c9caf42a8db
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6292
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-03-01 10:17:13 +00:00
Alexey Marchuk
696e858094 nvmf/rdma: Use RDMA provider SRQ API
Change-Id: I9401efe73f7d0b39d0449b304ea2c211efb3a9f2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6291
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>
2021-03-01 10:17:13 +00:00
Changpeng Liu
d0b2448b63 mk/libvfio-user: support --with-vfio-user=/usr/path
Users may not use SPDK libvfio-user submodule, so add a
library path for this case, users can still just use
'--with-vfio-user' without adding the path, for this case
a submodule default path will be used.

Change-Id: Ib0dd82ab6910056ff21b5b2d373c0d16916162c6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6471
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: Thanos Makatos <thanos.makatos@nutanix.com>
2021-02-26 12:27:06 +00:00
Changpeng Liu
ae9f80354a mk/libvfio-user: use the install directory for the link path
Previously the libvfio-user didn't install the static library to
the install directory, with that fix in libvfio-user, we can use
the install directory now.

Change-Id: I3f232395a6dc3bf6d7d3937b245eb10c4b6a0e26
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6470
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>
2021-02-26 12:27:06 +00:00
Changpeng Liu
c837419aac libvfio-user: update submodule
Change-Id: Ia4bab4fd181216fa7a2be1332858ef559832c2e1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6469
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-26 12:27:06 +00:00
Michal Berger
d511348a8e pkgdep/git: Add support for installing ice driver
Needed as depending on the kernel version given system is running under,
some E800 controllers may not be supported.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic3ac24e24c68d62fecd702170f0bccc7176da8cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-26 12:24:56 +00:00
Michal Berger
47508028c7 pkgdep/git: Add support for installing irdma driver
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ifd174eaa88fe28588c66fafeef8a3bb7c24164f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6234
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-26 12:24:56 +00:00
Michal Berger
ab7ae487a6 pkgdep: Add bash-completion package to DEV_TOOLS
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7fe3baa15327b9ff509185ff6aa30390e35e9f8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6239
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-26 12:24:56 +00:00
wanghailiangx
097d1979b1 app/trace_record: modify help case to return 0
Case 'h' or 'H' should return 0, this is a normal return.

Change-Id: I872cdeeaab8bbe0efac8a8f959c1bd88f159b0b8
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6064
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>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-26 11:50:58 +00:00
Shuhei Matsumoto
1160d8e6f5 lib/iscsi: Submit only subtasks for Data-OUT PDU sequence
This change follows the large read which submits only subtasks, and
simplifies large write cases.

Associate the PDU which sends a SCSI Write PDU with immediate data
with both the primary task and the first secondary task. Then stop
incrementing reference count of the primary task twice.

As same as the last patch, copy the failure status directly among
the primary task and the secondary tasks because the primary task
is not submitted now. Then remove related data from struct
spdk_iscsi_task and related helper functions from conn.c.

Finally simplify unit tests for process_non_read_task_completion().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I54aa38c9b9fb7d7352da040dcdd8bcc1b1756a83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6344
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-25 10:27:53 +00:00
Alexey Marchuk
b7115d46fe nvme_rdma_ut: Fix GCC 4.8.5 warning
nvme_rdma_ut.c:370:9: warning: missing braces around initializer [-Wmissing-braces]
  struct nvme_rdma_qpair rqpair = {0};
         ^
Designated initializers is used with scalar value
while the first element of nvme_rdma_qpair is
a structure

Change-Id: I5a4e76612ccbd2c84283fe3ae2c57b9ea98591cf
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6305
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>
Reviewed-by: <dongx.yi@intel.com>
2021-02-25 10:27:31 +00:00
Niklas Cassel
2910ba6c53 nvme: simplify controller statemachine
For the following nvme controller statemachine states:
NVME_CTRLR_STATE_IDENTIFY_NS
NVME_CTRLR_STATE_IDENTIFY_ID_DESCS
NVME_CTRLR_STATE_IDENTIFY_NS_IOCS_SPECIFIC

The statemachine can either:
- Jump to succeeding state
- If active ns list is empty, jump directly to NVME_CTRLR_STATE_CONFIGURE_AER
- In the unlikely case if NVMe completion error, jump to NVME_CTRLR_STATE_ERROR

Simply this such that we either:
- Jump to succeeding state
- In the unlikely case if NVMe completion error, jump to NVME_CTRLR_STATE_ERROR

This will help to reduce the complexity of the nvme controller statemachine,
especially considering that there are new additional states
(NVME_CTRLR_STATE_IDENTIFY_NS_DIRECTIVE and
NVME_CTRLR_STATE_CONFIGURE_NS_STREAMS) currently on review that would continue
with the bad habit of having three possible jump states instead of just two.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I3242052b1108afcd8adbe6d0378b1358fef58ec8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6521
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: sunshihao <sunshihao@huawei.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-25 10:27:21 +00:00
Mao Jiang
092516cae9 test/nvme_rdma: add creating nvme qpair cases
Change-Id: I2d772cab1d65b7a3522191e854327ed84b72a4df
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6335
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-25 10:27:07 +00:00
Jacek Kalwas
99b1257154 build: swap pci with bus_pci libs on the list
bus_pci depends on pci so it shall be listed before, otherwise it can
result in linking issue e.g.

/usr/bin/ld: /home/jkalwas/spdk/dpdk/build/lib/librte_bus_pci.a(bus_pci_pci_common.c.o): in function `pci_parse':
pci_common.c:(.text+0x6e): undefined reference to `rte_pci_addr_parse'

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Idff446df82c37844edc122d5171e8ffa684b296f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-25 10:26:48 +00:00
Mao Jiang
504031d850 test/nvme_transport: build nvme transport unittest file
Change-Id: I0ac4e9afdd69a933522e2cada54b891ab3fbd78c
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6458
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-25 10:26:36 +00:00
Liu Xiaodong
4f2f8e8d44 nbd: set NBD_FLAG_SEND_FLUSH
SPDK nbd supports NBD_CMD_FLUSH, so set NBD_FLAG_SEND_FLUSH
to inform kernel about this flush ability.

Change-Id: Iaccb98da07e6fa184a798d792dd062f3d4013ade
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6524
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-25 10:26:26 +00:00
Ziye Yang
579a678a51 nvme/tcp: Move sock creation into nvme_tcp_ctrlr_create_qpair function.
Purpose: To get the optimal group, we need the socket information.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I17b048a402fbf002307dd225f64b20a9f876d642
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3324
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>
Community-CI: Mellanox Build Bot
2021-02-25 10:26:08 +00:00
Ziye Yang
2f1cd867f3 sock/uring: Refactor the code in uring_sock_close
Use the same style compared the code in posix_sock_close.
Thus if we cannot close sock->fd, i.e., we leak the fd,
but we can still free the memory related with uring sock.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Id2f0e8a2c7065f100c2b009e76a49b528fd221b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6539
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-25 10:26:08 +00:00
Ziye Yang
be57e2a6ec lib/nvmf: Use the accelerated engine to compute the data digest.
This patch is used to leverage accelerated engine to compute
the data digest in the following case:

1 DIF is not used.
2 The data to compute is aligned with size 4, i.e, %4 = 0.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I51fb6e3ab04391062b244cba6e249c8e20d3180f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6014
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-25 10:25:49 +00:00
Ziye Yang
88754353c0 lib/accel: Add the real chained crc32 support with the example.
This patch added the chained crc32 support API for both batched
and non batched mode usage. And also update the accel_perf
program in order to use the revised accelerated crc32 function.

For example, you can use the following command:

./build/examples/accel_perf -C 4 -q 128 -o 4096 -t 5 -w crc32c -y

In this command, "-C 4" means that caculate the chained
crc32 for an iov array.
(even if you do not have the accelerated DSA hardware)

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ifede26f9040980b5791da8e5afef41177eede9f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6457
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: Changpeng Liu <changpeng.liu@intel.com>
2021-02-25 10:25:49 +00:00
Niklas Cassel
1f49ee235f nvme: only reassign start_valid if we fetched a new SGE
For a SGL using PRPs, there is always an alignment check of the start
address in the beginning of the loop. This is stored in start_valid.

If the start is indeed valid, we might fetch a new SGE,
and then perform a second alignment check on this new SGE.

However, this second alignment check is done unconditionally,
meaning that for the last SGE in a request, we check if the
same start address is aligned twice.

Only perform the second alignment check if we actually fetched
a new SGE.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I9df8038c650b0879f838d1d9d895e8dd7172840d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6493
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-25 10:25:39 +00:00
Thanos Makatos
dfd7604687 NVMf/vfio-user: handle LOG_INFO and LOG_WARNING log levels
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Change-Id: Ie5129fcda87c054605180d80bf038f4dce2d71c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6523
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: Changpeng Liu <changpeng.liu@intel.com>
2021-02-25 10:25:29 +00:00
Thanos Makatos
53ff83c24e NVMf/vfio-user: don't use SPDK log levels where syslog(3) log levels should be used
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Change-Id: Ia198b509e396a4635af9f9133e6dc40fc34c4ac1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6522
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-25 10:25:29 +00:00
Nick Connolly
e7c019874c module/bdev/nvme: improve portability
In nvme_bdev_ctrlr_create, calloc will be called with a zero size
allocation request if the number of namespaces is zero. The behaviour
is implementation defined if the size of the space requested is zero -
calloc will either return a pointer that mustn't be dereferenced, or
NULL. If NULL is returned, the nvme_bdev_ctrlr_create will fail.

Only call calloc if there are a non-zero number of namespaces.
Otherwise, leave the namespaces pointer with a NULL value. All
references to namespaces[] are either known to be safe, or occur
in the context of looping through the namespaces which will be
skipped if the count is zero. The exception to this is in
vbdev_opal_create, where an assert has been added to match
equivalent code in bdev_ocssd_create_bdev.

Tested by running unit tests on a system that returns a null pointer
for a zero size allocation.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I058b0683fd9b3a20bf90e54db93ca48b9bb4e40e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6551
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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: sunshihao <sunshihao@huawei.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-25 10:25:20 +00:00
Ziye Yang
d5cd0b13b6 sock: Fix the "sock remove assert bug" in spdk_sock_group_remove_sock
The statement causes this issue is:

assert(group_impl->num_removed_socks < MAX_EVENTS_PER_POLL);

The call trace is:

The previous solution is:
commitid with: e71e81b631

But with this solution, it will always add the sock
into the removed_socks list even if it is not under polling
context by sock_group_impl_poll_count. So it will exceed the size of
removed_socks array if sock_group_impl_poll_count function will not be
called. And we should not use a large array, because it is just a workaround,
it just hides the bug.

So our current solution is:

1 Remove the code in sock layer, i.e., rollback the commit
 e71e81b631. This patch is
not the right fix. The sock->cb_fn's NULL pointer case is
caused by the cb_fn of write operation (if the
spdk_sock_group_remove_sock is inside the cb_fn). And it is not
caused by the epoll related cache issue described in commit
"e7181.." commit, but caused by the following situation:

(1)The socket's cb_fn is set to NULL which is caused by
spdk_sock_group_remove_sock by the socket itself
inside a call back function from a write operation.

(2) And the socket is already in the pending_recv list. It is
not caused by the epoll event issue, e.g., socket A changes Socket B's
cb_fn. By the way, A socket A should never remove a socket B from a polling group.
If it really does it, it should use spdk_thread_sendmsg to make sure
it happens in the next round.

2 Add the code check in each posix, uring implementation module.
If sock->cb_fn is NULL, we will not return the socket to the active socks list.
And this is enough to address the issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I79187f2f1301c819c46a5c3bdd84372f75534f2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6472
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-24 13:06:50 +00:00
Niklas Cassel
9d79d27e49 nvme: add function to get ZNS max active zones
Add a function to get the number of max active zones for a zoned
namespace.

The value inside the identify namespace struct is a 0's based value,
where 0xffffffff means unlimited.
If unlimited, the addition will overflow and return 0,
which is the intended value to represent unlimited for this API.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia09e3db157ca0afadbd3ca4032eedd7bcd88248c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6443
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: sunshihao <sunshihao@huawei.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-24 13:06:32 +00:00
Niklas Cassel
bb5330c06d nvme: add function to get ZNS max open zones
Add a function to get the number of max open zones for a zoned
namespace.

The value inside the identify namespace struct is a 0's based value,
where 0xffffffff means unlimited.
If unlimited, the addition will overflow and return 0,
which is the intended value to represent unlimited for this API.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I4223146bc1ddf90486892a0af5fe5ce006dc5fd3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6442
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: sunshihao <sunshihao@huawei.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-24 13:06:32 +00:00
Mao Jiang
74c43a7446 test/nvme_tcp: Cases for nvme tcp
Cases for sending tcp qpair command and writing tcp qpair pdu.

Change-Id: I183d61fefd0749fb8a269d4f240d6e2e917a4996
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5998
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:06:21 +00:00
Rafal Stefanowski
80b80d2482 bdev/ocf: Handle memory error properly
When there is not enough memory needed to start cache, print
relevant message and inform about possible solutions.

Fixes #1763

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I911dcb4e86ad7e3f2e2b051678736d4e88869db5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6078
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-24 13:06:12 +00:00
Nick Connolly
619b8e3733 dpdkbuild: set --buildtype for debug builds
When ./configure --enable-debug is specified, meson is invoked using
the default 'release' buildtype and '-O0 -g' is added to DPDK_CFLAGS.
Instead, specify --buildtype=debug so that meson knows it is a debug
build, will return the correct value from get_option('buildtype') and
can choose the appropriate toolset options to enable symbolic debugging.
Using --buildtype=debug generates unoptimised code which matches
the current intent.

Tested by building with and without --enable-debug and verifying that
meson reports 'debug' for the debug build.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iabb79cd2051145e03fea8fd749cfb18b78e625a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6497
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:03:21 +00:00
Nick Connolly
8436569a70 dpdkbuild: add support for mingw cross build
If CONFIG_CROSS_PREFIX includes 'mingw', then specify --cross-file
'config/x86/cross-mingw' which is used as part of regular DPDK
testing, so is being maintained. For any other non-null prefix, default
to the current error message that automatic cross builds are not
supported.

Tested by running ./configure --cross-prefix=x86_64-w64-mingw32
and verified that 'make' in dpdkbuild used the cross tools.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I75c401dfe8422f6c5f1bbe631695e7ae6118f723
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6530
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:02:30 +00:00
Shuhei Matsumoto
847d0a4ec0 bdev/nvme: Get nvme_bdev from standard ns via helper function for configuration
When multipath is supported, nvme_bdev will be got via bdev_subsystem.
To make such change transparent, add a helper function
nvme_bdev_ns_to_bdev() and use it for some cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia5ad0b87178bc739ba0a75789f9f26b860241a04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5801
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: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:01:44 +00:00
Shuhei Matsumoto
eacea084f8 bdev/nvme: Replace linked list, nvme_ns->bdevs, by pointer, nvme_ns->bdev
By the recent changes, the linked list nvme_ns->bdevs has only a
single bdev at the maximum. Hence replace it by the pointer
nvme_ns->bdev, and remove the linked list pointer nvme_bdev->tailq.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib976e15bb128ba8479070b58e5f4c43fb9dcf479
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6230
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:01:44 +00:00
Shuhei Matsumoto
613d441364 bdev/nvme: Process only the head of linked list, nvme_ns->bdevs
By the last changes, not only standard namespace but also ocssd
namespace has only one nvme_bdev, and standard namespace processes
only the head of nvme_ns->bdevs.

This patch changes the common and standard namespace specific
part to process only the head of nvme_ns->bdevs.

The following patch will replace the linked list nvme_ns->bdevs
by the pointer nvme_ns->bdev.

Add a particular error case that nvme_bdev is failed to create even
if ctrlr has one namespace. If ctrlr has one namespace but the
corresponding bdev is failed to create, nvme_ns->populated should
be false and hence nvme_ns->bdevs should not be accessed. However
the code had not assumed such case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5495882fad8c8a012305177179a46d4373ba75f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5800
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-24 13:01:44 +00:00
Shuhei Matsumoto
9772b58082 bdev/ocssd: Remove range from struct ocssd_bdev
Remove range instance from struct bdev_ocssd_range, and additionally
remove range pointer from struct bdev_ocssd_create_ctx.

Then remove the definition of struct bdev_ocssd_range.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5cb38d17ff2ec852878b481b8974983922fe25d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6225
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-02-24 13:01:44 +00:00
Shuhei Matsumoto
56d8cc8d72 bdev/ocssd: Process only the head of nvme_ns->bdevs
The range parameter was deprecated from bdev_ocssd_create(), and
hence one ocssd_bdev can be created per one ocssd_ns now.
Hence process only one ocssd_bdev per one ocssd_ns. The following
patches will replace a linked list nvme_ns->bdevs by a pointer
nvme_ns->bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I824d26f4d2f73326238a6426634e28cfd655a04d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6224
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-02-24 13:01:44 +00:00
Ziye Yang
90c56d965d lib/accel: Two crc32c APIs are added to provide the chained crc32 operation support
This patch provides two new accelerated crc32c function interface.
And the next patch will be used to add the real support of chained crc32c feature.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3f8dd55c3da636e29e5fb02fc229b51f05653cd6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6456
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>
2021-02-23 08:52:48 +00:00
Shuhei Matsumoto
5ddf6f7671 lib/iscsi: Copy failure status directly among secondary tasks and primary task for read
When read is split, only secondary tasks are submitted. Hence we can
copy the failure status directly among secondary tasks and primary
task now.

Additionally, improve the comment in the source code to make us easier
to understand.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I857711dfaf90515231048f8c31c9273eac854d28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6343
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-23 08:52:20 +00:00
Shuhei Matsumoto
6358538aa7 lib/iscsi: Pass the range (offset and length) to iscsi_conn_read_data_segment()
This will make the current code simpler and make the following changes easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5a06f7e876fee03ed05d880525b594f92cadcdca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6410
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-23 08:52:20 +00:00
Shuhei Matsumoto
d752a1755d lib/iscsi: Remove pdu->data_buf and use pdu->data instead for all cases
data_buf was duplicated with data and was not necessary. Hence
remove it and use data instead in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I207047ce73d938f83e39f1454d44a9e4bba6b2f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6407
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-23 08:52:20 +00:00
Shuhei Matsumoto
0b576bb738 lib/iscsi: Factor out reading PDU payload operation from iscsi_read_pdu()
This patch follows the last cleanup.

Factor out reading PDU payload operation from iscsi_read_pdu() into a
helper function iscsi_pdu_payload_read(). This reduces the nesting
level, improves the readability, and make the following patches easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie5f51eedefe00f3b43a7b45dcf84be79f8df4e27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6414
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-23 08:52:20 +00:00
Ziye Yang
36b9a670c8 lib/iscsi: Refactor the code in iscsi_read_pdu.
For the logic in ISCSI_PDU_RECV_STATE_AWAIT_PDU_PAYLOAD case,
this change will make it easier to read.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iccc582dd5c749c60b3d22b2b9b73fb8407e59b0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6360
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-23 08:52:20 +00:00
Alexey Marchuk
9451030761 rdma: Add functions to queue and flush recv WRs
Change-Id: I77e286efd48330fcb6c1c85d1515656e49587983
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6290
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:05:27 +00:00
Jim Harris
ab0a3f8f33 nvmf: do not pause a namespace when resizing
SPDK block devices can only be resized up when
it is open. So there is no need to pause the
associated namespace itself when resized - just
pausing the subsystem is enough.

Also modify the ns_hotplug_test to do null bdev
resizing - this will help test this resize code path.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3cb7b9de0892c296f2abf2280bed434d18ebe6b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6467
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-22 10:05:11 +00:00
Nick Connolly
d90a55117b lib/env_dpdk: improve portability
Provide a default stub definition for spdk_pci_device_claim/unclaim
for non-linux platforms, rather than just for FreeBSD.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ica45d967878582d9a58e37b088eba4bf0d94104e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6464
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-22 10:05:02 +00:00
Jaylyn Ren
c2a4702d7b perf: Add option to display perf cores usage
Run perf tool with parameter "-m" to display real-time overall cpu usage on used cores.

Signed-off-by: Jaylyn Ren <jaylyn.ren@arm.com>
Change-Id: I1f60315ac1e1ed1dfd238eb0a42a4b93c773e21e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6444
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-22 10:04:53 +00:00
Michal Berger
83adcc14c9 scripts/pkgdep: Remove kernel-modules-extra as FUSE dependency
Rationale behind e663dc82ad which put this package as a dependency
into pkgdep was that it shouldn't be exclusive to vm_setup.sh.

However, this particular package causes unnecessary kernel upgrades
whenever newer version is detected by dnf|yum. This behavior is out of
pkgdep's scope and as such similar upgrades should be performed via
vm_setup.sh only where its sole purpose is to configure system on a
wider spectrum.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I066105f95834f3f8d436b9ff52ec1f2bf97844af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6437
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-22 10:04:38 +00:00
Michal Berger
439688a97e scripts/pkgdep: Update lib cache after installing liburing
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I8097b1db08f951e8240248b585c8aeccc7893d49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6435
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-22 10:04:38 +00:00
wanghailiangx
58e587d01b examples/nvmf: modify help case to return 0
Case 'h' or 'H' should return 0, this is a normal return.

Change-Id: I33888fdd8f293b5a297a629a80cf925917b32df8
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6062
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-22 10:04:26 +00:00
Alexey Marchuk
13381936af make: Correct ppc detection
gcc -dumpmachine may provide the following output:
ppc64le-redhat-linux
To detect PowerPC system we should check for both
"powerpc%" and "ppc%" strings

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ifb5afe743797177afa4f1b541a0c8ccaf4befbda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6378
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:04:14 +00:00
paul luse
9643f7ec6e test/accel: add UT for _get_task()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I46dcf77715c58056fc81a0fa1250ac5e3b8ba610
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6380
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
8dc056bc71 test/accel: add UT for _is_batch_valid()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifd9197c6a9941b3643c902cbf2f1ca670b455bd5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6357
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>
Community-CI: Mellanox Build Bot
2021-02-22 10:03:35 +00:00
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
Wenhua Liu
e7f6ff2db6 Fix incorrect implementation of HPDA/CPDA in NVMe/TCP target code.
The current implementation treats HPDA/CPDA as the absolute offset
to the beginning of the PDU where the payload data starts. This is
incorrect. The HPDA/CPDA actually specify where the payload data
should start such that the starting location is a multiple of HPDA
(for C2H PDU) or CPDA (for H2C PDU or CapsuleCmd PDU).

The other issue fixed is that the current implementation calculates
padding only when header digest is enabled. This is also incorrect.

Signed-off-by: Wenhua Liu <liuw@vmware.com>
Change-Id: If7a3896a4c1d73f6d062bd3dbe6a912d31771180
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6256
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-16 08:40:14 +00:00
Nick Connolly
77573e830e lib/bdev: ensure mutex is initialized
For correct behaviour, pthread_mutex should not be locked after it has
been destroyed.

g_bdev_mgr.mutex is statically initialized. It is destroyed in
bdev_mgr_unregister_cb, but not re-initialized in spdk_bdev_initialize.
Repeated calls to initialize/unregister occur during unit tests.
Remove the destroy from bdev_mgr_unregister_cb, which seems
the simplest way of resolving the issue.

The sequence: spdk_put_io_channel(), spdk_bdev_close(),
spdk_bdev_unregister() occurs during unit tests.
spdk_bdev_unregister() destroys internal.mutex which is then
locked by a call to bdev_channel_destroy() resulting from the
earlier spdk_put_io_channel(). Move the destroy and the free of
internal.qos into bdev_destroy_cb so that they don't occur until
all of the channels have been released. Remove the no longer
required bdev_fini.

Repeat calls to spdk_bdev_unregister that occur after an unregister has
completed will lock internal.mutex which has been destroyed by the
previous unregister. This occurs during unit tests. Defer locking
internal.mutex until after the internal.status has been checked for
SPDK_BDEV_STATUS_REMOVING. This is the only place where
internal.status is set to removing and g_bdev_mgr.mutex alone is
sufficient to ensure atomicity here.

Tested with a pthreads library that contains debugging code to
check the mutex state and a modified version of bdev_io_types_test
to call get_io_channel on a different thread.

Suggested-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I81cc46a1b8a766700253829b19cc86c7f0eb79f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6217
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-16 08:39:17 +00:00
Krzysztof Karas
1450e5bdb2 spdk_top: adjust pop-up details windows positions
Changes the position where pop-ups are displayed.
This patch tries to accomodate different spdk_top window sizes
and display pop-ups in the center as opposed to currently hard-coded
coordinates.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I75a53be7ab8d5549d65053a30365b0da1f31b6ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6199
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:37:22 +00:00
Michal Berger
5c61089ca2 test/scheduler: Rewrite the balanced() test
Simplify the test to follow the scheduler period in order to check if
target thread is properly balanced among selected cpus.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I326ad1171ca00c3d171aebe95266c5e4998abad3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6337
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-16 08:36:23 +00:00
Pawel Piatek
23c8f667a2 autorun: allow pass configuration file path
Allow to pass configuration file as first parameter with
fallback to previous behaviour where config file is read
from home directory.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I45972b04fe5fc978bf3b2bede45aae363be3069c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:36:03 +00:00
sunshihao520
a4ee18886d pkg: add python3 requires in spdk.spec
When use rpm -i to install spdk-tools, it requires python3-configshell
and python3-pexpect. Add this requires to spec to avoid install failure.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: I7fc7e9aab35c3fd730401282b72b1604f765a73f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6336
Community-CI: Mellanox Build Bot
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>
2021-02-16 08:34:12 +00:00
Tomasz Zawadzki
232f34d754 lib/env_dpdk: add rte_net dependency
Vhost is enabled by default, so rte_net was always included.
When disabled, rte_power failed as it depends on rte_ethdev and rte_net.

rte_vhost was only possible to enable on Linux, so there
is no conflict with adding it next to rte_power under this condition.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2e183004d6457e404471740a0540dcb08aa738d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6398
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-16 08:33:46 +00:00
Krishna Kanth Reddy
48aed8a578 lib/nvme: Adding support for PMR Identification
Identify application prints the PMR details if it is supported

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: Iaba4c15e18e1402035b11a34b2defe8078855751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6209
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-11 08:40:48 +00:00
sunshihao520
9529803fe0 lib:vhost Add version check when use RTE_VHOST_USER_ASYNC_COPY in 21.01
In dpdk 19.11 version, RTE_VHOST_USER_ASYNC_COPY is not define.
After dpdk 20.08, we can use RTE_VHOST_USER_ASYNC_COPY.
Use version check to avoid this problem.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Iaf9914e8380f3d54cded1e2f16af6a7dc3504f95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6274
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-02-11 08:40:31 +00:00
Nick Connolly
240fdd7dd1 test/string.c: remove hardcoded limit values
Unit tests for spdk_strtol/spdk_strtoll use hard coded strings for
arithmetic constants (LONG_MIN/MAX etc). These are only valid
on platforms where both long and long long are 64-bit values.

Replace the hardcoded values with strings generated from limits.h.
The tests use values that are outside of the MIN/MAX range, which
cannot be represented as int64_t. These are calculated in two parts
to avoid overflow and recombined as a string.

Verified using the unit tests on two different architectures and with
test code to check that the generated string is the same as the
hardcoded value on x86 Linux. Used a small test program to calculate
+/-30 around each limit value to check carry handling and boundary
conditions.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I990ff354f568a0b35853ecc849dd2a452bb1048b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6048
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-11 08:40:09 +00:00
Niklas Cassel
4249dc1010 nvme: account for PRACT when calculating max sectors per transfer
There is a special case when using 8-byte metadata + PI + PRACT
where no metadata is transferred to/from controller.

Since _nvme_ns_cmd_rw() already calculates the proper sector size
using _nvme_get_host_buffer_sector_size(), which takes PRACT into
account, change the sectors_per_max_io calculation to also take
PRACT into account.

This will avoid certain requests that don't need splitting getting
split.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8d450d37c2458453701189f0e0eca4b8fe71173b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6247
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>
2021-02-10 08:44:54 +00:00
Liu Xiaodong
b7c33b5e61 nbd: set io timeout
After setting io timeout, host can avoid nbd io
stuck or kernel hang occasionally caused by nbd
stop or underlying bdev removal.

Change-Id: I4ba2a0af7ff7bed369cdaf86121f082136dc1a0b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6191
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-02-10 08:44:36 +00:00
paul luse
eea826a276 accel_perf: update to create worker threads on its own
As reactors no longer have a thread created with them.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie9e9411c52c215b8cffd894fef6394448ae8167d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6312
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>
2021-02-10 08:44:17 +00:00
Nick Connolly
68ff34bc66 include/nvme_spec.h: improve portability
Aspects of bit fields are 'implementation defined'.  On some platforms
alignment will occur if two adjacent fields are of different types. This
occurs in spdk_nvme_feat_async_event_configutation after the crit_warn
member which is effectively an int8_t, followed by an int16_t. There
isn't a generic way of changing the compiler's behaviour, so the best
options are:

- Change crit_warn to a uint32_t bit field and copy the value to/from
  a spdk_nvme_critical_warning_state variable to use it. This requires
  changes to code using the field.

- Adjust the structure definition to use smaller types to avoid the
  problem. This preserves existing semantics, but the field order will
  need to be reviewed if big-endian support is ever added (other places
  in nvme_spec.h will need similar attention). A second reserved field
  is required.

Use smaller types which seems the most straightforward option. Adjust
the use of the spdk_nvme_feat_async_event_configuration reserved fields
in lib/nvmf/ctrlr.c.

The new structure is binary compatible and the fields behave in the same
way, with the exception of an additional reserved field, so updating
CHANGELOG.md probably isn't necessary.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I7d8163c84b4f410fc95a5b7064506ad7b4b62c6c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6340
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>
2021-02-10 08:44:10 +00:00
Nick Connolly
424cbc3957 lib/util/math.c: improve portability
__builtin_clzl takes an unsigned long argument which may be smaller
than uint64_t on some platforms. GCC silently ignores the mismatch,
returning the wrong answer at runtime. Use __builtin_clzll instead and
add static assertions to detect the issue.

Attribute 'target_clones' requires 'ifunc' support which only applies to
ELF targets. Add check for defined(__ELF__).

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iff76640b34223649de531250ad40471d829512c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6317
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>
2021-02-10 08:44:01 +00:00
Ziye Yang
0e9ee17642 posix: Fix the NULL pointer issue of group.
A single sock connection can call posix_sock_flush,
and this sock may not belong to a polling group.
So add the check in sock_check_zcopy to avoid such issue.

Fixes #1788

Change-Id: Id0a2f80ad0f3cdb7fc736a3be3211e49513751b1
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6334
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:40:25 +00:00
Mao Jiang
8654a1b0cf test/nvme_tcp: nvme tcp UT cases
Cases for getting tcp requests and request initialization.

Change-Id: I64ba6dbfba6bd68b70a3b7f1090ea274e3195634
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6140
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>
Community-CI: Mellanox Build Bot
2021-02-10 08:32:30 +00:00
Jim Harris
0aac63ce62 bdevperf: do not append cpumask to thread name
spdk_thread_create() does not require unique thread
names, and we already print out the CPU mask for each
job. So there is no need to append the cpumask to the
thread name.

Removing it has the added advantage of not modifying
the job name specified by the user if they are using
a job config file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6d75ea2bdc50061d7338ad41749e458efa62b48e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6331
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:30:40 +00:00
Jim Harris
783293dee4 bdevperf: make usage() clear that -j takes a parameter
-j option requires a filename to specify the job config
file to use.  Update usage() to reflect that.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I38092f43e34c145d476783816f5300a1b0cfd673
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6329
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:30:40 +00:00
Jim Harris
b0c978893c bdevperf: clean up output
We can make the output a bit more precise by putting
the Core Mask on the same line as the Thread Name.

Let's also use "Job Name" instead of "Thread Name"
since that more closely matches the user's intent.
We use a thread internally for each job, but user
specifies workloads in terms of jobs, not threads.

Finally let's get the Total values aligned
with the per-job values again - this seems to have
broken as part of commit d80b4f4.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I04fcd294b8f88374b11e09350aabf84beb2ae60e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6328
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:30:40 +00:00
Jim Harris
933868afe5 spdk_top: fix -h option handling
-H is not specified to getopt, so there's no reason
to have a case statement for it.

We should also return 0 when -h is specified. spdk_top
-h should not return error status to the shell since
this is valid usage.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifa24c93661648c61de6925bea4b4071cd53013d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:30:40 +00:00
Jim Harris
1ed57e1fb6 spdk_top: fix up usage() text
spdk_top is a JSON-RPC client, so -r specifies the
RPC connect address, not listen address. Also add
missing close parenthesis while we're here.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6a910df647a3f5eee4df088a2dcf79bc6d7cc087
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6326
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-10 08:30:40 +00:00
Changpeng Liu
35800b39cf nvmf/vfio-user: use transport cdata_init callback for custom IDENTIFY
Change-Id: I89a0aeb4d42932dc720598da7ff06c59b6cf8ea3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6313
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-10 08:27:56 +00:00
Changpeng Liu
5118878c37 nvmf/vfio-user: use stack variable for acq_map
insert_queue() will copy it to internal data structure, so that
before successful map we don't need to consider the error path.

Change-Id: Id7ea2ef73da7914ea430ea568e7981657016d3f7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6310
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-10 08:27:56 +00:00
Changpeng Liu
d786273dc1 nvmf/vfio-user: connect IO queue pair after creating SQ
The CQ is created first, so it's more reasonable to connect
the IO queue pair after creating the SQ.

Change-Id: I196c19a54a015310a3777d9bfca7db8735a4d5b2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6309
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>
2021-02-10 08:27:56 +00:00
Changpeng Liu
8586a1b3cc nvmf/vfio-user: unpack add_qp() function
add_qp() function is only called when creating NVMe SQ/CQ, so unpack
it into the caller to make the code more clear.

Change-Id: Id5cc1152b1684df980909b2f7d73ed2788c0efb2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6308
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-10 08:27:56 +00:00
Changpeng Liu
a7ab74b114 nvmf/vfio-user: rename map_dma/unmap_dma
The clients(QEMU and NVMe vfio-user driver) use shared memory with
NVMf vfio-user target for zero-copied IO processing, when memory
region hotplug happens from clients, the backend target can get
notification via callbacks.  Here we rename them to reflect the
action.  For now NVMe vfio-user example applications use static
memory model and single memory segment.

Change-Id: Icecbe13883668dd8267019b5fe57d0fef1c68b81
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6307
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-10 08:27:56 +00:00
Changpeng Liu
e738db6218 nvmf/vfio-user: remove unnecessary ABORT command
We can use the NVMf library ABORT implementation directly, so remove
it in vfio-user.

Change-Id: I0f204a869c53c6a6ce67ad900a64d5bb59ac2aab
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6306
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-10 08:27:56 +00:00
Changpeng Liu
a3b56e7f4d test/nvmf_vfio_user: add one more device to the target
Previously we only tested one device with vfio-user target,
now add one more device to the test script.

Change-Id: I6923a313b23f93e6fdc3f25baa060b9af43ba7f7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6228
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-09 11:31:16 +00:00
Changpeng Liu
0f30fea99b nvmf/vfio-user: don't check controller ready state in group poll context
The group poll context is for queue pair state, so we don't need to
check controller state here, and for the disconnect case below, the ADMIN
queue pair will be removed from group poll.

Also add spdk_unlikely in the poll context.

Change-Id: I5ef32ef3cf41ad757a7cb167e1e1fa32c52a84d6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6227
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-09 11:31:16 +00:00
Niklas Cassel
b05b3d0a12 nvme: add assert in nvme_ns_cmd_zone_append_with_md()
Zone append commands cannot be split.
_nvme_ns_cmd_rw() should never cause a NVME_PAYLOAD_TYPE_CONTIG
zone append request to be split.

This is currently true, but add an assert to make sure that
any refactoring to _nvme_ns_cmd_rw() does not break this promise.
Also add error handling, since release builds are built with
asserts disabled.

Follow-up patches will refactor _nvme_ns_cmd_rw().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I5fd2440c4c9d6bd8d56f30354b208a9047b64729
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6246
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:30:51 +00:00
Niklas Cassel
c56fb6d3ee nvme: fix typo in zone append header documentation
While zone append is very similar to write, we should refer
to the proper I/O command.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I85dc2634eefb502dd38351ca02d9b09a15c5620f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6245
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:30:51 +00:00
Shuhei Matsumoto
1c6277b21b ut/json_mock: Add spdk_json_write_string_fmt()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42b0afec9a13772a2c09ca88b2e992de31057280
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6130
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:29:53 +00:00
Shuhei Matsumoto
9b00466392 ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa9aa75086264037ae72926b89c4f63c8123f2eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6129
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-02-09 11:29:53 +00:00
Ziye Yang
e150f6b8b7 accel_perf: Add _free_task_buffers_in_pool function.
This function is used to eliminate the duplicated code.

Also rename _free_task to _free_task_buffers to make
it easy to understand the code.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I2ef9dbbb81c12c229952f5590f616a17dc2fe087
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6128
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:28:25 +00:00
Ziye Yang
b34883e07b accel_perf: Fix the memory leak issue of task free
When the task is allocated from _get_task function,
the task is removed from the tasks_pool in non batched mode.

So in _accel_done function, when the is_draining flag is true
and it is not a batched mode, we should add task back to the pool.
If not, the the memory related resource allocated by the task will
not be freed.

PS: In _check_draining function, the related resource of task
in the tasks_pool will be freed. However, if the task is not
added back, the resource free will not work as expected.

PS: The issue is reported by ASAN.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I981117037fba8e111987c771cae65bc06a734a6f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6097
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:28:25 +00:00
ChengqiangMeng
82240049d6 unittest/nvmf_rdma: increase code coverage for nvme_rdma_alloc_rsps
nvme_rdma_alloc_rsps code comprehensive coverage.

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Ie01271454558f39f121876802af01ab9bf39d3c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:27:55 +00:00
Jim Harris
e329ec45a6 nvme: add set_nvme_pcie_set_hotplug_filter
This function allows applications to specify whether
they wish to allow probing a newly attached NVMe
PCIe SSD.

The env layer will only even probe devices that have
been allowed.  By default, this is all devices, but
if the user has specified some list of
allowed PCI addresses (via spdk_env_opts pci_allowed)
then newly attached PCIe devices are implicitly not
allowed.  This API allows applications to add
device addresses to the allowed list after the
application has started.

This API will be useful for use cases where multiple
SPDK processes are running on one server, and assignment
of PCIe SSDs to those processes are based on some function
of the SSD's PCIe address.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6184
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-09 11:27:19 +00:00
Jim Harris
207e05831f env: add spdk_pci_device_allow() API
The env layer has a pci_allowed list, which specifies
that only a subset of PCI devices may be attached
by the associated process.

But that doesn't cover PCI devices that are hot-inserted
after the application starts, which is common for
storage/NVMe.

So add a new spdk_pci_device_allow() API which allows
an application to add new devices to the allowed list.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6183
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>
Reviewed-by: <dongx.yi@intel.com>
2021-02-09 11:27:19 +00:00
Michal Berger
37d8b241a8 test/nvmf: Add DIF test utilizing the digest functionality
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I511d04ff75d5b6b4213e6186b0314a5db1ce722d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6028
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-09 11:26:51 +00:00
Alexey Marchuk
05aeb9db27 bdev/nvme/rpc: Add params to enable TCP hdgst and ddgst
Function bdev_nvme_create accpets new parameter - ctrlr
opts which is passed and filled by RPC handler. That
will allow us to add config parameters for other ctrlr
options with minimal changes.

Change-Id: I96ac1b21e7a3816c652765cddade75423eb843ca
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6023
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-09 11:26:51 +00:00
yidong0635
4c26a8e79f lib/sock: Check conditions together.
This avoids duplicated codes as other coding style.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I111bd70d02cf23d38e6e73a4d0249adbfe8f24d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6314
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-02-09 11:24:57 +00:00
yidong0635
0859c83790 reactor: Construct a function to do common code.
remove lw_thread in a static function.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Iade1cb6c88e8aba4ca92c22d2596b8b3dea01ff5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2021-02-09 11:24:36 +00:00
Michal Berger
92e49c0044 test/scheduler: Wait for a bit for the governor to change the freq
Issues like https://github.com/spdk/spdk/issues/1784 showed that
governor may need some more time to properly adjust cpufreq's sysfs
knobs. In case we see that frequency setting hasn't changed after
given iteration, wait for 0.5s to make sure it finally settles.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ibf25d0d1962bf2b07b13d60d6096c5cc185c1279
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6283
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-09 11:24:22 +00:00
sunshihao520
ccbdd1750f pkg:spdk.spec Add ncurses-devel to BuildRequires
ncurses.h is needed in spdk_top, add ncurses-devel to BuildRequires.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: I22754838788fe237a29ab74a675a94ab7007bd33
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6258
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-02-09 11:24:06 +00:00
Vasuki Manikarnike
d92c2f118a lib/nvme: Remove qpair from all lists before freeing it.
Fixes #1777.

When a qpair cannot be allocated because the transport connection fails,
the qpair was freed without unlinking it from the other structures.
This was leading to a segfault when attempting to create and free other
qpairs.
Also added a unit test to cover this case.

Change-Id: I74b78d1847f90117248b07203b43a11ff5cfa5d6
Signed-off-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6272
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-08 16:13:59 +00:00
wanghailiangx
4b69ab67d9 test/aer: modify help case to return 0
Case 'H' should return 0, this is a normal return.

Change-Id: I09f81e08d782007c62592475750e70461c83f318
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6194
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-08 16:13:29 +00:00
wanghailiangx
cf3ed0e19f test/app/stub: fix a null pointer passed as argument 'H'
When val gets optarg and argument is 'H', a  null pointer passed as argument 1,
which is declared to never be null. So we adjust the order, judge 'H' first.
Then './test/app/stub/stub -H' will display help info instead of 'Segmentation fault'.
This patch fixed it.
And case 'default' should return 1.

Change-Id: I6ba9311eb5ac90266fdf33ab3424ab28fa64a78f
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6083
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-08 16:13:09 +00:00
paul luse
afbab54cbb doc/accel_fw: update docs to reflect updated configuration
Previous patch changed config #0.  Also clarrified config #1 as
well.  A future patch will expose the priority setting mentioned in
config #1 as this is currently internal.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4761324e522b24f580918a8397810b52dd1a6bd3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6008
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>
2021-02-05 21:19:37 +00:00
Tomasz Zawadzki
e4070ee0e0 so_ver: increase all major versions
To allow SO_MINOR updates on LTS for the whole year it is supported,
the major version for all components needs to be increased.
This is to prevent scenario where two versions exists with matching
versions, but conflicting ABI.
Ex. Next SPDK release adds an API call increasing the minor version,
then LTS needs just a subset of those additions.

Increasing major so version after LTS, allows the quarterly releases
to update versions as needed. Yet allowing LTS to increase minor
version separately.

Disabled test for increasing SO version without ABI change, as
that is goal of this patch. This check shall be removed with SPDK 21.04
release.

This patch:
- increases SO_VER by 1 for all components
- resets SO_MINOR to 0 for all components
- removes suppressions for ABI tests

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I44d01154430a074103bd21c7084f44932e81fe72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6167
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-05 14:43:47 +00:00
Tomasz Zawadzki
d126733f41 test/check_so_deps: remove the skip for idxd
libspdk_idxd library was introduced in SPDK 20.04 without
specifying SO suffix. This required to skip a test for this library
after the release.

This is no longer required.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3981888c9187c47012e252c24fc4d6f7992d5d76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6219
Reviewed-by: Ben Walker <benjamin.walker@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>
2021-02-05 14:43:47 +00:00
Nick Connolly
7d3b2c137a unittest/bdev: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed when finished. Add mutex initialization and destroy
calls to io_valid_test.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Idbbf857f3103ba15ab851ed16ce9f4e2bc99f7dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6218
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>
2021-02-05 13:55:04 +00:00
Karol Latecki
00afb74669 test/vm_setup: fix LTS release checkout
We don't typically "describe" our releases and it seems
that last LTS (20.01.2) was described by accident,
so this script worked. Fix it for 21.01 LTS.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2e64380299cd1a4aeaf21f324890d9257efdaea3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6244
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:47:12 +00:00
Jin Yu
b924daec88 virtio_blk: add segment number and segment size flags
Our userspace driver already supports the SIZE_MAX
and SEG_MAX features so add these two flags in supported
features.

Change-Id: Ibcbe423dbc1e2e8a31a53b34650c59243d35ba04
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6232
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-05 13:46:45 +00:00
Nick Connolly
6ff30cefe9 test/nvme_pcie: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed before the memory is zeroed. Add mutex initialization
and destroy calls to test_nvme_pcie_hotplug_monitor.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifd770a85627a11e2b2c6643f798f796bab10b6cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6153
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:46:23 +00:00
Ziye Yang
48b2ac7a13 sock/posix: fix the zero copy enabling in initiator.
When zero copy is enabled in initiator, there could
be the case that a socket connection does not belong
to a polling group, i.e, the application does not use
socket polling  group. Then we should actively call
_sock_check_zcopy in posix_sock_flush function when zero
copy policy is enabled.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idceaa7557eb265daa878db40c922494c3de35ea8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5423
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:45:15 +00:00
sunshihao520
b1687cd456 lib:env_dpdk fix the enum rte_kernel_driver definition deference between dpdk 19.11 and 20.11
In dpdk 19.11, rte_kernel_driver is the old version, add version check before use the members.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Ic1db37cc0760c7d03692fd2cdcbb6ff1e41f872d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6252
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>
2021-02-05 13:45:00 +00:00
paul luse
0e73e10da8 lib/idxd: add a condition to sim workaround
Developer convenience - make this based on a specific version.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I228b8aff6e8957cad5e8c1fae5615b113e16cfb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5950
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-05 13:42:32 +00:00
paul luse
6edaae0fb8 module/accel/idxd: stop submitting queued tasks as DSA batches
This was experimental code.  Besides being simpler it makes perf
analysis easier and gives complete control of whether batching
is used to the application.  The framework will now not use
DSA batches for internal operations.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic3139c40371dad64c3bc77818f0ad3f8c31d9af6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5849
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-05 13:42:32 +00:00
paul luse
9623a0402b idxd: perf optimization, remove reg read
In the completion handler there's no need to do an MMIO read
unless the completion record indicates there's an error.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic4850d803a23413f9813da30ac6f1b611804f1b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5847
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-05 13:42:32 +00:00
paul luse
8a1a845053 idxd: simplification in re-balancing channels
For flow control reasons we have to resize the bit arrays we
use to manage flow as channels come and go.  However since
channels are assigned to devices, until the channel count
reaches the device count there's no sharing so no resize of
the array is needed. So, when we use a device for the first
time there's no need to run through the rest of the channels
and re-balance.

Same thing is done on destruction. The code to free idxd
specific resources was moved from the rebalance function to
the idxd put channel function which is a much more logical
place for it as well.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib4df163286906f413dd6429dc6833af7b68e208c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5846
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-05 13:42:32 +00:00
paul luse
15c0e78042 lib/idxd: change config #0 to something more sane
Config #1 remains what is shown as an example in the spec. Change
config #0 to just have 1 work group and 1 work queue all backed
by 4 engines.  As the majority of initial use cases will not be
implementing separate priorities and/or different back end
targets (mem, pmem, etc) having just 1 group and work queue makes
the most sense as it allows the silicon to decide which engine to
use.

Also, having multiple work queues spreads out the available
entires such that if we're not using all of the work queues then
we're not using all of the resources.  As channels are created
they are assigned the next available device.  As a channel is
assigned a device that is already in use it will round robin
work queues.  If then, for example, we have 16 devices then only
the first work queue will ever be used for the first 16 threads
which seems and if there are even just 2 work queues per device
it would take 32 threads to use all of the resources at the
device.

By haing just one work queue per device we always have the max
number of work queue entries available regardless of how many threads
are being used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie15ff6bdea12525fe3bfc769613084ddd2de50bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5845
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-05 13:42:32 +00:00
paul luse
f17e67059e examples/accel_perf: rework how batching is done
Previous version just used batching for initial queue depth loading
as an example of how to batch. This version adds a new param -b that
allows the caller to either disable or set a specific batch value
for use during the entire run.  For example Q depth 128 with a batch of
64 will always send IO in batches of 64 so in effect once the Q depth
has been met the tool will wait until the Q depth has dropped enough
to send another 64.  This will allow for a more accurate measurement
of batching performance vs sending IO one at a time.

Also added clarrifying note on usage the Q depth is per core, not
spread over all cores.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ieb1df5f668ae9c7b37b0d789fceab1138044a5e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5489
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-05 13:42:32 +00:00
Michal Berger
e7ab45baf7 check_format: Include all potential bash scripts from the repo
Checking only the .sh suffix was omitting ./configure and potentially
other bash scripts which don't necessarily have to include said suffix
in their name.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6196559e8875de46f80d9c8426577a1a79b5996d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6026
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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-02-04 16:11:20 +00:00
Michal Berger
bb0f78a278 configure: Make code compliant with shellcheck
Make sure to at least cover directives check_format.sh is looking
for.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I51750c9c8ee627de4dbab8e0e4933eb39e84c527
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-02-04 16:11:20 +00:00
Michal Berger
5ccabc8f27 configure: Fix Bash style syntax to be compliant with shfmt
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7858a32bb3186df89844407cfc55c8c76b1dddd4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-02-04 16:11:20 +00:00
Michal Berger
238251a10b sync_dev_uevents: Break from the loop if kernel seqnum matches mdev's
Change-Id: I68b1edf48eb7b243647b3e980d989c580015f812
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4710
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-04 16:10:49 +00:00
wanghailiangx
0b6f2e236d example/nvme/plugin: set bs 4160 for Extended Data LBA
The original value of bs is 4096, we can rewrite it in another script.
When spdk_nvme_ns_supports_extended_lba(ns) is 1, we need to
test with an integer multiple value of extended_sector_size, such as 4160.

Change-Id: I8257bee4f741f62597bb2bb645ee9c59cf57bf33
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:45:01 +00:00
Nick Connolly
9e422bd76a test/blob: Use CFLAGS when checking CUnit version
If the CUnit include files are located through CFLAGS rather being
in one of the system include directories, then the version test will
fail and blob.c unit tests will be skipped. Specify CFLAGS as part of
the CC command.

If the version check fails, clean won't be run to remove any left over
artifacts. This can occur if CUnit is being built externally and gets
cleaned before SPDK. Add an extra definition (ALL_DIRS) to control
compilation, so that clean will always be run.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I6099fceb14cfc6473a6b8feed746d2b44b8d291a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6054
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-04 08:44:30 +00:00
Nick Connolly
2a0c2a2dcc configure: Adjust platform tests for portability
Explicitly test sys_host against "Linux" which is clearly the intent
and matches the behaviour described in the comments.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ic79d32b5d58bf556847849817e6bd72f70363335
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6055
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:44:13 +00:00
Richael Zhuang
568915b6e4 sock: update sock_map_release comment
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Icfeb9254f386fb5da6a5bde88b164bd0933f8889
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6070
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:43:31 +00:00
Karol Latecki
738cdf143f scripts/pkgdep.sh: install pyelftools for DPDK
Recent builds with mainline DPDK failed due to missing
python dependency "elftools". This patch adds it to
our system provisioning scripts.

Fixes #1770

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9e3879d9bddd64bb0f7be81120e5fadebefa9eb8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6103
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:43:05 +00:00
Rafal Stefanowski
34584d2598 doc/bdev: Update OCF needed memory formula
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I2f4ee4cd942a69a35004dc83f8c428d7c1604906
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6105
Community-CI: Broadcom CI
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-02-04 08:42:45 +00:00
Ziye Yang
d4c412720f test/nvmf: Add the digest test in multipath.sh
Since this script is only running tcp transport,
so we can enable the header and data digest configuration
when running nvme connect option.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9954af0fc9798cc565c2a439ecba1707d3629e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6119
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: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:42:33 +00:00
paul luse
d959e41c80 LICENSE: add info about submodules
Make it clear that each submodule carries its own license.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2e467df995429f3a87140288b8a8488eccb48139
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6123
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:42:09 +00:00
Nick Connolly
7f293c58a5 test/iscsi: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use.
Add static initialization to a couple of structures containing a mutex.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I7049824bb292135dbebab201083a1858597f94d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6124
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-04 08:41:56 +00:00
Mao Jiang
6b3ec9683e nvme/rdma: Fix rdma ctrlr creating qpair memory leak
Change-Id: Ie94cacac0b8dcf90b0243e8d568bb728dc7d3045
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:41:33 +00:00
Tomasz Zawadzki
a8104d66d9 test/check_so_deps: move checking Makefile and .so to run_test
Moved the test to a separate function so it runs under run_test.
This will make sure the logs print out "START TEST" and additionally
that time taken will be tracked separately.

It might have been misleading to include results of this test
right after confirm_abi_deps. This could lead to belive that it
was output of confirm_abi_deps. See snippet:

************************************
START TEST confirm_abi_deps
************************************
* Running confirm_abi_deps against spdk_abi_latest
Processed 60 objects.

real	0m3.970s
user	0m3.220s
sys	0m0.600s
************************************
END TEST confirm_abi_deps
************************************
---------------------------------------------------------------------
there was a dependency mismatch in the library nvme
The makefile lists: 'log sock util rdma vfio_user'
readelf outputs   : 'log rdma sock util'
---------------------------------------------------------------------
shared object test failed


Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie0768b8a9c7390f51d35b2e879f66854a4da2226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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: <dongx.yi@intel.com>
2021-02-04 08:40:38 +00:00
Allen Zhu
306ad7ff17 nvme/perf: Add missing key (ns) of Transport ID in perf help
NVMe namespace ID (i.e., ns) is a key of Transport ID, which is
supported by perf, but it's missed in the help. In addtion, a
note is added to specify multiple '-r' parameters can be used
to test multiple disks/targets.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Change-Id: Icf55e6213a63d97396bdc7022e4c0d09c67aab9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6141
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: 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-04 08:39:51 +00:00
Richael Zhuang
c0a3cf7b88 sock: add enable_quickack and enable_placement_id when writing json config
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: If67dcb6bf7b9742d2c96481057b472e31e87e87d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6144
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-02-04 08:39:33 +00:00
Matthew King
b56f1ef5e4 Cleanup: Fix boolean arg in fio plugin.
In fio, bools are represented as ints.  They have to be read into int entries
in the options struct, or memory corruption may occur.
Also provided a default to bring it more in line with existing fio code.

Signed-off-by: Matthew King <matthew.king@xilinx.com>
Change-Id: Ib718653d6597a287bf8ff96d2fb864e46295751d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6147
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:38:55 +00:00
Nick Connolly
ed1dcc1c50 unittest/nvme: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed before the memory is zeroed. Add mutex initialization
and destroy calls to test_nvme_init_controllers.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I9a0509bee176940e1aa46bd5de4c6ad396b787e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6152
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:38:44 +00:00
Nick Connolly
b6748a41eb test/nvme_ctrlr_ocssd_cmd: initialize mutex
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. Add mutex initialization to
DECLARE_AND_CONSTRUCT_CTRLR and add DECONSTRUCT_CTRLR
to cleanup afterwards.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifefec17b44ac01769fd9d041119fa093b4e9d8b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6155
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-04 08:38:27 +00:00
Nick Connolly
05aaac9c14 test/nvme_ctrlr_cmd: initialize mutex
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. Add mutex initialization to
DECLARE_AND_CONSTRUCT_CTRLR and add DECONSTRUCT_CTRLR
to cleanup afterwards.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Id1d62e6f76548bd8e259d4d9c4d453a3218b0b1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6159
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:38:12 +00:00
Nick Connolly
b34fb47d8c test/nvme_ctrlr: initialize mutex for portability
For correct behaviour, pthread_mutex must be initialized before use
and destroyed afterwards. An already initialized mutex should not
be re-initialized.

Remove the call to mutex_init from setup_qpairs since it will be done
in nvme_ctrlr_construct.

Add calls to nvme_ctrlr_construct where nvme_ctrlr_destruct is
called without a matching construct.

Add missing calls to mutex_init and mutex_destroy as required.

Tested with a pthreads library that contains debugging code to
check the mutex state.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0ee97a70d67157668cd8921fbee03d976d4d607d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6161
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: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:37:59 +00:00
Ziye Yang
74b2916c4a nvme/rdma: Only wait for the RDMA event if spdk_rdma_qp_disconnect return 0
If rdma_qp_disconnect is not correctly sent out, we will not wait
for the event.

Change-Id: I99701e421dc93909d481ccf35e9bfd8004e60da8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6163
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: <dongx.yi@intel.com>
2021-02-04 08:37:38 +00:00
Alexey Marchuk
8015386885 sock/posix: Enable zero copy send
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ic21e7ba1b090b4d24ef8ae0c1b0a9c5b1909da3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6193
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-04 08:36:50 +00:00
Alexey Marchuk
2ae4adc342 sock/posix: Add sock to pending list on zcopy event
In NVMF TCP initiator when zero copy is disabled,
all requests are completed when we receive EPOLLIN event
for socket, add socket to pending_recv list and call socket's
callback which calls qpair_process_completions. As part of
completions processing on NVME level we receive the number
of completions and resubmit the same number of queued requests.

When zero copy is enabled, some transport requests can be
completed when we receive and process EPOLLERR event, it
happens out of qpair_process_completions context. So part
of requests can be completed, transport level contains
free requests but NVME layer don't have info about it
until it calls qpair_process_completions. And there is
a chance that on posix level when we poll sockets we
receive only EPOLLERR flag without EPOLLIN. In this
case we can complete several requests but don't call
qpair_process_completion so we don't resubmit queued
requests. It may lead to a hang in the end of test run
when there are no mo requests to be completed on transport
level (no EPOLLIN event) and we receive EPOLERR only,
so we can't resubmit queured requests.

This patch fixes this problem, it add a socket to
group's pending_recv list if we received EPOLERR
event and completed at least 1 socket request.
So socket's callback can be called even without
EPOLLIN event.

Fixes issue #1685

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I21d5c2fe6eb0787aab9531925a7f0e2fe18bafaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6162
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-02-04 08:36:50 +00:00
Rui Chang
1293377629 lib/util: Fix valgrind error reported on ARM platform
Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I244a1b0350b4426666e390781b500de65d250c09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6214
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-02-04 08:35:59 +00:00
Krzysztof Karas
de7f290830 spdk_top: delete unused variable in show poller function
Deletes poller_counter variable as it is used only when constructing
ncurses window and always equal to 0.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ib837064e1bbbe59984802d3ec96cb4c46dcf8407
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6198
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-02-04 08:35:39 +00:00
Krzysztof Karas
0d85c5bba9 spdk_top: unify opening and closing pop-up details windows
Changes threads details pop-up and pollers pop-up to open with Enter key
and close with Esc key only. This is to avoid confusion in the future
as now those pop-ups can be opened and closed with both Enter and Esc
and and others can only be closed with Esc key.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I7e8c5a172346662a21f65c7193fc1cbd830fd1e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6196
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>
2021-02-04 08:35:39 +00:00
Tomasz Zawadzki
e3d29a3012 lib/event: do not spawn a thread for each reactor
Those spdk threads were neither used nor tracked in event framework.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1becee6390e172a10e08754703e018f7c44e30df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
ce9efeda3a lib/vhost: set g_vhost_core_mask to all cores rather than threads
spdk_vhost_init() relies on having a thread on each reactor.
Every vhost controller could be created on the same core and
even passing --cpumask when creating would not affect it.

This has happened before, see patch (7cc83b62).

This patch modifies the g_vhost_core_mask to match the actual
cores in use.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I42a07c5f99690bfa4ecd2a5b9b7b04d1aa7d2800
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6188
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
b74363bcdf lib/vhost: force cpumask to be subset of application's CPU mask
Documentation for vhost target states that CPU mask must be a subset
of application CPU mask. This wasn't enforced right now and allowed
the cpumask on controller creation so long as at least single
CPU core overlapped with application's CPU mask.

This might have been misleading and covered up user configuration errors.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I03f959ec37efd0be9b98cff9c93c5f996b04af35
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6212
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Tomasz Zawadzki
daab1abc4f test/vhost: verify cpumask argument for controller creation
`--cpumask` argument for vhost controller creation was
untested. This patch specifies this argument and verifies output
under following conditions:
- no cpumask, resulting in it being equal to the app cpumask
- cpumask equal to app cpumask
- single core
- single non-main core
- two cores

It was motivated by recent changes to reactor code affecting
vhost without it being caught by CI. See commit 7cc83b62.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92c603061619092007bc27a189d3d8787461a16f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:35:08 +00:00
Jim Harris
710838103b env_dpdk: add rte_ethdev dependency
As of DPDK main commit 682a6454 ("power: add ethdev
power management"), rte_power depends on rte_ethdev.
So add rte_ethdev library, but only on Linux since
that is the only place where we use rte_power.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibc3473d6ec75c14a8c0c5517616950017cb2ea96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6210
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-02-04 08:34:30 +00:00
Karol Latecki
4dd1548be3 scripts/nvmf_perf: check "extra_params" key berofe accessing it
If config without this field was used then
script resulted in KeyError exception.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Icf0b270d28dcc6bf44b66c4b9ed583a6b3ef08b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-02-04 08:33:43 +00:00
Karol Latecki
62c2c1c110 scripts/nvmf_perf: fix pylint E1111 error - assignment on no return
Fix assigning variables from functions which return nothing.

Change-Id: Ic54dc0d42e3339cda23970ed347ac6f7bf92e795
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6203
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:33:43 +00:00
Karol Latecki
6882e04563 scripts/nvmf_perf: fix pylint C0411 wrong import order
Standard lib modules first, then pip installed modules
and local modules last.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If0159fad29bab5bef0b69aa803e3cea429cc5f25
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6202
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-02-04 08:33:43 +00:00
Ziye Yang
5206698e77 nvme/tcp: Add the implementation to get the optimal polling group
Add the real support in nvme tcp transport.

Change-Id: I2aa9b0284d6fe009925e67f602a055e787f77987
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5734
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-02-04 08:30:54 +00:00
Ziye Yang
e749b5d3ec nvme: Add the interface to get the optimal polling group
This patch is used to add spdk_nvme_poll_group_get_optimal
public API.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iee34c89e0e1ff1f81167b18e198c144ca28f71de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3311
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-02-04 08:30:54 +00:00
Tomasz Zawadzki
7cc83b6258 Revert "lib/event: do not spawn a thread for each reactor"
This reverts commit 72eed604b4.

spdk_vhost_init() relies on having a thread on each reactor.
Without the revert, every vhost controller is created on the same
core and even passing --cpumask when creating does not affect it.

Proper fix would be to change spdk_vhost_init(),
but would require additional testing. For now revert the patch
that spawned always idle threads.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0dbd6c9fe1d9d23ada260da8fc7b48086223c632
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6186
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>
Community-CI: Mellanox Build Bot
2021-02-01 08:04:51 +00:00
Tomasz Zawadzki
c15af452f6 doc: added scheduler framework documentation
Added changelog entry for dynamic scheduler, along with general
information on scheduler framework and behaviour of particular
scheduler implemenations.

Change-Id: I9fcef56323c4be136b6b531297b070562981eee5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6151
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-29 18:21:13 +00:00
andypma
7741de6b7d vhost/compat: add RTE_VHOST_USER_ASYNC_COPY flag when used IOVA_PA mode
Recently, we discovered that under the SPDK + UIO mode, it is possible that vm may be wrong when doing io.
such as:
[root@VM_6_151_centos ~]# mkfs.xfs /dev/vdc
meta-data=/dev/vdc               isize=512    agcount=4, agsize=234421142 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=937684566, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=457853, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
bad magic number
bad magic number
Metadata corruption detected at xfs_sb block 0x0/0x1000
libxfs_writebufr: write verifer failed on xfs_sb bno 0x0/0x1000

the github issue link: https://github.com/spdk/spdk/issues/1738
After investigation, we found as below:
The qemu set to VHOST_USER_SET_MEM_TABLE then call vhost_user_set_mem_table(dpdk version spdk-20.11)->mmap(without MAP_POPULATE)
the mmap will only return the virtual address not map the virtual address to the physical address actually.
after call vtophys_notify->vtophys_get_paddr_pagemap, we will get a wrong physical(the virtual address we not access)

So this patch is to set MAP_POPULATE during we use SPDK + UIO.

Signed-off-by: andypma <andypma@tencent.com>
Reviewed-by: Zhigang Lu <tonnylu@tencent.com>
Reviewed-by: Xun Ni <richardni@tencent.com>
Reviewed-by: YuZhoujian <windyu@tencent.com>
Reviewed-by: LuWeiKang <luweikang@tencent.com>
Change-Id: Ib921b6d7381f46bb5894ed787cef52e02524197a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5970
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-29 15:16:06 +00:00
Changpeng Liu
3b673b8431 nvmf/vfio_user: disable vfio_user by default
Users can use "--with-vfio-user" to enable it when testing it.
For CI configuration, we add a new test flag SPDK_TEST_VFIOUSER
to enable CI tests.

Change-Id: Id284df721171d01cc52491ebf4088bcc17eee147
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6139
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-29 15:15:23 +00:00
Tomasz Zawadzki
f58b29784a doc: list methods to convert from legacy config
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iccc272ddaeefad3d02b9d63607173bd2b76bd112
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6154
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>
2021-01-29 15:15:13 +00:00
Alexey Marchuk
4a2c27f717 nvmf/rdma: Handle CQ resize for iWARP transport
Since iWARP doesn't support CQ resize, we can't
accept new qpairs when CQ size is insufficient.
In other case if we accept new qpairs we can
et CQ overrun and receive IBV_EVENT_CQ_ERR ibv
async event. In that case we will have to close
all qpairs that use this CQ.

Part of the fix for issue #1747

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I30b9163a7c8abb8651f8813c6bbdb80000741c9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6106
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-01-29 15:14:59 +00:00
Alexey Marchuk
137866e573 nvmf/rdma: Fix search for req to abort when SRQ enabled
When SRQ is enabled, all qpairs share common pool of
rdma requests and we should check that rdma_req which
cid matches belongs to the correct qpair.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I2505ca39c5110e8e67a48abbe34b6df9ff00229f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6110
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-01-28 10:27:08 +00:00
Tomasz Zawadzki
19dddb3e32 version: SPDK 21.04 pre
This is first commit that should go into latest SPDK
after the code freeze for SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieeef261f4a83183946358916a084fef886339d83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6052
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-26 17:44:02 +00:00
Ben Walker
312a9d603d nvmf: Subsystem pauses only pause admin queues
Additionally, the user can specify a namespace to also pause during the
operation.

This allows for the management of hosts, listeners, and the addition of
namespaces all while I/O to other namespaces is occurring. Pausing a
specific namespace also allows for the removal of that namespace without
impacting I/O to other namespaces in the subsystem.

Change-Id: I364336df16df92fe2069114674cb7a68076de6fb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4997
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-26 17:38:54 +00:00
Jim Harris
7665710cd4 event: wait to shut down subsystems if scheduling in progress
We want to avoid an active for_each_reactor operation
while the reactors are being shut down.

Fixes issue #1766

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I30bc258c5b22545320080d269a1ed8cb0b4e12f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6104
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-26 17:33:57 +00:00
Changpeng Liu
8b203d1994 nvme/pcie: move the common IO path APIs to nvme_pcie_common.c
The data path for PCIe and vfio-user transports are almost
same too, so move the code from nvme_pcie.c to nvme_pcie_common.c,
so that these APIs can be reused by vfio_user.

No logic change for this patch.

Change-Id: I82f480bba3bae0ce35e2a98f29839081095f7d50
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6040
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-26 16:30:10 +00:00
sunshihao520
613f82f547 moudule:bdev_nvme fix the error cb function in bdev_nvme_writev
In bdev_nvme_writev function convert the bdev_nvme_writev_done as
cb instead of bdev_nvme_readv_done.

Signed-off-by: sunshihao520 <sunshihao@huawei.com>
Change-Id: If2e43cf6e5a67b694ef3cfa8f5c61ace3beab48e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6094
Reviewed-by: <dongx.yi@intel.com>
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>
2021-01-26 16:30:00 +00:00
Maciej Szwed
0bfc0391d1 event: Do not compile DPDK related code for non-DPDK env
dpdk_governor (and therefore scheduler_dynamic) use DPDK
env. It should not be compiled in non-DPDK env.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I6b7cf15cf7383e6c1e77bfb188b24cabcc1f0fe1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6102
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-26 16:29:52 +00:00
yidong0635
de3878ec31 reactor: Fix unused warning in non-debug mode.
Using reactor once insteads of target to fix this warning.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I30cd6be26669fe1b2c5d694c15bfda223efd3b85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6086
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>
2021-01-26 09:27:33 +00:00
Jim Harris
d390808fd3 nvme_perf: stop sending I/O to hot removed namespaces
It may be an interesting test case to send I/O to hot
removed namespaces, but for a perf tool it seems better
to stop sending them once we get an INVALID_NAMESPACE
status code.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie458fa63b12114cf05d5a3f1702e37f91d8a00f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6091
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-26 09:27:24 +00:00
Jim Harris
d1c17064e7 nvme_perf: rate limit I/O error messages
The nvme perf tool can be useful to generate I/O for
stress conditions.  But if we use it for situations
where we expect a high rate of failures, the excessive
spew can significantly clutter the log.

So add a new -Q option (meaning "quiet") which will
rate limit these error messages.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia8ab2e1ea1cfab9f43d87bcabe8f3f7589b77cda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6077
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>
2021-01-26 09:27:24 +00:00
Jim Harris
9765e956b9 nvme_perf: separate read/write error messages
Next patch will add rate limiting on some of the
error messages.  Separating the read error message
from the write error message will allow us to
rate limit them independently.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id49b64aa1ee545874d7230399a5127c47f217836
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6076
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-26 09:27:24 +00:00
yidong0635
bb15f82631 examples/interrupt_tgt: Fix app compiling error without vhost.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I64773ef2cab0d11d0438b217b597b371bfe6d043
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6088
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-26 08:33:44 +00:00
Alexey Marchuk
813869d823 nvmf: Fix possible race condition when adding IO qpair
There is a chance that admin qpair is being destroyed at
the moment when IO qpair is added to a controller due to e.g.
expired keep alive timer. Part of the qpair destruction process
is change of qpair's state to DEACTIVATING and removing it
from poll group. We can check admin qpair's state and poll
group pointer before sending a message to poll group's thread
and fail connect command.

Logs and backtrace from one CI build that hit this problem:
00:10:53.192  [2021-01-22 15:29:46.671869] ctrlr.c: 185:nvmf_ctrlr_keep_alive_poll: *NOTICE*: Disconnecting host from subsystem nqn.2016-06.io.spdk:cnode1 due to keep alive timeout.
00:10:53.374  [2021-01-22 15:29:46.854223] ctrlr.c: 185:nvmf_ctrlr_keep_alive_poll: *NOTICE*: Disconnecting host from subsystem nqn.2016-06.io.spdk:cnode2 due to keep alive timeout.
00:10:53.374  ctrlr.c:587:41: runtime error: member access within null pointer of type 'struct spdk_nvmf_poll_group'
00:10:53.486      #0 0x7f9307d3d3d8 in _nvmf_ctrlr_add_io_qpair /home/vagrant/spdk_repo/spdk/lib/nvmf/ctrlr.c:587
00:10:53.486      #1 0x7f93077ea3cd in msg_queue_run_batch /home/vagrant/spdk_repo/spdk/lib/thread/thread.c:553
00:10:53.486      #2 0x7f93077eb66f in thread_poll /home/vagrant/spdk_repo/spdk/lib/thread/thread.c:631
00:10:53.486      #3 0x7f93077ede54 in spdk_thread_poll /home/vagrant/spdk_repo/spdk/lib/thread/thread.c:740
00:10:53.486      #4 0x7f93078366c3 in _reactor_run /home/vagrant/spdk_repo/spdk/lib/event/reactor.c:677
00:10:53.486      #5 0x7f9307836ec8 in reactor_run /home/vagrant/spdk_repo/spdk/lib/event/reactor.c:721
00:10:53.486      #6 0x7f9307837dfb in spdk_reactors_start /home/vagrant/spdk_repo/spdk/lib/event/reactor.c:838
00:10:53.486      #7 0x7f930782f1c4 in spdk_app_start /home/vagrant/spdk_repo/spdk/lib/event/app.c:580
00:10:53.486      #8 0x4024fa in main /home/vagrant/spdk_repo/spdk/app/nvmf_tgt/nvmf_main.c:75
00:10:53.486      #9 0x7f930716d1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
00:10:53.486      #10 0x40228d in _start (/home/vagrant/spdk_repo/spdk/build/bin/nvmf_tgt+0x40228d)

Change-Id: I0968eabd1bcd532b8d69434ad5503204c0a2d92b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6071
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-26 08:32:39 +00:00
Michal Berger
049d587e50 test/scheduler: Add basic tests for verifying interrupt mode
Also, move all the functions wrapping the scheduler app into
common.sh.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I63c1002f867128851cff04a035c6c51c50e10383
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6053
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-25 20:37:50 +00:00
Michal Berger
dfa3659be1 test/scheduler: Give some time for active_thread to kick in
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I138b741c9561a9d36b709f9bb4f7aced1e72139f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6074
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>
2021-01-25 20:37:50 +00:00
Maciej Szwed
af1c51505d scheduler: Move busy thread if its mask do not match current lcore
When using interrupt mode we can have a situation
when we create thread (which is always busy) with
a particular core mask, but this thread will be
scheduled for different core, because core
pointed by thread mask is in interrupt mode.

This thread will never be moved by scheduler
to correct core because currently scheduler
do not move busy threads.

This change makes scheduler to move busy threads
if their mask do not match core on which they
are executed currently.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I35abdc91b197f1b9d40e491f964d31debad72fa5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6073
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-25 20:37:50 +00:00
Maciej Szwed
20362e5bc8 schedulers: Add _get_next_target_lcore function
This function will be useful in upcoming patch.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I2a79305b8cb155a94c83b4baa3f5d7014cb602c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6079
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-25 20:37:50 +00:00
Maciej Szwed
e742a41456 schedulers: Switch to interrupt mode if core is unused
Save CPU resources by switching reactors w/o any
threads to interrupt mode.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibd1c1d50d1f6c6d7ed226d585e14999c2fd04621
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5456
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-25 20:37:50 +00:00
Maciej Szwed
6859a49a98 event: Change reactor mode based on scheduler output
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9c17839a00fb5dc2d14179ac8fd302267969ef6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5962
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-25 20:37:50 +00:00
Maciej Szwed
9cde15093f schedulers: Add interrupt mode information to cores map
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I0d143a1aa05f27c4d0b4bd6212b361eafa966de9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5452
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-25 20:37:50 +00:00
Liu Xiaodong
a20745541e reactor: add spdk_reactor_set_interrupt_mode func
spdk_reactor_set_interrupt_mode will send event to set
reactor into interrupt mode or poll mode, also set every
notify_cpuset on all reactors for consistency.
It can be used by RPC method or scheduler to set
reactor to interrupt mode while workload is lightweight.

Currently, this function is limited that the specific
reactor should have no attached spdk_thread.

Change-Id: I7e8f449bff1184b9a7948f80b9572066a19da60f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5853
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-25 20:37:50 +00:00
Michal Berger
1194f6ccc8 test/scheduler: Test to verify rscheduler-governor cooperation
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9771f985564ce0705698ac7a799cbd30e0fe7e67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5740
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>
2021-01-25 16:57:22 +00:00
Liu Xiaodong
227c8b8199 reactor: avoid schedule thread to reactor in intr
Currently, spdk_thread can't get executed on reactor
which is in interrupt mode but interrupt of spdk_thread
is not enabled. So avoid schedule spdk_thread on it.

Change-Id: Ib37d1585f173ed3be8def83cd18aef65e287361c
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5852
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-25 16:32:33 +00:00
Liu Xiaodong
eff5b149ce reactor: add cpuset to indicate intr mode
Each bit of the cpuset indicates whether a reactor
is going to be in interrupt mode.
Each spdk_cpuset is allocated to each reactor. So it
can only be touched by its reactor.

Change-Id: Ic186de341588b701d7471bf09336309d28b1bf4e
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5850
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-25 16:32:33 +00:00
Jim Harris
8689f6a396 nvmf: do not start ctrlr destruct if disconnect in progress
A ctrlr disconnect (due to EN=0 or SHN) results in
async operations that we need to make sure don't
complete after the associated controller has been
destructed.  So make sure we do not start the ctrlr
destruct if a disconnect is in progress.  We can
basically just continue to send the destruct message
to itself over and over again until the disconnect
has finished.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id722ad206c0dde26ee013dfd98815af3901a9cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6057
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-25 15:43:05 +00:00
Jim Harris
3f2d21a0a6 nvmf: save association timeout value in ctrlr
Currently we fetch the value from the transport
via the admin_qpair.  But there are corner cases where
the admin_qpair may be disconnected after an EN=0 or
shutdown process has started.

We could do something like detect if the controller
is being destructed before starting the association
timer, but I think just saving the timeout value in
the ctrlr is a bit cleaner.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaf4ceb2f9d38cee3c9a258e1fdf367972030fbe9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6056
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-25 15:43:05 +00:00
Krzysztof Karas
12f4a2c62d spdk_top: redraw bottom menu after closing a window
Fix for merged patch.
Redraws bottom menu after closing a pop-up window
to avoid leaving black space where windows was drawn.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I3ab3d7ea1a2729d3556539cad5d28aa758617d67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6067
Reviewed-by: Maciej Szwed <maciej.szwed@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-25 13:58:50 +00:00
Rui Chang
9a66df8102 lib/event: Fix no error info problem when reading spdk_tgt json file
When start spdk_tgt with json config file, if the file cannot be read,
there is no error message indicating what is wrong.

Change-Id: I4e0cbad5fb7a23b99f05ebdce7d0801eebbd63f7
Signed-off-by: Rui Chang <rui.chang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-25 12:52:58 +00:00
Michael Bang
75440d0537 doc: correct explanation of NVMe SQ command submission
Correct explanation of NVMe SQ command submission

Change-Id: Ibdb3d13369c916708269c18fc04d5680044fce8e
Signed-off-by: Michael Bang <mi.bang@samsung.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6027
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
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>
2021-01-25 12:52:08 +00:00
Tomasz Zawadzki
43c2070171 CHANGELOG: add missing entries for 21.01
Added missing entries from browsing headers and RPC changes.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib416c819004af49b626b073eb07ff22b4818f382
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6051
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: Paul Luse <paul.e.luse@intel.com>
2021-01-25 08:15:51 +00:00
Ziye Yang
39387c4757 lib/nbd: Add the abort support
We need add the abort support if the nbd state is
NBD_DISK_STATE_SOFTDISC.

Change-Id: I137b71d8f68005b78b9065a16056dbab71d33acd
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6038
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-01-25 08:14:49 +00:00
Changpeng Liu
fda0424e71 nvmf/vfio_user: update libvfio-user submodule
For the purpose to fix issue #1754, APIs are changed, so
also apply the new APIs for SPDK NVMf vfio-user transport.

Change-Id: Ic41ba78a8efca83d7d63c321a27b1c63bfaf22be
Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6059
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-25 08:08:44 +00:00
Tomasz Zawadzki
72eed604b4 lib/event: do not spawn a thread for each reactor
Those spdk threads were neither used or tracked in event framework.

Needed to edit hardcoded cpumask value in spdkcli test to accept any string.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieffea1bdf467f50ec0bd3af4b17a1d259fd876b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5817
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-25 04:55:54 +00:00
Rui Chang
229a67ad6a configure: fix 'break' error in configure file
Break is not supported in if statement which cause error messages

Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I671510ac936e2ac43a6570c9c3d0a6458e28f0d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6041
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-25 04:42:04 +00:00
Tomasz Zawadzki
f1f51f2b49 CHANGELOG: fix formatting and typos for SPDK 21.01
Fixed formatting for SPDK 21.01 changelog.
For the most part proper display of function/struct references.

While here some typos were corrected too.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie6f77755108a26d82e8a9e9b4fa8a507af0d41d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6050
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:33:40 +00:00
Tomasz Zawadzki
bc76a832ed CHANGELOG: sorted categories for SPDK 21.01
Alphabetically sorted entries for SPDK 21.01.
No changes in the entries themselves.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I290ab3a0a2e5bfc9312347a7e1a3101fb67ef881
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6049
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:33:40 +00:00
Krzysztof Karas
87ecafadef scheduler: add scheduler period to framework_set_scheduler
Adds scheduler period in Parameters and Example sections of framework_set_scheduler.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I05dbe20fb73aefe4dc8fa60f659f63d5a4d88db6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6043
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:33:13 +00:00
Krzysztof Karas
abf52d7d7f spdk_top: add rpc for scheduler and governor
Added rpc to get name and period of currently set spdk scheduler
and name of currently set spdk governor.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I5562a81a7f9e4879bd48a765c9467f70b43f73ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5917
Community-CI: Broadcom CI
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:33:13 +00:00
Ben Walker
8f7d9ec2f4 env/dpdk: Use the DPDK device count for IOMMU mapping
The VFIO container must have at least one device present to
be able to perform DMA mapping operations. Instead of using
the count of SPDK devices, use the count of DPDK devices. This
allows for the user of SPDK's memory management APIs even if
only a DPDK device is attached.

Change-Id: Ie7e21f09bdf1cdf1a85424c35212f64f24ae4e26
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3874
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-22 18:32:53 +00:00
Karol Latecki
22e240eb87 scripts/nvmf_perf: do not use "shell" for python subprocess
Using shell=True was unnecessary, as it spawned additional
shell process for any subprocess with this option set.
We don't need that in this script and it's generally
discouraged.
Also removing check=True from some calls as don't have
these subprocess calls in try/excepy anyways.

Change-Id: Ibb9b5d71119c9dd877209ea77b8351f9b610cade
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6046
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:32:19 +00:00
Karol Latecki
abe273b8d1 scripts/nvmf_perf: unify PCM options into single setting
Instead enabling each measurement (cpu/power/memory) just
use a single flag and enable them all at once.

Change-Id: I8a639b697285aa741f28b5ddec11ce70c34fc760
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5980
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:32:19 +00:00
Karol Latecki
90761053ef scripts/nvmf_perf: stop pcm-memory using sigterm
Use terminate() instead of kill() to exit more gracefully.
Using kill() resulted in (sometimes) output not being saved.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ff1dec8cb0804f6e0674c5ed61bbe4ec9ea70ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6045
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:32:19 +00:00
Karol Latecki
79199d4164 scripts/nvmf_perf: create results dir early
"measure_*" threads in script use the same results dir
as the results parsing function. To avoid race try to
create results destination directory early.

Change-Id: Ic391a7c2fb3decff64f1fdf51782abb940706d38
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6044
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:32:19 +00:00
Krzysztof Karas
0aced70043 spdk_top: add menu to core details window for displaying thread details
Adds menu to core details pop-up window to allow selecting threads running on core.
Pressing ENTER on selected thread shows pop-up window with thread details.
Added function to display thread details in pop-up window to avoid code duplication.
Function is called when ENTER is pressed on a selected thread in THREADS tab and
inside cores pop-up window.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I62a6de15c4bb4b58da0a7436d74cd20e0544a2ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5548
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
bd3c084fc7 spdk_top: add a setting option to display total counters vs per refresh interval counters
Adds option to switch between total counters and interval counters by pressing 't' key.
Total counters show status since the start of application while
interval counters show status since last refresh.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I9b00c85a7c6609977723f632dda9111cf9a1bfc2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5507
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
1417aa38e4 spdk_top: add idle/busy indicator for each poller
Added idle/busy indicators for each poller.
Indicators show in POLLERS tab and poller details pop-up window.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Iffd47620933e8b8376c98a01724764cef086d194
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5479
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: Maciej Szwed <maciej.szwed@intel.com>
2021-01-22 18:31:52 +00:00
Maciej Szwed
a43db13a27 spdk_top: Extended the bottom menu.
Changed margins for each item displayed in the bottom menu
to allow another item to fit.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I4a1de8a7f7db8e219e586dee656348b442a49aee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5413
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: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
313f364aa3 spdk_top: fill cores pop-up window with data.
Populates previously implemented core details window with data.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: If1a44a1990b1bc7190254a711c13a6e45a4770ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5412
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
b05d03d8f3 spdk_top: add cores details window.
Adds empty core details pop-up window for selected core from CORES tab.
Window appears upon pressing ENTER key and closes on ENTER and ESC keys.
Pop-up will be populated with data in the future patch.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I2d1435e718d0780b8d15aa8243d09f0026a32149
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5411
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: Maciej Szwed <maciej.szwed@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
948d7e0049 spdk_top: fill pollers pop-up window with data.
Fills previously implemented poller pop-up window with data.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I61b94c9405fd96c4869b95bfa19feef7610d812e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5410
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
dcec3053ec spkd_top: add pollers details window.
Adds empty pop-up window for selected poller.
Windows will be populated with data in the future patches.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: If5485211248290584a8560a0f248efc5713315c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5409
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: Maciej Szwed <maciej.szwed@intel.com>
2021-01-22 18:31:52 +00:00
Krzysztof Karas
f79e0fc945 spdk_top: refactor refresh_pollers_tab function
Refactors refresh_pollers_tab function to avoid future code duplication,
while displaying pollers details.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I4432a8044a718fc4be0d71ca5b4c59323d90e6e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6001
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:52 +00:00
Maciej Szwed
c3ccff9c30 spdk_top: Add thread details when enter is pressed in threads tab
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I188b3d90fa95f01adf6a2f41b86b0949a6114eae

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1717
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-22 18:31:52 +00:00
Maciej Szwed
89f6b928fa spdk_top: Add option to select a row
This will be extended to display new window
in next patches.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ia1884036bb444cf9e407e43f2a4c2bdd9c2aa4fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1715
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>
2021-01-22 18:31:52 +00:00
Michal Berger
766dfaac81 test/scheduler: Add load balancing tests
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I326260703d78a016aea5b64dae1b03ffacc1c461
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5798
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>
2021-01-22 18:31:25 +00:00
Michal Berger
c313f1b2b5 test/scheduler: Add test for verifying idle state
This also introduces scheduler tests in the autotest pool.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I892a2374e21dab0e349c655dcafaa4cc2e45fdc1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5741
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>
2021-01-22 18:31:25 +00:00
Michal Berger
da9946a7c0 test/scheduler: Add wrapper for setting up the environment
Setup boils down to selecting CPUs for exclusive use by SPDK
app(s).

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie3af44d16f3f220aeca97b2d65a99297016884dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5739
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:25 +00:00
Michal Berger
c1318c5b82 test/scheduler: Add .sh common source for rscheduler tests
This main goal of this "library" is to provide the following:

  - Handling view of the cpu|numa topology as seen by the kernel
  - Mapping cpufreq subsystem to cross-reference it with how
    DPDK's librte_power governor behaves.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I0fca41eefeea3949102e7546c227e0d36811a269
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5738
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:25 +00:00
Michal Berger
73884e62ce test/scheduler: Add simple tool for utilizing msr driver
This tool simply returns contents of EAX|ECX registers for a specific
MSR. Targeted use is to compare DPDK's governor results while working
under intel_pstate driver.

Change-Id: I40b3f3601d41e45ba65c96b99ebd1b6949b5af20
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5737
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:25 +00:00
Tomasz Zawadzki
453b15d62d test/scheduler: application to test behaviour of schedulers
This is an application designed to provide custom RPC
interface for testing scheduler and governor implementations.

Based on those RPCs scenarios later can be implemented to verify
functionality. Tests added here verify just the app itself.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I74b81234b95d815864cf8264705d728e3a7fe309
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5763
Community-CI: Broadcom CI
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 18:31:25 +00:00
Maciej Szwed
bfca56ffc9 scheduler: Track threads count per core during rebalancing
This will be helpful in upcoming patches for changing
interrupt mode (when reactor have no threads).

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4902d0bd26f27db2b98dc4ca4fd4df934f59d9a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5450
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:25 +00:00
Maciej Szwed
ad15f44116 scheduler: Don't use main core for new thread if it is too busy
We don't want to make main core 100% busy, so don't
move thread to it if thread busy time is higher than
main core idle time.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib521ac0d8959ec8062322ff7b2ad587d85ccada5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5638
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:25 +00:00
Maciej Szwed
ce23de932d scheduler: Change main core frequency dynamically
Use DPDK based governor to change first core frequency
in dynamic scheduler. Core frequencies are adjusted
based on relative usages.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibeb9ca59fd67df27cfb0bfe752e66e5eef41b126
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5438
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: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:25 +00:00
Maciej Szwed
6ade44c25f event: Implement new scheduler
This scheduler will group idle threads on first available
core and balance busy threads on other cores.

Change-Id: Ia0425c767dc3da2a66a9d82a20a0012fac83163c
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3901
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:25 +00:00
Maciej Szwed
80a13be9f5 event: Save thread stats to last_stats field in spdk_lw_thread structure
This field will be used in upcoming patches
by scheduler to keep a history of threads
statistics. Base on those scheduler will
be able to calculate how busy a thread is.

Also we have to save the value of this field
while rescheduling thread.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iffbd1f946e1d159ec7277a39bc30161e71722456
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5972
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-22 18:31:25 +00:00
Tomasz Zawadzki
aa22321aca configure: remove --with-igb-uio-driver option
DPDK 20.11 moved the kernel modules to separate
dpdk-kmod repository. It has to be built separate
from DPDK.

If needed for testing vm_setup.sh script now contains option
to build this driver.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I98a5eb956eb0cc60ec402d88fcdbd66d4854f19a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6033
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:47:48 +00:00
Karol Latecki
1963b478f7 test/nvmf: add Intel E810 RDMA nic's detection
Check if E810 series cards are installed in system.
No need to check for specific model as all are RDMA
capable. See: https://ark.intel.com/content/www/us/
en/ark/products/series/184846/intel-ethernet-network
-adapter-e810-series.html

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If4c11ee5b65ca0f545100581782fa4263a92921d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5943
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Community-CI: Broadcom CI
2021-01-22 08:33:05 +00:00
Karol Latecki
45866e50c3 test/nvmf: try to initialize only available RDMA NICs
Instead of rushing and probing all drivers for all NICs,
first try to check which RDMA drivers are already loaded.
Try only to use these NICs which drivers are already
available. This makes it easier to select which NIC
vendor will be used in test, as not all NICs will be
listed under /sys/class/infiniband (even if physically
present in system).

If for some reason a preloaded driver is detected, but
no physical NIC is seen in lspci - fall back to "old way"
and try to all NICs known to us.

Also includes code change to following if block, just
for style consistency in function.

Change-Id: Idc5756b5d4927b0ff11b5a37ed3729995f5c8f8a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5948
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:33:05 +00:00
Karol Latecki
40597c9b95 test/nvmf: fix driver list for Mellanox ConnectX-4
CeonnectX-4 and X-5 share the same set of drivers.
mlx4_* drivers were mistakenly added for ConnectX-4
while actually they're used by ConnectX-3.
https://community.mellanox.com/s/article/mellanox-linux
-driver-modules-relationship--mlnx-ofed-x

Change-Id: I03de970fad6497c98a6873a25a5df66a0de8312c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5947
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:33:05 +00:00
Changpeng Liu
da5c9de277 nvme: add NO_SGL_FOR_DSM quirk for Intel P55XX SSDs
Intel P55XX SSDs can support SGL feature but can't use Dataset Management
command with SGL format, so add a quirk here for now, if the limitation was
fixed in future, we can remvoe this.  Also SPDK doesn't privoide scatter buffer
API for DSM, so using PRP with DSM is totally fine.

Change-Id: Ibe92f4deb5b8bc2077115f5b7244bc17be4f3b23
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5858
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>
2021-01-22 08:16:53 +00:00
yidong0635
2d3f8b7cb2 bdev_malloc_rpc: Remove unnecessary code.
Remove unnecessary codes of free_rpc_delete_malloc.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ieb83e2df7f4e0cd7c0eee0d2629e2116c87c64c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6017
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-22 08:16:17 +00:00
yidong0635
73487b15d8 nvme/nvme_tcp: Remove unnecessary returns.
No need these returns at the end of void functions.
So remove them.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I8889745f3ef82af513d03259a77a33c1f4f536cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-22 08:16:17 +00:00
Niklas Cassel
aa6767fb14 nvme: add support for ZNS zone append command
The Zone Append command is an optional command in the Zoned Namespace
Command Set.

Zone Append differs from a regular write, in that the command is not
given an exact LBA of where to write the data.

Instead the user has to set the zslba field to the start of a zone,
and the data will be appended to that zone.

The actual LBA where the data was stored is returned in the
spdk_nvme_cpl, where Dword0 contains 31:00 of the ALBA field,
and Dword1 contains bits 63:32 of the ALBA field.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Iabae1b3456bfbb62c07b63d79afe9a14e460fe83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6013
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:15:55 +00:00
Niklas Cassel
c078941ca1 nvme: create _nvme_get_host_buffer_sector_size helper function
Create a _nvme_get_host_buffer_sector_size helper function,
to avoid the same code being duplicated in several functions.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8c14683c683a44e03c97eefa186833831f754bcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6035
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:15:55 +00:00
Niklas Cassel
ffd18d43e3 nvme/spec: add zone append specific PIREMAP define
PIREMAP is defined as bit 25 in Command Dword12 for the zone append
command.
Bit 25 in Command Dword12 is still reserved for regular reads/writes.

PIREMAP determines the contents of the reference tag written to the
media.

If cleared to 0, then the controller writes the reference tag
per the NVMe Base specification without modification.
If set to 1, Reference Tag[0] = ILBRT + (ALBA - ZSLBA).
Media Reference Tag[n+1] = Media Reference Tag[n] + 1.

As defined in Zoned Namespaces Command Set Specification,
section 4.5.1.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I984ca00146baf6af61208e3598c833f1ec4708bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6012
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-22 08:15:55 +00:00
Niklas Cassel
628f9adb39 nvme/spec: completion queue entry Dword1 is now command specific
The ratified NVME TP4056 changes the completion queue entry Dword1
from reserved to command specific.

Update spdk_nvme_cpl to reflect this.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I6a21eb1355f6ca69770ea7eb4ccc8fe1c5a0d737
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6011
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-22 08:15:55 +00:00
Niklas Cassel
33b5627a37 nvme: only set check_sgl if sending in SGL type
It does not make sense to send in check_sgl == true,
when we are calling _nvme_ns_cmd_rw() with a payload
of type NVME_PAYLOAD_CONTIG.

_nvme_ns_cmd_rw() simply cannot "check SGL" if the payload
is not a SGL. Doing so regardless just makes the code harder
to read.

We still send in check_sgl == true, when we are calling
_nvme_ns_cmd_rw() with a payload of type NVME_PAYLOAD_SGL.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I56d49a2abf7819d20cf5974c9e0df8f04f1ccd10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6009
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-22 08:15:55 +00:00
Jim Harris
88e3ffd7b6 github: automatically close pull requests
This leverages the mistaken-pull-closer GitHub app
to automatically close any GitHub pull requests.
The submitter will receive a notice pointing them
to the SPDK contribution guidelines for Gerrit
instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie8ab095b8b62cafa813427187b878df96ec87b7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6034
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 21:20:53 +00:00
Tomasz Zawadzki
8bb0ded3e5 isa-l: update submodule to v2.30.0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7c1eda311000a56edd957bbd101521f76614d8e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6019
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>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 19:24:10 +00:00
Jim Harris
91e422572a configure: add --enable-cet to build with CET support
Intel Control-flow Enforcement Technology (CET) is a
processor feature that blocks return/jump-oriented
programming (ROP) attacks.

It is currently only supported on Tiger Lake client
processors, but will be available on other processors
in the future.

CET requires toolchain support.  gcc8 does support it.
For now, this will opt-in only at least until the
technology is available on server processors.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5921
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 19:24:10 +00:00
Michal Berger
5636dabc3d test/nvmf: Add tests covering usage of DIF
Change-Id: I95eedb1bc21e296113d7f5853ab286d966adf1b8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5568
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 16:43:54 +00:00
wanghailiangx
0fd4c1f97c example/nvme/plugin: Fix a notice error of bs
We konw bs should be extended_sector_size(ns) * num_blocks.
In other words, bs should be an integral multiple of extended_sector_size.
num_blocks cannot be got here, so we used integral multiple.

Change-Id: Ie521db194cdad6f2d2247fd2704cab92c36ddb82
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5881
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: Jim Harris <james.r.harris@intel.com>
2021-01-21 16:11:16 +00:00
Ziye Yang
c013ef1598 accel_engine test: Add the test case for accel_engine.
This patch is used to create a script to test the
accel_engine. It can be used to test both software/hardware
approach in acccel_engine.

The first usage case is to add the crc32c test. More cases
can be added later.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I9f7564e39887265f8bbfce3a15ba446fbd7a14bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5974
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-21 15:49:40 +00:00
Karol Latecki
3164371422 test/common: don't use absolute path for igb_uio
Due to recent change to vm_setup.sh we now expect
this module to be already provision in system and
available under /lib/modules.

Change-Id: Ica40e7ad95710f44bf538919e7a65878f416b7e4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 15:21:20 +00:00
Karol Latecki
1b2eb02410 test/vm_setup.sh : install igb_uio
igb_uio was removed from dpdk 20.11 and moved to
a separate repository:
http://doc.dpdk.org/guides/rel_notes/release_20_11.html
Because of that igb_uio module does not build as part
of dpdk meson build, and we have to build and install
it ourselves as part of test dependencies.

Change-Id: I4081bc3b0233ebaf5dbf926665edf28fa3463fbe
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6006
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 15:21:20 +00:00
Karol Latecki
61ecba1a92 test/vhost_perf: set test block device scheduler to "none"
In recent systems default is set to bfq which lowers
performance when using SPDK vhost.

Change-Id: Iefa3b8b514dac2f7b028cf06c18cee3f59c5a9ac
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5982
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Community-CI: Mellanox Build Bot
2021-01-21 14:40:28 +00:00
Karol Latecki
0773af993a test/vhost_perf: detect cgroups version
Detect which cgroups version is used to set IO
throttling in the guest system.

Change-Id: I4e7f482a8590dfe59da461cf5ef0a557b508fa98
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5981
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-21 14:40:28 +00:00
Alexey Marchuk
288805a00e nvmf: Add missing transport opts in json dump
The following common transport opts are missing:
num_shared_buffers, buf_cache_size, dif_insert_or_strip

Change-Id: I1c9c33bb1b46e2babb61c290a0187f08a5acacad
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6004
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 14:24:47 +00:00
Karol Latecki
55e5baf993 scripts/nvmf_perf: add PCM power measurements
Enable pcm-power measurements with appriate option.
This will be used for scheduler tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I57acc9905c6f1acd7bc3ecdbf886b209a2cdb653
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5979
Reviewed-by: Maciej Szwed <maciej.szwed@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>
Community-CI: Mellanox Build Bot
2021-01-21 14:24:19 +00:00
Maciej Szwed
937d4935d0 spdk_top: Fix core tab
Refactored code for displaying cores information and
at the same time fixed handling cores w/o threads.

Change-Id: I86990e5508523e77ce3d22ab2ace3621567b37d1
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5028
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>
Community-CI: Mellanox Build Bot
2021-01-21 14:22:49 +00:00
Tomasz Zawadzki
a66fde23d7 libvfio-user: set COMMON_CFLAGS for external_code tests
Static compilation for external_code tests uses SYS_LIBS
that now includes libvfio-user. As such the COMMON_CFLAGS
need to point to the build directory.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f3aa670a62445088535eacdfa1483bfacd5ce7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6020
Community-CI: Broadcom CI
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 12:51:13 +00:00
Alexey Marchuk
3e5ea7ff33 nvmf/tcp: Send several C2H for large read op with DIF
Socket request has iov vector of limited size and when
DIF insert of strip feature is enabled we send each data
block as separate iov element to remove metadata.
In the case of large read operation there might be not
enough iov elements to describe all data block. In this
case we can send several C2H PDUs.
To estimate the number of bytes that can be written
with single C2H we try to fill socket iovs. That is
not so cheap operation so this fix is implemented
for DIF case only. Also data buffers in regular
read operation should always fit into socket iov
vector.

Fixes issue #1674

Change-Id: Ie7197f96175ecc0a760d91d35b668512432ef7a7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5968
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>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-01-21 09:55:53 +00:00
Alexey Marchuk
74542bae77 tcp: Rename readv_offset to rw_offset in nvme_tcp_pdu
In the next patch this member will be used to track
both read and write offsets

Change-Id: I852125ff35257f9821ddf4a641d96afb29ebf0a0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5924
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-21 09:55:53 +00:00
Michal Berger
a5b3a7ded5 pkgdep/git: Make sure all object files are built for the QAT driver
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I789948c28d638e647f82d6e4dd64c74ed49294e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5967
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-21 09:51:58 +00:00
Michal Berger
889c8da616 pkgdep/git: Upgrade QAT driver to the latest release
Change-Id: Iaa6ec9a73ca17c1e9599d92cb150e961bce08eae
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5966
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2021-01-21 09:51:58 +00:00
Nick Connolly
53d172b0e3 test/bdev: Use PRIx64 for portability
POSIX defines PRIx64 for printing 64-bit values in a portable way.
Replace references to %lx to remove the assumption about the size
of a long.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I40374212baf64028f77f87c3a7f0373f6cdb1415
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6003
Community-CI: Broadcom CI
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>
2021-01-21 09:51:20 +00:00
Changpeng Liu
77f994a9c5 pkg: change minimum supported dpdk version to 19.11
Change-Id: I7b3705923a0a50ce78e2c34072d0135416cda0da
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-01-21 09:51:10 +00:00
Jim Harris
79f9a7f572 build: generate pkg-config files for SPDK
Users can now generate the necessary linker args for their
own applications using something like:

PKG_CONFIG_PATH=build/lib/pkgconfig pkg-config --libs spdk_nvme

Dependencies between libraries are included in the generated
.pc files, so the user only needs to pass the top-level subsystems
or individual SPDK libraries they are using in their application.

Modules will automatically be added to the output if the associated
library is specified.  For example, specifying "spdk_bdev" will include
the libraries not only for spdk_bdev, but also all of the bdev modules.

Users still need to supply the -Wl,--no-as-needed or -Wl,--whole-archive
flags. They cannot be added to the .pc files without increasing the length
of the argument string by a factor of 15x to 20x.

Modify the test/external_code/hello_world Makefile to use pkg-config to
ensure this gets tested at some level in our autotest environment.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie48a75f11969d5d775d514cf10bcb82d197eabfd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4371
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-21 09:46:32 +00:00
Changpeng
3ff9c13614 NVMe/vfio-user: add initial version vfio-user transport to NVMe driver
When NVMf target linked with vfio-user library, we can use
vfio-user client library to connect to the target.

Here is the three examples that can work with target:

identify -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g
perf -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 1 -o 4096 -w read -t 10
reconnect -r 'trtype:VFIOUSER traddr:/var/run/muser/domain/muser0/8' -g -q 32 -o 4096 -w randrw \
-M 50 -t 10 -c 0xE

You can run the following test script test/nvmf/target/nvmf_vfio_user.sh to have a quick test,
currently enabled with NVMe Identify,Perf,Reconnect tools.

Change-Id: Ieb9842b2f372184fffbf7f23e4aad26feb47c350
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3839
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>
2021-01-21 05:00:18 +00:00
Changpeng Liu
1b0ec0b7c2 nvme/pcie: add controller specific vtophys
Libvfio-user assumes the memory translation is IOVA=VA mode,
since SPDK CI is running inside a VM, the memory mode is
IOVA=PA mode, so when testing NVMe vfio-user transport inside
a VM spdk_vtophys doesn't work with libvfio-user, so here
we add a function to return memory address based on TRTYPE.

Change-Id: I11d1c87197f7bbfc243b6bf368795c9a74bd1303
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5958
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
349895a25f nvme/pcie: set doorbell base when allocating the bar
Change-Id: Id40f03f1bc4e90113dad6326dbeb9a7b5af5c1b1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5960
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>
Reviewed-by: <dongx.yi@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
6b4b2d2913 nvme: move common pcie transport code new source files
There are some common data structures and APIs in pcie transport
which can be used both for pcie and vfio-user transport, so move
the common code into a new header and source file.

No actual logic change just the code movement except remove the
static function declarations.

Change-Id: Ie9021e703a5780fdd6840f0e3cfea76a0017a811
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5923
Community-CI: Broadcom CI
Reviewed-by: sunshihao <sunshihao@huawei.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
f4fd07c68c NVMf: Add a custom(VFIOUSER) transport target support
VFIO is a framework that allows a physical device to be securely passed through
to a user space process. Typically, the user space process is a VM and the device
is passed through to it in order to achieve high performance. VFIO provides an API
and the required functionality in the kernel.

vfio-user is a framework that allows implementing PCI devices in userspace.

SPDK NVMf library provides the emulation of a NVMe device, combined with vfio-user
protocol, we can provide the emulated NVMe device to VM or client application, such
as SPDK NVMe perf.

This patch has dependency on libvfio-user library, users can start NVMe identify/perf
examples.

Usage:
1. Start nvmf_target.
2. Use RPC to create a subsystem with namespace bdev.

    mkdir -p /var/run/muser
    mkdir -p /var/run/muser/iommu_group
    mkdir -p /var/run/muser/domain/muser0/8
    mkdir -p /dev/shm/muser/muser0

    scripts/rpc.py nvmf_create_transport -t VFIOUSER
    scripts/rpc.py nvmf_create_subsystem -a nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8
    scripts/rpc.py bdev_malloc_create -b muser0 $((512)) 512
    scripts/rpc.py nvmf_subsystem_add_ns -n 1 nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8 muser0
    scripts/rpc.py nvmf_subsystem_add_listener -t VFIOUSER -a "/var/run/muser/domain/muser0/8" -s 0 nqn.2019-07.io.spdk.muser:/var/run/muser/domain/muser0/8

    ln -s /var/run/muser/domain/muser0/8 /var/run/muser/domain/muser0/8/iommu_group
    ln -s /var/run/muser/domain/muser0/8 /var/run/muser/iommu_group/8
    ln -s /var/run/muser/domain/muser0/8/bar0  /dev/shm/muser/muser0/bar0

Currently, file /var/run/muser/domain/muser0/8/ctrlr is the socket file which is used
to transfer socket messages between target and client.

[1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg723794.html

Co-authored-by: Ben Walker <benjamin.walker@intel.com>
Co-authored-by: Changpeng Liu <changpeng.liu@intel.com>
Co-authored-by: Thanos Makatos <thanos.makatos@nutanix.com>

Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: I5f2a8e77314a6a13aa6366dd4a6dc77b13434e7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3838
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-21 05:00:18 +00:00
Changpeng Liu
6308a24f56 nvme: add a new custom transport SPDK_NVME_TRANSPORT_VFIOUSER
The new custom transport can enable NVMe driver running with
NVMe over vfio-user target.

Change-Id: I5f90e8516eaca08fc3eab658b29b760a03326ff7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5996
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>
2021-01-21 05:00:18 +00:00
Changpeng Liu
b30d57cdad libvfio-user: include libvfio-user as a submodule with SPDK
Also add a CONFIG_VFIO_USER config flag, it's enabled by
default.

Change-Id: I18b44c024a264516a60f743d5c366a4c7f7c6785
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5000
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-21 05:00:18 +00:00
sunshihao520
5fba455d3e lib/nvme: add two async API for Directive Send and Directive Receive.
Add two async API for Directive Send and Directive Receive.
	spdk_nvme_ctrlr_cmd_directive_send;
	spdk_nvme_ctrlr_cmd_directive_receive;

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Icb6974f74902df1512a5ffa9835188132634291b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5803
Community-CI: Broadcom CI
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>
2021-01-20 16:27:34 +00:00
sunshihao520
e69af13dea nvme: add directive definitions to nvme_spec.h
Add data structure needed by directives to nvme_spec.h

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: xiehuiming <xiehuiming@huawei.com>
Change-Id: I0cbc53fb4f7ca448ab0566d826a7ae8800bbf504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5683
Community-CI: Broadcom CI
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>
2021-01-20 16:27:34 +00:00
Tomasz Zawadzki
8f40b23192 dpdk: update submodule to DPDK 20.11
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I92567bfccf55e4b42bc3466532942418a40a648e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5347
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-20 14:21:38 +00:00
sunshihao520
1572882a7f lib/nvme: add function spdk_nvme_bytes_to_numd to calculate number of dwords
According to kernel, use an inline function spdk_nvme_bytes_to_numd
to transfer paload_size form bytes to numer of dwords.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: I8b9ded122bbf4a3c8e46988993ea52404783c0b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5926
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-20 08:45:43 +00:00
Jim Harris
9317f72d09 fio_plugin: clarify thread=1
There was some confusion from a user on whether thread=1
means only one thread is supported.  So add some extra
documentation around this section to clarify this a bit
more, since the option is a bit confusing.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibcccd1759180e2e6c47e736d94ffbeafc405f7bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5995
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: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-01-20 08:45:21 +00:00
Alexey Marchuk
1d6ccec9ec ut/nvme: Fix compilation warning
GCC 4.8.5 compains on missing braces:
nvme_tcp_ut.c: In function 'test_nvme_tcp_req_complete_safe':
nvme_tcp_ut.c:456:9: warning: missing braces around initializer [-Wmissing-braces]
  struct nvme_request req = {0};
         ^
nvme_tcp_ut.c:456:9: warning: (near initialization for 'req.cmd') [-Wmissing-braces]
nvme_tcp_ut.c:458:9: warning: missing braces around initializer [-Wmissing-braces]
  struct nvme_tcp_qpair tqpair = {0};
         ^
nvme_tcp_ut.c:458:9: warning: (near initialization for 'tqpair.qpair') [-Wmissing-braces]

Also structure spdk_nvme_qpair is embedded into nvme_tcp_qpair,
there is no need in a separate variable.

Change-Id: I3a9d6760a0cffe90ece0a6d470dda8309a6619e7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5985
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-01-20 08:45:08 +00:00
Liu Xiaodong
5a499ac098 reactor: improve spdk_reactor_get
Size of g_reactors allocated is g_reactor_count, so
valid lcore should be less than g_reactor_count.

Change-Id: I9d5cde7856d6b400a7188631812b53a7e5701d0f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-20 08:44:56 +00:00
Liu Xiaodong
992b168ee5 reactor: replace last_core() by g_reactor_count
Record result of spdk_env_get_last_core() to
g_reactor_count, since spdk_env_get_last_core()
iterates through all core ids in a loop, it is
not so efficient.

Change-Id: I6bbbfec0bc25490bab33436c84fca3da6380cbe8
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5955
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-20 08:44:56 +00:00
Karol Latecki
7090c78598 doc: add NVMe Bdev 20.10 performance report entry
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib64148bb874f744a4ec494407eb0a013bdf9c530
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5986
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-20 08:10:45 +00:00
Liu Xiaodong
021ff6edff bdev: add function to return aio's errno
This helps user to locate whether bdev_io fails in
spdk bdev layer or inside Linux AIO.
SPDK_BDEV_IO_STATUS_AIO_ERROR indicates bdev_io fails
due to Linux AIO or its lower layer's failure.

New functions spdk_bdev_io_complete_aio_status and
spdk_bdev_io_get_aio_status can be used to report out
the errno from Linux AIO.

Change-Id: I32640e4a0459cca057278c02ea5a7522f3408a02
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5690
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>
2021-01-20 00:13:49 +00:00
Ziye Yang
bf10299893 Revert "nvmf/tcp: Remove the await_req list."
This reverts commit 0bcaf050d7.

Reason: After this patch, the last nvme command cannot be executed
on the qpair with the following two conditions together:
(1) The qpair is in waiting for available req state.
(2) There is no incoming data again (i.e.. no read in event).

Fixes issue: 1746

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reported by: John K Kariuki <john.k.kariuki@intel.com>
Change-Id: Ie16a89e19baeaa784002990ae034ae59d90a51f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5951
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-19 21:44:50 +00:00
Naresh Gottumukkala
2f48218a11 nvmf/fc: free g_nvmf_ftransport after nvmf_fc_lld_fini is complete.
Dont free g_nvmf_ftransport before LLD finishes its cleanup.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I61693fbe1afe0b4f6b52828d3149175419457487
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5963
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-19 21:05:19 +00:00
Jin Yu
d0657f3230 bdev_null: add null bdev resize rpc
Usually null bdev is used in testing.
The resize function provides flexibility

Change-Id: I603db0b85ff13a86d38ccc8dd6f260807393df93
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5797
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:03:02 +00:00
Jin Yu
e6493c81f3 bdev: improve bdev blockcnt notify
A small improvement in blockcnt change.
If size == bdev->blockcnt just return.

Change-Id: I507a3e5d5fa0f3f17383afa08c47c0bda48be52c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5922
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:03:02 +00:00
Karol Latecki
ec1494e92b test/nvme_perf: add option for alternative fio job layout
Allow for alternative fio job layout.

"group" (default) will create X fio job sections for
X assigned CPUs and distribute available NVMes between
sections. (e.g. 4 CPU test with 24 NVMes will result in
4 fio job sections with 6 NVMes each and scaled iodepth)

"split" will create a separate job section for each
available NVMe, but still pin it to desired CPU thread
using cpus_allowed option.

This allows for alternative way of testing io_uring
which fails to run some cases with fixedbufs=true and
high iodepth values (caused by system-wide default
UIO_MAXIOV=1024).

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iab835596a59f6437b067d1117208e5abd6c8d36b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5727
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-01-18 13:02:49 +00:00
Mao Jiang
7985c34ca0 test/nvme_rdma: RDMA requests allocation cases
Change-Id: I59b402ed7f204adc20a22406390224400e20ad51
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5746
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:02:40 +00:00
Alexey Marchuk
3289ab6d93 rdma: Remove check for translation length
With min supported DPDK >= 19.11 there is no need
to check that the buffer can be split over
several Memory Regions so we can remove this check.
Keep assert that translation length is not less than
request as a sanity check.

Change-Id: If61e673ecde28bbda8eb57a2768085715bed141a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5938
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-01-18 13:02:20 +00:00
Alexey Marchuk
6715cc2a07 nvmf/rdma: Remove handling of buffers split over MR
Since now min supported DPDK version is 19.11, we can
remove handling of buffer that may be split over several
Memory Regions as it was specific for DPDK < 19.05

Change-Id: I61a79c80b864e3bdde134e8bff6622025ea578a7
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5937
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-18 13:02:20 +00:00
Mao Jiang
1ddef952f7 test/nvme_tcp: improve unittest coverage of tcp
Cases for nvme tcp requests compelted safety.

Change-Id: Iff5d2418881de8aa1e29fa38149744740772be11
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5856
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-18 13:02:02 +00:00
Alexey Marchuk
59d50e1f1c perf: Add signal handlers
Perf tool doesn't have handlers for SIGINT and SIGTERM
signals, so when the tool is killed with e.g. ctrl-c
all SPDK and transport resources are destroyed
ungracefully. In the case of RDMA we may have
IO requests inflight and if the request is processed
by the driver when the corresponding MR is destroyed by
the kernel, it may cause an error on the target side.
Such errors are not harmful but it is better to
have a graceful shutdown procedure.

Fixes issue #1549

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I7818a4705d2b5cf4a5f3ca4745c62392312d22d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5869
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:00:41 +00:00
Changpeng Liu
7fdf829cd7 test/nvme_reserve: allocate IO queue pair for supported controllers
Move the IO queue pair allocation after checking the support feature
bit.

Change-Id: Ie8c5f20cddacb669b093b05dcf911f01cdb1413e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5909
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-18 13:00:33 +00:00
Karol Latecki
df2c932e09 scripts/rpc: fix framework_set_schedule period parameter
Period parameter is marked as optional in rpc.py. This works
as long the rpc call is issued with rpc.py, as argparse
sets period to "None" by default. This patch makes it
an optional argument as well directly in app.py.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2e3cae6df7edd7fc6e1120ee3d4a2655dc60813a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5942
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-01-18 08:17:28 +00:00
Jim Harris
a27756993c identify: fix set-but-not-used error
Fixes: 5ef79a17ec (add an option to dump the full zns zone report)

max_zones_per_buf was only used in an assert.  Per-patch
testing doesn't do a release build, so this wasn't found
until running nightly tests.

So rework the code a bit to print error message and exit
instead of this unexpected condition occurs.

While here, change another error message to use stderr
instead of stdout.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2c2893089cc82f76d7dd6b569952dd4a9f907ebc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-15 22:44:31 +00:00
Tomasz Zawadzki
a9a0761bcc scripts/config_converter: skip sections not present in legacy config
Sections 'Nvme', 'Nvmf', 'Bdev' and 'iSCSI' were always present in
the output of config_converter. Even when they were not present in
the legacy config.

This posed an issue with iSCSI section. Support for iscsi_set_options
is part of lib/iscsi, that is not compiled with all applications
(such as nvmf_tgt).

Fixes #1741

This patch checks if there is corresponding section in the legacy
config, and only then presents the JSON output.

Added test to verify output from empty legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ief94e92115dbd80c890dcb434b7c6d5376421c9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5879
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>
Reviewed-by: <dongx.yi@intel.com>
2021-01-15 08:32:10 +00:00
Tomasz Zawadzki
25b3a770bd scripts/config_converter: remove always empty subsystems
JSON configuration that does not contain a particular
subsystem is a valid one. If needed, the defaults are always
present in the subsystem itself.

accel, interface, net_framework, scsi, nbd do not have
legacy configuration to convert. Including those in the
output of config_converter does not serve any purpose.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6442ac1b8f65ac7271102e782068846f86c2d09f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5878
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-15 08:32:10 +00:00
Niklas Cassel
5ef79a17ec examples/nvme/identify: add an option to dump the full zns zone report
Add a new option, -z, to dump the full zone report for
NVMe Zoned Namepaces.

Rather than allocating a buffer that can exactly hold the number
of zones we request, allocate a fixed size buffer of size MDTS.

That way, the controller will copy as many zones as it can,
while not exceeding the buffer. The nr_zones field in the
received report indicates the number of zones that were
successfully copied to the buffer.

The full zns zone report can be larger than MDTS, therefore
we now need to put the spdk_nvme_zns_report_zones() call
inside a loop.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If3ff84876289a491d0482e74c58c5a11de7e19df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5896
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-01-15 08:31:54 +00:00
Niklas Cassel
d3fe9591c2 examples/nvme/identify: exit after showing help text
Exit after showing the help text.

If the user specifies -H, it is confusing that
the regular execution of the program continues,
which might mislead the user to think that the
option they specified is not taking effect.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52d8e0f6c720c7ce1d66bddb99181babb12cef1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5895
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-01-15 08:31:54 +00:00
Liu Xiaodong
76c21d4138 intr_tgt: interruptable libs shown by modules.mk
Indicate interruptable module libaries by spdk.modules.mk
through INTR_BLOCKDEV_MODULES_LIST.
Other applications can directly use INTR_BLOCKDEV_MODULES_LIST
to create themselves to be interruptable.

Change-Id: Id1894dd3753c7b404ebb9d77f3184be942f6d216
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5782
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:42 +00:00
Ziye Yang
d478edd4ee lib/nvmf: Use the async function to caculate the crc32 for header_digest.
In this patch, we will use the accel library to do the crc32 work for the
header digest when sending the pdu in the target side.

For data digest support, will consider in the further patch.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3169a158afd633f48bdbeb2cce1ed20e4141ae45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5472
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:30:34 +00:00
Ziye Yang
a8ebf6ac53 nvmf perf test: Add the data integrity test.
Just change the test for QD=32 in order not adding the addtional
test time.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic801fffd904aecfd7ccdc89d04f67273dbdf2753
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5908
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:30:34 +00:00
Jin Yu
2969c5ab30 vhost-blk: recover ring base when reconnect
This patch is for packed ring and recover the ring
base when vhost target reconnect to QEMU.

Change-Id: I73f791b4a55adf9834112afd7dd7bb26c75a135d
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4128
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: Changpeng Liu <changpeng.liu@intel.com>
2021-01-15 08:30:18 +00:00
Jin Yu
4ad4c76cba vhost-blk: resubmit inflight descs of packed ring
This patch is for packed ring live recovery.
After reconnection we should resubmit the inflight descs.

Change-Id: I133bf5f1c09029d3c693c0fef67a609d72f2bf69
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4127
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>
Community-CI: Mellanox Build Bot
2021-01-15 08:30:18 +00:00
paul luse
ec2e6e2b91 modules/crypto/compress: changes to support DPDK mbuf changes
Need to manage how we store IO context based on DPDK updates
made in 19.11.

Fixes issue #1671

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If1183808cd30987b6c999912f563949b7ade7fcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5799
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-01-15 08:30:01 +00:00
Michal Berger
c3d5069947 pkgdep/git: Fix spdk_abi_lts build for v20.01 under make 4.3
This attempts to mimic commit 2a860943b8 from DPDK repo to pass the
build under make 4.3. Currently, this affects Fedora33 which ships
with make 4.3 by default.

Change-Id: If3afa8ad9200d618f43bbea42360efbfe99d3085
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5779
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-15 08:29:32 +00:00
Tomasz Zawadzki
95d8e7a683 lib/bdev: delay bdev_register notification til after examine
"bdev_register" notification was sent right when register
happened, which was misleading for any listener.
Action on the registered bdev might not have been possible
when examine took longer time.

Order of bdev_register notifications in json_config test
was modified, because they are being sent out as pollers
for the spdk_bdev_wait_for_examine() are being processed.
This is only because pollers are inserted at the tail,
and processed from the tail as well.

Order of notifications should not matter, as long as bdevs
are ready for use.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I45b769f184b386df2daa4152ee766636ef0668ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5213
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>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
e57bb1afb8 lib/bdev: build bdev_wait_for_examine into subsystem
Since user/orchestration has no chance to call
bdev_wait_for_examine when loading json configuration,
this RPC is now always built into bdev subsystem json.

This behaviour was already there for SPDK_RPC_STARTUP,
see bdev_module_action_complete().
Yet it did not apply to SPDK_RPC_RUNTIME RPCs, as the
bdev module initialization was already complete.

Making sure all SPDK applications finish their startup
when all bdevs are ready to be used. See issue below:

Fixes #1675

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0f60f56932da020a15deeef09a5a1544f3a1bae6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5481
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
c5c7de44f3 scripts/rpc: allow methods without params in load_config/load_subsystem_config RPC
JSON-RPC allows for methods that do not contain any params.
Turns out that so far this scenario has not occured for load_config or load_sybsystem_config
RPC, which processes JSON config file saved from previous app run.

Next patch writes out bdev_wait_for_examine to bdev subsystem
configuration. As that methods does not contain any params following
error was seen:
# /home/vagrant/spdk_repo/spdk/scripts/rpc.py load_config
Traceback (most recent call last):
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 2671, in <module>
    call_rpc_func(args)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 2601, in call_rpc_func
    args.func(args)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 100, in load_config
    include_aliases=args.include_aliases)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc/__init__.py", line 143, in load_config
    client.call(elem['method'], elem['params'])
KeyError: 'params'

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4a56a9d0caa4b752fb9c1fad4ae581aad8a4c2c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5860
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
77b6f4bc3e lib/bdev: add spdk_bdev_wait_for_examine()
Add spdk_bdev_wait_for_examine() API to be called
in order to report when examine on all registered bdevs finished.
It will be built in to most bdev modules RPC.

New RPC added to allow
- building it into bdev submodule
- user/orchestration to verify examination status manually

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I27db3ae42eea3e692faeea4c2a01d04586bff438
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5480
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
cc8e4443e5 lib/bdev: refactor out checking for module actions
This patch moves out check for all module actions to finish.
It will be used further down in the series for new RPC and as
new bdev API.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I24ff40de70f5ed1c8582e60dc23146d7bf9380fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5212
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@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>
2021-01-15 08:28:57 +00:00
Maciej Szwed
89a922221d event: Fix SPDK_SCHEDULER_REGISTER macro
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1b7d00f7ae2675e316eb64323966f8696357e7c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5897
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
6e3346df5b scheduler: Add option to provide scheduler period in framework_set_scheduler RPC
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I96a8937ffe8751f093227589b076a5ae77fa5f16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5295
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
cc0d13f7e6 event: Change _spdk_scheduler_period_set() to use usec as argument instead of ticks
That is more inline with other places we
do things like this in SPDK. Also change
argument type to uint64_t.

Change-Id: Ie98f6c37bf53d583431ea9edd7d977075aeaa7a0
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5876
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
f3bf9f501a event: Set default scheduling period
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ieabe13803d0bb7013ca529da196cb1b5d2eacc98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
584fb373eb scheduler: copy snapshot of thread stats to new spdk_lw_thread field
This will be used by a scheduler while balancing threads
to get information how much busy a thread is.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib0e897a9bb5d2a71173f60cce7e1d442e67a57f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5253
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
75022aa205 event: Move scheduler set call and scheduling reactor set call
This fixes issue where scheduler is not being
initialized on first set.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I881438955f08852fb72187a2b92c7acfb12cd662
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5029
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-15 08:28:30 +00:00
Changpeng Liu
3962f9047a nvme: add quirks for new NVMe controller
Change-Id: Ice9da4b539b6c5955e449ec4d1ea18d580595caf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5857
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-14 16:20:38 +00:00
Michael Haeuptle
02d3d439be nvme: New function to perform a NVMe subsystem reset
This commit introduces spdk_nvme_ctrlr_subsystem_reset to
perform a NVMe subsystem reset according to the NVMe spec.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: If4ffae1bd92d4d16a62ec2b6a01f7373223b5705
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5488
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>
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:20:29 +00:00
yidong0635
64739a7a24 module/bdev: Remove unnecessary code.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I95a804f94ad6dac02243a029858ffae2d0ae26e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5883
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:20:05 +00:00
Ziye Yang
b48596efbc lib/nbd: Remove errno != EWOULDBLOCK in nbd_socket_rw
In this commit (a1d4a714b2),
we refactor the code but introduce the new error comparison.

And it causes the hang issue in some cases for RPC, so remove
it.

Change-Id: I4da802dff24b7efc27dd25a05739f1def37c1486
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5767
Community-CI: Mellanox Build Bot
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:19:58 +00:00
Alexey Marchuk
01f2d0bd2d nvmf/rdma: Use RDMA provider memory translation
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I78420118d3ec1bf78c0301a51ab320503b6f2fca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5123
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-14 16:19:48 +00:00
Alexey Marchuk
b6efb964cd nvme/rdma: Use RDMA provider memory translation
Change-Id: Ie0995a55d252c0167b82ef54aaf7c7b8e5fd75d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5122
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-01-14 16:19:48 +00:00
Alexey Marchuk
7fabdd12b6 rdma: Add functions to support memory translation
This is the first commit in a series which aim is to
unify MRs registration and memory translation in
NVMEoF target and NVME initiator RDMA transports.

Next patches will add usage of new functions in
RDMA transports.

Change-Id: I93153d497fc4554ced14edbe545961b78bda91e3
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5121
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-14 16:19:48 +00:00
Naresh Gottumukkala
f892089f92 nvmf/fc: Add flag to differentiate LS queue and non LS queue.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic80c5de475b712b045ec4e9c31d4bc2fdbe395fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5828
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-14 16:18:25 +00:00
Naresh Gottumukkala
9f0b1d763a nvmf/fc: Extend nvmf_fc_lld_fini to take spdk_nvmf_transport_destroy_done_cb.
As LLD cleanup is asynchronous in nature, Pass the
spdk_nvmf_transport_destroy_done_cb to LLD and it will be called
once the cleanup is completed.

Dont forcefully remove fc_ports by nvmf_fc_port_cleanup function.
LLD will drive the fc_ports cleanup gracefully as part of nvmf_fc_lld_fini.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I537b9ea817eda26a0469114821e2288d2ba9d91c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5827
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
74669b90fc nvmf/fc: Fix use after free issue.
As fc_req is freed in the previous step, using fc_req->hwqp
results in segfault. Fix this.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I9d82f62a24e8c139b1971466948fc5aa3513f4ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5826
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-14 16:18:25 +00:00
Naresh Gottumukkala
cf07c1f7be nvmf/fc: Use correct args in nvmf_fc_adm_evnt_hw_port_reset api.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I3d0b3a228479b21ea18c4ff7f9c41bc8879f630d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5825
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-14 16:18:25 +00:00
Naresh Gottumukkala
143c78a94c nvmf/fc: For ABTS search only in already established connections.
For ABTS search only in already established connections. Skip
any connections that are in process of establishing.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I824f14b38faaa6897d2e5a4c4564bbb0f8e2fd74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5824
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-14 16:18:25 +00:00
Naresh Gottumukkala
61dfdd2a48 nvmf/fc: FC Priority tagging and VMID support.
Add support for FC priority tagging and VMID.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic3b67e4a9bf33308fb08dedd0e2f39344d979f34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5822
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
cfc716feb8 nvmf/fc: Handle out of order fused commands.
For FC, Fused commands ordering is not gauranteed but nvmf layer expects strict ordering.
FC LLD layer can reorder this out of order commands based on FC header CSN.
Introduce a new FUSED_WAITING state that can be used by LLD to keep waiting the out of order
data.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I85eba0059f75ff3775f664e85ed2e4dc258d27a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5811
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-14 16:18:25 +00:00
Naresh Gottumukkala
e3c78a6453 nvmf/fc: Add support for hwport free admin api.
Currently we dont have an api to delete fc port. Add SPDK_FC_HW_PORT_FREE
api. This is useful in cases of hardware reset and other error cases.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ib1b986ee7ab2f54043bd300b52121b651c292e5b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5810
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-14 16:18:25 +00:00
Naresh Gottumukkala
dc0d896293 nvmf/fc: Cleanup pollgroup and hwqp mapping logic.
1) As part of nvmf_fc_adm_evnt_hw_port_offline event, We try to remove
hwqps from pollgroup but we dont actually wait the action to complete.
Wait for the action to complete before completing nvmf_fc_adm_evnt_hw_port_offline
as this will serialise things nicely.

2) Protect fgroup->hwqp_count inside the transport lock as there can be
races where an fgroup can be removed paralley.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ib7af6bc0641c91e40331da2b2a7e72b5f55d54ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5808
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-01-14 16:18:25 +00:00
Karol Latecki
65291a30ec dpdk: update dpdk-20.08 submodule
Update to include RHEL 8.3 fix located at
4073acbe61d232623d910fa93c672bc7ee8bf3b9

Change-Id: I958218eeb4e2abdaea6f751d8151797ea12822e5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5836
Reviewed-by: Paul Luse <paul.e.luse@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>
Community-CI: Mellanox Build Bot
2021-01-14 12:10:28 +00:00
Changpeng Liu
fb27c710f2 vhost/blk: make packed and split vring process in different function call
Code cleanup to make the code looks more clear, this helps the coming
inflight IOs support for packed ring.

Change-Id: Iebca17e01e597eab2a920dd7f38056c57ae2cd11
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5755
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-13 10:08:11 +00:00
Changpeng Liu
99c62dda60 vhost/blk: make process_blk_request() only process virtio_blk request
Previously the function also get the payload from vring descriptors,
this mixed the process of vring and virtio_blk together, now it's
only related with virtio_blk.

Also this make the resubmission process more clear.

Change-Id: I6dd17cf9e30dde99e50a7c6d345b6eee7fa5b758
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5754
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: JinYu <jin.yu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-13 10:08:11 +00:00
Shuhei Matsumoto
6fdc71ec18 lib/thread: Defer exiting thread if thread is unregistering io_device
Current SPDK thread library has a issue which occurs if there is
a race between exiting thread and unregistering io_device.

For example, there are two threads. Thread 1 registers a device
and thread 2 gets a channel of the device. Then if thread 1 starts
exiting and unregisters the device, and then thread 2 puts the channel,
thread 2 sends a message to thread 1 to complete releasing the device,
thread 1 already moved exited. Hence thread 2 failed to send the
message.

This patch fixes the race issue. The code is verified by adding
a unit test case.

In detail, add a count, unregistering_dev, to struct spdk_thread,
increment it if a callback is specified to spdk_io_device_unregister(),
and then decrement it in _finish_unregister(), and thread_exit()
checks if it is zero.

The contents of struct spdk_thread is changed but it is not public
data structure, and hence suppress it for ABI testing.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idf5faa55335c3ea89f47ccce32687a6be2e26c68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5796
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-13 10:07:51 +00:00
yidong0635
ad583422ce lib/event: Fix SEGV causing by spdk_app_stop executing twice.
Bdevperf shutdown_cb calls spdk_app_stop(0) directly.
 But since json configuration also failed, spdk_rpc_initialize()
 that calls spdk_app_stop, with -EINVAL. So subsystems are shutdown twice.

 Adding a flag stopped in spdk_app to record the spdk_app status.
 This confirms spdk app one start and one stop.

 Meanwhile this fixes some SEGVS.

 Fixes issue: #1731.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic3e36a458813a2d6bcf806de67ab691446b8d6fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5802
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-01-13 10:07:44 +00:00
Michal Berger
2212610cd1 pgkdep/freebsd: Use py37-pycodestyle
py27-pycodestyle was dropped and is no longer available for the
amd64 arch. Use py37-pycodestyle instead (it should be available for
other common architectures too).

Change-Id: Icb56860d358e2fa06f202a47302a5005b32708e3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5877
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-01-13 10:07:31 +00:00
Jim Harris
da5e62782f bdev/nvme: detect failed async probe
Track whether we attached a controller while
polling the probe ctx.  If we didn't when the probe
ctx is done, then it means the controller failed to
attach and we need to free the ctx.

Fixes issue #1723.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7f040a073e4c824c29c0ed493f8391b69f94174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5818
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-13 10:07:11 +00:00
Shuhei Matsumoto
60601e8cfb bdev/ocssd: Get nvme_ns from nvme_bdev via helper function for configuration
Use nvme_bdev_to_bdev_ns() for configuration.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I33ff9889a3677d96f714256542d1959e879542e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5872
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: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
d86477bff3 bdev/nvme: Get nvme_ns from nvme_bdev via helper function for configuration
When multipath is supported, nvme_bdev_ns will be got via bdev_subsystem.
To make such change invisible, add a helper function
nvme_bdev_to_bdev_ns() and use it in bdev_nvme_io_type_supported()
and bdev_nvme_dump_info_json().

Inline the function and locate it in common.h to use for ocssd_bdev
too.

ctrlr can be got from ns using spdk_nvme_ns_get_ctrlr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If85c86737e8194b8e34ed62df04a3968443f23bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5795
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: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
e995690fbc bdev/nvme: nvme_bdev remembers if opal is enabled or not
This is helpful to simplify bdev_nvme_dump_info_json() when supporting
multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7cf7712b8ee8ac6f15354a46dee2edbacbdeafcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5794
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
885dd11225 bdev/ocssd: Factor out finding I/O path, nvme_ns and qpair, at I/O submission
Use bdev_nvme_find_io_path() for ocssd_bdev too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e7169821fb03f397a6ff240e704cd1c425eaeeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5820
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: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
bfef6cdb21 bdev/nvme: Factor out finding I/O path, nvme_ns and qpair, at I/O submission
Fctor out getting nvme_ns and qpair pointers in _bdev_nvme_submit_request()
into a helper function bdev_nvme_find_io_path().

bdev_nvme_find_io_path() will be used for ocssd_bdev, and hence
locate it in common.h, inline it because it is used in I/O paths.

ocssd_bdev needs not spdk_nvme_ns but nvme_bdev_ns pointer in I/O paths,
and bdev_nvme_find_io_path() returns nvme_bdev_ns.

Besides, move inclusion of likely.h from bdev_nvme.c and bdev_ocssd.c
to common.h.

The next patch will apply bdev_nvme_find_io_path to ocssd_bdev.

By the following patches, bdev_nvme_find_io_path() will take ANA
state into consideration.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3817c9f56606021ebea90fdfbcf0656df9faba82
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5528
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
e946792fc4 bdev/ocssd: Get ctrlr from not nvme_ch but nvme_ns to get zone info
A nvme_ns is associated with a nvme_bdev_ctrlr, and hence we don't
have to pass nvme_ch to bdev_ocssd_get_zone_info().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia58d335721c87d70ad2544d483dbc8767464c287
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5819
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2021-01-13 10:06:48 +00:00
suhua1
6d306ae59f nvme: Fix the problem of callback failure during hot plugging
Signed-off-by: suhua1 <suhua1@kingsoft.com>
Change-Id: Iba8afdfcf4d90245ab1aa700b12cb9c375c4fe76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5855
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-12 08:07:04 +00:00
paul luse
fab40895ab examples/accel_perf: move some code around in prep for upcoming patches
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I81f4e9c783a6ce7377ac4da7f814574df1078a74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5491
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>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-01-12 08:06:53 +00:00
paul luse
ac9a1a8373 examples/accel_perf: refactor task mgmt in prep for batching changes
* change how tasks are allocated and freed (simplifcation)
* added helper for getting and freeting a single task
* minor drive-by in chaning function parms for _submit_tasks()

Note that the task pool is used to manage tasks and their data
buffers.  It is fully allocated and populated before the first IO
is sent and tasks are never retired, they are re-used so they are
not removed from the list except for error or exit cleanup.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5fea5ef8c989df6310f15b2c9bb4e8aef9bd3d3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-01-12 08:06:53 +00:00
Changpeng Liu
2600cd92f5 nvmf: revert 'commit ae207216fb ("nvmf: remove request exec backdoor")'
spdk_nvmf_request_exec_fabrics() is still required because for coming
vfio-user transport, Fabric commands are executed synchronously, and
at that monment, the ADMIN queue was not in active state.

Change-Id: I6c53950680d0ad0ab199f66e88ab34a0af46dc14
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4234
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-11 23:18:07 +00:00
Liu Xiaodong
7f6afb7bc0 bdev_aio: allow value of efd to be 0
Previously, value '0' is used to reflect efd's
invalidation. But it is possible that efd is 0
if STDIN is closed. So change related condition
checking, and assign efd to be '-1' in initializing

Change-Id: Iffea09b1f094617ab2edd3fe3b98336ec9084b8a
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5781
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-08 15:14:17 +00:00
Liu Xiaodong
7a3246bfb2 vhost: fetch and check avail_idx from memory
Since there may be race condition, num_events gotten
from kickfd is not always right to reflect the number
of requests in virtqueue. So remove this check.
Instead, avail_idx in memory reflects the real situation
whether there is unprocessed requests in queue.

Change-Id: I4e59242cf3101ece912777533411bc4dcdc81c9d
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-08 15:14:17 +00:00
Liu Xiaodong
fce2956c24 vhost: always acknowledge kickfd in intr
kickfd of virtvq should be akcnowledged firstly in
vhost_vq_avail_ring_get function, in case there is
no available requests then kickfd won't get acked.

Change-Id: I9c2f0cc19be9da54649991ddab5a5b5640ed941a
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-08 15:14:17 +00:00
Allen Zhu
f8330a575e nvme/perf: generate multiple-SGL payloads in perf tool
A new option -O is added to indicate the IO unit size.
Multiple IOVs are created according to the IO unit size.
We are able to test multiple-SGL SGL requests in NVMEoF
RDMA with this patch.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7624966b585bf0a9d2bbbb6263fa06fbcdb65820
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4377
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-08 09:36:48 +00:00
Ziye Yang
aa4b4e17f3 nbd: Continue revising the nbd subsystem fini logic
After carefully checking the code, spdk_nbd_stop should
be called in the same spdk thread which creates the io_channel.
Usually, the spdk thread which handles the rpc call should be
same with the thread which finalizes the thread. But it could
be different. So adding another async call to make sure we should
call spdk_nbd_stop on the same spdk thread.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I276eb35e78b930d31869f10137712a78aaee71ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5705
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: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-08 09:36:36 +00:00
Rui Chang
60af3c00d8 nvmf/tcp: optimize nvmf_tcp_req_set_state() to reduce cpu usage
In the stress test of NVMe TCP (ARM platform, 6 nvme disks),
we see nvmf_tcp_req_set_state() takes quite some CPU cycles
(about 2%~3% of the nvmf_tgt process, ranking 6) moving TCP
request structure between different queues. And after some
analyzes, we think these actions can be saved. With this change
we get 1%~1.5% performance gain overall.

Change-Id: Ifd2f5609e4d99cab9fea06e773b461ded6320e93
Signed-off-by: Rui Chang <rui.chang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-08 09:35:55 +00:00
Mao Jiang
6fd1459493 nvme/rdma: Fix rdma allocation return unique pointer
Allocate memory with zero number or size, maybe return a unique
pointer rather than NULL. Add a check before common allocation APIs.

Change-Id: I83e07cab5145035e705bc32364652be90f238633
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5809
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-08 09:35:43 +00:00
Michal Berger
731cd47e66 test/common: Add SPDK_APP wrapper for spdk_tgt
Change-Id: Ia085576c88c1824dca6b3b419259414cbb60c8a8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5736
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-07 13:38:26 +00:00
Jim Harris
acf116c6d5 bdev/nvme: run poller more frequently while probe in progress
When we do detect new devices, we would like to get them
attached as quickly as possible. Controller initialization
requires a non-trivial number of admin commands, and when
using async probe, it means that after we have detected
a new device, it will take many iterations of calling
spdk_nvme_probe_poll_async() before the controller is
fully attached.

So when we are actively probing a probe_ctx, create
a new poller that is solely responsible for probing
that context at a much higher frequency.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5646
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-07 13:38:18 +00:00
Ziye Yang
83a544c2a9 lib/iscsi: Support the Datain pdu sending in out of order case.
According to 12.19 in iSCSI 3720.
"If DataSequenceInOrder is set to No, Data PDU sequences may be
transferred in any order."

So if the DataSequence is negotiated with "No", then we can
send Datainpdu in out of order manner. And the initiator will
handle this case.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia15f56c606e4f97af019f91fa1118cc9cac5daa7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5719
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-01-07 13:36:39 +00:00
Ziye Yang
6238e1a2d3 lib/iscsi: directly use task->scsi.offset in iscsi_send_datain
For sending data in pdus, we can direclty use task->scsi.offset,
because task->scsi.offset is already set it before (in functions
iscsi_conn_handle_queued_datain_tasks). So we should not update
this offset in the task structure again.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I873a6f7fb174145fd90fe84a00a80a4de2d49161
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5753
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: Changpeng Liu <changpeng.liu@intel.com>
2021-01-07 13:36:39 +00:00
Tomasz Zawadzki
45744ace4c bdev/fio_plugin: add support for DDIR_SYNC
One of the io types FIO can send down is DDIR_SYNC,
which matches spdk_bdev_flush.
This patch adds handling for this io type.

Related #1712

This was first observed in ./test/vhost/shared/shared.sh

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icfa9b9833c6b0d9a18310222ef18d0865cf51b17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5551
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-07 13:36:08 +00:00
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
Jim Harris
31e91a83fa test/external_code: make spdk_env_dpdk part of DPDK_LIBS
Our examples here show how to link in the DPDK environment
into an SPDK application. That includes both spdk_env_dpdk
library and the DPDK libraries. So put spdk_env_dpdk in
the DPDK_LIB variable in the Makefile.

This will also simplify a future patch where we will
use pkg-config in this Makefile instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2c389eaa9900dbe5f77ccee536bd4edc0a54cccc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5673
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
b43166b43f test: add EXTERNAL_MAKE_HUGEMEM
test/external_make wants to always default to
the autotest_common.sh HUGEMEM default which is
8192MB on Linux. But it is useful to be able to
override this to run this test in VMs with less
memory.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I23a40c6c14e35cffefbaf4fa993ebd28d1b0054c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5672
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
8f92bde43e build: add PRIVATE_LIBS variables for module lists
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8e7f8af56b494a9c578cd0eeb718fe6a42deb542
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4469
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:32:06 +00:00
Jim Harris
ec02743a4c build: add ufc to SYS_LIBS in spdk.common.mk
This avoids duplicating it in several different
Makefiles.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I85f4886ec6744c23639d24867e2c68757dfeba32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4484
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>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2020-12-28 13:32:06 +00:00
yidong0635
10717b577c nvme/nvme_transport: Unify returns in disconnect and connect.
Here "return rc == -EINPROGRESS ? 0 : rc;"
They  are the same meaning in these two functions.
Keep the comments here. This makes more clear to readers.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I8590de3f0fe27337163ee8b02ea63e166f1bbe7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5689
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-28 13:29:35 +00:00
Shuhei Matsumoto
b2c29e91c5 bdev/nvme: Change parameter of nvme_ctrlr_depopulate_namespace_done() from ctrlr to ns
The following patches will need to update nvme_bdev_ns at
nvme_ctrlr_depopulate_namespace_done(). nvme_bdev_ctrlr can be
got from nvme_bdev_ns, and so this change will cause no issue.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7cbfe0d936a3a757a8792fdf842e1228b2df05e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4531
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:28:11 +00:00
Shuhei Matsumoto
5f523c44f0 bdev/nvme: Consolidate exit paths of connect_attach_cb()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife0bc6575697dee5a470793361502a852b132191
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5651
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: Jim Harris <james.r.harris@intel.com>
2020-12-28 13:28:11 +00:00
Shuhei Matsumoto
b2d785ee48 bdev/nvme: Move attach_bdev_to_ns() into bdev_create()
Move nvme_bdev_attach_bdev_to_ns() into nvme_bdev_create() and
change the return type of nvme_bdev_create() to int.

These refactorings are necessary to share a single nvme_bdev among
multiple nvme_bdev_ns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I81c702bfec15f14c6b4a6588d1d3dfa28a9e3e6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5650
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: Jim Harris <james.r.harris@intel.com>
2020-12-28 13:28:11 +00:00
Shuhei Matsumoto
01541c31fb bdev/nvme: Factor out creating spdk_bdev from creating nvme_bdev
This will make us a little easier to understand nvme_bdev and clarify
the difference between nvme_bdev and ocssd_bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If6e93bcc315612ec88c452cf9ae87a3db8ec7855
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5649
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:28:11 +00:00
Shuhei Matsumoto
6a76176a67 bdev/nvme: Refer controller's flag directly when setting acwu of disk
This is a preparation for the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20f7b03e15fe8cc74b22ff46040a4eba9cc63231
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5648
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-28 13:28:11 +00:00
Shuhei Matsumoto
17a4826687 bdev/nvme: Log if reconnecting I/O qpair failed by WARNLOG
We do not know if reconnecting I/O qpair succeeded or failed now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I030c3d8553efac7878da0fe358a624a502dd8656
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5699
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:28:11 +00:00
Shuhei Matsumoto
2de5aabd92 bdev/nvme: Insert new failover trid before failed trids
Add an new variable is_failed to struct nvme_bdev_ctrlr_trid, and
set it to true when starting failover or when failover failed, or
set it to false when initializing or failover succeeded.

Then add an new failover trid before all failed trids.

The test log showed that many failover failed because new trid was
added after failed trids.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I220839245c6414b5d3ef69a2fa1b97904d88d8bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5698
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:28:11 +00:00
Shuhei Matsumoto
ea2d4bb501 bdev/nvme: Hold mutex while adding failover trid
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e4aa1a9ed8e18a279b8d7aa7b90361df8fddc26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5697
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-28 13:28:11 +00:00
Shuhei Matsumoto
1f14fea3b4 bdev/nvme: Get failover path information by NOTICELOG
We do not know failover is attempted from which path to which path.
Get these information by NOTICELOG.

Failover or reset is serialized by the flag ctrlr->resetting and
ctrlr->failover_in_progress.

Hence it is enough to add such information only to start.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I97400c048b39dc1b70e6aeb71643b5ed1ca23e72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5695
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-28 13:28:11 +00:00
Shuhei Matsumoto
974c70e63f lib/nvme: nvme_ctrlr_fail() return immediately if ctrlr is already failed
As log shows

00:06:32.300  [2020-12-18 21:13:35.511014] nvme_ctrlr.c:1414:spdk_nvme_ctrlr_reset: *ERROR*: Controller reinitialization failed.
00:06:32.300  [2020-12-18 21:13:35.511104] nvme_ctrlr.c: 925:nvme_ctrlr_fail: *ERROR*: ctrlr 192.168.100.8 in failed state.
00:06:32.300  [2020-12-18 21:13:35.511132] bdev_nvme.c: 392:_bdev_nvme_reset_complete: *ERROR*: Resetting controller failed.
00:06:32.300  [2020-12-18 21:13:35.511240] nvme_ctrlr.c: 925:nvme_ctrlr_fail: *ERROR*: ctrlr 192.168.100.8 in failed state.
00:06:32.300  [2020-12-18 21:13:35.511511] bdev_nvme.c: 556:bdev_nvme_failover: *NOTICE*: Unable to perform reset, already in progress.

if spdk_nvme_ctrlr_reset() failed, nvme_ctrlr_fail() is called, and
then if spdk_nvme_ctrlr_process_admin_completions() failed,
nvme_ctrlr_fail() is called.

We don't know which one comes first but nvme_ctrlr_fail() should do
nothing if the ctrlr is already failed.

Hence we should avoid setting ctrlr->is_failed and calling
nvme_transport_ctrlr_disconnect_qpair() twice.

However we should set ctrlr->is_removed if the parameter hot_remove is true.

We do these changes in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac37c892e054fb59d78e69346ca7f0575d596235
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5694
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-28 13:28:11 +00:00
Shuhei Matsumoto
92d2ad357c bdev/nvme: Remove duplicated nvme_poll_group_remove() calls
spdk_nvme_ctrlr_free_io_qpair() calls spdk_nvme_poll_group_remove()
inside.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4068a7a099a30e4fdc98e6771331ec29e1361125
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5693
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:28:11 +00:00
Alexey Marchuk
a7f8dc0416 mk: Fix mlx5_dv linkage
Change-Id: Icf8a118d960888be7706a8ee167e6c950b6fdc1f
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5669
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-28 13:21:36 +00:00
Changpeng Liu
414b56600a examples/nvme_reconnect: add single memory segment parameter support
Add one optional parameter to enable single memory segment, which
can be tested with libvfio-user NVMeoF target.

Change-Id: I6d77b0c33f13500e24266ca190d2ee797708a65e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5593
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:20:12 +00:00
Rafal Stefanowski
3048a49c29 bdev/ocf: Fix initial force flag
Force is not supported in loading-existing-cache scenario,
so it is set to true only when initializing cache as new.
There is already patch in OCF waiting to be merged, that
addresses this problem by creating completely separate
pipelines to load and attach scenarios, thus ignoring the
force flag when cache is being loaded.

Fixes #1708

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I72269e2eacab6dffbecb725592af555e2f3702de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5595
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>
2020-12-28 13:19:26 +00:00
Karol Latecki
0cbfbbed2d doc: update blobfs.md gen_nvme routine
gen_nvme.sh should be used with "--json-with-subsystems"
option for that the whole configuration JSON file
is properly generated.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ia2f4a9fceb659e0e3c71dc398e6d532c0047a69b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5604
Community-CI: Mellanox Build Bot
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:18:03 +00:00
Michal Berger
6b52336516 test/vhost: Fix traddr lookup
get_traddr() was looking for INI configuration, however, gen_nvme.sh
now supports only json flavor. Use jq in such a case to get proper
traddr.

Change-Id: Ifb5e5e8b3cf3c7b21f67f6129173dcd09cecc6ec
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5578
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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
2020-12-28 13:17:20 +00:00
Changpeng Liu
e18788d30e vhost-blk: process VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP correctly
Flag VIRTIO_BLK_WRITE_ZEROES_FLAG_UNMAP is only used for WRITE
ZEROES command, vhost-blk target may tell VM via 'write_zeroes_may_unmap'
configuration that the backend can support this flag, however, Linux
generic block driver doesn't have such logic, it will enable this
flag by default(without REQ_NOUNMAP) with WRITE ZEROES command,
so the backend may choose to ignore this flag, because WRITE ZEROES
with this flag isn't mandatory.

Fix issue #1714.

Change-Id: Ic9388f39269720a23c00d41cba585d2a5abc3cfb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5565
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: <dongx.yi@intel.com>
2020-12-28 13:17:00 +00:00
Niklas Cassel
dffb272c1a examples/nvme_fio_plugin: error out on unsupported blocksize
According to the SPDK nvme fio plugin documentation:

"Blocksize should be set as the sum of data and metadata.
For example, if data blocksize is 512 Byte, host generated
PI metadata is 8 Byte, then blocksize in fio configure file
should be 520 Byte."

Error out if this requirement is not satisfied.
This requirement does not apply for the separate metadata case.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I730a83beb6a85695c8a4b80995340b4064375d5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5557
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:16:21 +00:00
paul luse
d80b4f4287 test/bdevperf: add some more output and use LBA as data for verify
When dumping results, include the LBA range used for the thread.
Also, to help with debug of verification erros, no longer use
rand data but instead use the current LBA.  This can provide
a clue on data mismatch as to what might be wrong.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia02c35cf61ff2763c4a241314766e0bc65d18886
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5177
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: <dongx.yi@intel.com>
2020-12-28 13:15:48 +00:00
Tomasz Zawadzki
7056bdf6ed docs/cuse: Improve details of nvme-cuse documentation
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I669b5d4d9a5ff5535b774d489fdebae4550c8941
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5454
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:09:00 +00:00
Michal Berger
3c9a0d09de doc: Add "CI Tools" section
This section is meant to describe tooling present in the SPDK repo
which is used to validate all the submitted patches. Also, add
first subpage describing use of shfmt.

Change-Id: Ib9d14c8eb28108d6dfdc27e140c008be070a16f5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2455
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-12-28 13:08:12 +00:00
Jim Harris
3c2190c214 nvme: capture ticks for timeout before checking state
In some extreme use cases, an SPDK process could get
swapped out for a long period of time just after
we checked the state but before we called spdk_get_ticks().
So now we will only timeout if the timer expired before
we checked the state *and* the state did not advance.

It's possible we could just move the timeout check
to before the ctrlr->state switch, but I was
hesitant to change the flow for this case.

Fixes issue #1720.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5596
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-28 13:02:54 +00:00
yidong0635
0dc567eb2d nbd/nbd_rpc: Fix memory leak of an error path.
here we can see that an error rpc response returns.
need to free the rpc nbd start req.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Iebc7cb416c691e8cd48a997f65bff664d9026657
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5635
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>
Community-CI: Mellanox Build Bot
2020-12-21 17:49:16 +00:00
Liu Xiaodong
43607106b1 intr: allow operations on fd=0
It is possible that STDIN_FILENO is registered as one
interrupt source. So fd_group and spdk_thread should
accept fd whose value is "0".

Change-Id: I96c7e0d6dc1dfa10b42b59aadfa6dc159c133519
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5161
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-21 17:49:12 +00:00
Jacek Kalwas
add8fc1575 nvmf: clarify on opts description
New added fields should be put at the end of the struct.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ibfa9d1967685ff4af6cef78806f403ba15e1ec01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5642
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-21 17:48:50 +00:00
Tomasz Zawadzki
2d36698d1d ut/bdev: fix lack of spdk_bdev_opts size
Patch:
(d3d077cc) bdev: Solve the ABI compatibility issue related with spdk_bdev_opts
didn't include changes from day prior that added new code in bdev_ut:
(9697d84) test: add unit test for split IO

This patch fills in the gap in the UT.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifc6c27d740b45e8135061d0ae86965afaafbe1b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5640
Community-CI: Broadcom CI
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-12-18 14:36:29 +00:00
Alexey Marchuk
b5ba9f4d94 nvmf/tcp: Remove tcp qpair::send_queue
This member is useless now, all tcp requests
are tracked using state_queue member.

Change-Id: I4771ec163e44202a5d98d356d8935b6e518575ff
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5576
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-18 09:48:55 +00:00
Ziye Yang
d3d077cc01 bdev: Solve the ABI compatibility issue related with spdk_bdev_opts
This change prepares for the potential change in spdk-bdev_opts
in the future in order to maintain the ABI compatibility

Change-Id: I8ce24299173854c14c697bf7e28cf365c23f005f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5597
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-18 09:48:45 +00:00
Jiewei Ke
a9bdb1ee73 lib/nvmf: mask pending AENs
Per section 5.2 of the NVMe 1.3 spec:

"When the controller posts a completion queue entry for an outstanding
Asynchronous Event Request command and thus reports an asynchronous
event, subsequent events of that event type are automatically masked by
the controller until the host clears that event. An event is cleared by
reading the log page associated with that event using the Get Log Page
command (see section 5.14)."

Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I0773ce1b704c2124db354fd19e0a8a19da48da54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5462
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-18 09:48:07 +00:00
Jiewei Ke
8cd9ef2825 lib/nvmf: Support to queue pending async events
Add support to queue pending async events to avoid event lost if
multiple async events happen when there is no outstanding AER requests.
Pending async events will be consumes in FIFO order once any AER
requests are received.

Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I545f0baa4ec2996e9e02ec12c176d639e3c0d55a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5117
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-18 09:48:07 +00:00
Shuhei Matsumoto
8c3b9204b1 Revert "lib/nvmf: Add trid to struct spdk_nvmf_qpair"
This reverts commit e21de9a9cc.

Reason for revert: The public API spdk_nvmf_qpair_get_listen_trid() was
overlooked when this patch is created. Then the code to use the trid was
replaced by spdk_nvmf_qpair_get_listen_trid(). To avoid someone from using
the trid in future, revert this patch. struct spdk_nvmf_qpair is defined]
in the public header file, nvmf_transport.h but it is mainly for pluggable
custom transport.
Any custom transport will not use the trid, and so even if we remove it,
we will have no issue.

Change-Id: If4656edf3ac68456e758013d487eb582699750aa
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5614
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-12-18 09:40:13 +00:00
Shuhei Matsumoto
6cf97693e4 Revert "nvmf/fc: Initialize transport id for the newly created FC transport qpair"
This reverts commit 9ef1496ba5.

Reason for revert: The public API spdk_nvmf_qpair_get_listen_trid() was
overlooked when this patch is created. Then the code to use the trid was
replaced by spdk_nvmf_qpair_get_listen_trid(). To avoid someone from using
the trid in future, revert this patch. struct spdk_nvmf_qpair is defined]
in the public header file, nvmf_transport.h but it is mainly for pluggable
custom transport.
Any custom transport will not use the trid, and so even if we remove it,
we will have no issue.

Change-Id: I3bf500c27d9d47cc98ee84823b3c098ffcc56d90
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5615
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-12-18 09:40:13 +00:00
Jim Harris
d132ee3531 build: use DEPDIRS variables to build SPDK_LIB_LIST
All of our Makefiles duplicate huge lists of libraries
in SPDK_LIB_LIST.  We have a very precise and accurate
accounting of the library dependencies in
mk/spdk.lib_deps.mk which can be used to generate
the full list if the app specifies the modules and
subsystem libraries it wishes to link.

I did a first pass through all of the existing
Makefiles to take advantage of this new functionality.
There may be more optimizations we can make later but
don't want to hold up this patch for all of them.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icdaf6f749a6908df2c2ce2db22631a4af4ff3a9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5553
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-18 09:40:01 +00:00
Ziye Yang
27c2daff1d lib/sock: Make spdk_sock_flush do real work if sock does not belong to a group.
If the sock belongs to a polling group, we already have the mechanism
to do the write/flush work.

Change-Id: Ic15660717f4e83d873ec9f642ababd7fd9cda5eb
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5442
Community-CI: Mellanox Build Bot
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-18 09:39:51 +00:00
wanghailiangx
5e65adcc7d autotest: uses unique name for the controller
Although '|| true' has been added in rpc.py bdev_nvme_opal_revert -b nvme0 -p test || true,
Backtrace also appears while running autotest.sh on none-opal nvme server.
Now using unique name for the controller in opal_revert_cleanup() can fix the issue.

Change-Id: Id65739f9d4c37e33817406a074350345a767e99c
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5366
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>
Reviewed-by: <qun.wan@intel.com>
2020-12-18 09:39:34 +00:00
Karol Latecki
19fe6e507e doc: add entry for NVMe-oF RDMA 20.10 performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9213ae2f993643d0ae6ada161e8958677d8c8e6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5599
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-18 09:29:58 +00:00
Karol Latecki
76a470e407 test/nvme_perf: make write latency log an option
Save latency log only when needed (i.e. latency tests).
Otherwise in some condition (high IO tests) this may stress
fio too much and cause a crash or fio might just refuse
to run the job.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I61993d05ba91e88e9b6580d8ee39f255e1b09076
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5476
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
2020-12-18 08:40:31 +00:00
Karol Latecki
2cae754c42 test/nvme_perf: add fio options for io_uring
io_uring engine benefits a lot from these options
for better results.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1fbc62b88e1726f4ea1569c6ee6997164a9d09a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5475
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-12-18 08:40:31 +00:00
Jin Yu
1fae3687df test: add unit test for the mix split
At the same time the bdev supports optimal_io_boundary
and max_segment * max_size. Add a unit to test this
scenario.

Change-Id: Ied7c6cb9eefe0ab0c5a3469e9b184cb548a45f1b
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4928
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-17 15:45:10 +00:00
Jin Yu
9697d84f0e test: add unit test for split IO
This unit test is for MAX_SIZE and MAX_SEGS
splitting IO.

Change-Id: I47278a9213986d8aa0e6db041b2795e595558498
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4820
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>
Community-CI: Mellanox Build Bot
2020-12-17 15:45:10 +00:00
Jin Yu
3b616c0f0c bdev: split bdev io base on IO size and segments
When the backend device supports max segments and
max size, we may need to split the IO if the IO segment
size is bigger than max_size or iovcnt is bigger
than max_segments.

Add unit test for span split

Change-Id: If8e9c4f903b7def0ad7ddec7dc5aab8410498db5
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4602
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-17 15:45:10 +00:00
Karol Latecki
8518219a62 doc: add entry for NVMe-oF TCP 20.10 performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I36733aa5911dc6eeec9ad173b08b80b6eac60bd0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5547
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-12-17 15:44:49 +00:00
Naresh Gottumukkala
9ae4346504 nvmf/fc: Cleanup fc delete connection code.
Delete connection code is scattered all over the place for
different scenarios. For FC-NVME2, we also need to have
ability to delete single connection at runtime. Cleanup delete
connection code and have a signle nvmf_fc_del_connection api that
can be used in all scenarios.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I8d153681fd89dab8c4844b18f29c7e8f7caaa94d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5433
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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-17 04:40:33 +00:00
Naresh Gottumukkala
561a9f26ec nvmf/fc: Create fc_req pool per connection.
1) Create fc_req pool per fc connection based on SQ size. This gives more flexibity.
2) Remove create_max_aq_conns_test as it is not longer valid. We dont have any limit
on number of AQ connections based on the HW RQ size.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I5c0b0d9ec9e9d63c7dccd76be7d6363a1f49c63e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5432
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-12-17 04:40:33 +00:00
Jin Yu
e28ac3bc6b vhost-blk: record inflight descs of packed ring
This patch is for packed ring live recovery.
First step is to track the packed ring descs.

This feature base on this QEMU patch:
https://patchwork.kernel.org/patch/11766697/

Change-Id: Id0ccb6fd12b3623cc367424f496b4ffc5323f390
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4126
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-16 08:56:12 +00:00
paul luse
c73dc155c2 doc: document crypto RPCs in jsonrpc doc
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5338015e1586f8faf601c80a509f48995ec8cf27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4186
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-12-16 08:40:28 +00:00
Ziye Yang
48701bd955 lib/event: support ABI compatibility for spdk_app_opts.
This patch is used to support ABI compatability issue for spdk_app_opts.

Fixes #1484

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6fed777fa15b367f7c3706b8f218d86d56493906
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5330
Community-CI: Broadcom CI
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>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-12-16 08:40:14 +00:00
wanghailiangx
e4f8ec053c test/blobstore: clean aio.bdev and json if there is an unexpected exit in running
If there is an unexpected exit in running blob_io_wait.sh,
error log will show as below:
bdev.c:5502:bdev_open: *ERROR*: Could not open aio0 - lvol module already claimed it
vbdev_lvol.c: 265:vbdev_lvs_create: *ERROR*: Cannot create blobstore device

Fixes #1718.

Change-Id: I28e2664689e41d088a00ea6a0631a2537323054f
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5503
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-15 10:45:05 +00:00
Shuhei Matsumoto
b8c15b044c bdev/ocssd: Pass nvme_bdev_ns to each I/O submit functions
This change clarifies and simplifies the code when we support ANA
multipath because nvme_bdev and nvme_bdev_ns are not associate
directly and nvme_bdev_ns is got from nvme_bdev_subsystem instead.

As a result of this change, remove bdev_ocssd_get_ns_from_bdev()
because it is not used anymore.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I17a6eb4c63aa99e3537d7ad6ce134277c32e8d3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5562
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-15 10:44:14 +00:00
Shuhei Matsumoto
a9d2ef69c5 bdev/ocssd: Add a helper function to get zone_size from ocssd_bdev
Add a small helper function bdev_ocssd_get_zone_size() to get zone_size
directly from ocssd_bdev. We do not need to cache nvme_bdev to get
zone_size by this helper function.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a6fffac6efaff2cb4cc872c19d85e8e504c5622
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5561
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-15 10:44:14 +00:00
Shuhei Matsumoto
dd3297bf57 bdev/ocssd: Pass qpair directly to I/O submit functions
I/O submit functions need only qpair, and so let's pass it directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I11634f16ddec9371f3857587014e20312234fff8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5560
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-15 10:44:14 +00:00
Shuhei Matsumoto
6fdc0a5346 bdev/ocssd: Call read() directly when buffer is already allocated
Call bdev_ocssd_read() directly when buffer is already allocated
to improve performance and support retry in the bdev module as done
for the standard NVMe bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icf18148e09b61df7effc84535bea60f49d1c15b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5559
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-15 10:44:14 +00:00
Shuhei Matsumoto
c885010fbf bdev/ocssd: Add nvme_bdev_ns to struct create_ctx and use it
Add nvme_bdev_ns pointer to struct bdev_ocssd_create_ctx and use it.
This will be helpful for the upcoming patches because nvme_bdev will
not hold nvme_bdev_ns directly and will have to be got via nvme_bdev_subsystem
instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8417ecb049fe7a3f50793db1d570733227f4f6b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5556
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-15 10:44:14 +00:00
Shuhei Matsumoto
15f29bbe83 bdev/ocssd: Add ocssd_ns to fill_zone_info() as additional parameter
The next patch will add nvme_bdev_ns to struct bdev_ocssd_create_ctx.
This patch is a preparation for it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I37c35e0d89a088dbc5f0a9896c5fd03e22bfa6a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5555
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-15 10:44:14 +00:00
Shuhei Matsumoto
ac15e16b8b bdev/ocssd: Clean up verify_range()
We can pass nvme_bdev_ns directly to bdev_ocssd_verify_range() and
actually we don't need to check if bdevs are created on the same
namespace.

For the former, change parameters of bdev_ocssd_verify_range() from
nvme_bdev_ctrlr and nsid to nvme_bdev_ns. For the latter, remove the
check but add assert to nvme_bdev_attach_bdev_to_ns() instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I23c3a0ad02fa2b9f4c8149d9b02660140b2d3951
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5554
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-12-15 10:44:14 +00:00
Shuhei Matsumoto
d15198098f bdev/ocssd: Change lba_in_range() to take ocssd_ns as additional parameter
As same as the last patch, change bdev_ocssd_lba_in_range() to take
ocssd_ns as an additional parameter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id8ceffa8ccaa279d6036408b8730e7b896b23b1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5539
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-15 10:44:14 +00:00
Shuhei Matsumoto
ace9f6d1c0 bdev/ocssd: Change to_chunk_info_offset() to take ocssd_ns as additional parameter
As same as the last patch, change bdev_ocssd_to_chunk_info_offset()
to take ocssd_ns as an additional parameter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I05eae4206cad0511029b9b5c97b4e87facf109ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5538
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-15 10:44:14 +00:00
Shuhei Matsumoto
62ac42cc13 bdev/ocssd: Change from_disk_lba() to take ocssd_ns as additional parameter
As same as the last patch, change bdev_ocssd_from_disk_lba() to take
ocssd_ns as an additional parameter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2612df739137f687cf9aa8699c54885836742b88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5537
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-15 10:44:14 +00:00
Shuhei Matsumoto
dad1be9761 bdev/ocssd: Change to_disk_lba() to take ocssd_ns as additional parameter
As same as the last patch, change bdev_ocssd_to_disk_lba() to take
ocssd_ns as an additional parameter.

In unit tests, get ocssd_ns from not ocssd_bdev but nvme_bdev_ctrlr
because direct association between nvme_bdev and nvme_bdev_ns will be
removed when supporting ANA multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8e86b43bfe435fb2732e29e0fb6926d7572b29e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5536
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-15 10:44:14 +00:00
Shuhei Matsumoto
f4f3fe37ec bdev/ocssd: Pass range and geometry directly to translate_lba()
When the NVMe bdev module supports ANA multipath, struct nvme_bdev
will not have nvme_bdev_ns pointer directly and will get via
nvme_bdev_subsystem.

The patch series starting from this patch will change helper functions
to get both ocssd_bdev and ocssd_ns as parameters to make the
upcoming changes easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iacec2eadc9e56ae7b84ee3c313c8986f55983a08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5535
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-15 10:44:14 +00:00
Shuhei Matsumoto
4956435757 bdev/nvme: Call bdev_nvme_readv() directly when buffer is already allocated
bdev_nvme_submit_request() calls bdev_nvme_get_buf_cb() directly
when the buffer is already allocated. This is for performance improvement
but will be helpful for the upcoming multipath feature to retry
read I/O submission because buffer should be allocated only once.

By reading the code a little more critically, bdev_nvme_submit_request()
can call bdev_nvme_readv() directly in this case, and do in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I005c70deabf7fbfe84b7029e9ef103ae122605e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5558
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-15 10:44:14 +00:00
Evgeniy Kochetov
2b9daef69e nvme/perf: Fix destroy of uninitialized barrier
Destroy of uninitialized barrier fails with SIGFPE signal.

Fixes: 1721

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ic3a18a13059c1b9d706f24c390f070dc7663f6f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5567
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-12-14 16:26:05 +00:00
Shuhei Matsumoto
eebd35116d bdev/nvme: Remove nvme_bdev_ctrlr parameter from create/destroy_qpair()
nvme_bdev_ctrlr pointer is already cached to nvme_io_channel.
Hence let's remove it from the helper functions, bdev_nvme_create_qpair()
and bdev_nvme_destroy_qpair().

The following minor fixes are done together in this patch.

Fix the error paths of bdev_nvme_create_qpair() because
bdev_nvme_destroy_qpair() cannot be used as is in this case.

When calling bdev_ocssd_destroy_io_channel(), check if nvme_ch->ocssd_ch
is not NULL instead of spdk_nvme_ctrlr_is_ocssd_supported().

Cache nvme_bdev_ctrlr to nvme_io_channel just before calling
bdev_nvme_create_qpair() because the pointer is more associated
with qpair.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic96b7d0fa27dd1f32d573eecdc9d4eacc5593bde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5511
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-14 14:35:07 +00:00
Shuhei Matsumoto
4dc86079b7 bdev/nvme: Factor out each RPC config from config_json()
Factor out each RPC configuration from bdev_nvme_config_json() and
bdev_ocssd_namespace_config_json() into a helper function, respectively.

These changes will make us easier to introduce subsystem into the
NVMe bdev module.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I297f3fb47893d45463e742834c58d2b1213a4b01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5468
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-14 14:35:07 +00:00
Jim Harris
17afd268df nvme: call correct remove_cb when device is removed
When a device is removed, we should use the remove_cb
that was specified when the device was originally probed
and attached, if one was set.

Also add a new spdk_nvme_ctrlr_set_remove_cb API.  This
can be used for cases where a different remove_ctx is
desired than was specified for the probe call.  This
also enables setting a remove_cb when using connect APIs
which do not have a way currently to provide a remove_cb.

This also requires fixing the bdev nvme module, which
was depending on the previously errant behavior.

Fixes issue #1715.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5510
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-14 14:34:42 +00:00
Ziye Yang
fd7c1ff2d8 changelog: Make two nvmf change section into one
I think that it was caused two different patches, so merging the two
nvmf change part into one for 20.01 release.

Change-Id: I906945b5ff059f9e01d0e5a33bc25744b79241e2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5564
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-14 14:34:27 +00:00
yidong0635
d949f55737 test/nvmf_example: Remove duplicated test code.
Only need to add command about sudo -u "$USER" for
non root user.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I3b6dbea0175a60b19627cd64d21da3d59309f47f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5563
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-14 14:34:14 +00:00
Jim Harris
3e96796391 nvmf: assert that subsystem cb_fn/cb_arg don't get set twice
nvmf_subsystem_state_change() protects against going
starting the pause/change/resume chain again if we
haven't completed the previous chain.  But add
some asserts to make sure the cb_fn and cb_args
never get set twice.  This also requires setting
them back to NULL after they've been used.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56c6c89bfb108223f731d5ac28100abbb746ab2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5531
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-14 14:32:29 +00:00
Jim Harris
392b07463b jsonrpc.md: add section for rpc.py BKMs
Generating JSON-RPC config files by hand is very
tedious.  Thankfully, SPDK has a number of ways
to simplify the process.  Let's document them
in jsonrpc.md so that we have a single place to
point people who have questions.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7470cf07923f2ea25ab55bf40a422c31d17b31d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5530
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-14 14:31:01 +00:00
Ziye Yang
771fae3ee9 lib/nvme: Simplify the code related with nvme_ctrlr_opts init
1 Remove the duplicated code.
2 Add a static check when developers add a new field.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie9f88d2505c52633cb2077ba565e429a3ec18abd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5532
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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-14 14:30:18 +00:00
Jim Harris
894175dece blob: add more detail to bs_load_use_pages_cpl assert
We have an intermittent CI failure that hits this
assert.  Adding some more detail to help analyze and
root cause.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2174dda58d0ae4d98359a914e5975f8be3e45a89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5550
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-14 14:29:09 +00:00
Michal Berger
e8e9a9aa79 scripts/qat_setup: Fix path to igb_uio driver
Change-Id: I1918615b8c3ad3aa0054bf2f1f9daab124789783
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5415
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-14 14:25:07 +00:00
Jim Harris
6d9d3f87e3 bdev_nvme: don't try to read csts on fabrics cmd timeout
It is recommended to read CSTS when there is a timeout.
If CSTS.CFS (Controller Fatal Status) is set, we should
reset the controller.

But if an admin command on a fabrics controller times
out, reading CSTS submits another fabrics command that
could also timeout.  Even worse, we are recursively
polling the admin queue for completions in this case.

Fixes issue #1716.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I23d31f6302375c52eba6f4370748d622fbd25ca7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5513
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-11 11:10:37 +00:00
Jim Harris
037f6bda65 bdev_nvme: write keep_alive_timeout_ms option to json
This was missed when this option was added recently in
46a348597 (rpc: add keep alive parameter in bdev nvme).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I38fa2d4fc7c995bb0cea89b7b8cb51b2ce72aaa0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5512
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-11 11:10:37 +00:00
Evgeniy Kochetov
eb753b2515 examples/nvme: Add hostnqn parameter to perf and identify
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I5f8435d9c270fa87295d1fc9126bb0c91aaf055c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5467
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>
2020-12-11 11:10:28 +00:00
Ziye Yang
3b16c6ddc2 lib/nvmf: support ABI compatibility for spdk_nvmf_transport_opts
This patch is used to support ABI compatibility related with
spdk_nvmf_transport_opts structure. We add a field opts_size in
spdk_nvmf_transport_opts and change the related two functions.

Fixes issue: 1485

Change-Id: Ifed3dc482bbc8fb54eb7089f7a1931718682f214
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5293
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>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-12-11 11:10:16 +00:00
Alexey Marchuk
4ede905352 nvmf/rdma: Ignore LAST_WQE_REACHED for iWARP
iWARP doesn't support this ibv async event.
Probably some clean up of SRQ needs to be done, e.g.
post dummy drain WR to SRQ and wait for its completion
when qpair is being destroyed.

Change-Id: Ic1035dbd8192e665eedbaf89e5cf4e00cb0506c6
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5474
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-12-11 11:09:58 +00:00
Michal Berger
a56d97b3fc autotest: Distribute memory evenly across NUMA nodes for crypto tests
This is needed in case QAT devices and their VFs end up on different
node than node0.

Change-Id: I34386c71dff6232e191a8625a7f26c90ea2cad6d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5464
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-12-11 11:09:33 +00:00
Michal Berger
fb732cb782 scripts/qat_setup: Make sure the out-of-tree intel_qat driver is in use
Change-Id: I8869b42cd42a1f18cbbde79d59e1a95df9316d4e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-11 11:09:33 +00:00
Michal Berger
d495c9b222 pkgdep/git: Force tag fetching and remove ref repo dirs before building
--force will make sure that all pre-existing tags will be overwritten
with those from remote (this concerns mostly LTS tag which is meant
to be changed in the future to point at different releases). Cleanup
is also necessary as we can't build against repos with old contents.

Change-Id: I9f8c5521d828bed04ea1dc23fb8f3bf07aad1f23
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5493
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>
2020-12-11 11:07:51 +00:00
Michal Berger
b33a9d9ca3 pkgdep/git: Look up only annotated tags for refspdk builds
Since --tags also works with lightweight tags, it simply returns "LTS"
string when tree is switched directly to that particular tag. Make sure
only annotated tags are checked so the release version lookup can work
as expected.

Change-Id: Ica875bf406c8e23529ee2961645c5bf6b6bc00fa
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5492
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-11 11:07:51 +00:00
Michal Berger
11b5e6f952 pkgdep/git: Fix small typos
Change-Id: I4a23fbf459b8e64329f4a9a8edc1cbf608f57e27
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5485
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-12-11 11:07:51 +00:00
Michal Berger
0146f2eeaa pkgdep/git: Check kallsyms to see if QAT needs to be patched
It seems that some of the kernel patches from 5.x were backported
to centos8's 4.18 kernel. This requires 0001-pci_aer.patch to be
applied on the QAT source. To determine if it's needed, check list
of exported kernel symbols to see if said patch is needed since
relying on version check is not enough in this case.

Change-Id: I9fb24480058817ef9f4dd246eff234a95ce65137
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5484
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>
2020-12-11 11:07:51 +00:00
Michal Berger
3edb26fb0e pkgdep/rhel: Check if given repos can be enabled
In recent Centos8 updates name of the "PowerTools" repo was changed to
"powertools". Since config-manager will fail if we provide a faulty
name of the repo, we need to make sure we tell it to enable what's
actually present on the system.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iff0c6103d1375fc42f5c967cd713e3e5089f4723
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5478
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-12-11 11:07:51 +00:00
Michal Berger
2f6afea662 scripts/qat_setup: Be more verbose about SR-IOV setup
If the sriov_numvfs sysfs attr is not available for given controller
report that. Also, verify if number of VFs matches initial value
of 16 devices. If not, report that as well. This number was also
being overwritten with the set value from previous device - this
could false-positive the confirm check so keep the set value in
a seperate variable.

Change-Id: I518464518dd75585c4692c8ec1b3268e798dcf6c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5414
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2020-12-11 11:05:23 +00:00
Maciej Wawryk
632703f681 scripts/nvmf: Capture configuration in perf tests
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I343e568f3c4f6d16a7159c8cdc460df2d2c842ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5252
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-11 11:01:58 +00:00
Pawel Piatek
150a29cc21 scripts/vagrant: DRY when handling distro parameter
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I7d1e68ef3041d0337eb429c0f74cabd7d3aa061c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5298
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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-12-11 10:59:32 +00:00
Evgeniy Kochetov
b482eda06e nvme/perf: Basic synchronization of workers
Currently, NVMe perf worker starts IO and measurements as soon as all
its QPs were connected. But other workers may still be connecting and
not started their measurements yet. With large number of QPs when
connections take a long time this can cause inaccurate performance
reporting.

This patch adds synchronization point for workers after all QPs were
connected and before start of IO and measurements.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: If0c9be8dd41c8e851aae6b3e71afa3efe5314330
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5126
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>
2020-12-11 10:59:09 +00:00
Karol Latecki
1bc2a2d9e9 scripts/nvmf_perf: fix clat percentile calculations
In case of latest fio versions "percentile" leaf for clat
latency measurements does not get created in case no IO
was run (e.g. write clat will not have "percentiles"
created in case rw mode was set to randread). This
caused KeyError exception when trying to access non-
existent dict key.

Change-Id: Ie0c28dc932481e5aab971505ba0f38b6798bff36
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-10 14:50:09 +00:00
Jin Yu
da625683a6 bdev: virtio blk read max size and segs
The backend device such as virtio-blk or virtio-scsi
may support the SIZE_MAX and SEG_MAX. Then SPDK needs
to split the big IO. Add this feature in bdev.

Change-Id: I2442e14121ccf141682964425e96382fec482af3
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4600
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-10 14:39:45 +00:00
Jim Harris
b94d358a49 remove unneeded spdk_internal/thread.h includes
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I488d7c9441302847b170cd3b2a835ecad74cd031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4718
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-10 14:38:04 +00:00
Naresh Gottumukkala
8611bc17ca nvmf/fc: Fix unfair LS queue pending processing.
If ls_pending_queue is not empty, then add the ls_rqst to
ls_pending_queue instead of trying to get xri.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I97e48f30cb6d4fd69548d48e6360275d9f1adec0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5502
Community-CI: Broadcom CI
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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-12-10 14:37:34 +00:00
Naresh Gottumukkala
67429f288d nvmf/fc: Data path should not use nport and rport.
nport and rport data structures are supposed to be used only
in control path but not datapath. FC data path scaling is based
on connection and connection object contains all the required
information for command processing.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I70f6896955d97abc86bc7c5e6b9f160d622e60d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5501
Community-CI: Broadcom CI
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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-12-10 14:37:34 +00:00
Naresh Gottumukkala
892d8bc436 nvmf/fc: Dont hold hardware command buffer.
Currently we are holding hardware receive command buffer till
the IO is completed. This is effecting the number of commands hardware
can receive. Copy the cmd into driver buffer and release the
hardware receive buffer back to hardware ASAP.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic292056b3e012d40515d0de5b9808cd8960811ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5430
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-10 14:37:34 +00:00
Naresh Gottumukkala
36ba0c573a nvmf/fc: Fix unfair pending processing.
Before calling nvmf_fc_request_execute, first check pending queue
to avoid unfair processing.

Some pending code cleanup aswell.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I6eb6716f17b47c4a28a4ba2ba61be93f55a28ed7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5445
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-10 14:37:34 +00:00
Naresh Gottumukkala
cd8e42f48c nvmf/fc: Merged LLD queue init api.
Today we have two lowlevel LLD apis nvmf_fc_init_q and
spdk_nvmf_fc_init_poller_queues for LLD queue initialisation.
Since two calls are redundant, merge them to one api. Also remove dead
function code nvmf_fc_hwqp_reinit_poller_queues.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic3df6bff7d38d7b1e946755c3224daf7f6194125
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5444
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-10 14:37:34 +00:00
Naresh Gottumukkala
c1a53822bb nvmf/fc: Code cleanup.
Use inline code instead of functions when it is used only once.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I5af26f81ac15546dd1e4e4a14753d32f7ee9e1d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5443
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-10 14:37:34 +00:00
Changpeng Liu
0c55825781 pkgdep: install json-c-devel and libcmocka-devel
The coming libvfio-user needs json-c and libcmocka library, so install
the libraries in CI environment.

Change-Id: Ib4871169a4d5b140cda11a2cc449201c963a9f12
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5287
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-10 11:16:34 +00:00
yidong0635
decdfa0b22 test/common: Add bdev_nvme_set_options before "bdev_nvme_attach_controller".
This patch is base on the patch about adding item "keep_alive_timeout_ms".
exposing bdev_nvme_set_options this method that existed but not used.

If we meet the keep alive timeout issue or some intermittent failure, we can
change the keep alive timer from host side. This is also an example to
demonstrate some special items that we can finetune.

Our host app is using json config, which gets config from the target side and
overwrite it .
Exposing this bdev_nvme_set_options that users can quickly change the setting
to fit the real testing environment. Strictly it's not a bug of target, just
make it more compatible.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic1e8a2757dd5ed359500e1692f16e448fab0d4fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5333
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-09 08:27:06 +00:00
guozhihong
750cfa17ab fix a bug of clear extents during blob persist md
Signed-off-by: guozhihong <guozhihong@bytedance.com>
Change-Id: Ief3fbc1754dedf424419dc98bebac8d73196377e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5106
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-12-09 08:26:43 +00:00
Tomasz Zawadzki
e663dc82ad pkgdep: install cuse module as dependency for nvme-cuse
cuse kernel module is not required to build nvme-cuse,
but any usage still requires it.

Packages for that were part of vm_setup script,
but should not be exclusive to it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia105454f65ee87ab3f56580c43d33214beac7b2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5453
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-12-08 13:11:49 +00:00
Jin Yu
46a3485971 rpc: add keep alive parameter in bdev nvme
Add keep alive timetout parameter in bdev_nvme_set_options.
NVMe bdev can set this value especially when we test with
bdevperf.

Fix github issue: #1690

Change-Id: I255c935671b74cdb615a8d393e7d7e84524f3c23
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5306
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@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-07 14:57:03 +00:00
Sochin Jiang
7083e01b9f bdev/aio: access 'spdk_bdev_io' before 'spdk_bdev_io_complete' called
'spdk_bdev_io' could be freed after calling 'spdk_bdev_io_complete',
fix this potential issue in aio.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I2e67ec44d9ffc0dda4f5753beba06b8a249456ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5463
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
2020-12-07 14:56:54 +00:00
Michal Berger
cac9322dc9 scripts/setup: [VFIO] Load vfio_iommu_type1
This is done in order to make sure IOMMU extensions, which DPDK is
looking for, are enabled.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia9ff8e5329d14a5eb60721f08ff7063cfb1d6eb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5259
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Mike Gerdts
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-04 09:51:26 +00:00
Tomasz Zawadzki
b4916f9f69 configure: do not check for > DPDK 19.05 to enable vhost
SPDK supports two latest DPDK LTS releases and DPDK 20.11
is out now.

Remove all functionality and checks for versions <= DPDK 19.11.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icc3e2ca15f536effc865c82637bf7f2960d5c11b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5346
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-12-04 09:51:00 +00:00
Tomasz Zawadzki
75e8c5f246 bdev/crypto: lib/env: move minimum DPDK version to DPDK 19.11
SPDK supports two latest DPDK LTS releases and DPDK 20.11
is out now.

Remove all functionality and checks for versions <= DPDK 19.11.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9c354b7bc56d35a9ab04375f9f5255ca914d53e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5344
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: Jim Harris <james.r.harris@intel.com>
2020-12-04 09:51:00 +00:00
Tomasz Zawadzki
6bb83abdef lib/env: move minimum DPDK version to DPDK 19.11
SPDK supports two latest DPDK LTS releases and DPDK 20.11
is out now.

Remove all functionality and checks for versions <= DPDK 19.11.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib4c750c49352fe4ad4b50c7a719867387808f0df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5343
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-12-04 09:51:00 +00:00
Michal Berger
d3a6cb8444 pkgdep/git: Change URL for fio repo to point at github
.dk doesn't seem to be stable, quite frequent timeouts can be seen
while cloning the repo. Use github instead.

Change-Id: I9c3a4f4e2deea94a7d7d69a33cc50a64df072d4b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5427
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-12-04 09:50:43 +00:00
Maciej Wawryk
78d5bfe575 autotest: Fix for disable lcov when using clang
Previous commit #ddba844, has wrong path in unittest.sh
and missing checks in unittest.sh and autotest.sh, that here was fixed.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Idc12719c0d427e3e6ec1a0e2c57e899508b0d7f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5364
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>
Community-CI: Mellanox Build Bot
2020-12-03 10:34:07 +00:00
Tomasz Zawadzki
aff588d7e6 lib/env_dpdk: warn about deprecated API
__rte_experimental attribute in DPDK ends up being changed to
'deprecated'. See rte_compat.h in DPDK.

Goal of patch below was to allow SPDK to use experimental API
"(b6fce19) env/dpdk: add support for DPDK 18.05 dynamic memory allocation"

Yet it disabled warnings for both. This patch makes it so that
__rte_experimental will not produce warnings, but deprecations in DPDK
will.

It will help identify incoming changes when testing newer versions
of DPDK in the future.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a75e37c976d613c7ec6ee32e05fc6da79a60a1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5342
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-03 09:41:44 +00:00
Tomasz Zawadzki
38e26cf55f build/dpdk: detect DPDK presence using meson.build file
This check in configure serves as sanity check only.
Since starting with DPDK 20.11 makefile were removed,
so was the common_base file.

Instead check for meson.build file which exists since
DPDK 18.02.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie62738c5a580e6e9bdfde2dfc4e85b376fc01056
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5341
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:44 +00:00
Tomasz Zawadzki
e9b2da84ec example/interrupt: do not compile interrupt_tgt without vhost
The interrupt_tgt depends on vhost lib, so it should not be
compiled when SPDK is not using it.

This resolves compilation errors with just:
./configure --without-vhost

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iad2dff6bb73e1b3d389b98f0dfbf157e576797be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5340
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:44 +00:00
Jim Harris
3795c1cfd8 event: replace master_core with main_core in spdk_app_opts
master_core will still be available but deprecated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6fe9eb7fecb2919795c439a02cb7d9d06a2774d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5358
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
0130905aee bdev_ocf: replace "master vbdev" with "main vbdev"
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib93a12de67640b940d6f9abedaf8bcc1008cffbb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5357
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>
2020-12-03 09:41:07 +00:00
Jim Harris
57de009a88 bdev_iscsi: replace master with main
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0ceac99c5a5b59c89a1b2c8e99554ea93f4bf430
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5356
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>
2020-12-03 09:41:07 +00:00
Jim Harris
3d78c09db1 bdevperf: replace "master_thread" with "main_thread"
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic622568a3990f55698876bb9ec086c6d378d4b03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5355
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
0e8925db3c nvmf/fc: replace use of "master" with "main"
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I55c53e0508b7490557e8f43501581fafa435051d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5354
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
9289521630 test/vhost: replace master_core with main_core
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibdf9612a27266ef739d9d10db3fd1d353729644a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5353
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
87b21afd65 examples: use "main" instead of "master"
While here, replace use of "slave workers" in some
comments with "secondary workers".

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2169c108da18d449a66a29daa77a3f9c3145d4b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
fe137c8970 env: replace master_core with main_core
This helps us remove master/slave terminology from
SPDK and is aligned with similar changes made recently
in DPDK.

While updating nvme/identify to use the new member
name, also replace g_master_core there with g_main_core.
Other nvme utility usage of "master_core" will be updated
in a later patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0ec4e3e9b644bec21b3729809bf5c4d35b10837f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5351
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
131e617191 nvmf: remove usage of "whitelist"
NVMf subsystems can have certain hosts that are allowed.
We were previously using the term "whitelist" to refer
to those hosts.  Replace that usage as part of removing
this term from the rest of SPDK.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2878352d83f3911aa8b59629061b818c7f1e5c96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5282
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-03 09:41:07 +00:00
Jim Harris
5237fe34b7 event: add new pci-allowed and pci-blocked cmd line params
These replace the pci-whitelist and pci-blacklist params
which are now deprecated.

pci-blocked will still use the -B short name.  pci-allowed
will use a new -A short name.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icf1c46c40ad6a0f49fb539b18cdd8d0c8daac636
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
9c2b3b3535 event: add pci_allowed/pci_blocked to spdk_app_opts
The old terms pci_whitelist/pci_blacklist are now
deprecated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6350a6dbe21ceb5965b30241899eead651834dca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
4a6a282411 env: add pci_allowed/pci_blocked to spdk_env_opts
The old pci_whitelist/pci_blacklist are now deprecated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9fddec0c90691dd385eb21d13be849247f144889
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5279
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Jim Harris
ddd71f939d env_dpdk: start using allow/block command line option
pci-whitelist and pci-blacklist are deprecated, so
use 'allow' and 'block' instead for DPDK versions that
support it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I430f73fc402ca9fc07d004e719435e5b3dc963f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5278
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-03 09:41:07 +00:00
Jim Harris
54a4e32eb3 test: replace VMD_WHITELIST with VMD_ALLOWED
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2eda74a4e1f5f72d81bdfc31549355e59085c4fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-03 09:41:07 +00:00
Jim Harris
f1a966dc3d scripts: replace NVME_WHITELIST with NVME_ALLOWED
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4a03ee4040df32710bba67e9ecb68949e49f8693
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5276
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-03 09:41:07 +00:00
Jim Harris
a1280c9878 scripts: replace PCI_WHITELIST with PCI_ALLOWED
Similarly replace PCI_BLACKLIST with PCI_BLOCKED.

Use of ALLOWED/BLOCKED matches similar changes made
in DPDK.

While here, replace use of term "blacklist" with "blocked"
in one of the nvme perf scripts.  The usage there was
associated with how devices are blocked by using the
environment variables that are changed by this patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I720d99118ba5e050f436612c9fd415db44294a63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5275
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-03 09:41:07 +00:00
Jim Harris
895ad89214 ioat: remove whitelist/blacklist functionality
This can be done via explicit options on the
application command line instead.

This has the added benefit of removing a usage of
whitelist/blacklist which we are working to
remove from the SPDK repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5739e281f1c29fc8a5d175f5bbc916cd7d926fe4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5274
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-12-03 09:41:07 +00:00
Karol Latecki
6b6ae3a214 autobuild.sh: enable i40 net driver for external DPDK build
RTE_NET_I40E has to be enabled, otherwise test-pmd app
compilation fails due to -Werror=unused-function.

This is caused by dpdk/app/test-pmd/cmdline.c:
    (cmdline_parse_inst_t *)&cmd_add_del_raw_flow_director,

Change-Id: I1add570732dedde082aec158dd3d09ab0051f7d3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5067
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-12-03 09:38:29 +00:00
Alexey Marchuk
efb6081cf6 nvmf/rdma: Correct SoftRoCE driver vendor_id
In some cases we need to check if we are working with
SoftRoCE driver (rxe) since it doesn't support several features
such as SEND_WITH_INVAL and LAST_WQE_REACHED ibv async event.
vendor_id of this driver has been changed from 0 (it was not
initialized at all) to 0XFFFFFF in commit
0184afd15a141d7ce24c32c0d86a1e3ba6bc0eb3
So now we should check for both values.

Change-Id: I62ce4d68c11612a07fe97606658a5b79f1db2149
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5307
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-02 10:19:39 +00:00
Shuhei Matsumoto
db436f2dc0 bdev/nvme: Refactor namespace comparison in add_trid()
In other places, nvme_ns->populated has been used to check an namespace
is active for an existing nvme_bdev_ctrlr. We do not need to call
spdk_nvme_ctrlr_is_active_ns() again. Follow it in this patch.

Besides, factor out the namespace comparison into a small helper
function bdev_nvme_compare_ns(). It will be used to check if two
controllers have the common namespace for ANA multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8aad2f58aae1fd45ca0dd981dded1c406f215ac0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5359
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-02 10:19:32 +00:00
Shuhei Matsumoto
f85b860d27 bdev/nvme: Add failover trid to an existing ctrlr in the attach callback
Previously, we separated two cases, creating an new nvme_bdev_ctrlr
and adding an new path to an existing nvme_bdev_ctrlr as early as
possible.

However, we can merge creating an new connection between these two
cases. In this patch, connect_attach_cb() calls bdev_nvme_add_trid()
and then calls spdk_nvme_detach() if the nvme_bdev_ctrlr whose name is
ctx->base_name already exists.

This will simplify ANA multipath feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2eec92dbf96e979690a1087c5c4fc306a29f15de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5329
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-02 10:19:32 +00:00
Shuhei Matsumoto
317dd9f740 bdev/nvme: Move add_trid() up and remove_trid() down in a file
Move bdev_nvme_add_trid() up in a file to locate it before
connect_attach_cb(). The next patch will change bdev_nvme_add_trid()
to be called by connect_attach_cb() to merge the connect operation
for failover case.

bdev_nvme_add_trid() will be associated more closely with
connect_attach_cb() and bdev_nvme_create(). To make it clear,
move bdev_nvme_remove_trid() down before bdev_nvme_delete() too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia5eb491baea57d715aadc07f206b94884334efaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5328
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-02 10:19:32 +00:00
Shuhei Matsumoto
80c4ee0a5e bdev/nvme: Use SPDK message at bdev_nvme_library_fini() not to unlock during TAILQ_FOREACH()
Even if we use TAILQ_FOREACH_SAFE(), it is not safe to lock and unlock
while linked list is parsed.

To fix such erroneous implementation, use SPDK message.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I79a126560ccd847149d4d06bb3d2111e43060ff7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5321
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-02 10:19:32 +00:00
Shuhei Matsumoto
6bd83dd1c7 bdev/nvme: Factor out nvme_bdev_ctrlr destruction further
Factor out the common operation to destruct nvme_bdev_ctrlr further
into an new helper function _nvme_bdev_ctrlr_destruct() from
remove_cb(), bdev_nvme_delete(), and bdev_nvme_library_fini().

The next patch will use SPDK message to fix the race condition
by locking/unlocking during linked list parse.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If5392bebcf830fac6165aa424b06aec0c9274dc8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5320
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-02 10:19:32 +00:00
Shuhei Matsumoto
e5b2304448 bdev/nvme: Use nvme_ns for nvme_bdev_ns and ns for spdk_nvme_ns
Clarify local variable names to avoid misunderstanding and do the
upcoming changes easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9a7185b5f7c62a9e537a626be83912895303e5ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5319
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: Changpeng Liu <changpeng.liu@intel.com>
2020-12-02 10:19:32 +00:00
Karol Latecki
0119b36be5 lib/bdev: increase SO_MINOR to 1
This was omitted in 296a6d9838
and is currently causing ABI inconsistencies.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ifb5b2360ff1ffbaffdc3b5d057047d035b98d909
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5368
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-01 13:11:42 +00:00
GangCao
1665a80fda iscsi: get the member after the NULL check
Change-Id: Ic427463d9e51af4262089ff0dae0dd19164b0995
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5332
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: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-12-01 10:21:50 +00:00
Shuhei Matsumoto
5c9a8a3c41 lib/nvmf: Use qpair_get_listen_trid() to find a subsystem listener
There is a public API spdk_nvmf_qpair_get_listen_trid() and it can
get trid of the specified qpair safely for any transport including
pluggable transports.

The API was overlooked when implementing the multipath feature for
NVMe-oF target. trid pointer was added to struct spdk_nvmf_qpair and
was used to find a subsystem listener.

However, pluggable transports got seg. fault because trid of the
qpair was not set.

To avoid such segmentation fault for any transport, change
nvmf_ctrlr_create() to use spdk_nvmf_qpair_get_listen_trid().

The struct spdk_nvmf_qpair is located in the public header file,
and so leave the added trid for now. It will be deprecated eventually.

Reported-by: Jacek Kalwas <jacek.kalwas@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e0bd24bd58b6ffdf1352332a179a82682f1589f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5323
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-12-01 10:21:28 +00:00
Alexey Marchuk
92e541b58b rdma: Don't log rdma_disconnect error for iWARP in verbs provider
rdma_disconnect may return an error and set errno to EINVAL in case
of iWARP. This behaviour is expected since iWARP handles disconnect
event other than IB and qpair is already in error state when we
call rdma_disconnect.

Fixes #1704

Change-Id: I38710198d9b6b70b8940947f8e7c553cd4fbbd51
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5314
Community-CI: Mellanox Build Bot
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-01 10:21:03 +00:00
Jacek Kalwas
296a6d9838 bdev: extend interface with get module ctx
Currently only nvme bdev module implements this interface. Bdev module
context (in this case spdk_nvme_ctrlr opaque handle) allows for nvme
interface usage for additional management.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I6302c9229d5f7f294a3c1472d9e8dc1519637ffb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4924
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-12-01 10:20:56 +00:00
Ben Walker
b10e305010 nvmf: In spdk_nvmf_request_exec, reverse order of subsystem and qpair
checks

Check if the subsystem is paused before checking whether the qpair is
active. The order of these checks doesn't really matter, but in the next
patch it will be more convenient to check the subsystem first.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ibc95e2578e9a95296f5fbc6023af3b542e954781
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5015
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-01 10:20:43 +00:00
Ben Walker
c642e8e2ee nvmf: Inline _nvmf_request_exec
This function is only called from one spot, so it's simpler to combine
it with that function.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I0a35e11edaf6c4446de530a3b0f538aa4a3238f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-12-01 10:20:43 +00:00
Ben Walker
af07b82fa2 nvmf: The maximum number of namespaces a subsystem may contain must now
always be specified

Previously the parameter was optional and the size could be increased as
necesary. Now, it is required and a hard maximum. Later another function
could be added to dynamically increase or reduce this number if
necessary.

Change-Id: I3524ac737a6b592b4f6ce14ea48d3742a352c70f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4996
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-01 10:20:43 +00:00
yidong0635
5986a1b42a test/bdevperf: construct a function bdevperf_end_task.
Extracting codes to a function, makes the more clear.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I49ae7b4f07ebacbeaf0c03941aeefc4657317e3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5304
Community-CI: Mellanox Build Bot
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-11-30 09:09:23 +00:00
yidong0635
a085705f9f test/bdevperf: Remove duplicated codes.
Using common out to usage and exit.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idec94789566603379e6b548fa0421ea9ccf82d5f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5289
Community-CI: Mellanox Build Bot
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-11-30 09:09:12 +00:00
Karol Latecki
f75d677908 test/make: select ABI reference build for test
At given time we support two SPDK versions:
- last release
- LTS release

For ABI tests we need to select proper reference
build to check against.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I674b6092199c4535288f5062ff0523a13890cbce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5056
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: Michal Berger <michalx.berger@intel.com>
2020-11-27 10:39:45 +00:00
Karol Latecki
13cf7a656c test/vm_setup: install last SPDK LTS reference build
Reference builds created by vm_setup.sh script are
needed when executing ABI tests. So far vm_setup.sh
only built reference build for previous release, but
in some cases a LTS build might be needed as well.

Also rename latest ABI reference build directory to
spdk_abi_latest, because that's the name of directory
used in test/make/check_so_deps.sh.

Change-Id: I1cb3e39e96d68051d4142753db5b8b3645016eeb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5025
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-11-27 10:39:45 +00:00
Ziye Yang
c38a1bc002 sock: create spdk_sock_prep_reqs function.
The purpose is to reduce the duplicated functions
in posix and uring implmentation.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia0568b2490d362e7e78fa59b3ca88a60313ba0bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5284
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-27 09:22:30 +00:00
Changpeng Liu
0e99c68d61 pkgdep: install cmake
cmake is required by the coming libmuser, it's already installed
in some environments, here install it with more environments.

Change-Id: Ia7ce5ddaad95342e88ddcec327ac9c0eee51297d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5207
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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-11-27 09:22:19 +00:00
Karol Latecki
70b8af668b doc: add entry for Vhost 20.10 performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1a5af688a86ce140ee967cc7c557978b1a29c565
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5257
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-11-27 09:22:09 +00:00
Tomasz Zawadzki
c83ffe324f ut/bdev: dont poll threads recursively
free_bdev() polls threads to push the bdev unregister forward.
get_device_stat_test called the free_bdev() within a callback,
which results in polling threads recursively.

Discovered while working on asynchronous registration for bdevs.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib4f6f50c1542d11e98f8ba093710620cca016eb4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5211
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>
2020-11-26 10:17:07 +00:00
Jim Harris
5338dabb73 build: remove types suppressed from abidiff during 20.10
Some of these types had changes that we suppressed
during the 20.10 release cycle.  Now that 20.10 is
out, remove those suppressions since we will now
compare patches against the 20.10 release which
includes the affected changes.

Note that commit fce94287 filled out a new field
in spdk_nvme_ctrlr_data, so we will keep that
suppressed again for this release.  This is normal
and expected for spec-defined structures when we
define bits that were previously reserved.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1a0f3b187330d443c4de7e013b4d66d1b8cb4e46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5234
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:16:59 +00:00
Jim Harris
c3f1aa0560 build: suppress SPDK_BDEV_NUM_IO_TYPES errors from abidiff
New IO types are just ignored by existing modules, but when
added it changes the value of SPDK_BDEV_NUM_IO_TYPES which
then throws an abidiff error in our build.

So just suppress changes to this specific value so that
adding new IO types doesn't itself result in an SO version
bump.

Thanks Alexey Marchuk for pointing out this abidiff
feature.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib023bd5ee30a7ebcf7da0bb4b3f8dc54f5713710
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5206
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:16:59 +00:00
Ziye Yang
403526021e nvmf/tcp: Fix the typo in print and remove the unnecessary empty line.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idb39df954e39242353d55e62c4d360da9e5e1c58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5283
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
2020-11-26 10:16:36 +00:00
Liu Xiaodong
7cf29902ba app: align usage printing
Change-Id: Ie810c36a03801cfb7d3bd63860492a7ab814560d
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5245
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2020-11-26 10:16:26 +00:00
Liu Xiaodong
e4e218d898 trace: disable trace by set num-trace-entries=0
Previously, trace file is always created in shared memory.
Adding disabling trace in order to avoid trace
file's creation if user doesn't require trace.

Also returning error if trace is disabled but trace rpc is
call to enable or diable trace group

Change-Id: Ic9ea781a8a1edd530d0a5921b0dc774356ae4d48
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5195
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-26 10:16:26 +00:00
Maciej Wawryk
ddba8440c0 Disable lcov when using clang
We want to add clang to autotest per patch, but lcov takes
considerable time to process clang coverage.
The test will be just building SPDK using clang.
Details: https://github.com/spdk/spdk/issues/1693

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I085adb5498613222d36a0607b1fd260a2f4088b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5169
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-26 10:16:18 +00:00
Jacek Kalwas
86e8085d58 env: describe enumerate function detail behavior
2s asynchronous delay is introduced to avoid race conditions between
user space software initialization and in-kernel device handling for
newly inserted devices. Subsequent enumerate call after the delay
shall allow for a successful device attachment.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I273111ae7a588ce5e15e593bbdfb223777c19071
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5060
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-26 10:15:37 +00:00
Tomasz Zawadzki
cfccb8c383 test/vhost: remove tests for live migration between different hosts
The test case 3 a/b were tests for live migration were to be executed
between different hosts.

Since most of the tests in CI are executed within single host,
those were to be delegated to separate job that would use more hosts.

Yet for some time this went untested and state of the scripts is unclear.
Let's remove it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6bab2c0b85da87d29cfccabff2103812b181f246
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5037
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-26 10:15:12 +00:00
Tomasz Zawadzki
27544da15a test/vhost: remove windows filesystem test
This test is not ran on CI right now and state of
executing it is unclear.

Almost two years since it's addition that it went unused,
lets remove it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I637bc56374fd5943cc11ccccb3a0c0690ddfe673
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5036
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-26 10:15:12 +00:00
Shuhei Matsumoto
c8fa7f4c16 bdev/ocssd: Pass bdev_ocssd_io instead of spdk_bdev_io to I/O submit functions
This is the end of the series to make the code of ocssd_bdev more
similar with nvme_bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9dfc2634292ec581d6787500e46e74ad3b95aa90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5251
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:15:03 +00:00
Shuhei Matsumoto
c132f1e190 bdev/ocssd: Extract and pass contents of spdk_bdev_io to I/O submit functions
Extract and pass contents of spdk_bdev_io to I/O submit functions.
Besides, adjust the coding style for I/O submit function calls
with nvme_bdev.

The next patch will replace spdk_bdev_io parameter by bdev_ocssd_io
parameter for I/O submit functions.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2556d4a3c092d4ffacd47bbfc95db060da477bc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5250
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:15:03 +00:00
Shuhei Matsumoto
1ce01e40a1 bdev/ocssd: Add nvme_ch parameter to reset_zone() and get ctrlr from nvme_ch
This follows the recent change in nvme_bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I81a0d838a5bb1bd22275ee75e64b32b7b12cc67f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5249
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:15:03 +00:00
Shuhei Matsumoto
bd65fef240 bdev/ocssd: Add ocssd_bdev parameter to I/O submit functions
nvme_bdev passes not spdk_bdev_io but nvme_bdev_io pointer to I/O
submit functions, and gets spdk_bdev_io pointer from nvme_bdev_io
pointer in its completion callback functions.

This is very clean because spdk_bdev_io is processed by the generic bdev
layer and nvme_bdev_io is processed by the NVMe bdev module.

The patch series changes ocssd_bdev to pass not spdk_bdev_io but
bdev_ocssd_io pointer to its I/O submit functions.

This patch is the first of the series and add ocssd_bdev parameter
to I/O submit functions. ocssd_bdev pointer is got from
bdev_io->bdev->ctxt. Hence this patch removes one dependency on
spdk_bdev_io.

One noticeable small change is that get_zone_info() gets zone_info
from not bdev_io->bdev but nvme_bdev->disk to advance removing
the dependency on spdk_bdev_io.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia3127ceb1fc8923e321a1404edbb19b63f5fde5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5248
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-26 10:15:03 +00:00
Shuhei Matsumoto
00c9699b51 ut/bdev_ocssd: Use _submit_request() to test get_zone_info()
This change increases the coverage and makes the unit test more
realistic, and furthermore makes the following refactoring easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If8177b9cff888bf26e9a8e9830d4e915d264523f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5247
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-11-26 10:15:03 +00:00
Shuhei Matsumoto
0619909689 bdev/ocssd: Use cached pointers geometry_cb() for readability
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iff1db8002258947eba1bd9a312edd6a8ab781a80
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5133
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: Jim Harris <james.r.harris@intel.com>
2020-11-26 10:15:03 +00:00
Changpeng Liu
26ae3d66d8 ioat: hide 2MiB boundary memory check in spdk_vtophys()
Change-Id: I8ad61e398f02fc5989450415424f58ea60423f85
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5178
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-25 17:15:13 +00:00
Changpeng Liu
e1aba43745 nvme: hide the 2MiB memory check in env API
spdk_vtophys() already checks that, so we don't need
to check it in the NVMe driver again.

Change-Id: I74288ae8cab80e1be34583475fa02a3ae13e090c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5166
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-25 08:52:51 +00:00
Jacek Kalwas
4793391448 env: move attach cb description where typedef is specified
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I148b4b1608b4287add0e7d3b88b676950d44a9a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5059
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-25 08:52:43 +00:00
Sochin Jiang
714a3bc3da lib/iscsi: unregister login timeout timer in right place
In commit 9eefbc, we've fixed an iscsi connection leak problem(
use telnet ${ip} ${port} to reproduce), that a connection without
login handshake will be left forever with 'invalid' state. Here,
to avoid killing normal connections by mistake, we need to unregister
login timeout timer in two right places:
1) immediately after login timeout happened
2) when we receive login pdu instead of login success(login may fail
because all kinds of reasons: ACL...)

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I55bbc1c6ac6d2e0b6545b9f7d802ba057b2a09dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5209
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-11-25 08:52:27 +00:00
Shuhei Matsumoto
0aeab1f13d bdev/nvme: Add nvme_bdev_ctrlr pointer to struct nvme_io_channel
When we support ANA multipath, I/O path will get nvme_bdev_ns from
nvme_bdev_ctrlr->namespaces, and nvme_bdev_ctrlr will be got from
nvme_io_channel.

Hence this patch adds a pointer to nvme_bdev_ctrlr to struct
nvme_io_channel.

As a side effect, nvme_io_channel->ctrlr is helpful to simplify
admin command submit functions, and do it in this patch.

For ocssd_bdev, we will do the similar change later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6976d1543ccda37dde4b81b2124d88f0d05ed7eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5055
Reviewed-by: Changpeng Liu <changpeng.liu@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>
2020-11-25 08:52:15 +00:00
Shuhei Matsumoto
54c4cd0000 bdev/nvme: Pass spdk_nvme_ns and spdk_nvme_qpair pointers directly to I/O submit functions
When we support ANA multipath, we will use spdk_nvme_ns and
spdk_nvme_qpair pointers for I/O submit functions after checking
ANA state of spdk_nvme_ns.

It will be efficient and easy to understand if we unify such check.
The next patch will provide a helper function to do such check.

This patch changes the parameters of I/O submit functions as a
preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic741caa1d7e6df844b875beea776e79d4eb8d6fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5204
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: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:52:15 +00:00
Shuhei Matsumoto
e979e1fd37 bdev/nvme: Add nvme_ch parameter to bdev_nvme_flush()
bdev_nvme_flush() just completes with success now and uses only
bio parameter now, but matching parameters with other similar I/O
APIs will be good for future enhancement and following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I64be668fa781396ef68b6b506b22cb153d7b6850
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5203
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: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:52:15 +00:00
Shuhei Matsumoto
1a8c6c4d4a bdev/nvme: Get dif_check_flags via bdev_io->bdev in I/O paths
Using bdev_io->bdev will be more straightforward than using
bdev_io->bdev->ctxt and &nbdev->disk.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie5854ab063b7b21710e9f899dd93340624a8cb49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5202
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: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:52:15 +00:00
Shuhei Matsumoto
3bf79d7c91 bdev/nvme: Use spdk_nvme_ns_get_ctrlr() for I/O passthrough
This changes follows the last patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I057a4e035e4010e5dd8ec8e7de78f91d562383cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5201
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: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:52:15 +00:00
Shuhei Matsumoto
8b26fdd5ea bdev/nvme: Use spdk_nvme_ns_get_max_io_xfer_size() for I/O passthrough
This and the next change will enable us to pass spdk_nvme_ns and
spdk_nvme_qpair as parameters to I/O passthrough APIs. When we support
ANA multipath, ANA state of spdk_nvme_ns will be checked. These changes
follow that.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id38a0e14501ff6402f9b151eaf9e44864079412b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5200
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: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:52:15 +00:00
Roman Penyaev
6490dbe4fe thread: don't output error in case of EAGAIN for interrupt mode
Keep silence if nothing to read from message queue.

Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
Change-Id: I6f3df6a58e708aa424fe2c6ebca509c44062d12c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5153
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-25 08:52:02 +00:00
Michal Berger
c0648d4b45 scripts/setup: Check if hugepage files are used before removal
If DPDK was not told to unlink the hugepage backing files during the
hugepage_init, the application will keep them open while holding a
lock on each file. Check if said lock is held, if not, remove the
file.

Change-Id: I738a3d7756c335b63388a2efeb03debd734d9c9e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:51:53 +00:00
Michal Berger
bcf9f8ffc4 scripts/setup: Allow to define number of hugepages per node
Change-Id: Ib3ff5ba285a5e7fc70bf2357e4f367b666bc3977
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5046
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-25 08:51:53 +00:00
Michal Berger
2b80955c09 scripts/setup: Refactor hugepages allocation for Linux
Main changes:

- By default, allocate all hugepages on node0. On NUMA-aware systems,
  processes will most often use default policy with local node as the
  preffered one for allocations. This usually is node0, thus splitting
  hugepages evenly across the nodes, in default setup, would force
  allocations from a remote node, impacting overall performance (in
  case hugepages on node0 run out). See 68740678e1 as a reference.

- Introduce HUGE_EVEN_ALLOC - force setup.sh to evenly distribute
  hugepages across all the nodes.

- Introduce HUGEPGSZ - overrides default page size

- Introduce CLEAR_HUGE - remove all hugepages on demand before
  allocation is performed.

- HUGENODE - this now can be a list of nodes to use. NRHUGE will be
  set across all the nodes from the list.

Change-Id: I084829edde3c416e7fc6b7b6abe369cc0631fcd7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5042
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-25 08:51:53 +00:00
Michal Berger
07e251ef42 scripts/setup: Redirect status headers to stderr
This is done so user can easily filter out parts of the output which
are not relevant for additional processing (greping, seding, etc.).

Change-Id: I67eafd1fbeb723224cca6b0026e149cb7f85bfe9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5152
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-25 08:51:53 +00:00
Michal Berger
7f34367592 scripts/setup: Sort and unify status output on Linux systems
This is done in order to improve the grepability of the output. Sort
is based on the BDF address.

Hugepages statistics are intact.

Change-Id: I121e9a46bfb1550380f233c1d5c06cefb9d4e7a9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5022
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-25 08:51:53 +00:00
Naresh Gottumukkala
0d98a94901 nvmf: Allow asynchronous nvmf transport destroy.
As part of FC transport destroy, FC LLD (Low level Driver) needs to
to do its cleanup which cannot be completed synchronously. So
allow transport destroy to be asynchronous.

FC transport code to use this functionality will be pushed shortly.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I104cf7d131e18199abdcf0651df261fe41d666ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5180
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-11-24 08:21:27 +00:00
Shuhei Matsumoto
d4ad1f9cc1 lib/iscsi: Add wait parameter to iscsi_create_portal_group RPC
Add an new optional parameter wait to the RPC, iscsi_create_portal_group
not to listen on portals until it is started explicitly.

Fixes the issue #1676.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic217f1ccceb618e70fdb2aff3f710d262a8a9bdb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5091
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: Changpeng Liu <changpeng.liu@intel.com>
2020-11-24 08:20:37 +00:00
Shuhei Matsumoto
024d286527 lib/iscsi: Add iscsi_start_portal_group RPC to start listening if not yet
Add an new RPC, iscsi_start_portal_group, to start listening on
portals if the specified portal group is not started yet.
The next patch will add an new parameter wait to the existing RPC,
iscsi_create_portal_group.

The RPC allows the specified portal group to be already started,
and returns a success response in this case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I631d6bccffb38092c95694f922f10648e24d6ff7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5090
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: Changpeng Liu <changpeng.liu@intel.com>
2020-11-24 08:20:37 +00:00
Shuhei Matsumoto
7ac4961b33 lib/iscsi: Factor out internal of rpc_iscsi_delete_portal_group
Factor out the internal of rpc_iscsi_delete_portal_group() into
a function _rpc_iscsi_change_portal_group() and rename the related
data structure to use them for the upcoming RPC,
iscsi_start_portal_group.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I965f1e52f04fb54c6a89987836f89c508441a37e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5089
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: Changpeng Liu <changpeng.liu@intel.com>
2020-11-24 08:20:37 +00:00
Shuhei Matsumoto
8381b98ef4 lib/iscsi: Add portal_group_resume() and add pause parameter to portal_group_open()
Add an new function iscsi_portal_group_resume() and add an new parameter
pause to iscsi_portal_group_open(). They will be used in the following
patches to pause listening portals while target nodes are created at
start-up because Windows hosts do not retry login.

Pausing and resuming portal group is possible because we can unlisten
temporarily by simply not calling accept(). Any inbound connection
requests are queued to the backlog and once the backlog queue is full,
further inbound connection requests are simply dropped. If we restart
calling accept(), we will dequeue the backlog and be ready for more
connecitons.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7403f91ebd729b47d98a23e589cba8b35569dc6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5088
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: Changpeng Liu <changpeng.liu@intel.com>
2020-11-24 08:20:37 +00:00
Michal Berger
602b134fa2 scripts/setup: List all devices which have active mountpoints
Change-Id: Ib8124e6e144b4f6524e87af1e9ab8b383afe978a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5171
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-23 09:37:22 +00:00
Michal Berger
eb32e8b2f1 scripts/setup: Return all block devices attached to a given controller
Each nvme BDF can have multiple namespaces, hence multiple block
devices, return them all.

Change-Id: I93fe8acf5b1904f05514445eb3e970ef4254caed
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5170
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2020-11-23 09:37:22 +00:00
Michal Berger
06058e9bdb scripts/setup: Revert back to using lsblk for mount checks
lsblk will include all the potential holders|virtual devices given
block device may be part of. This is relevant in case a nvme|virtio
device is part of the lvm|md setup.

Change-Id: I32198ddcf71746c3cbad4a96496a1762a5c201cd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5167
Community-CI: Mellanox Build Bot
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-23 09:37:22 +00:00
yidong0635
657e50a032 test/bdevperf: Replace code with existed function.
These codes are at the end of bdevperf_construct_jobs,
and they can be replaced by _bdevperf_construct_job_done.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I9bcae562a2a277f6131864ad2ea7b7f565135814
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5181
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-11-20 17:31:49 +00:00
Nick Connolly
b8c99a3aad lib: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.

Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.

Explicitly test for not __linux__ where that is the intent, rather
than testing for __FreeBSD__.

Cast pointer to uintptr_t before aligning it, rather than using
a specific integer size which may not be large enough to store a
pointer.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Icfe219e1bbb2d06b3ef05710fac5b7091d340251
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5142
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-11-20 11:01:37 +00:00
Nick Connolly
bb19c18f6a examples: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long.

Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifa558522437f4922b922abf17712173cb5ca1184
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5134
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-20 11:01:11 +00:00
Jin Yu
4c890c3160 virtio: add transitional virtio device support
SPDK virtio driver does not support the virtio legacy
device but it's ok for the modern and transitional
device. So update the probe function.

From the spec:
Transitional PCI Device ID Virtio Device
0x1000 network card
0x1001 block device
0x1002 memory ballooning (traditional)
0x1003 console
0x1004 SCSI host
0x1005 entropy source
0x1009 9P transport

Transitional Device: a device supporting both drivers conforming to
modern specification, and allowing legacy drivers.

Change-Id: I28cd277fb2b2e07a429082b7d7bd581f254eae9c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5053
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-20 11:00:53 +00:00
Ziye Yang
0bcaf050d7 nvmf/tcp: Remove the await_req list.
In my thought, this await_req will not have performance improvement,
and it makes the code more complicated, so remove it.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I97d86448fc273098d001a08d914ad45ddac07e16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5149
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-20 11:00:31 +00:00
Niklas Cassel
23a1916935 nvme: add function to get the max zone append data transfer size
The zone append command, which is part of the Zoned Namespace Command Set,
has a maximum data transfer size that can be less than or equal to mdts.

Since zone append commands will not be allowed to be split, the user has
to be able to get the maximum zone append data transfer size. Add a
function that returns this limit.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I9da2672ea8a307ff62251c069a42f7540765e08b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5140
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-20 11:00:18 +00:00
Niklas Cassel
38d59d8b5a nvme: add function to check if controller supports zone append
Zone append is an optional command in the Zoned Namespace Command Set.
Add a convenience function to check if the controller supports the zone
append command.

The ratified NVMe TP 4056 added a CSI field (in cdw14) to the Get Log Page
command. However, since there already exist two public functions to get a
log page (spdk_nvme_ctrlr_cmd_get_log_page() and
spdk_nvme_ctrlr_cmd_get_log_page_ext()), avoid creating a third one for
now, since nvme_ctrlr_get_zns_cmd_and_effects_log() itself can leverage
one of the existing public functions.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I99516dbac8db6714488b4d6cabe64c27f46d6153
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5078
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-11-20 11:00:18 +00:00
Niklas Cassel
35596d34b0 nvme: make enum spdk_nvme_ctrlr_flags more readable
Make enum spdk_nvme_ctrlr_flags more readable.
Other enums in spdk, e.g. enum accel_capability,
and enum NVME_RDMA_COMPLETION_FLAGS, already define
the enum values using bit shifts.

Do the same for enum spdk_nvme_ctrlr_flags.

No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ida7d7e4ff7f4cffce85cb2d6ea2bc0168875fdb8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5158
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-20 11:00:18 +00:00
Niklas Cassel
bd9db7f8c2 nvme: add missing param in doc for spdk_nvme_ctrlr_get_max_xfer_size()
Add missing param keyword in documentation for
spdk_nvme_ctrlr_get_max_xfer_size().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0e4242b41b50a12da5a79e6fef135e5f3046ac6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5139
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-20 11:00:18 +00:00
Niklas Cassel
efedaf17e8 nvme: remove superfluous parentheses
Remove superfluous parentheses around ctrlr->cdata.mdts.
They provide no value while making the code harder to read.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I4342d87f0e33fd92fe76357eb0379fb1e9c8f98f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5138
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-20 11:00:18 +00:00
David Marchand
2e9cd9d7b0 env_dpdk/pci: fix check on 20.11 EAL API change
RTE_DEV_ALLOWED is an enum and has no associated define, hence checking
for its presence will always be false.
We could test for RTE_DEV_WHITELISTED define, but this macro added for
deprecation warning will be dropped in the future.
Switch to a check on DPDK version.

Fixes: 10ed0eb755 ("env_dpdk/pci: adapt to 20.11 EAL changes")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Change-Id: I75270977b580065b36c753266cbaa5fb73f99eb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5165
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-19 14:24:04 +00:00
Nick Connolly
024179d8ee module: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.

Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0ec4c0cb5e7a8f4b94a1ee6272c8df9ee7f06aa6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5141
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-19 09:59:01 +00:00
Nick Connolly
b869772938 Include: Test for __linux__
Explicitly test for __linux__ which is clearly the intent and
matches the behaviour described in the comments.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I498476f4a214891b897609924e018c5b132afaf2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5143
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-19 09:53:21 +00:00
Nick Connolly
5c5a44f008 test: Use PRId64 for portability
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.

Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.

Add a cast when comparing an enum to an integer value.

Add an explicit uint64_t cast to the definition of BLOCK_CNT to prevent
value truncation.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I093cffe7e79bc04eba012f4ffaf33062a642d062
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5137
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-19 09:53:05 +00:00
Nick Connolly
3b461269d2 test/unit/lib/nvmf: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iab76fbdebb13a9fda652418a0d75148d24c62378
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5082
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-19 09:52:39 +00:00
Nick Connolly
e49d3c6612 test/unit/lib/ftl: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Added stubs for use when configured with pmem.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I8944b8aaa90f27102ae6b030bfab89898194e5a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5085
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-11-19 09:50:13 +00:00
Nick Connolly
afef2104a5 test/unit/lib/idxd: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Move include of idxd/idxd.c after definition of movdir64b so that mock
function is used.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I760755122a1d3ca96f12b00b0040ae15471beafa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5110
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-11-19 09:49:53 +00:00
Nick Connolly
43b185746f test/unit/lib/nvme: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I3960ecc572090348c2ccabfc907b7abee89ed97f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5083
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-19 09:49:41 +00:00
Nick Connolly
f686aa962c test/unit/lib/vhost: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ic291ba22cbee121b5c75b80910378b456a217189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5080
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-11-19 09:47:54 +00:00
Nick Connolly
c70d03f32a test/unit/lib/iscsi: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I63953b666e841942f51f9cc035c6a6521663079d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5084
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-11-19 09:47:26 +00:00
Nick Connolly
f4b818434b test/unit/lib/scsi: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0a8606f9ec1743f7ca430f68c90b59f5699155b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5081
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-11-19 09:47:06 +00:00
Nick Connolly
a414e7bbf6 test/unit/lib/sock: Add unit test stubs
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure can
be seen by removing 'LDFLAGS += -Wl,--gc-sections' in spdk.unittest.mk

Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.

Part of a set of independent changes which
Fixes #1613

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I7bafbd2b414e1502d54f317d7b671798d564732c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5079
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-11-19 09:46:52 +00:00
Shuhei Matsumoto
c626ada01d bdev/ocssd: Cache zone pointer from ocdev_io->io.zone and use it
Using ocdev_io->io.zone to update zone is a little confusing,
and so cache zone pointer from ocdev_io->io.zone and use it for
clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaee9b1fa8a86240022ddf5038a8c86b48476ba78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5148
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-11-19 09:45:40 +00:00
Shuhei Matsumoto
73d7353f79 bdev/ocssd: Separate write_cb() and append_cb()
This refactoring increases the code size slightly but improves
readability, and will make the following patches easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I704eca60fe98e4622e0d39d2e54ead63844156f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5147
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-11-19 09:45:40 +00:00
Shuhei Matsumoto
f9faa0743d bdev/ocssd: Factor out pushing and notifying media event in chunk_notification_cb()
This is to improve readability even if the factored functions are
used only in a single place.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa6c7ba4380124a957e66e31123e3743d83e7615
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5146
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-11-19 09:45:40 +00:00
Shuhei Matsumoto
ae3b179a53 bdev/ocssd: Factor out getting chunk info. offset from _get_zone_info()
Factor out getting chunk info. offset into a helper function
bdev_ocssd_to_chunk_info_offset() and locate it next to
bdev_ocssd_to_disk_lba(). This will improve readability a little.

Besides, cache addr_shift first in bdev_ocssd_translate_lba() for
clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4c078e2002638d90b000b97f9f7cda90938d02ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5132
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: Jim Harris <james.r.harris@intel.com>
2020-11-19 09:45:40 +00:00
Shuhei Matsumoto
74438fc588 bdev/ocssd: Extract common operation from from_disk_lba() and lba_in_range()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd6b2b76c80d7b12bffdff6f9684b6c8dc3e3ed5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5131
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: Jim Harris <james.r.harris@intel.com>
2020-11-19 09:45:40 +00:00
Shuhei Matsumoto
ddc03b4584 bdev/ocssd: Factor out internal of bdev_ocssd_num_parallel_units()
Factor out the internal of bdev_ocssd_num_parallel_units() into an
new inline helper function ocssd_range_num_parallel_units(), and
apply the latter into a few functions.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16550046ed2d6f543f66711810b30bd45f21c970
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5130
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-11-19 09:45:40 +00:00
Shuhei Matsumoto
f90c6378a5 bdev/ocssd: Clean-up three small helper functions for zone
Clean-up bdev_ocssd_num_zones(), bdev_ocssd_get_zone_by_lba(),
and bdev_ocssd_get_zone_by_slba() to make a little easier to read
and understand.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I13c92dc86dc3855f1ec9ab5ae9d7097607f20512
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5129
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-19 09:45:40 +00:00
Shuhei Matsumoto
729f7ec516 bdev/ocssd: Consolidate num_zones() calls in bdev_ocssd_init_zones()
Cache the return value of bdev_ocssd_num_zones() in bdev_ocssd_init_zones()
to improve readability.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If71b40221694e512617389da03720211744f3b5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5128
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-19 09:45:40 +00:00
Shuhei Matsumoto
7e4b8d79a4 bdev/ocssd: Adjust location of num_parallel_units() and num_zones()
Locating bdev_ocssd_num_parallel_units() and bdev_ocssd_num_zones()
closer to the related helper functions makes us a little easier to
understand the code.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0d96034bf26b2b1a39d879654ca2b30289349e4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5127
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-19 09:45:40 +00:00
Anil Veerabhadrappa
24f373c506 doc: Fix a typo in CHANGELOG.md
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I5a22f52158ddf81ebe87936efa3e29b9dd2de5be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5160
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-19 09:44:46 +00:00
Li Feng
002cfe9d3f vhost-scsi: fix hang when removing target
If the virtio-scsi controller doesn't support the 'eventq' and
'controlq' queue, the operation(vhost_scsi_controller_remove_target)
of removing target from this controller will always hang.

We can reproduce this by starting a qemu without a bootable guest os.

Change-Id: Ia53b48ae1a18cfb9dc919352fc3cce6ade84c9d8
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5151
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>
Community-CI: Mellanox Build Bot
2020-11-19 09:23:39 +00:00
Maciej Wawryk
348bd072df scripts/vagrant: Replace out of date fedora30 by new fedora33
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I4e72262a1d6bb9913e0443dd94eb628c48e322a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5111
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-11-19 09:21:09 +00:00
Michal Berger
252ba4dfa5 scripts/pkgdep: [liburing] Compile specific version
Change-Id: I7f74167f2553249bd73e5a30c5de4392783fa327
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5058
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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-11-19 09:20:04 +00:00
Niklas Cassel
d7345e08ae nvme: group NVME_CTRLR_STATE_WAIT_FOR_* states together
While I assume that the initial thought of having the
NVME_CTRLR_STATE_WAIT_FOR_* state directly after the state which it is
waiting for, was to make it clear for the reader in which order the
states will be executed.
However, it feels silly to have the same code copy pasted everywhere.

Someone who needs to add a new state will still need to edit
nvme_ctrlr_state_string() and enum nvme_ctrlr_state, which still defines
the NVME_CTRLR_STATE_WAIT_FOR_* state directly after the state which it
is waiting for.

In one way, moving the NVME_CTRLR_STATE_WAIT_FOR_* states to the end of
nvme_ctrlr_process_init(), when reading nvme_ctrlr_process_init(), it is
actually easier to see the ordering of the states which actually do
something of significance.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia95ea5ac3c44a53179edbdc65cba45bec94e469f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5115
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-18 11:28:11 +00:00
Naresh Gottumukkala
ccd96ead65 nvmf: Allow nvmf_transport_qpair_fini to complete asynchronously.
As part of nvmf_transport_qpair_fini, FC transport needs to cleanup
all the resources used by that QPair on the shared hardware. This
hardware cleanup is asynchronous in nature.

FC transport code to use this functionality will be pushed shortly.

Change-Id: I5606a33dff45971badd74e0cc087b132b56af076
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5100
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-11-18 11:28:02 +00:00
Maciej Wawryk
55de68f109 scripts/vagrant: Add ubuntu 20.04 into vagrant setup scripts
Fixes issue #1680.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6a7c1c2ba2f72c82cec10c7a46207ab528c22d2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5109
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-18 11:27:34 +00:00
paul luse
1924221192 lib/accel: change max batch size to match idxd batch max
0x10 is thought to be a more common size, hard to tell until
we get real silicon but either way 0x80 limited the total
number of outstanding batches way too much.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I61ba219b9d0185b126d300468ddd8a2214ed284a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4971
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-11-18 11:27:23 +00:00
Michal Berger
0f89273f81 test/vhost: Partition the VM drive more gracefully
Check at which sector location it's safe to start the test partition.
Also, make sure that the VM drive matches the size which is used for
creating the lvol.

Also, reorder pt sync with sleep - we should make sure that partprobe
is called after block subsystem was properly updated. Extend the sleep
time just to be more on a safe side.

Change-Id: I789c8842fb8d136bb1eec1f7793019b18297c864
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5035
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-11-18 11:27:16 +00:00
Michal Berger
feb6830021 test/vhost: Use basename of the vhost dir passed to vhost_kill
vhost_kill expects the argument to be the name|id of the vhost
instance, not the absolute path to its directory.

Change-Id: Ia41f49cdfdeaa97316cdc0d6e963fad2edd055f2
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5034
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-18 11:27:16 +00:00
David Marchand
10ed0eb755 env_dpdk/pci: adapt to 20.11 EAL changes
DPDK 20.11 renamed device and bus control enums [1].
This is a simple renaming, no change in semantics.

1: https://git.dpdk.org/dpdk/commit/?id=a65a34a85ebf

Signed-off-by: David Marchand <david.marchand@redhat.com>
Change-Id: Ia40bae750ad74f405eb700b47514fca021ffd052
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5116
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-17 14:51:59 +00:00
Weifeng Su
00a126bea8 lib/env_dpdk: Change the location of lock files from /tmp to /var/tmp
Move the lock files from '/tmp' to '/var/tmp' cause user maybe delete files in /tmp
or remount /tmp by mistake, And the JSON-RPC domain socket located in '/var/tmp' also.

Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: Shihao Sun <sunshihao@huawei.com>
Change-Id: I18d52f42462e8477fb35aeea9e38efc51610d17c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5096
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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-11-17 08:25:31 +00:00
Weifeng Su
5e01bdb41d lib/event: add assert check after call spdk_reactor_get
Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: Shihao Sun <sunshihao@huawei.com>
Change-Id: Ib2012fd57071c89743477eba26047f127e68ce4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5074
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-17 08:25:31 +00:00
Weifeng Su
ced16bcd35 lib/ftl: add assert check for ftl_wptr_from_band
Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: Shihao Sun <sunshihao@huawei.com>
Change-Id: Ibba5fcf368ad1fa09f5303135b0cd9bda9bade4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5073
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-17 08:25:31 +00:00
Weifeng Su
eacc9199fc lib/nvme: Add error handler for parse_event
Add handler for 'strstr, strrchr' function in 'NULL' return
that maybe cause memory access issue.

Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Signed-off-by: Shihao Sun <sunshihao@huawei.com>
Change-Id: I2525fbcd9f8ce0a78383305c735b2d27575f4bfe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5071
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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-11-17 08:25:31 +00:00
yidong0635
d73077b84a lib/jsonrpc: Add a new API to send response for writing bool result.
There are many duplicated codes about sending response for writing bool result.
That we need a function to do this.
Then we can reduce many codes.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic439111b1e9ca1013f8c657ab925f0c27a7be699
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5033
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 15:08:47 +00:00
Shuhei Matsumoto
fd798f8f9e bdev/nvme: Refactor dump_info_json() to clarify querying NVMe driver
Following a previous patch, cache pointers to spdk_nvme_ctrlr and
spdk_nvme_ns in bdev_nvme_dump_info_json().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I769d112f815e29262d52faee5ec17ccb914a7154
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5104
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-11-16 12:26:35 +00:00
Shuhei Matsumoto
b470ed628d bdev/nvme: Get the connected trid from NVMe driver in dump_info_json()
bdev_nvme_failover() updates trid of spdk_nvme_ctrlr using
spdk_nvme_ctrlr_set_trid(). Hence trid of spdk_nvme_ctrlr is always
up-to-date.

Hence bdev_nvme_dump_info_json() can query trid simply by calling
spdk_nvme_ctrlr_get_transport_id(). The queried trid is a const
parameter.  Hence add const to nvme_bdev_dump_trid_json().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id04881f9e7596b910bdf26c4f14f1ebcb3cdbbee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5103
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-16 12:26:35 +00:00
Shuhei Matsumoto
1388d02447 bdev/nvme: Refactor io_type_supported to clarify querying NVMe driver
bdev_nvme_io_type_supported() queries NVMe driver to return if the
specified IO type is supported. To clarify it, cache pointers to
struct spdk_nvme_ctrlr and spdk_nvme_ns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0956506e720722216e03cb808f61737ada617329
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
974daa68a6 bdev/nvme: Factor out creating NVMe bdev in nvme_ctrlr_populate_standard_namespace()
In the following patches, nvme_bdev_subsystem will be added and nvme_bdev_ns
will be added to not nvme_bdev but nvme_bdev_subsystem.

To do it easier, factor out creating an NVMe bdev into an new helper
function nvme_bdev_create().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa902912ba1ea979153b04ef4ac9fae10c09b7e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5018
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
744414c087 bdev/nvme: Pass nvme_ch to bdev_nvme_reset() to queue I/O easily
bdev_nvme_reset() has been called only by a single caller now.
Hence pass nvme_ch to bdev_nvme_reset() to queue I/O easily.

This will improve readability and clarify the logic.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idc22cb499fcf8455a2b04d44688f999344abc352
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4992
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
a563df3b83 bdev/nvme: Factor out the common opeartion of bdev_nvme_reset()
Factor out the common operation between internal calls and bdev I/O
calls of bdev_nvme_reset() into an new helper function
_bdev_nvme_reset().

This is to improve readability and to clean-up the operation only
for bdev I/O calls in the next patch.

Replace bdev_nvme_reset() by _bdev_nvme_reset() for internal calls.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7580a8fb40d5a1d694d5f913cde770ca95a0b0c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4991
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
b14c7cd8f2 bdev/nvme: Rename _bdev_nvme_reset to _bdev_nvme_reset_ctrlr
_bdev_nvme_reset_ctrlr will figure out what it really does.
_bdev_nvme_reset will be used by an new helper function in the
next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I890f962529a663ea412bcd416ef9ba31fadfbf61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4990
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
460bd99a28 bdev/nvme: Consolidate error paths of _bdev_nvme_reset_create_qpairs_done()
Clarify the operation done in the error paths for readability.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icb8a1a7c569e88d474737d0449c8eef73759a633
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4989
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
4e8f5d39ec bdev/nvme: Fix bdev_nvme_delete() to call ctrlr_get_by_name() and set destruct to true in a lock
bdev_nvme_delete() had called nvme_bdev_ctrlr_get_by_name() and
then called remove_cb(). But nvme_bdev_ctrlr_get_by_name() had not
been guarded by lock and remove_cb() parsed the list again by using
spdk_nvme_ctrlr as a key.

These were not safe and efficient.

This patch refines bdev_nvme_delete() to inline remove_cb() into
it and acquire mutex before calling nvme_bdev_ctrlr_get_by_name().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf39859809efa6f22899353c53b7b1eef58aa470
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4842
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
edbb7ace72 bdev/nvme: Include path removal into bdev_nvme_failover()
Add the second parameter remove and include path removal into
bdev_nvme_failover(). Additionally, bdev_nvme_failover() returns
only two return values, 0 or -EAGAIN, and hence change
bdev_nvme_remove_trid() to return the return value of
bdev_nvme_failover() directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife560f886e32ecec23691e01e87069502e27cc0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4867
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
b0100cef46 bdev/nvme: Extract failover case from bdev_nvme_reset() into bdev_nvme_failover()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib0517ed5bcf9ee5741f7a4d7106e2bc0ba7c36cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4866
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
f1fb19e332 bdev/nvme: Fix the race condition between destruct and reset controller
nvme_bdev_ctrlr_destruct() had checked first if poller is already
registered. On the other hand, nvme_bdev_ctrlr_destruct() had been
used as a poller function.

Hence nvme_bdev_ctrlr_destruct() had no way to unregister poller
if destruct and reset controller were raced.

This patch fixes the issue. The previous patch ensures nvme_bdev_ctrlr_destruct()
is called only once.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iba5424c42a4a3e5f03575df2616ec2a817e38f51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4827
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
0939c07505 ut/bdev_ocssd: Clean up controller destruction
Previously local boolean variable empty was used to destruct a
controller in delete_nvme_bdev_controller(). However, it was hard
to understand and did not work well with refactoring.

Using reference count is more sophisticated and works well, and hence
done in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I59d0552c16653495fa55e9bfe4a2c0a316a204c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4355
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
01f769c62a bdev/nvme: Ensure ctrlr->destruct is set only once
Checking if destruct is false and setting destruct to true are
separated by mutex in remove_cb() and bdev_nvme_library_fini().

It was possible that multiple threads called nvme_bdev_ctrlr_destruct()
because the caller could call nvme_bdev_ctrlr_destruct() before
setting destruct to true after knowing it was false.

This patch ensures that nvme_bdev_ctrlr_destruct() is called only once.

Set ctrlr->destruct to true without releasing mutex after checking
if ctrlr->destruct is false.

If destruct is set to true before calling nvme_ctrlr_depopulate_namespaces(),
nvme_ctrlr_depopulate_namespace_done() may call nvme_bdev_ctrlr_destruct()
because it is likely that reference count is zero and destruct is true.
In this case, remove_cb() or bdev_nvme_library_fini() cannot call
nvme_bdev_destruct() after returning from nvme_ctrlr_depopulate_namespaces().

On the other hand, if a controller has no namespace,
nvme_ctrlr_depopulate_namespaces() does nothing and
nvme_ctrlr_depopulate_namespace_done() is not called. Hence
remove_cb() or bdev_nvme_library_fini() has to call nvme_bdev_destruct()
after returning nvme_ctrlr_depopulate_namespaces().

To unify both cases, initialize reference count to one as a sentinel value
and remove_cb() and bdev_nvme_library_fini() decrement reference count
and then calls nvme_bdev_ctrlr_destruct() if reference count is zero
after returning from nvme_ctrlr_depopulate_namespaces().

Additionally, add assert to check if reference count is not negative
to find bug in future.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a617b5aa4d0a9faff832e63c2ed4b353341dd6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4817
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
844e6bfa8c bdev/nvme: Add subnqn of controller to bdev_nvme_dump_info_json()
subnqn will be used to manage subsystem, and so add it to the output
of bdev_nvme_dump_info_json().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id28023754fa19d14aa9297f4e6676d235f024e0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4974
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
93a91be642 bdev/nvme: Factor out common operation of create_cb() and reset_create_qpair()
To improve readability and make the following patches easier,
factor out the common operation of bdev_nvme_create_cb() and
_bdev_nvme_reset_create_qpair() into bdev_nvme_create_qpair(),
and factor out the main operation of bdev_nvme_destroy_cb()
into bdev_nvme_destroy_qpair(). bdev_nvme_destroy_qpair() is used
in the error path of bdev_nvme_create_qpair().

Updating g_opts.io_queue_requests again is no harm and so is done
in bdev_nvme_create_qpair().

Use the term nvme_ch in bdev_nvme_create_cb() and bdev_nvme_destroy_cb()
for clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie0a4251023037958d122fbb5d7ee72d42238b3ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4981
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-16 12:23:04 +00:00
Shuhei Matsumoto
0768aa10e3 bdev/nvme: Rename ch by nvme_ch of create_cb() and destroy_cb()
This change will make the next patch smaller and its review easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2784fa74dce98676958180bbf80a9a4f938454db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5101
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-16 12:23:04 +00:00
Jiewei Ke
012bd3b942 lib/nvmf: Notify ANA change when namespace change happens
When ANA is enabled, if a new namespace is hot-added to the subsystem on
the target side, the Linux host will expect to receive an ANA change
notification after the namespace change one. Without the knowledge of
the namespace's ANA state, the host will not register the associated
block device, so users cannot see the nvme device.

In this patch, ANA change is notified right after namespace change, so
host will get ANA log, update the namespace's ANA state and then
register the block device if it is alive.

Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I2faf61d344eb6de7efb2fde3cb1013cf0efd3c2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5097
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-16 12:22:50 +00:00
Liu Xiaodong
b7f7bbd16b sock/uring: reap if some sock has data in pipe
Since spdk_sock_group_poll should do level trigger to
the callback func registered in spdk_sock_group_add_sock,
if there is data in pipe, but not event occurs, poll func
should still reap sock who has data in pipe.

Change-Id: If3a983f80fd04708e45ad0398c7d34018ec52bc7
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5072
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-11-16 12:22:43 +00:00
Karol Latecki
cc5ade1bfc autobuild.sh: print git log when builiding external dpdk
Having a brief gitlog of build external DPDK makes it
easier to track what has changed in case of failures
detected in CI.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I549405b017c38bb5706d64a00022a2521d950a3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-16 12:22:31 +00:00
Jim Harris
a2be549268 CHANGELOG: fix path of default JSON-RPC domain socket
The original entry was wrong - the path has always been
/var/tmp/spdk.sock.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I24febd74c5eac31b1c56f2e053636660a641fbc0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5087
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-11-13 15:00:45 +00:00
Anil Veerabhadrappa
65b5866e0e nvmf/fc: optimize code to access structure members only when needed
Reference the struct members only when it is necessary.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I44208dfde20f74ab96e494445a464bf45f7ab408
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5070
Community-CI: Broadcom CI
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-13 14:11:50 +00:00
sunshihao520
33e1f4b0e2 lib/thread: return NULL when id is invalid before search form tailq
When call spdk_thread_get_by_id function to use thread->id to get thread point, if the id value is invaild, just return NULL before search from g_threads tailq.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Ic6c35d2c2b5093c9b513618742b8b9835599ba63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5031
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-13 14:10:37 +00:00
Ziye Yang
57833a5dff iscsi: fix the warning issue in tgt_node.c reported by vagrant.
The allocated size of buf is too large,i.e., 4096. And we will
have host to be assigned with buf, host = buf. But the tmp_buf (destination)
buffer is not so big. So restrict the buf size and make the vagrant happy.

The max size of conn->target_addr is MAX_TARGET_ADDR, so add additional 2 is enough
according the format to print.

The warning is:

/home/vagrant/spdk_repo/spdk/lib/iscsi/tgt_node.c:377:47: warning: ‘%s’ directive output may be
truncated writing up to 4095 bytes into a region of size 301 [-Wformat-truncation=]
00:03:02.381    377 |     snprintf(tmp_buf, len + 1, "TargetAddress=%s:%s,%d", host, p->port, pg->tag);

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ib64e7140d5e14909d2a86dd2d47413abe5cd027e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5092
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-11-13 14:05:05 +00:00
Naresh Gottumukkala
7b0f650cff nvmf/fc: Remove dead code in FC transport.
Remove linkbreak related code that is not being used anywhere.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I8ab2a8337fd5615bdb75744a7abcd28ec3d41f2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4977
Community-CI: Broadcom CI
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-13 05:29:56 +00:00
Jim Harris
39c31e6c0c test/external_code: make clean before starting tests
This test script is based around only a strict
subset of the SPDK configuration options.  If we don't
clean before building, we could still have libraries
in build/lib from previous tests that the external_code
Makefiles do not account for when linking libspdk.so,
which will include *all* libraries in build/lib.

Fixes issue #1662.
Fixes issue #1665.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I525ea1740313048fc44f26b5b0db9ab38161725e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4970
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2020-11-13 05:29:38 +00:00
Jim Harris
1b56233c0c build: add SPDK_NO_LIB_DEPS to build libraries w/o dependencies
Our check_so_deps.sh test script removes the spdk.lib_deps.mk
include from spdk.lib.mk so that we can check which symbols
the libraries depend on.  But modifying the code like this
is a bit kludgy.  So instead add a Makefile variable that
check_so_deps.sh can set to get the same behavior.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5622f4c3adb2d5ccd5ae33cb4cd116716134a9b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4512
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2020-11-13 05:29:38 +00:00
sunshihao520
bf13dc4801 bdev/rpc: use goto to make code reuse.
delte duplicate code and use goto to make code reuse.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: Ib5eae0d31699fa7e3a0e6147b1572d383208df0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5052
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-11-11 01:02:31 +00:00
sunshihao520
d2a0706982 lib/conf: check pointer return value when use calloc
add return value check when use calloc to create spdk_conf_section struct.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: linfeilong <linfeilong@huawei.com>
Signed-off-by: liuzhqiang <liuzhiqiang26@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: Iab89491b7c6942337fa7b1ab765e7bb509c1e92b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5051
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-11-11 01:02:31 +00:00
sunshihao520
be979ad11e app/spdk_top: check NULL pointer after use newwin or new_panel
When use newwin or new_panel function, the return value maybe NULL. Check the return value before use it will be more safe.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: linfeilong <linfeilong@huawei.com>
Signed-off-by: liuzhqiang <liuzhiqiang26@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: Ifef8ed91b778cc4577cec1834f6596c58643e5c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5050
Reviewed-by: Changpeng Liu <changpeng.liu@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-11 01:02:31 +00:00
Maciej Wawryk
1d03a9baf4 scripts/vagrant: Remove unused vhost stuff
We don't use this script to create qcow2 images for our tests in CI.
Also this script is using random vagrant box images, and we don't know
what is inside them.
Script maintenance is a tedious affair because fedora boxes use xfs file
system, and we can not shrink them virtual disk to minimal size, and this
will caused fails in tests in future.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I7b35f16bbfd6135377995f7b20e1402d14b2b1b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4738
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-11 00:55:33 +00:00
Jin Yu
30f9feca2a test: add md_buf unit test in splitting test
Change-Id: I83010cdc7af49a29e516bcd351d67154307756ad
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4884
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-11-11 00:55:08 +00:00
Madhu Adav MJ
fce9428772 nvmf: Async event support for discovery log change
Added asynchronous event notices for discovery log change
as per nvme fabrics spec 1.1. This allows a host with persistent
connection to discovery controller to automatically connect to any
new subsystem available to the host automatically.

According to nvme fabrics spec 1.1, if the connect command specifies a
non-zero keep alive timer value and the discovery controller does not
support asynchronous events then we need to return Connect Invalid.
Since SPDK does not implement this check instead added support
for asynchronous events in discovery controller.

Change-Id: I4cade5f7d24826ce97a2fa2b4ca688a1d728c1db
Signed-off-by: Madhu Adav MJ <madhu.adav@flipkart.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-11-11 00:53:57 +00:00
Ziye Yang
abb6823d5d iscsi: Add the support for long text response.
This patch adds the support for long text response.

Change-Id: I8ef146069c9b8d86eb6df4c9e60cc6a3b2ff1ad7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4993
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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-11-11 00:53:52 +00:00
Jim Harris
0e47be4b41 nvme: add nqn prefix to hostnqn
Section 7.9 of the NVMe spec says that all nqns must
start with "nqn.".

Fixes issue #1669.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7fd0e6a0a397e831c4fa2377126b6b1e1b127d88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5017
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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-11-06 08:11:54 +00:00
Shuhei Matsumoto
db853f0510 bdev/nvme: Consolidate nvme_ctrlr_populate_namespace_done() calls
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1190740d949eba78e1b9f8915a5b044d0cec1d9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-11-06 08:11:50 +00:00
Shuhei Matsumoto
4a9d0af5a8 bdev/nvme: Register nvme_bdev_ctrlr to the argument of the timeout callback
This change removes the necessity to get nvme_bdev_ctrlr by calling
nvme_bdev_ctrlr_get_by_name() and simplifies the code.

bdev_nvme_reset() checks if nvme_bdev_ctrlr->destruct is false first.

Hence we will not degrade stability.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7a3baab666644c3063af404905284c3e16bc62ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4843
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-11-06 08:11:50 +00:00
Rafal Stefanowski
ebd8ef4bc5 bdev/ocf: Fix metadata updater call
OCF metadata updater is handling all the requests at once and when
it finishes the cache can deinitialize, so in the rare circumstances
when the thread is not aware of cache not existing any more, there
is another metadata kick request and check for the random pointer
is performed instead of expected cache.
The solution is to increase/decrease cache ref count prior sending
a message to a thread and after metadata has been updated.

Fixes #1533

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I77d2ae400110fcb4d491350e5fec334245f4bb90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5030
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-06 08:11:19 +00:00
Liu Xiaodong
b3a8025d1e hello_sock: print new line after print usage
Change-Id: I25b82d80b5f622c346df0577eac274b4b50a30a1
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4883
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-06 08:11:12 +00:00
sunshihao520
4237d2d8cb lib/thead: print error log when create mempool or ring failed
Add debug information when call spdk_mempool_create or spdk_ring_create to create resource for spdk failed.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: I0bd99ba473c8cb6f68045e3009db50cf2e392dd3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5019
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-05 09:41:06 +00:00
sunshihao520
686401ebf2 lib/thead: add information when poller isn't free
When call _free_thread in the exit process, print poller type information to identify which type poller is not free.
Even if the fuction spdk_poller_register_named called, we don't konw what type the poller is.

Signed-off-by: sunshihao <sunshihao@huawei.com>
Signed-off-by: suweifeng <suweifeng1@huawei.com>
Change-Id: I43f8d51b08a01169d418e6a6a46266887f9a85dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-05 09:41:06 +00:00
Ben Walker
7dbe9cfa0f bdev/nvme: When detecing multipath, only compare active namespaces
Calling spdk_nvme_ns_get_data(ns) on an inactive namespace will crash.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib8cfa84e785a4a04dc3b1826c700a22eeec51e3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5013
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-11-05 09:40:33 +00:00
Jim Harris
e7cbcec38e app_ut: add stubs required w/ clang build
clang-9 is a bit more onerous on stubs required in
the unit test file.  app_ut specifically needs
spdk_reactors_init and spdk_reactors_fini added.

Fixes issue #1613.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa219829e933405ddb662f5b991204ef05b3bd75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5016
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-05 09:38:48 +00:00
jiaqizho
384be89f7f nvmf : fix custom trtype no right in nvmf_tgt_write_config_json
When user used CUSTOM transport, follow this step can reproduce:
1. run ./nvmf_tgt
2. ./rpc.py nvmf_create_transport -t ABC (ABC is the transport name)
3. ./rpc.py save_config >> config.json

Then in config.json :
{
	"subsystem": "nvmf",
	...
	"config": [
	{
          "method": "nvmf_create_transport",
          "params": {
            "trtype": "CUSTOM",
	    ...
	  }
	]
}

trtype should be ABC , because nvmf_create_transport need pass
the transport name to create transport.

Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: Iaf24837b649a1736568902f898d48135dac0882d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4973
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-05 09:38:27 +00:00
Jin Yu
1b5a65a73d bdev: fix md_buf split issue
For each child IO, when md is separate.
data_buf_addr = parent_data_base + offset * data_block_size;
md_buf_addr = parent_md_base + offset * md_size;

Change-Id: I92f9a04baa4d90ba55338591007b148e2bae545c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4844
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-11-05 09:38:11 +00:00
Tomasz Zawadzki
ae2a100fc8 test/ocf: remove unused nvme_cfg() function
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f002721e0245fcc4c206084d48b84917c164924
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4803
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-11-05 09:37:55 +00:00
Michal Berger
ed3cd2b927 pkgdep/git: [qemu] Ignore address-of-packed-member errors
Also, disable docs building since it fails on newer GCCs (>=10).
Last but not least, move all the -Wno-error flags to a separate
array to make code a bit clearer.

Change-Id: Ieb6d30778140c745a8c9f0ccd83bf4acd3a0acd5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5004
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-11-04 16:42:45 +00:00
Michal Berger
dbd140b20b test/common: Check NASM version from within get_config_params()
This is done to avoid conflicting parameters being passed to
./configure via get_config_params(). Originally, if all previous
conditions were met, get_config_params() would return "--with-reduce"
in the string. ./configure would lookup the NASM version on its own
and disable the --with-reduce and --with-isal parameters. However,
--with-reduce would be set again by ./configure while looking up
the cmdline. This would end up with --with-reduce and --without-isal
being set together, failing the configuration.

Change-Id: I81fa1dfd4bc5b41b82525e911b1c75fc7e15fd14
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5003
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-11-04 16:42:45 +00:00
Michal Berger
86eadb4d7c scripts/common: Change name of the cmp() function
It could potentially  override cmp binary, causing failures in some
of the tests.

Change-Id: Ia0bd88222c60e5b8a13d3809a6213b457b887b41
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5005
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-11-04 15:27:28 +00:00
Jim Harris
42ec403b6a test: add some missing stubs
This fixes link issues with clang on some systems.

Fixes another part of issue #1613.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icd51351b8e38043f267918b85e8ed1c3daab2db7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4860
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-02 11:23:21 +00:00
Jim Harris
c94c546e00 build: force shared library dependencies
We use some implicit depdendencies in our subsystem
libraries.  With at least some linkers, these
dependencies are not written into the shared library
file if there is no actual symbol dependency found.
So use --no-as-needed to ensure the dependencies
stick.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idb476efb50b00ff04f5640b4e5a1362a1f096fa7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4796
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-11-02 11:23:21 +00:00
Liu Xiaodong
5568355eb0 vhost-blk: apply interrupt
If interrupt mode is set, related poller functions will be
registered to interrupt handler instead of poller.
interrupt_tgt can work as vhost-blk target to support VM.

Change-Id: I3a15f9a63532f44fe0d2f0cb69b0efdd72431d10
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4277
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-11-02 11:22:40 +00:00
Jacek Kalwas
7229b8e1c6 env: update description for enumerate function
During enumeration all registered pci devices with exposed access to
userspace are getting probed internally unless not explicitly specified
on denylist. Because of that it becomes not possible to either use such
devices with another application or unbind the driver (e.g. vfio).

Change-Id: I9e84ed1d5dc82db75adcb18936cb6d702ee74d78
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4962
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-02 11:19:43 +00:00
Ziye Yang
4192b16aa8 nvme/perf: Add the feature to test the allowed pci_list feature.
This patch is used to test the allowed pci list feature.
The reason we add in perf because NVMe Device is the typical
pci device. And we also want to make sure it works.

Change-Id: Ic98ddcfecb162ffb74c9bdf3bc9e702633ddd3e2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3246
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-11-02 11:18:54 +00:00
Niklas Cassel
96c14b3838 examples/nvme_fio_plugin: remove duplicated max transfer function
There is no need for an additional function to calculate the max transfer
size based on mdts.

nvme_ctrlr_identify_done() already initializes ctrlr->max_xfer_size
based on mdts, and spdk_nvme_ns_get_max_io_xfer_size() simply returns
ns->ctrlr->max_xfer_size.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I747ff8ac9767eababffc3c7e0b6846029a98b826
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4985
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Simon A. F. Lund <simon.lund@samsung.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-11-02 11:18:07 +00:00
John Kariuki
7c27b615d3 doc/nvmf: fix broken link
Change-Id: If016dad97eaf099933fde4e67c6ae66f034f75d1
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4980
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-11-02 11:16:57 +00:00
paul luse
cbd8036eba lib/nbd: fix minor grammar issue in comments/prints
"in using" --> "in use"

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id3853a26f87e4fe25704b6fbb337f1144db27335
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4983
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-11-02 11:16:48 +00:00
Karol Latecki
097e6e16b9 nvme/hotplug.sh: Copy external DPDK libs into test VM
Need to select proper path for passing libs into the VM
in case we're building with custom DPDK.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I97d301c70adee31b727c6b6673eadac3cbde9817
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4975
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>
2020-10-30 16:13:59 +00:00
Alexey Marchuk
9b19abae3c sock/posix: Disable zcopy send by default
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I4825c681d742946dfcf5bdc209356194766a15cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4978
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-10-30 14:51:34 +00:00
Alexey Marchuk
d296fcd8d9 nvme_tcp: Fix icreq/icresp handing with zcopy enabled.
There is a problem with TCP zcopy enabled:
1. TCP initiator sends icreq and start polling a qpair. Polling of qpair
actively calls nvme_tcp_read_pdu function
2. nvme_tcp_read_pdu: qpair is in NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_CH state,
it reads 8 bytes of common PDU header. It determines the type of the PDU
and finds the size of PDU_PSH header.
3. nvme_tcp_read_pdu: qpair is in NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PSH state.
It should read 120 bytes of icresp PDU. The number of bytes which needs to be
read is pdu->psh_len - pdu->psh_valid_bytes. qpair receives 120 bytes
(the full PDU) and calls nvme_tcp_pdu_psh_handle -> nvme_tcp_icresp_handle.
Here we check that we haven't yet received buffer reclaim notification and
simply return from this function. At the same time we continue to poll the qpair.
4. nvme_tcp_read_pdu: qpair is in NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_PSH state
and tries to read data from a socket again. The number of bytes is
pdu->psh_len - pdu->psh_valid_bytes. But now pdu->psh_len == pdu->psh_valid_bytes,
so we call nvme_tcp_read_data with zero length.
readv with zero length is commonly used to check errors on the socket,
but in our case there is no errors and readv returns 0.
5. nvme_tcp_read_data treats zero as error and return NVME_TCP_CONNECTION_FATAL.

Fix is to handle icresp, but leave qpair in INITIALIZING state until
we receive acknowledgement for icreqsend_ack. We also move qpair to
NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_READY recv_state so recv_pdu
will be zerofied and qpair will try to read a common PDU header.
But since it is not initialized yet, it won't receive anything
from the target.

Fixes issue #1633

Change-Id: I22cedefe530a8ac3b51495988ed6265d8fad15bb
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4969
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-30 09:05:35 +00:00
Simon A. F. Lund
f875da4019 examples/nvme_fio_plugin: update ZNS section of README
Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I99c82490811314201b53dde59e586538835e0840
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4950
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-29 22:15:40 +00:00
Simon A. F. Lund
aae84b1f0e examples/nvme_fio_plugin: add plugin-option 'initial_zone_reset'
Added plugin-option 'initial_zone_reset', providing the option to reset
all zones on all namespaces with the Zoned Command Set enabled upon
initialization.
The default is not to reset. The option is exposed even when the ZBD
plumbing is not available. However, it will then inform the user that
ZBD/ZNS is not supported instead of resetting.

The plugin-option provides a short-term solution to an observed issue
with consecutive invocations of fio exhausting maximum-active-resources.
A longer-term solution would be to add a 'max_active_zones' limit in fio
and ensure that fio does not exceed that limit.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I65341c028a97657370b315fb298bf97651b9bffd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4949
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: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-29 22:15:40 +00:00
Simon A. F. Lund
528ad3b3cf examples/nvme_fio_plugin: move completion-helpers
Preparation patch for the addition of the 'initial_zone_reset' plugin-option.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I768fc207b74cfa2a516009e10fc2a4646d06ba72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4948
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-29 22:15:40 +00:00
Jim Harris
f896aa6f10 env_dpdk: add rte_rcu library dependency
rte_hash depends on rte_rcu starting in upcoming
DPDK 20.11 release.  rte_rcu was only added in
DPDK 19.05 release, so we need to check if it
exists before linking it.

Fixes issue #1661.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7e343c6f964b03cc62484b57803a3bad00f80288
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4947
Community-CI: Mellanox Build Bot
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-10-29 10:39:05 +00:00
Jim Harris
f2196fcafb dpdk: move submodule to build rte_rcu library
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie38573774612ac7ec7cf23367d3233124acd1a66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4953
Community-CI: Mellanox Build Bot
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-10-29 10:39:05 +00:00
Jim Harris
d792356a5a test/external_code: use variable to hold DPDK lib list
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie4a489926695cc56125f0e18796071f7730190f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4946
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-29 10:39:05 +00:00
Maciej Szwed
67109ff88b changelog: Add information regarding scheduler implementation
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id389ffb2c6091add92fb2849fac21a0472c8a404
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4857
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-10-29 08:11:44 +00:00
Michael Haeuptle
7fc48a5ffc nvme: break completion loop when ctrlr is invalid
This fixes #1423 where the completion loop never
breaks when the NVMe ctrlr is no longer present.
This condition can happen during a hot remove.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: Ia238c8aeae720832068de28ce4d34a9d233344fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4831
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: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-29 08:11:35 +00:00
Jim Harris
ddf86600bb nvme: continue probing ctrlrs even if one fails
It is possible that a single probe_ctx could be used
to probe multiple newly attached nvme controllers.  If
one of those controllers is removed during this process,
the rest of the controllers do not get probed and can
even get stuck in a zombie state.

It is better to just continue with probing the rest of
the controllers.

Fixes issue #1611.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4945
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-29 08:11:17 +00:00
Michael Haeuptle
4409007906 nvmf: Fixes double triggering of association timer
Fixes issue #1635.

Under rare circumstances, the CC.en and CC.shn are both set
which then results in setting the association timer twice.
This scenario was observed during hot plug testing when the
initiator tries to reset the subsystem that contains the
removed device.
The end result is that when the ctrlr is destructed, then
one of the timers can still fire and access freed memory.

Change-Id: Ie5880ab325a28f19361f73712bdeb5b58894ee68
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4935
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-29 08:11:12 +00:00
Maciej Wawryk
c4c37f1cf1 Modifications for using universal qcow2 image in tests
We want to replace few qcow2 images with one universal.
This commit contains:
 - change password in autotest.sh
 - change image path
 - change image name
 - use snapshot mode in hotplug.sh instead of copying base image

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I75c457fe75f005b0ab43ca909be7886529ed115b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4551
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-28 15:07:56 +00:00
Niklas Cassel
1e83b640aa examples/nvme_fio_plugin: fix zone reporting
All zone management receive helper functions (including
spdk_nvme_zns_report_zones()) are implemented to match the parameters of
the zone management receive function in the ZNS specification.

The documentation for spdk_nvme_zns_report_zones() states:
"param partial_report If true, nr_zones field in the zone report indicates
the number of zone descriptors that were successfully written to the zone
report. If false, nr_zones field in the zone report indicates the number
of zone descriptors that match the report_opts criteria."
This matches the description of the "Partial Report" bit in the ZNS spec.

Since the FIO function parse_zone_info() calls the io_ops->report_zones()
function multiple times, until all zones have been reported, it expects
the return from this function to represent the number of zones that were
successfully reported.

By setting the partial_report bit to false, the controller will return
the total number of zones, and since spdk_fio_report_zones() loops until
idx < report->nr_zones, and writes to zbdz[idx], the current code will
overwrite heap memory, since idx will take on index values that are out
of bounds for the memory allocated by the FIO function parse_zone_info().

Therefore, spdk_fio_report_zones() has to set the partial_report bit to
true when calling the NVMe level function spdk_nvme_zns_report_zones().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8846711bfed4faadac0315b450158293cefa36f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4871
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Simon A. F. Lund <simon.lund@samsung.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-28 15:07:37 +00:00
Niklas Cassel
00d197dba2 examples/nvme/identify: print ZNS data structures if supported
Print the Zoned Namespace Command Set Specific data structures,
if the namespace/controller supports them.

spdk_nvme_zns_ctrlr_get_data() returns NULL for a controller
that does not support the ZNS specific controller data struct.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0acd2695976fc598b61591989f612db35ac821db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4839
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-10-28 15:07:10 +00:00
Simon A. F. Lund
414500c9eb examples/nvme_fio_plugin: fix log-msgs. in report_zones() and reset_wp()
In spdk_fio_report_zones(), log_err did not prefix messages with
"spdk/nvme", making it hard to determine who dumped the error-message.
In spdk_fio_reset_wp() log_err described the wrong function.

This change fixes the above.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I41df6d451e88942806c8b5a3cf9a0902d98cb186
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-28 15:06:44 +00:00
Simon A. F. Lund
12a44d4745 examples/nvme_fio_plugin: fix reset_wp()
When _reset_wp() received a range to reset, then the loop kept resetting
the first zone in the range.
Also, the processing of command-completion were re-using the same
'completion' state, thus a previous completion would short-circuit
command-completion such that it would never be processed.

This change fixes that.

Also, the reset-loop assumes that the given offset is a valid zone-start
LBA, a check is added to verify that and return -EINVAL if it is not.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I1a1e4be2e1f67c2d8fecb5fc36a211b2dbb5a921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
2020-10-28 15:06:44 +00:00
Simon A. F. Lund
906c2adb86 examples/nvme_fio_plugin: help the user with max_open_zones constraints
When a device has resource-limitations such as the
maximum-open-resources (mor) and this threshold is exceeded, then IO
will fail upon completion. Such behavior is not the most user-friendly
way to tell the user that they should provide a value for the
fio-parameter 'max_open_zones'.

This change provides an arguably more user-friendly approach by checking
whether the device is limited and in case it is:

* Provide a default value for 'max_open_zones', inform the user, and
continue
* Verify 'max_open_zones' and in case of error inform the user and
return error

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I76cb045d560b9ec5701d97b82a62947af11960b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4914
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.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-10-28 15:06:44 +00:00
Changpeng Liu
2c9b5b5af5 env/memory: use stack variable when unmapping the dma region
When enable Werror compile option with new kernel(v5.8), there is
following error reported due to the <linux/vfio.h> data structure
change(added a uint8_t data[] variable in new kernel), we can just
put the 'unmap' at the end of the data structure to fix the issue,
I think it's better to just use a stack variable instead.

CC lib/env_dpdk/memory.o
memory.c:63:36: error: field 'unmap' with variable sized type 'struct vfio_iommu_type1_dma_unmap' not
at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
struct vfio_iommu_type1_dma_unmap unmap;
^
1 error generated.

Change-Id: Icf73a3c48a301e74b92b9ae2e2d8715262b2d056
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4925
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-10-28 15:06:12 +00:00
yidong0635
a474889bc6 rocksdb/env_spdk: Fix unused warning.
Fuction takes one parameter to print,
others are unused.

spdk/lib/rocksdb/env_spdk.cc: In function
 ‘void rocksdb::base_bdev_event_cb(spdk_bdev_event_type, spdk_bdev*, void*)’:
/spdk/lib/rocksdb/env_spdk.cc:666:70:
error: unused parameter ‘bdev’ [-Werror=unused-parameter]
666 | base_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
      |                                                    ~~~~~~~~~~~~~~~~~~^~~~
/home/yidong/spdk/lib/rocksdb/env_spdk.cc:667:12:
error: unused parameter ‘event_ctx’ [-Werror=unused-parameter]
  667 |      void *event_ctx)
      |      ~~~~~~^~~~~~~~~
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic1cf45443ab1dcdf38d1b9c6bdea2905e94df19c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4929
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-28 12:49:10 +00:00
Liu Xiaodong
e2f773aafc reactor: check calloc failure in gather_metrics
A round of _reactors_scheduler_gather_metrics should be stopped
when there is calloc failure.

Change-Id: Ic2220c561abb07a849ea37d3c88af3f6d5d1ffa1
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4882
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>
2020-10-27 16:20:32 +00:00
Liu Xiaodong
b45788036f lib/rocksdb: remove redundant linked blobfs_bdev
blobfs_bdev lib is already added into BLOCKDEV_MODULES_LIST
so it shouldn't be included by application who already
uses BLOCKDEV_MODULES_LIST or ALL_MODULES_LIST.

Fixes issue: #1654

Change-Id: I46a272e4593e19cf14c3ed8b2965797443c37a0d
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4876
Community-CI: Mellanox Build Bot
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-10-27 16:20:25 +00:00
yidong0635
1e2b38ba78 example/perf: Fix warning about scanbuild.
rc has been assigned to -1 directly, so it's no used here.

Issue:
accel_perf.c:681:7: warning: Although the value
stored to 'rc' is used in the enclosing expression,
the value is never actually read from 'rc'
        if ((rc = spdk_app_parse_args(argc, argv, &opts, "o:q:t:yw:P:f:", NULL, parse_args,
             ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1d0a4447c4655bde97fa18d50b694809fc9010ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4825
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-27 08:42:32 +00:00
yidong0635
eb9577f8d5 module/nvme: Fix warning about scanbuild.
Analyzer treats these as warning, they are unused.

Issue:
bdev_nvme_rpc.c:706:7: warning: Although the value
stored to 'rc' is used in the enclosing expression,
the value is never actually read from 'rc'
        if ((rc = spdk_nvme_ctrlr_reset(firm_ctx->ctrlr)) != 0) {
             ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bdev_nvme_rpc.c:851:8: warning: Although the value
stored to 'rc' is used in the enclosing expression,
the value is never actually read from 'rc'
         if ((rc = spdk_bdev_open(bdev2, true, NULL, NULL, &desc)) != 0) {
              ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
nvme_rpc.c:375:10: warning: Although the value stored
to 'rc' is used in the enclosing expression, the value is
never actually read from 'rc'
        return rc = val->type == SPDK_JSON_VAL_STRING ? -ENOMEM : -EINVAL;
                ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1d58db97b00ac2d102c1a46d7852c2ce3f559fda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-27 08:42:32 +00:00
yidong0635
fd661859ed nvmf/ctrlr: Fix scanbuild warning.
Issue:
ctrlr.c:1851:13: warning: Although the value stored
to 'copy_len' is used in the enclosing expression,
the value is never actually read from 'copy_len'
        next_pos = copy_len = 0;
                   ^          ~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie6d402cd4ad206ae5713deb15e2d03929bac94f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4823
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>
Community-CI: Mellanox Build Bot
2020-10-27 08:42:32 +00:00
yidong0635
5c91e9d9e4 event/app: Fix warning about unused value.
Issue:
app.c:700:7: warning: Although the value stored to 'rc' is
used in the enclosing expression, the value is never actually read from 'rc'
        if ((rc = app_setup_signal_handlers(opts)) != 0) {
             ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I4912d37c8300c88afc7668b792039683addc94c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4822
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-27 08:42:32 +00:00
yidong0635
2a53883af9 env_dpdk/memory: Fix warning of scanbuild.
We can verify readdir(dir) directly.
And this fixes issue :
memory.c:1233:23: warning: Although the value stored to 'd'
 is used in the enclosing expression, the value is never
actually read from 'd'
        while (count < 3 && (d = readdir(dir)) != NULL) {
                             ^   ~~~~~~~~~~~~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I34b191c9f89d8ae67697ec8e331f9c7c78c16ab2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4819
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-27 08:42:32 +00:00
Liu Xiaodong
36d2e93ea1 vhost-blk: extract per queue vdev worker
Change-Id: Id852585f3eb3b61f5a074336c73e300f020c594e
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4863
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-27 08:40:28 +00:00
Liu Xiaodong
d2db3cdf8f vhost: extract vhost_session_vq_used_signal
Change-Id: I249e3e0df45f394c03aedfa7fa2a960de7419a58
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4862
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-27 08:40:28 +00:00
Liu Xiaodong
6a1ec6a640 vhost: extract session_vq_io_stats_update
Change-Id: Id0349d571c974e963fbbf080bd6e2fe113b13622
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4769
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-27 08:40:28 +00:00
Allen Zhu
3e2c9092d4 rpc/bdev.py: pass zero values to SPDK when allowed
In bdev_nvme_set_options command, timeout_us/retry_count/arbitration_burst/low_priority_weight/
medium_prioity_weight/high_prioity_weight/nvme_ioq_poll_period_us/io_queue_requests can be 0,
which should be passed in the rpc command.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2ebff51b7b7de418c5ac8fbd0265444fd27e1e10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3816
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-27 08:40:12 +00:00
Allen Zhu
96ab62802c rpc/nvmf.py: pass zero values to SPDK when allowed
in_capsule_data_size/buf_cache_size/sock_priority/max_namespaces can be 0,
which should be passed in nvmf_create_transport/nvmf_create_subsystem commands.

Signed-off-by: Allen Zhu <allenz@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ib557cf9f20f7ec2c0b3c31156cd79dbd670ce7e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3815
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-10-27 08:40:12 +00:00
Alexey Marchuk
f600ca4c3c nvmf/tcp: Repack spdk_nvmf_tcp_qpair structure
Move data used in IO path to the beginning of the structure,
eliminate several holes

Change-Id: I45202f31c888fba32307a8b8ae2b62e7e601a32f
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4760
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-27 08:40:12 +00:00
Alexey Marchuk
a85057ea07 nvmf/tcp: Repack spdk_nvmf_tcp_req structure
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I4ca230a8a5ad01bb72cece4ce4cf543db144fcce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4759
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@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-10-27 08:40:12 +00:00
Alexey Marchuk
c1fbbfbe56 nvmf/tcp: Align recv_buf_size to MIN_SOC_PIPE_SIZE
If the user decided to disable ICD then we have several side effects:
1. SPDK prints several warnings/errors
2. SPDK doesn't create recv pipe and doesn't set SO_RCVBUF socket option.

I think that we should not rely on ICD only when we create recv pipe or
set SO_RCVBUF since data may be transferred in sgls via R2T/H2C and
we still need recv_pipe and SO_RCVBUF for better performance.
Alternative option is to set recv_buf_size as a maximum between
ICD and io_unit_size

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ida71ecc099f9a9355e4617f13315a341872d1cb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4755
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-27 08:40:12 +00:00
Alexey Marchuk
4fe47d6ff4 rpc: Add new parameter 'control_msg_num' to 'nvmf_create_transport'
This parameter represents the number of control messages to be
allocated per poll group, specific for TCP transport.
The new parameter can't be zero.

Change-Id: I8ae198c0b46e9a5850a80492aa6260f0c6ef885e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4829
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>
2020-10-27 08:40:12 +00:00
Alexey Marchuk
85fa43241b nvmf/tcp: Support ICD for fabric/admin commands
According to the SPEC we should support up to 8192 bytes
of ICD for admin and fabric commands. Transport configuration
parameter in_capsule_data_size is applied to all qpair types -
admin and IO. Also we allocate resources when we get a connection
request, so we don't know qpair type at this moment.
Create a list of buffer in TCP poll group to support ICD up
to 8192 bytes when configuration ICD is less than this value.
The number of elements in this pool is hardcoded, it is planned
to add a new configuration parameter later.

Fixes issue #1569
Change-Id: I8589e3e2ea95d515f5503c6de7c1ee40aaf7b6da
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4754
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>
2020-10-27 08:40:12 +00:00
Jim Harris
c31ad66893 event: deprecate opts.config_file member
Just always put the config file name in json_config_file,
since we now only support JSON.

If user specifies both -c and --json, it will just take
the latter of the two.  This is similar to if the user
specified --json twice.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idc21d73acf0e190eda57a7b0c5d9bcfa14e87030
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4858
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-26 22:25:47 +00:00
Liu Xiaodong
a3c3c0b538 thread: fix warning caused by intr
Fixes issue: #1650

Change-Id: I8935d439fb7d1d1c896ef297baa53db0d2cd538f
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4869
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-26 11:49:03 +00:00
Liu Xiaodong
47962dc7a3 bdev_aio: fix interrupt mode notify error
Change-Id: Ie4492aa33028e8090da96e2b592b20293d694120
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4865
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>
Community-CI: Mellanox Build Bot
2020-10-26 11:49:03 +00:00
Alexey Marchuk
e385cafa72 nvme: Don't log an error when we can't resubmit all requests
In TCP NVME initiator with zero copy enabled requests might be
completed asynchronously - out of qpair_process_completions
context. At the same time we calculate requests completed
asynchronously so that generic NVME layer can resubmit
queued requests after calling qpair_process_requests (or
poll_group_process_requests).
But there is a time gap between async request complete and
qpair_process_completions and the user can submit new IO
thereby decrease the number of free TCP requests. That means
that there might be less free requests than we excpected when
we try to resubmit queued requests.
The solution is change ERRLOG to DEBUG log since it is not a
fatal case.

Change-Id: If045ecd331cc6693e8ef450d8e15432dfa5d8812
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4859
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-26 11:48:46 +00:00
Tomasz Zawadzki
214b9847d0 version: SPDK 21.01 pre
This is first commit that should go into latest SPDK
after the code freeze for SPDK 20.10.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie7dc39553206ba747dc83ab6af7ddc2fc25d71eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4854
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-10-23 23:21:14 +00:00
Vitaliy Mysak
a2596f4dc2 event: add scheduler_set RPC
Add RPC that allows to change scheduler at runtime.

Change-Id: I008670f5e936bc25a0fbc923b826277d15343273
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3958
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>
2020-10-23 22:35:53 +00:00
Maciej Szwed
1b1e52cb47 event: Do not change scheduler while scheduling
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Idb8cce814b90f7a7a4a06c81507ce79da91e312c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4856
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>
2020-10-23 22:35:53 +00:00
Maciej Szwed
b309e8cefa event: Scheduler plugin for using governors
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I2edc6e31eb91fff9e1b7f0a3a05cf7cd5dc79a58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4163
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-10-23 22:35:53 +00:00
Maciej Szwed
68493f45af event: Add DPDK based governor
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ide0ac38497bc500886e26fd219cb120113896966
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4152
Tested-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 22:35:53 +00:00
Maciej Szwed
63933afd24 dpdk: Move submodule to latest commit
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4faa1e65898f50ea9bac0de7f666efd52f6426a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4849
Tested-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-23 22:35:53 +00:00
Maciej Szwed
c6adf304bd event: governor implementation
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9aaa84261144145933d227976a5f89dc89732267
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4028
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-23 22:35:53 +00:00
Vitaliy Mysak
2cffc80079 event: add rebalancing infrastructure
Features:
- does not delay thread creation
- does delay thread deletion
- singlethreaded, but can be made multithreaded.
  By being singlethreaded, we don't waste time,
  because reactors are not paused during rescheduling,
  but we do make statistics less up to date

Change-Id: Ie5a7e8569bc32b3fd4bb887804dfbc3f5c2ea858
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3899
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 22:35:53 +00:00
Vitaliy Mysak
7148f33360 event: adopt static scheduler to the new API
Move current scheduler to it's own module
and make use of new API.

Change-Id: I4928aed82603d51de01194c9650709e814f7f61b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4054
Reviewed-by: Ben Walker <benjamin.walker@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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 22:35:53 +00:00
Maciej Szwed
0d8a4af849 event: Add lw_thread helper functions required for scheduler
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ifd21adad6116d75170d5a6ff4b6d03470644feab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4338
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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-10-23 22:35:53 +00:00
Maciej Szwed
2a146cd936 event: define scheduler API
Add structures and function for new scheduler API.

Change-Id: I8e379db62189eb7c36092265c137f07368650e9b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4053
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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-10-23 22:35:53 +00:00
Tomasz Zawadzki
9e89645b61 CHANGELOG: add missing entries for 20.10
Added missing entries from browsing header and RPC changes.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I326e63cc14278adebd58d1dadd5e444dd2bfc554
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4853
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 18:24:12 +00:00
Tomasz Zawadzki
75fdd05eea CHANGELOG: fix formatting and typos for 20.10
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibbe6293955e74c236f5a45936aadfcac9879f4fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4852
Reviewed-by: Ben Walker <benjamin.walker@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 18:24:12 +00:00
Tomasz Zawadzki
078ef4e5e6 CHANGELOG: move command log entry to correct SPDK version section
Patch introduced during SPDK 20.10 development put this addition put
the changelog entry into SPDK 20.07 section.
(198a3ad) nvme: if no command set is requested, use the most reasonable default

Move it to the right place.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0f3ddd1a551c8ba3ad2e272dea82ab2179063599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4851
Reviewed-by: Ben Walker <benjamin.walker@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 18:24:12 +00:00
Tomasz Zawadzki
c7df7a4ce5 CHANELOG: alphabetize 20.10 section
This patch does not add/modify/remove entries.

All sections are put in alphabetic order and lower cased.
Some of the repeated ones are consolidated.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5691f2de1e8de5efa00002361904bd63bddf2ac4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4850
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 18:24:12 +00:00
Liu Xiaodong
147000aa7b interrupt_tgt: add lvol, blobfs and basic bdevs
Logical volume, blobstore and blobfs can directly run in
interrupt mode.
Some bdev modules don't have pollers, so they can be directly
runnning in interrupt mode.
interrupt_tgt can create lvol bdevs and some other type bdevs

Change-Id: I9ad068393c6ff31bb3aafb3e58a41b0e0aeec9af
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4276
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-10-23 16:23:48 +00:00
Liu Xiaodong
54a7d73ad1 nbd: apply interrupt
If interrupt mode is set, related poller functions will be
registered to interrupt_handler instead of poller.
interrupt_tgt can run IO with linux nbd.

Change-Id: I39ecf1efa10be76419fb0d25713ea457a5a53b37
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4274
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-10-23 16:23:48 +00:00
Liu Xiaodong
ad8c05dc7c bdev_aio: apply interrupt mode
If interrupt is set, related poller functions will be
registered to thread interrupt  instead of poller.
interrupt_tgt can create aio bdev now.

Change-Id: Id777a55c8b7dc7a220f94ab837f7039ecea4fcb4
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4273
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-10-23 16:23:48 +00:00
Liu Xiaodong
d8618de0df interrupt: add interrupt_tgt app
interrupt_tgt is similar with vhost_tgt, but it is constructed by
libaries supporting event interrupt mode with interrupt functions.
Some basic bdev libraries are linked in it.

"interrupt_tgt -E" will run the app in interrupt mode.
At start, it can work with SPDK RPC methods.

Change-Id: I3a9b253a4657758fc670af835e5bed5e53f412dc
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4271
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-10-23 16:23:48 +00:00
Liu Xiaodong
4bf6e4bb32 interrupt: apply fd_group in thd and reactor
Each reactor and each thread is assigned with one fd group.
At the same time, each thread is treated as one interrupt source
registered into its corresponding reactor.
The egrp function for reacotr is the only block point waiting
for events.

Change-Id: Id092e66591b07b445342f8ae16dc218d28887427
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4269
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-10-23 16:23:48 +00:00
Liu Xiaodong
7d19e50a54 reactor: extract reactor_post_process_lw_thread
Change-Id: I2761db384f78529525b7f1eb3c9c959a7b885ede
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4756
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-23 16:23:48 +00:00
Liu Xiaodong
c5d1e7f171 interrupt: new fd_group in lib/util
Interrupt is aiming to support interrupt
mode in SPDK application framework.
fd_group is implemented by epoll on linux.
fd_group can be inserted into thread and reactor
to do epoll_wait internally in order to avoid polling

Change-Id: I9077ad648a97fbd68fd46f43de2e16440bedab0b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4268
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 16:23:48 +00:00
Maciej Wawryk
4ffb15c133 test/vhost: fix shared.sh test to run in vagrant box
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6d255ce3250b97895bd2bb02256f92e14a3c4245
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4666
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 16:20:08 +00:00
Tomasz Zawadzki
02d4c2b32a ut/iscsi: remove unused legacy config files
The tests did not use the legacy files anyway.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icffedb7cc7a8574f0f801883b2d9655515cab687
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4855
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-10-23 16:12:18 +00:00
Michal Berger
dec533bf17 pkgdep/git: Fix git version check
f62834a6bb forgot to actually retrieve version string. Also, use
common function for comparing the strings.

Change-Id: I022ab54ea5b4edf0b596776dd35ca8637506ee46
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4833
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 14:28:50 +00:00
Michal Berger
62df2c1e81 pkgdep/apt-get: Add libpmemblk-dev package
libpmemblk-dev - provides /usr/include/libpmemblk.h (--with-pmdk)

Change-Id: Ie92dc1006cde972e7f77630577de18a016f4b3be
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4816
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 14:28:50 +00:00
Michal Berger
22213bb777 pkgdep/apt-get: Move ubuntu-dependent checks to os/ubuntu
Change-Id: I11b4bb2a0db20e6f86749cd951221a3697a72ed6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4815
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-23 14:28:50 +00:00
Karol Latecki
17f3add0a4 autobuild.sh: exclude custom dpdk from scanbuild path
Change-Id: Icc668defa2670561f1160a78f68e76452e0862fc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4774
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 13:47:43 +00:00
Karol Latecki
b7e4207b29 autobuild.sh: cherry pick dpdk fix for disabling qat_asym driver
Use the same fix that we already have in spdk/dpdk
repository:
c2c273d5c8

Change-Id: I136d3e90a048c039cb101a190f10dabd043875ab
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4828
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-23 13:47:43 +00:00
Ben Walker
2ec88c4f8c nvmf: Don't fail a property set command with invalid bits
If the initiator sends a property set command to a valid register, but
the value contains bits that are reserved by the NVMe specification,
don't fail the whole command. Just log an error message.

Previously, any valid bits set would take effect but then the command
would also fail. That confuses the initiator and thinks it must retry
the full property set.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I566bc68c4469b9f41c69902e276f825c86683075
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-23 13:47:35 +00:00
wanghailiangx
6eca984a77 example/bdev/hellow_word: Drop .ini config in favor of json
Change-Id: I019a58860cb020e6a4071efb898b513a11c44554
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4846
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-10-23 13:47:23 +00:00
Niklas Cassel
6e231f59af examples/nvme/identify: remove exit_and_free_qpair()
Currently, error handling code in examples/nvme/identify frees the qpair
before calling exit().
However, since every SPDK process starts off by triggering a reset
(in state NVME_CTRLR_STATE_INIT), which causes all the qpairs to be
deleted, there is not really a reason to do a nice cleanup on error.

Additionally, other examples, e.g. examples/nvme/hello_world does not
do a nice cleanup on error, so it is inconsistent if identify does so.

Proper freeing of the qpairs is still done in the normal case where
we don't get any errors (in this example, and in other examples).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0db612934464e6e84eaf466c12eb35eaa396e511
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4838
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>
2020-10-23 13:47:09 +00:00
Niklas Cassel
6915ad7c34 examples/nvme/hello_world: call exit() on read error
The printout in read_complete() says "Read I/O failed, aborting run",
however, execution still continues, and prints and prints the buffer
where the result was supposed to be stored.
Since we got a read error, we will not have gotten any data stored
in the buffer, so it is simply confusing to print it.

Calling exit() in the read_complete() error handling code code also
makes it consistent with the error handling code in write_complete()
and reset_zone_complete().

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I6e542758c57efc376f921857c2cdb24e252d49c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4837
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-10-23 13:47:09 +00:00
Simon A. F. Lund
8a1d6f446d examples/nvme_fio_plugin: add initial support for ZNS
This adds initial support for ZNS by aligning the NVMe spec. defined ZNS
structures and commands with the fio Zone representation and
implementation of the following io-engine functions:

get_zoned_model() / spdk_fio_get_zoned_model(), when namespace is ZNS
and the Zoned-Command-Set is enabled, then this function informs fio
that the device is ZBD_HOST_MANAGED.

report_zones() / spdk_fio_report_zones(), submits a single
zone-mgmt-recv and waits for its completion, converts the spec-defined
zone-descriptors to the fio ZBD_ZONE representation and returns the
number of zones in the converted report.

reset_wp() / spdk_fio_reset_wp(), submits multiple zone-mgmt-send,
covering the range [offset, offset+length] and waits for their
completion.

Four helper-functions are added to assist in the above implementations.

get_fio_qpair(), this helper is added to retrieve the namespace matching
the given fio-file, ensuring that management commands reach the correct
namespace.

spdk_fio_qpair_mdts_nbytes(), this helper is added to assist
report_zones() retrieve the zone-report within the bounds of the
maximum-data-transfer of the device.

The functions pcu() and pcu_cb() provide a means to submit
management-commands and waiting for their completions. They are needed
since, although mgmt-send/recv are IO-commands in the context of NVMe,
then for fio they are not part of the regular queue/event/getevents but
utilized in a synchronous/blocking manner.

Note, in the fio-zone-representation, then the start/len/capacity/wp
fields are in units of bytes, whereas the corresponding values in NVMe
are in lbas/sectors. It is worth noting as the offset <-> lba
conversions do not take NVMe configurations with extended-lba format
into account. Thus, the implementation is initial support for ZNS as
more work is needed to support pi/extended-lba configurations.

Note, a guard FIO_HAS_ZBD checks for the required io-engine ops version
and indirectly testing for available of fio Zone representation by
testing for a macro introduced in the same fio-release as the required
fio Zone representation.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Id3d1d61a52db2e55019032c724197df4d559271a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4836
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-10-23 13:47:01 +00:00
Simon A. F. Lund
54219afe5a nvme/spec: add accessors to, and commented members of, zone-descriptors
The struct-accessors are added and named matching the fields defined in
the spec. to be used by the fio_plugin/nvme and other consumers of the
driver-layer. Comments to be consumed doc-generators as well as human
readers of the header-file.

The identify example is updated with the change.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I8d6cb82e095c5dcbc06fe892e17ce83dc0062735
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4835
Reviewed-by: Paul Luse <paul.e.luse@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>
2020-10-23 13:47:01 +00:00
Simon A. F. Lund
6fafaa5dc6 nvme/spec: add ZNS zone states and zone types
Added to be used by the fio_plugin/nvme and other consumers of the
driver-layer.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I945b0aa93c675ad381ce0a83883c41688b549aee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4834
Reviewed-by: Paul Luse <paul.e.luse@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>
2020-10-23 13:47:01 +00:00
Karol Latecki
c98d7a4adf autobuild.sh: cherry pick dpdk fix for freeing pci devices
Change-Id: I57e380508da69b9c4d7d5219c81a550816966b4b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4732
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-10-23 10:14:12 +00:00
Karol Latecki
7ba6712604 autobuild.sh: fix ipsec installation for custom dpdk
- Enable shared objects
- Lininkg to libs for meson done with -Dc_link_args
- append lib path to LD_LIBRARY_PATH in case ipsec
  is needed in later build or test steps
- Save LD_LIBRARY_PATH from autobuild.sh and pass it
  to autotest.sh. This is needed for crypto tests
  using ipsec-intel-mb library.

Change-Id: I047c6d3187ea42de8790181428d18596b195ff2e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4730
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-10-23 10:14:12 +00:00
Karol Latecki
b7b4348233 autobuild.sh: preserve LD_LIBRARY_PATH in sudo call
Apparently LD_LIBRARY_PATH is not preserved even with
"-E" option. Pleaes see sudoers(5) manual as a reference.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7d213abc4322eed3e01199416d5c7880965bdbe2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4711
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-10-23 10:14:12 +00:00
Karol Latecki
d9b311e7fd autobuild: fix isa-l installation for custom dpdk
pkgconfig path must be set for meson/ninja installation
as described in:
https://doc.dpdk.org/guides/compressdevs/isal.html

Change-Id: I9dd01b576c4468c42241ede65781e5d50bd52bbd
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4700
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 10:14:12 +00:00
Karol Latecki
507f8ae3ea lib/env_dpdk: update crypto and compress library names
Post DPDK 20.08 crypto, isa-l and qat shared object
libraries had their names changed. Detect which library
names are available and use them.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8c9b9b24f9232f303b99c959754a7f7550ffdf90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4780
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-23 10:14:12 +00:00
paul luse
397cf3f884 lib/idxd: small code cleanup
Suggestions from a prior review... able to remove a boolean by changing
how the batch elements 'index' and 'remaining' are used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I273e5e231bb30d51eb3ae0a59eec110377d49ab7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4813
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-10-22 22:43:28 +00:00
paul luse
9d5268b19c lib/idxd: remove unused translations
Added by mistake.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I08fb4d105f4834a551488bcfec413a46f1404e34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4811
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
2020-10-22 22:43:28 +00:00
paul luse
63d7ac35c9 lib/idxd: small code simplifcation
Earlier refactoring enables us to not have to keep track of batch completions in
the batch struct as they're always used sequentially now so we can just add
the addresses from the start up to the number of elements in the batch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I00cdcdec3376a1c32c9dab72c68fea868c1cb540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4810
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
2020-10-22 22:43:28 +00:00
paul luse
33eac886b9 lib/idxd: refactor batching for increased performance
And to eliminate an artificial constraint on # of user descriptors.
The main idea here was to move from a single ring that covered all
user descriptors to a pre-allocated ring per pre-allocated batch.

In addition, the other major change here is in how we poll for
completions.  We used to poll the batch rings then the main ring.
Now when commands are prepared their completion address is added to
a per channel list and the poller simply runs through that list
not caring which ring the completion address belongs too. This
simplifies the completion logic considerably and will avoid
polling locations that can't potentially have a completion.

Some minor rework was included as well, mainly getting rid of the
ring_ctrl struct as it didn't serve much of a purpose anyway and
with how things are setup now its easier to read with all the
elements in the channel struct.

Also, a change that came in while this was WIP needed a few fixes
to function correctly.  Addressed those and moved them to a
helper function so we have one point of control for xlations.

Added support for NOP in cases where a batch is submitted with
only 1 descriptor.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie201b28118823100e908e0d1b08e7c10bb8fa9e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3654
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-10-22 22:43:28 +00:00
paul luse
17bb748a60 accel: Move non-engine specific batch to the accel_fw layer
The new design:

* Supports a generic batching capability in the accel_fw layer
that keeps track of hw accelerated vs sw commands based on
the capabilities of the engine and processes sw commands in the
generic layer while sending a list of commands (not a batch)
to the engines for processing.

* Batch completions are managed via the generic layer, when using
the accel_fw the engines only process commands. With DSA however,
if a list of commands is sent down it will use the DSA public
API to create and send batches but will rely on the generic layer
to complete the batch task itself. When using DSA directly, batching
works as usual (DSA handles batch completion).

* The engine function tables were greatly simplified by replacing
all of the individual entries (copy, fill, crc32c, etc) with one
`submit_tasks` function that is used to both send lists of tasks
for batches or just one task for single shot API.

* Internally batching is now used to re-submit tasks that were queued
for flow control reasons.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I99c28751df32017c43490a90f4904bdabe79a270
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3555
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
2020-10-22 22:43:28 +00:00
Tomasz Zawadzki
8c3e71f0f9 script/gen_nvme: do not generate legacy configuration
gen_nvme.sh will no longer generate the legacy configuration.
"--json" option will still work for any current users of the script.

Tests were modified to no longer use the "--json" option.
Meanwhile others were simplified with switch to "--json-with-subsystems".

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8450be98660e54c64c27d8401fc40d649f9403ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4802
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: Paul Luse <paul.e.luse@intel.com>
2020-10-22 17:08:41 +00:00
Tomasz Zawadzki
2903c65533 doc: remove mentions of legacy config
Support for legacy configuration has been removed from SPDK
at this point.

This patch focuses on adjustement in documentation and examples.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icfe8baf7a7497ffa86fde9038001429c5a7bc4f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4801
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: Paul Luse <paul.e.luse@intel.com>
2020-10-22 17:08:41 +00:00
Tomasz Zawadzki
78ad672861 lib/event: remove legacy configuration from event framework
All options -c, --config and --json are valid, but have to
point to JSON configuration file.

Adjusted UT since JSON configs don't work with --wait-for-rpc.

Since this removes last reference to legacy INI configuration,
updated conf library to no longer mention the deprecation.
All uses of conf library are for explicit reason and not
related to SPDK event framework configuration.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic9a702465982daf715ce1c2ab863c48584734611
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4752
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-10-22 17:08:41 +00:00
Shuhei Matsumoto
1e8fac45ec examples/bdev_fio_plugin: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia858b755718da97e48035b7e7ca4544f6f9b9a63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4807
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-10-22 15:01:18 +00:00
Michal Berger
65ed603449 configure: Fix check against NASM version
Currently, NASM in version 2.14 or newer is required. However, the
old code assumed that nasm -v returns version in the form of x.y.z,
however, some builds return only the x.y. In such a case, check would
always fail to detect proper version since the following would be
be always true:

NASM version 2.14

2.14 -> 214 -> [[ 214 -lt "21400" ]]

Change-Id: I63bfc7aa84383bf2d71e936ae534536ecf25723a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4809
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-10-22 15:01:09 +00:00
Michal Berger
77c4d0f673 scripts/common: Add functions for comparing version strings
This is introduced mainly for convenience. Examples of supported usage:

eq 0xf.1 15.1 # true
gt 1.1.00 2 # false
le 2.33.4 2.44.02 # true
ge 03.03.03 3.3.01 # true
lt 1 0 # false
ge 4.19.0-6-amd64 4.10.0-6-amd64 # true
neq 0.0 0 # false

Change-Id: Iac05fce03bfe95f85ab1c8a7c24c4553ffc6776a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4808
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-22 15:01:09 +00:00
Karol Latecki
dc45a73d9e perf/nvmf: replace bdev INI configs with JSON
INI is deprecated, use JSON configs for fio plugin instead.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3075e79ed7601116e837536a818821372362eb8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4762
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-22 10:12:02 +00:00
Monica Kenguva
74f8f3712c unit: add a UT for the get_ana_log_page
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic1edb61697ba1e9a22bfde53e5044ec6bb6a80d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3903
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: Broadcom CI
Community-CI: Mellanox Build Bot
2020-10-22 03:56:35 +00:00
Ben Walker
6723bd0c0f nvmf: nvmf_subsystem_remove_host RPC now disconnects hosts
If a host matching the removed hosts' NQN exists, it is now
disconnected.

Change-Id: I0bec29eda2dc220114b9197d4eb765899b9e1517
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4684
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: Broadcom CI
2020-10-22 03:55:57 +00:00
John Kariuki
c5840d77b3 test/bdev_perf: disable zcopy by default
Prior to this patch the bdevperf application enabled using the zcopy API
by default. This means that on bdevs that don't natively support zcopy the
API emulates zero-copy by allocating a buffer. In my test environment, I
measured a 25% decrease in IOPS when zcopy was enabled. This patch changes
the default value so that zcopy is disabled by default. For bdevs that support
zcopy, use the -Z flag to enable using zcopy API.

Change-Id: Ib7e5c24f76eb16ffef038687daca58c0ffad1c1c
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-21 20:49:02 +00:00
Changpeng Liu
c0bf93145a env/memory: return the memory virtual address's file descriptor and offset
For virtio-user library and coming vfio-user feature, the client needs
to send the memory file descriptors to target so that the two processes
can setup shared memory region to do data processing without memory copy.
Currently virtio-user will read /proc/self/maps to get memory file descriptor,
since DPDK already provides this such APIs, so here we can just use it,
for existing virtio-user library we may replace it with the new added
API.

Change-Id: Icfeae465d53826d0c8d1b335287634b03cd174aa
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4428
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-10-21 20:47:01 +00:00
Tomasz Zawadzki
95b76c4dcc test/external_code: replace copies of test apps with symbolic links
The files for external_code tests were copies of the same files
in SPDK. Intention of external_code tests is to verify
that nothing breaks in regards to building process.

The copies were getting out of sync with functional changes.
So to address this:
- hello_bdev app is now symlinked
- vbdev_passthrough is copied from respective files
- RPC and name of the module were changed to not conflict with
the original passthrough module

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idb83b8a06dea7143505d2062b23bfb35c86e3274
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4804
Reviewed-by: Ben Walker <benjamin.walker@intel.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>
2020-10-21 20:46:20 +00:00
Tomasz Zawadzki
1cb73242f0 bdev_fio: remove legacy config support
This patch removes legacy config from bdev fio_plugin.

Both configuration options are valid, but they should
point to JSON files.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5ae8102752317fe6da8ae7d0a69f444cb0751efa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3721
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 20:46:20 +00:00
Alexey Marchuk
c72a16431a nvme/tcp: Fix check of completion number during icresp handling
The current approach checks "rc == 0". It worked before adding
polling of poll group since a single qpair should return 1
completion for its own icreq while poll group can return
several completions for all qpairs attached to this poll
group (but .e.g not for those qpair who is waiting for the
completion).

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I60d05d8d6640e4e2bbaf3cd533d2f5a3637adea1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4768
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-10-21 20:45:13 +00:00
Tomasz Zawadzki
344bb69312 event: remove printing legacy config for apps
Remove spdk_app_get_running_config() that allowed printing
legacy configuration by the apps.
Along with usr1_handler callback that was used to call that
function.

It was only used in iscsi_tgt so it is removed there.

The app_repeat test was using SIGUSR1 to trigger a
spdk_app_stop/spdk_app_start cycle.  But we can use
SIGTERM for that instead.  While here, do a bit of
cleanup in the app_repeat test app.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie8449e8bcd979b237c68ef94f50fb7a3cb6c19db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4750
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 20:44:47 +00:00
Michal Berger
f62834a6bb pkgdep/git: Don't install git if there's already supported version installed
Change-Id: I2866994df8a5f268d7dea2154e0df87786397142
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4685
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: Paul Luse <paul.e.luse@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
c9b46ba92b pkgdep/git: Don't install sources in parallel
As stated in a66c52fd this is racy and also masks out all potential
failures since wait() will not indicate if all processes succeded
or failed, it will return only with exit status from the last
process it handled.

Change-Id: I9e2b5d01ac8f951082e0b28eeae5455ecd0c8e74
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4680
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
721344d778 pkgdep/git: Ignore maybe-uninitialized errors while compiling nvme-cli-cuse
Newer compilers (gcc 10.x) shipped with, e.g., Clearlinux, Fedora32,
will simply fail upon hitting this error. Ignore it.

CPPFLAGS is used since CFLAGS would override its default options
defined in a Makefile breaking compilation on older gccs as a result.

Change-Id: I75c7938268736365a41b49373c948e779d57253b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4679
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
4301477c32 pkgdep/git: Clear libiscsi's WARN_CFLAGS
These are not understood by the older versions of the compiler, like
the one shipped with Centos7. The flags in question are:

 -Wno-stringop-truncation
 -Wno-unknown-warning-option

Change-Id: Icc29ebcf5080c908e23aa2df290a6c452f3e185c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
203fd7ffc7 scripts/setup: Move fallback driver check to collect_driver()
Change-Id: I98de31e32190350c38b52edef8514dc4ab8bda92
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4659
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
ce4d070961 autotest: Call nvme_namespace_revert() only under Linux
This routine depends on nvme-cli which on FreeBSD can be installed
only through ports - this operation is not supported by SPDK's
provisioning tooling, like pkgdep.sh or vm_setup.sh. Considering
that, it's unlikely that working nvme tool will be available on
generic FreeBSD system, thus skip this work entirely.

Change-Id: Ib2f12a65b6f000f1b4d9d3beda6b349685f263c7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 15:08:18 +00:00
Michal Berger
13d01bed16 scripts/common: Use proper format of the pci address for pciconf
If devices are not picked up from the cache, iter_all_pci_class_code()
will pick lspci in first instance to iterate over the pci bus. If said
tool is installed on FreeBSD, it will return BDFs in format which won't
be understood by pciconf (which is used to determine which driver given
device is bound to):

  pciconf: cannot parse selector pci0000:00:06.0

To make sure pciconf understands the argument it's given, simply
replace .function with :function (0000:00:06.0 -> 0000:00:06:0).

Change-Id: I59d4f7050c65df99626a3d449aa0a5bb122d4081
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4665
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-10-21 15:08:18 +00:00
Michal Berger
94067e8baf scripts/setup: Check if DPDK drivers are in place
If they are not, there's no point to continue setup on FreeBSD.

Change-Id: I6d94712f1507c0597fbd569ff73c52f262ab9df9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4658
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-10-21 15:08:18 +00:00
Michal Berger
c90dac7a6e scripts/setup: Gracefully handle contigmem status
Change-Id: Id59b02f08fb093dfc016bd49b9d5073807831040
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4657
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-10-21 15:08:18 +00:00
Michal Berger
1431ea025c scripts/setup: Handle kenv while looking up contigmem opts
In case contigmem is loaded, but the kernel environment hasn't been
properly updated with hw.contigmem.* options, kenv will fail,
breaking the check to determine if contigmem should be unloaded.

Avoid the above scenario by determining first if given option is
actually set in kernel's environment.

Change-Id: I4118b7622fd876b28f0c07d081c583f5782f0357
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4656
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-10-21 15:08:18 +00:00
Maciej Wawryk
5df2c9a343 test/vhost: add -f for mkfs.btrfs command
During tests with new qcow2 image there is error:
    ERROR: use the -f option to force overwrite of /dev/sdb1
when creating filesystem using mkfs.btrfs, adding -f
resolve this issue.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If6548d3d5781e2b46f794422144e2a635e700559
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4660
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:19:38 +00:00
Krzysztof Karas
3c408dd5a6 etc: Remove etc directory
SPDK is removing legacy INI style configuration
and the examples in this dir are representing
and documenting it.

Those should be removed, instead of being converted.
Because JSON does not support inline comments
and all of the JSON RPC is already documented
extensively https://spdk.io/doc/jsonrpc.html.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I8609bc107736aea53e9d64e05d0d3221bd73b567
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4782
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:19:10 +00:00
Shuhei Matsumoto
9d3afe1f50 CHANGELOG: NVMe-oF target supports ANA Reporting and provides multipath
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a444ffaf8d4a167ac19fb3cf280887620acfac3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4781
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-10-21 12:19:01 +00:00
Shuhei Matsumoto
e99ac03100 CHANGELOG: Configuring TCP delayed ACK feature
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9cc1b5f1bf43682bff6aa876a27ff5f2409fd12d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4778
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-10-21 12:19:01 +00:00
Shuhei Matsumoto
5dcbf54bcf CHANGELOG: iSCSI login redirection feature
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb41571137e5007b4a018e1bdcda13d62b336b84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4777
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-10-21 12:19:01 +00:00
Shuhei Matsumoto
44ac74e8b3 CHANGELOG: NVMe async detach and adding namespace to NVMe-oF subsystem
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I12f083d694d1e5c6b3edec9635f9e81b6ccc6390
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4776
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>
Community-CI: Broadcom CI
2020-10-21 12:19:01 +00:00
Tomasz Zawadzki
0798ddf723 test/json: remove virtio-nvme RPC
The virtio nvme was removed from SPDK, so this TODO
would never get implemented.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iafa701249ed3fafa45d028f2bb929a024b78a0b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4784
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:18:52 +00:00
Tomasz Zawadzki
887a0e0347 Revert "test/vhost: workaround issue #1583 by specifying --vq-count"
This reverts commit cff7c8f1f7.

DPDK submodule is updated with the actual fix:
(9471c59) vhost: fix external backends readiness
https://review.spdk.io/gerrit/c/spdk/dpdk/+/4219

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I130d1d0b7aab86f3eb2bf420aa8644d4607e1eeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4783
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:18:52 +00:00
Niklas Cassel
3301f8214b examples/nvme/identify: print zone report excerpt for zoned namespaces
If the namespace is a zoned namespace, get and print a zone report.

Since a ZNS drive can have thousands of zones, request a zone report
containing only the first 8 zones.
The code does take a ZNS drive with less than 8 zones into account,
even though such a drive is unlikely to exist in the wild.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I28ecb4d7c60ab5a911d7b1faae595f43ef6706e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4794
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>
Community-CI: Broadcom CI
2020-10-21 12:18:44 +00:00
Niklas Cassel
6dec7623be nvme: add support for ZNS zone management receive command
Add support for the ZNS zone management receive command.
An internal nvme_zns_zone_mgmt_recv() function is created
that matches the parameters of the zone management receive
function in the ZNS specification.

Convenience functions are provided for the following
Zone Receive Action: Report Zones.

Zone Receive Actions not implemented: Extended Report
Zones.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I23589a602336da5dffccec7230d07026a868e81b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4793
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-10-21 12:18:44 +00:00
Niklas Cassel
be3ff9c0b5 nvme: add function to get ZNS num zones
Add a function to get the number of zones for a zoned namespace.

Since the ZNS specification does not allow zone size == 0,
divide by zero should not be possible on a spec compliant drive.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I15e0ac8a72e244e248b7fb44f7156b182ecd98b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4792
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>
Community-CI: Broadcom CI
2020-10-21 12:18:44 +00:00
Niklas Cassel
6abee9a205 nvme: add function to get ZNS zone size
Add a function to get the zone size of a zoned namespace.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I89429fa2fd36307a8b34bdf91e3251c68596a48c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4791
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: Broadcom CI
2020-10-21 12:18:44 +00:00
Tomasz Zawadzki
6511969c3b event: remove subsystem legacy config print
This patch removes callback function for subsystems to
present their options for legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I63076fc03eff45da5d57fab03501602922a20e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4749
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 02:25:45 +00:00
Tomasz Zawadzki
28ebb8cc78 bdev_module: remove config_text
This patch removes function for bdev modules to
present options of the bdevs.

blob_bdev.h refers to the spdk_bdev_module, so would need
to be bumped too.
At this time spdk_bdev_module is left unchanged to prevent
that.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3cacb087c998d928c5d8c2722b7f041d82bb43f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4748
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 02:25:45 +00:00
Ivan Betsis
bd3840a729 nvmf/rdma: Add RPC to set new RDMA batching option
Add option to enable/disable work requests batching (RDMA only).

Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Change-Id: I84ca599711cdc2713606444e7ec501c36671e796
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/925
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>
Community-CI: Broadcom CI
2020-10-21 02:25:32 +00:00
Ivan Betsis
c818233b41 nvmf/rdma: Add WR batch rdma new transport option
With x86 and low queue depths with multiple QPs/initiators
there is a benefit from disable batch when we have randread IO pattern.

Testing environment: x86, Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GH
Several results:
init_cores | QD | BS | Avg IOPs/BW without batch | Avg IOPS/BW with batch
  8 cores  | 4  | 4K |     1870087 / 7305        |     1594014 / 6226
  8 cores  | 8  | 4K |     1853573 / 7240        |     1576400 / 6157
  8 cores  | 16 | 4K |     1819643 / 7108        |     1569487 / 6130
  8 cores  | 32 | 4K |     1815467 / 7092        |     1569909 / 6132
 16 cores  | 4  | 4K |     1908018 / 7453        |     1566843 / 6120
 16 cores  | 8  | 4K |     1906081 / 7446        |     1562110 / 6102
 16 cores  | 16 | 4K |     1880706 / 7346        |     1555060 / 6074
 16 cores  | 32 | 4K |     1835878 / 7171        |     1548156 / 6046

Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Change-Id: Icdbbbdf83f137eb4f05bd2063268ee2a7d87335a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/924
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>
Community-CI: Broadcom CI
2020-10-21 02:25:32 +00:00
Shuhei Matsumoto
938d2ae254 test/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I77cdc07ddfcd97569e31eeb245cd4e5a26289dbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4441
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-10-20 16:55:55 +00:00
Shuhei Matsumoto
7a85c283d9 test/app: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I43428a41df2b6f26b62cf03990d35add9a3663d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4440
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-10-20 16:55:55 +00:00
Shuhei Matsumoto
0a903c91ac examples/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I05c504428df56f4ab5d1ffdd19ac81e6c062c89d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4439
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-10-20 16:55:55 +00:00
Shuhei Matsumoto
d8f4bbeb43 lib/nvme: Add spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Add two new public APIs, spdk_nvme_detach_async() and
spdk_nvme_detach_poll_async() to detach multiple controllers in parallel
as a simple manner to users.

Hold the target controller to nvme_ctrlr_detach_ctx because users
will free any object which held it after returning spdk_nvme_detach_async().

spdk_nvme_detach_ctx holds all nvme_ctrlr_detach_ctx in a sequence
by linked list.

spdk_nvme_detach_ctx has a boolean variable polling_started to prevent
the user from calling spdk_nvme_detach_async() while
spdk_nvme_detach_poll_async() is called repeatedly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>i
Change-Id: Ib049c19f7ef24410b963fd5c777a21184f3012d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4758
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
ea1bfd84cd lib/nvme: Make internal of spdk_nvme_detach() asynchronous
Add two new helper functions, nvme_ctrlr_detach_async() and
nvme_ctrlr_detach_poll_async() to make the internal of
spdk_nvme_detach() asynchronous.

Use callback function to remove controller from the attached list after
completing shutdown and before freeing to avoid conflict between
attach and detach.

Update MOCKs in the corresponding unit test cases.

The next patch will add two public APIs spdk_nvme_detach_async()
and spdk_nvme_detach_poll_async() based on this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifbdfec2a1facde9354007c6248f280e245a36eed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
3806b2e1f9 lib/nvme: Make nvme_ctrlr_destruct() asynchronous
Following the last patch, separate nvme_ctrlr_destruct()
into nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async(),
but keep nvme_ctrlr_destruct() by replacing the internal by
nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async().

Add shutdown_complete to nvme_ctrlr_detach_ctx. If shutdown_complete is true,
we can destruct the controller. The case that nvme_ctrlr_shutdown_async()
failed sets shutdown_complete to true. The case that nvme_ctrlr_disable()
is called sets shutdown_complete to true unconditionally.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3994e259f9d3ccf8fede3ac03aadef911eefb9dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4415
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@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-10-20 16:55:55 +00:00
Shuhei Matsumoto
257fcb7352 lib/nvme: Make nvme_ctrlr_shutdown() asynchronous
This patch is the first of the patch series to make spdk_nvme_detach()
asynchronous.

We have lengthy shutdown notification, i.e., we have to wait a long time
until shutdown processing is completed, in some SSDs. If the running system
has many such SSDs, we see large intolerable delay.

SPDK provides a controller option, no_shn_notification as a workaround.
We can use the workaround if the use case of the detach is to switch to
the next application without system reboot. However, we cannot use the
workaround if we want to do system reboot after detach.

To mitigate such lengthy shutdown notification, we need to parallelize
detachment among SSDs.

Hence the patch series will introduce an asynchronous detach API and
will use the API to parallelize detachment.

This patch adds the following changes.

Introduce a context structure and separate nvme_ctrlr_shutdown()
itno nvme_ctrlr_shutdown_async() and nvme_ctrlr_shutdown_poll_async()
using the context structure.

Name the context structure as nvme_ctrlr_detach_ctx because it will be
used only in internal APIs. The upcoming public APIs will support
multiple detachment and will have the contest structure named as
spdk_nvme_detach_ctx.

Use TSC instead of counter because polling interval will be controlled
by the caller.

Use the convenient macro, SPDK_CEIL_DIV(), to round off the time
value in milliseconds.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e2355fd24b6d6a4d6c1813577d53822304d4f33
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4414
Reviewed-by: Jacek Kalwas <jacek.kalwas@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
c865839736 examples/blob_cli: Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Update a few print outputs to out not product name but bdev name
because bdev pointer is not available there after replacing
spdk_bdev_get_by_name() and spdk_bdev_open() by spdk_bdev_open_ext().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I624fea3a0a12c1049e950bddae8cea9f88b16db5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-20 15:27:38 +00:00
Shuhei Matsumoto
97901dca7c examples/hello_blob: Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I932d46fc4c8e6d2de0e8f92c0c8a7965032ccb17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4703
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-10-20 15:27:38 +00:00
yidong0635
2e0dafb305 test/reset: put unregister_worker after unregister_controllers.
From the log we can see that it reports ns_ctx was freed before it
was used. In unregister_controller, it still need ns_ctx to do io_complete.

And now this app works as a signle worker to do something.
Just need to change the order, execute unregister_worker after
unregister_controllers.

Fixes issue #1626

tested on clearlinux.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I392ff168abb862ba236a24b775fb31bb341e2157
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4761
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 14:05:51 +00:00
Niklas Cassel
998ec7b094 nvme/hello_world: for zoned namespaces, reset the zone before write
If the namespace is a zoned namespace, reset the zone starting at
LBA 0, before doing the "Hello world!" write to LBA 0.

This is done to ensure that the write pointer for the first zone
is at LBA 0.

We need to do this since a regular write on a zoned namespace
to an LBA that is not equal to the write pointer results in a
Zone Invalid Write I/O error.

Therefore, if we don't do a zone reset before doing the write,
the write would fail if there already were data written to the
first zone. (E.g. if the user ran the hello_world example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0ee972b4cc40bc5ebd476105d0b180a07cfe5a76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4683
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-10-20 12:18:56 +00:00
Niklas Cassel
67475a58f4 nvme: add support for ZNS zone management send command
Add support for the ZNS zone management send command.
An internal nvme_zns_zone_mgmt_send() function is created
that matches the parameters of the zone management send
function in the ZNS specification.

Convenience functions are provided for the following
Zone Send Actions: Close Zone, Finish Zone, Open Zone,
Reset Zone, and Offline Zone.

Zone Send Actions not implemented: Set Zone Descriptor
Extension.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I9cc04776c249d2b9c515438b81a0f06aea4198fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4682
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-10-20 12:18:56 +00:00
Niklas Cassel
3be2935701 nvme: move ZNS specific functions to their own header file
Move ZNS specific functions to their own header file:
include/spdk/nvme_zns.h.
This is similar to how it's done for e.g. NVMe-oF with
include/spdk/nvmf.h.

This avoids cluttering the nvme.h header with ZNS specific functions.

A SPDK program that wants to use the spdk_nvme_zns_* functions will
need to include include/spdk/nvme_zns.h, however, this is similar
to how e.g. spdk_nvmf namespaced functions work.
This change is safe to do now, since there is no SPDK release with
ZNS so far.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If39fab4e7a6924cc3bd67aa0c03e9c6de5f8a324
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4681
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-10-20 12:18:56 +00:00
Niklas Cassel
198a3ad2fd nvme: if no command set is requested, use the most reasonable default
Since namespace types were introduced in NVMe, the CC.CSS register
has a new value (SPDK_NVME_CC_CSS_IOCS) which indicates that all
supported command sets should be selected/enabled. This possibly
includes command sets other than NVM and ADMIN only.

Therefore, if a SPDK application wants enable all the command sets
that the controller supports, it has to explicitly set
opts->command_set to SPDK_NVME_CC_CSS_IOCS.

To avoid possibly a lot of SPDK applications having to set this
parameter, check if the user requested a command set explicitly,
if not, make SPDK automatically use the most reasonable default,
based on the supported bits set by the controller.
The most common case is that you want to enable (all) the command
sets that the controller supports.

A user will still be able to restrict the controller to only use
the NVM command set (or ADMIN only), by setting opts->command_set
to a specific value.

Since the current default command set value specified by
spdk_nvme_ctrlr_get_default_ctrlr_opts() is SPDK_NVME_CC_CSS_NVM,
which is defined as 0, we cannot know if the user specified a
command set explicitly or not.
To solve this, change the default command set value specified by
spdk_nvme_ctrlr_get_default_ctrlr_opts() to CHAR_BIT (0x8), which
is larger than the largest value that can be set in CS.CSS (which
is only 3 bits wide, thus 0x7).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I45ec148d3667ab87c41fbfb6d6612a1e0e5c9d9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4701
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-10-20 12:18:56 +00:00
Tomasz Zawadzki
20b7b660c9 test/lvol: rename lvol test script
After the large effort of moving lvol tests from
python to bash, the original lvol.sh was removed.
Only lvol2.sh remained.

Just rename the script to its original name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5c0a239b01c111f0b11f554caaebfec372877c6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4561
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-10-20 08:54:53 +00:00
Karol Latecki
af62eb57fc autopackage.sh: add flag for release builds
Using another flag for the conditional will let us
run release build test in selected job configurations
for per-patch testing on CI side, not just for nightly
tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib9de1c98bf6d7380670f22321f2df7784f2517de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4734
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-20 08:54:40 +00:00
Karol Latecki
d526c73c61 autobuild.sh: replace --disable-debug
Using "get_config_params" and appending --disable-
debug results in contradictory options on the same
./configure line. Sed out "--enable-debug" instead.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I465f38b4c63ab7a6ae824c7932b2548fdb362ff3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4733
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-10-20 08:54:40 +00:00
Karol Latecki
63a6e3ba31 Add requirements.txt for Python Pip
“Requirements files” are files containing a list of items
to be installed using pip install. We're going to need
this for SNYK scans. We can also later use this file
in our pkgdep.sh installation script.

Change-Id: I3224f21ee4cbe170c9840aac38156eeee627c257
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4532
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 08:54:25 +00:00
Tomasz Zawadzki
6d86242dc5 subsystem/iscsi: remove legacy config support
This patch removes legacy config support in iscsi subsystem.
All options through the legacy config are already reflected in JSON.

Following RPCs are corresponding to removed legacy config sections:
Initiator groups - iscsi_create_initiator_group and iscsi_initiator_group_*
Subsystem options - iscsi_set_options
Portal groups - iscsi_create_portal_group
Target node - iscsi_create_target_node and iscsi_target_node_*

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I11326a84d4d580b19db422b8522198eea5a5be0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 08:53:53 +00:00
Shuhei Matsumoto
2842056073 blobfs_bdev: Use spdk_bdev_create_bs_dev_ext() instead of spdk_bdev_create_bs_dev_from_desc()
Replace all calls of spdk_bdev_create_bs_dev_from_desc() and
spdk_bdev_open_ext() by calls of spdk_bdev_create_bs_dev_ext()
including unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb9dc5a10f6e221c26e82e0194930cb7a2071dae

Change-Id: I61e577db9e26ef3e1c3e2e4093ad66922a178f34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4723
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
b6cbf872eb bdev/lvol: Pass bdev name instead of bdev pointer to vbdev_lvs_create
Change the first parameter of vbdev_lvs_create() from bdev pointer
to bdev name, and then remove spdk_bdev_get_by_name() from
rpc_bdev_lvol_create_lvolstore().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b0e47f551657f6aa1235af37a8357b0af62d414
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4707
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
3ea2bffb9e blob/bdev: Add function pointer get_base_bdev to struct spdk_bs_dev
spdk_bdev_create_bs_dev_ext() gets not bdev pointer but bdev name
as an argument, and hence vbdev_lvs_create() will get bdev name
accordingly.

However after completing spdk_bdev_create_bs_dev_ext(),
vbdev_lvs_create() has to get bdev pointer from the created bs_dev.

Hence add a function pointer get_base_bdev to struct spdk_bs_dev
and set it to bdev_blob_get_base_bdev() at initialization.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idef0663ace85db0269442212014286669c150069
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4706
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6051368da9 bdev/lvol: Use spdk_bdev_create_bs_dev_ext() when creating lvol store
This is a drop-in replacement. The following patches will remove
spdk_bdev_get_by_name() from the operation to create lvol store.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I31688cf98625f1d13012281d89f06d343e2f2cef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4705
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
9b32f4858c lib/rocksdb Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4acce43baa95d0968b7b568e87fade1972efc646
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4704
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6a72c19ee2 blob/bdev: Add an API spdk_bdev_create_bs_dev_ext()
spdk_bdev_open_ext() requires the caller to use bdev_event_cb_t
and bdev_event_cb_t is more extensible than bdev_remove_cb_t.
Hence use bdev_event_t as an argument.

spdk_bdev_open_ext() calls spdk_bdev_get_by_name() inside and
spdk_bdev_create_bs_dev_ext() calls spdk_bdev_open_ext() inside.
The caller needs to know if the spdk_bdev_get_by_name() succeeded.
Hence spdk_bdev_create_bs_dev_ext() returns return code by return
value and returns the created bs_dev by double pointer.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c225bfb66db036439c69c459f39c86684d8a540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4692
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
778e21aabd blob/bdev: Factor out the common blob_bdev initialization
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icdcc8b57198cd697921b025edfc8ba8f61bf0764
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4691
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
94d6e332bc ut/nvmf_ctrlr_discovery: Remove spdk_bdev_open() stub because it is not used
Remove the stub for spdk_bdev_open() and use the DEFINE_STUB_V macro
to the stub for spdk_bdev_close().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I84df06b4b73e1f5af5c2c8854f1613e8a413533b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4729
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6a684a349e ut/bdev_mt: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
Replace all spdk_bdev_open() calls by spdk_bdev_open_ext() calls
in the multiple SPDK threads cases of the unit tests for lib/bdev.c.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65591f12f8737bb8a0c1256fa84c5b6dac481150
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4728
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
75dfecbb16 ut/bdev: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
Replace most spdk_bdev_open() calls by spdk_bdev_open_ext() calls
in the unit test for lib/bdev.c.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifbb8a7338b1d99808c96c87be1cfbee145b0d21f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4727
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
d163fc1820 app/spdk_dd: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icf8e90fee4a3ffc70f68e346cabbfc87591bab73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4726
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Tomasz Zawadzki
cda1d2cf11 build: remove unused references to conf library
- Removed slew of conf.h includes
- No longer require mk vars that include conf

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica7e8e8bf1d4a5d0b0200bfe689aa13afd77bfaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4746
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
9103bca73b lib/event: remove deprecated ReactorMask from legacy config
Legacy INI configuration is being removed this release.
This patch removes one of its options and always uses the
SPDK_APP_DPDK_DEFAULT_CORE_MASK as default core mask.

That can only be overwriten by -m/--cpumask arguments in app.

In bdevperf there was no reason to set reactor_mask to NULL,
as that was then still using the defaults.

Meanwhile bdev_svc will now check if user provided different
string via command line args to know if it should
unaffinitize its thread.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id882f8d7dbdd07b7743bd5981c37daa888b7872a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4619
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
5b1e154a5c bdev: remove legacy config support
This patch removes legacy config support in bdev layer.
All options through the legacy config are already reflected in JSON.

Removed configuration can be set via `bdev_set_options` and
`bdev_set_qos_limit` RPC.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I24c365625540659cad425268d2aa41e3bf279d5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4645
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
a8de86e9aa lib/accel: remove legacy config support for accel module register
Since legacy config is being removed, SPDK_ACCEL_MODULE_REGISTER
macro no longer needs field corresponding to processing this
type of configuration.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I76ca02487a5fb8f9ecc9d33ac6fa514e7226a03b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4636
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
5f90d0c016 accel/ioat: remove legacy config support
This patch removes legacy config support in ioat accel module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iebaeef4cf648874700238f6167462f4958546be2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4635
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
ceea308887 lib/blobfs: remove legacy config support
This patch removes legacy config support in blobfs library.
Mostly reverting patch:
(97f3104) blobfs: Add conf parse for blobfs.

CacheBufferShift option in legacy config is not tested in CI,
and never received corresponding RPC.
If required the RPC can always be added later on.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I54e39f069047a243b2186ae5ea225ed452180488
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4668
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
d3e99f4891 module/virtio_blk/sci: remove legacy config support
This patch removes legacy config support in virtio_blk and virtio_scsi bdev modules.
Most of the options through the legacy config are already reflected in JSON.

Exception to that is "[VirtioPci] Enable" option, which worked for virtio_blk
and virtio_scsi. It then on initialization scanned virtio_pci devices for
presence of blk/scsi. There is no RPC that scans it on demand, nor was it used
in any of the tests. So this patch removes that functionality,
if needed this can be reintroduced as new RPC (or two for each backend).

Module initialization for bdev_virtio_scsi changed to be synchronous.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0978a4a084795e94993bb9122bd73ed49e14b96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
dbc7e89f58 subsystem/nvmf: remove legacy config support
This patch removes legacy config support in nvmf subsystem.
All options through the legacy config are already reflected in JSON.

Since the step in target initialization no longer does config
parsing, it was renamed appropriately.

There is no longer a need to delay this step via send msg,
since no callback is used.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5ee080bb1f5bf954f3b00545adb16e7176c35530
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4644
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
356edd8e51 subsystem/nvmf: move adding discovery subsystem out of conf.c
This is a step to prepare for deletion of conf.c.

Adding discovery subsystem is now moved out of parsing the legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idd36b5443541a1cc542d6837f17798bc6aaf17e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4664
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
c3dd7e10a7 subsystem/nvmf: move target creation out of conf.c
This is a step to prepare for deletion of conf.c.

NVMe-oF target application always creates the default 'nvmf_tgt'.
This was done as part of legacy configuration parsing, but does
not belong there at all.

Acceptor poll rate and max subsystems are set via RPC before this
step, or via legacy config. Since this patch creates target before
parsing the config, options defined there no longer change the target.

Parsing of legacy config will be removed further down the series,
so no need to refactor to keep the original functionality.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f87df0ad3f03b72d6f916de50e5eab6d29dafa9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4663
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
6caba3e63b subsystem/nvmf: define spdk_nvmf_tgt_conf in subsystem
This is a step to prepare for deletion of conf.c.

spdk_nvmf_tgt_conf was allocated either by RPC or legacy config.

RPC still had to to allocate that because settings for subsystem
are set before subsystem itself initializes.

This patch removed both allocations and just defines that in the
subsystem. nvmf_set_config RPC can now be called multiple times,
only overwritting values that were passed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5438a91c1d15070f1f193e29f2000c4b58ea4816
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4662
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-10-20 02:42:16 +00:00
Tomasz Zawadzki
8c66958a10 vmd: remove legacy config support
This patch removes legacy config support in vmd subsystem.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I45f66809a889b39a05bf4f6856431d922b497c76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4641
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
269efef886 bdev modules: remove legacy config support
This patch removes legacy config support in:
 crypto bdev module
- nvme bdev module
- ocf bdev module
- rbd bdev module
- pmem bdev module
- iscsi bdev module
- raid bdev module
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I00213365f52d3de1012493c14d4ea5fc537e595e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4673
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
b1f76f512f lib/vhost: remove legacy config support
This patch removes legacy config support in vhost_blk/scsi library.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia63651cdb7433267d1a8839a1739e68b436e5d08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4621
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-10-20 02:42:16 +00:00
Changpeng Liu
6bd7bd0da2 vhost: deprecate internal vhost library support
The internal vhost library is used when DPDK's version
is older than 19.05 and the experiemntal vhost nvme
target.

For the CONFIG_INTERNAL_VHOST_LIB option, SPDK doesn't
enable this option by default over one year and CI
doesn't cover it either, so we may remove it with
this release.

As for the vhost-nvme target, since we are developing
a new vfio-user target solution, it's OK for us to remove
it now.

Change-Id: Ib2cce1db99cd09754307c2828b3187f2d4550304
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4562
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 02:42:16 +00:00
Darek Stojaczyk
c77c655987 json: add spdk_json_free_object()
After decoding a JSON object we had to free the parsed
strings one-by-one. Not anymore.

Change-Id: I819f1d533e397aa9babca58b5500c38ac01a963d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2753
Reviewed-by: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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-10-19 10:02:10 +00:00
JimboLuCN
944a480ea7 blobfs: fix the problem that the return code is not returned correctly
In spdk_file_read and spdk_file_write, __send_rw_from_file always returns 0 and does not return the correct error code,
because req has been released in __rw_from_file_done.

Signed-off-by: JimboLuCN <lujinbo@didiglobal.com>
Change-Id: I4437cf8f1817dbb98bf71b808ad1c544e7b09853
Signed-off-by: JimboLuCN <lujinbo@didiglobal.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4311
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-10-19 10:01:21 +00:00
Yao Liu
ed0c3125fb vhost: add missing smp_rmb in vhost_vq_avail_ring_get
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: Ie8f42cb41ae923ae0926290019cc79d9f5afc868
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4647
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>
2020-10-19 10:01:01 +00:00
Michal Berger
f81cd2f3e2 make/check_so_deps: Speed up the confirm_deps()
Instead of iterating over each symbol, create a regex group including
all the symbols to lookup and pass it to grep.

Also, refactor some small pieces:
 - filter event_ dependencies within import_libs_deps_mk()
 - convert SPDK_LIBS to an array built up with extglob
 - drop DEP_LIBS
 - drop missing_syms (unused)

The overall improvement (this covers the execution of the subshell
within which confirm_deps() is called for each .so):

real    1m23.688s
user    4m16.196s
sys     8m3.110s

real    0m3.537s
user    0m13.450s
sys     0m18.486s

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id61c5f947cd116e0fa0107cc7c941beb2c0bdcb4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4632
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-19 10:00:44 +00:00
Michal Berger
d5f8983edd make/check_so_deps: Convert IGNORED_LIBS to assoc array
Also, move the check against IGNORED_LIBS to import_libs_deps_mk().

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I190262f728118d65c35481e490ca094086760cfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4631
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-10-19 10:00:44 +00:00
Michal Berger
5d88afca2a make/check_so_deps: Use function to get the short name of the lib
Change-Id: I2def5ca17c8c34447a398a7d210b6dce6a50ecc4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4630
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-10-19 10:00:44 +00:00
Michal Berger
4c859a6da5 make/check_so_deps: Drop replace_defined_variables()
This function was recursively greping through the .mk file to map all
ref variables $(...) to values they are set to. This was including
plenty of duplicate entries which then had to be sorted|uniqed.

Instead, and to avoid recurssion, import the entire .mk file into
Bash's environment. The mapping would look like so:

 JSON_LIBS := json jsonrpc rpc
 DEPDIRS-event_vmd := event vmd conf $(JSON_LIBS) log thread
 |
 v
 JSON_LIBS="json jsonrpc rpc"
 JSON_LIBS() { echo $JSON_LIBS ; }
 event_vmd="event vmd conf $(JSON_LIBS) log thread"
 |
 v
 event_vmd="event vmd conf json jsonrpc rpc log thread"

Change-Id: Ibfcd52438403cd7638e01d2d5642c08822f85106
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4629
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-10-19 10:00:44 +00:00
Michal Berger
7deb562547 make/check_so_deps: Fix a typo
/accesible/accessible/.

Change-Id: I79335935957f685ceb31ccfe0eca8ddd9edac306
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4628
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-10-19 10:00:44 +00:00
Michal Berger
5328d922d7 make/check_so_deps: Tell readelf to use wide output
Newer versions of readelf (e.g. from binutils v2.35) break the lines
in the following manner:

.... GLOBAL DEFAULT   14 restore_funcarra[...]

The symbol name is shortened, however, the way how it's indicated
with "[...]" may mess with any tools that look up this field with a
regex pattern - just like grep in the confirm_deps() test.

Currently, this test fails on clearlinux where the latest readelf
is shipped on board. To avoid it, make sure readelf returns full
name of the symbol with the --wide output.

Change-Id: Ief1a3dccde5481f603302ee714021dcebc20fc58
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4627
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-10-19 10:00:44 +00:00
Jim Harris
44ff994386 event: remove include of spdk_internal/thread.h
It's not needed.  Add it to one of the UT where it
is needed though.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I06628184c22df68deffce3ca0561878569ccf3f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4717
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 10:00:29 +00:00
Jim Harris
95e5339490 nvme: fix signed/unsigned error with cuse ioctls
cuse defines the ioctl handler to take an int for
the command, but the kernel uses unsigned int.  So
cast the int parameter to unsigned int when doing
the switch.

Fixes issue #1613.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ef13afc755ee79d8a79b3c7a09dccee7bb7aa1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4716
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-19 10:00:29 +00:00
Jim Harris
fcaf67e238 test/rdma: fix array subscript violation in rdma_ut.c
Found by gcc 10.1.1.

Fixes issue #1623.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3b43b0ad1db5048cadaccc16e3c9a47b2592aa6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4715
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-19 10:00:29 +00:00
Shuhei Matsumoto
405ae5eaae bdev/ocssd: Pass nvme_io_channel instead of spdk_io_channel to I/O functions
Except for bdev_ocssd_submit_request(), we can pass nvme_ch instead
of ch to I/O functions, and do the change in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia9e09300d053fa80ada8286c8df7ec689bdb9aaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4527
Community-CI: Broadcom CI
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
37cc052a6c bdev/ocssd: Rename the local and member variables ocssd_ioch by ocssd_ch
This change follows the standard nvme bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I83486712d23668e2688e0f1353519cea6dd6fef7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4689
Community-CI: Broadcom CI
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
69884770ec bdev/ocssd: Rename the local variable ioch by ch
This changes follows the standard nvme bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8306fef00489b36b57065bde78ccf9d852b5cba9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4688
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
350df1c6fe bdev/ocssd: Rename the local variable nvme_ioch by nvme_ch
This change follows the standard nvme bdev.

Two local variables used ioch for nvme_io_channel and they were
confusing. Rename them by nvme_ch too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iad42d28e698c3cacc3ebc9df379fc7551bebcb55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4687
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>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
229b996850 bdev/ocssd: Removed unused ioch parameter from bdev_ocssd_get_zone_info()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4a7a79892ca8d6010888e69d095e58c4b50bafce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4526
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Mellanox Build Bot
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
e9e9053a23 bdev/ocssd: Separate main and error operations of bdev_ocssd_submit_request()
As same as the last patch, follow the pattern used by standard nvme
bdev about bdev_ocssd_submit_request().

Extract main operations from bdev_ocssd_submit_request() into
_bdev_ocssd_submit_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I286b4d82a356a3f1fac9c052397714cd7ee8497d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4525
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: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
e2eac3bbd9 bdev/ocssd: Implement bdev_ocssd_reset_sgl/next_sge() as same as standard nvme bdev
It looks that we do not have any special reason not to follow
standard nvme bdev about bdev_ocssd_reset_sgl() and bdev_ocssd_next_sge(),
and it will be good for ocssd bdev to follow standard nvme bdev.

Add iovs and iovcnt to struct bdev_ocssd_io and rename iov_pos by
iovpos and iov_off by iov_offset.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ied864dc9505b3f1c0a19a8a36031dda9e32eb4d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4524
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: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
edced1368d bdev/nvme: Factor out depopulate all namespaces into a helper function
We have two functions, remove_cb() and bdev_nvme_library_fini() to
depopulate all existing namespaces.

Factoring out the operation into a helper function
nvme_ctrlr_depopulate_namespaces() will improve the readability.

Besides, change the line after return value for two functions to
adjust format.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibda921bdc94a50c14cca0ece462f76197efc5ccb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4642
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>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
0004476aac bdev/nvme: Clean up bdev_nvme_reset() to clarify the failover case
Swap the resetting case and the non-resetting case. Unlock mutex
before calling spdk_bdev_io_complete(). Use curr_trid instead of
tmp_trid to clarify the meaning of the stored value.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If3b520a16459aba498ac80ed887b9223ac5ca3d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4523
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-19 10:00:16 +00:00
Shuhei Matsumoto
5908576131 bdev/nvme: Consolidate error paths of create_ctrlr() and rename it
Consolidating error paths will be helpful to create and associate
with the creating controller. Fix a couple of memory leaks in error
paths together.

Then rename create_ctrlr() by nvme_bdev_ctrlr_create() to follow
naming conventions and clarify what type of controller is created.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3f9073756198c0b0bc65b67ce84a41233297eac0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4509
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>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 10:00:16 +00:00
Tomasz Zawadzki
5acae9d6f7 module/uring: remove legacy config support
This patch removes legacy config support in uring bdev module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I79f9b4458af2fdf0e4683f9cd82b64e9658c5fcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4672
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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>
2020-10-19 09:55:43 +00:00
Tomasz Zawadzki
f0ef3b2fcb module/split: remove legacy config support
This patch removes legacy config support in split bdev module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iaa8e546bbd6357ba93af8164e2f3d8e497fcec06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4634
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 09:55:43 +00:00
Tomasz Zawadzki
421ced38b3 module/passthru: remove legacy config support
This patch removes legacy config support in passthru bdev module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I53ee6e78d210c155a31ae6204472e89756e43e65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4633
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: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 09:55:43 +00:00
Tomasz Zawadzki
2eda3fa095 module/null: remove legacy config support
This patch removes legacy config support in null bdev module.
All options through the legacy config are already reflected in JSON.

While here, added allocation failure check for g_null_read_buf.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I59a28a402e0c61e5636da623bc109e15b36f0584
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4626
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-10-19 09:55:43 +00:00
Tomasz Zawadzki
98fde363f3 module/malloc: remove legacy config support
This patch removes legacy config support in malloc bdev module.
All options through the legacy config are already reflected in JSON.

Note that malloc_disk_count needs to be reset for each module initialization.
Otherwise for cases where bdev submodule is reinitialized, the count in
malloc names would grow. This should be addressed separately by making name
parameter required, rather than optional. Which is the case for most (all?)
of the other bdev modules.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ida93c74e7b0be7da19e11d5cc3fda9112824782f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4625
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 09:55:43 +00:00
Tomasz Zawadzki
ccdbe656be module/gpt: remove legacy config support
This patch removes legacy config support in GPT bdev module.

Please note that disabling probing only for GPT partition does not
have a corresponding RPC.

Similar functionality is possible for all bdev modules at once via
`bdev_set_options --disable-auto-examine` RPC then followed by
`bdev_examine` RPC for particular bdev.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a106b3dc0953166264b11c2e95c4433163fcd3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4624
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-19 09:55:43 +00:00
Shuhei Matsumoto
aed3d21eca bdev/virtio: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
It is not really necessary to replace spdk_bdev_open() by
spdk_bdev_open_ext() for virtio scsi bdev, but spdk_bdev_open() has been
deprecated. Hence do the replacement in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I995c01c3c5842b306497e32099f6cfe767333091
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4725
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-10-19 09:55:14 +00:00
Shuhei Matsumoto
5885a8ab43 lib/nbd: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3c297b6676b53bae8a308d5732800ac05c4cebc7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4724
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-10-19 09:55:14 +00:00
Shuhei Matsumoto
83b57c54da bdev/hello_world: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20dc836b4d17770c8164c737e5523ebbf6fb22bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4708
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-10-19 09:55:14 +00:00
Shuhei Matsumoto
3ac1d76aef bdev/ocf: Use spdk_bdev_open_ext() instead of spdk_bdev_open() in attach_base()
This is a drop-in replacement.

spdk_bdev_open_ext() requires the caller to specify event_cb.
Hence base_bdev_event_cb() calls hotremove_cb() only if event_cb is
not NULL.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98cd29781412406470a173e9714c65a07288c573
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4690
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-19 09:55:14 +00:00
Shuhei Matsumoto
c6358b974f bdev/zone: Pass bdev name instead of bdev pointer to vbdev_zone_register()
To reduce the patch size, use local variables for descriptor and
bdev pointer before allocating the bdev_zone_block structure.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie33fac33eeb39ccc2b016d2f9c1711fcf76ebd7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4649
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-10-19 09:55:14 +00:00
Darek Stojaczyk
f766d1e478 nvmf: let transports parse transport opts from JSON themselves
There are more transport on the way and we don't want to add
all their various opts into the single, generic structure.
We'll pass the JSON structure to transports instead. Then
the transport code can custom pull from the JSON any param
it wants.

To complement that, transports will now also have their own
JSON config dump callback. This was only done in the generic
nvmf.c so far, with conditions for RDMA and TCP.

Change-Id: I33115a8d56cec829b1c51311a318e0333cc64920
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2761
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-19 09:55:05 +00:00
Changpeng Liu
9ae19a413b nvme: restore qid in free_io_qids bit array
There is an error when do following sequences:

1. Allocate an I/O queue pair
2. Do controller reset via spdk_nvme_ctrlr_reset
3. Allocate an I/O queue pair

becaues the free_io_qids was reset and didn't
restore.

Fix issue #1621.

Change-Id: Icd533f171079c12fe03be07e659e8eed9b082384
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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-10-19 09:54:54 +00:00
Shuhei Matsumoto
9eefbc5b10 lib/iscsi: Add login timeout not to leave hunged connection
An issue is reported that connections were left forever without any
progress during login processing.

Not to leave these connections, add the login timeout feature as
described in the iSCSI specification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I9483a5b5540b433df6235aa7fc13b99eaca0bfa4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4609
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-10-19 09:54:44 +00:00
Changpeng Liu
da58e37709 test/memory_ut: fix clang compilation error
clang reports the following error:

memory_ut.o: In function `vtophys_notify':
/home/spdk/lib/env_dpdk/memory.c:1025: undefined reference to `rte_eal_iova_mode'
/home/spdk/lib/env_dpdk/memory.c:1137: undefined reference to `rte_eal_iova_mode'

Fix issue #1613

Change-Id: Ia7e3e6c1f6f63bf664d6b76ebdc070c2cba76b2d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4686
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-19 09:54:32 +00:00
Tomasz Zawadzki
ab856faa64 env: replace phys_addr to iova in rte_memseg
DPDK patch (7ba49d39) included in DPDK v19.11
renamed phys_addr to iova in rte_memseg structure.

Meanwhile latest DPDK from (72f82c43) removed the
phys_addr altogether.

This patch replaces the reference for DPDK v19.11 and up.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I24b28d32ec8758d730b14bc54fd0cf1a4cc5a333
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4419
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-10-19 09:54:20 +00:00
Shuhei Matsumoto
7a85820db3 bdev/zone: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is just a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I018ef60648122aa672430bb62dc7b1a2e1cd5d7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4648
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-16 23:12:03 +00:00
Shuhei Matsumoto
bd190d88b3 bdev/raid: Pass bdev name instead of bdev pointer to raid_bdev_add_base_device()
This change removes the call of spdk_bdev_get_by_name() from
raid_bdev_add_base_devices() by passing bdev name instead of bdev
pointer to raid_bdev_add_base_device().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1dc7bb6edbc23513f69e7acdf8ca735494338bfd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4592
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
2020-10-16 23:12:03 +00:00
Shuhei Matsumoto
d8a1892422 bdev/raid: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement. Update unit test together, and the
idea of the update was from the unit test for zone bdev module.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia8d0644f42b9d0a0ad502eebbe3e414abd1de4cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4591
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
2020-10-16 23:12:03 +00:00
Shuhei Matsumoto
491e6c4309 bdev/crypto: Open base bdev first using spdk_bdev_open_ext()
vbdev_crypto_claim() gets bdev name instead of bdev pointer
as a parameter, and open the corresponding base bdev first using
spdk_bdev_open_ext().

The purpose is to fix the race condition due to the time gap
between spdk_bdev_get_by_name() and spdk_bdev_open(). A bdev pointer
is valid only while the bdev is opened.

Resize event is not supported for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0e1ce2ce696f431bb26af94729931c3ffb9a9d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4588
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
2020-10-16 23:12:03 +00:00
Changpeng Liu
e3f08eef8c examples/nvme: export DPDK single file descriptor memory segments as input parameter
Similar with existing virtio user driver, we need to enable "--single-file-segments"
option in DPDK as the target only support limited number of memory regions, for
coming vfio-user feature, the requirement is same, so here we enable the option
with identify&perf tools in advance.

Change-Id: I83d78b403a8c1ec0c76a5bf21aac6bed109931c3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4612
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-16 08:16:50 +00:00
Jim Harris
eecc14df19 event: fix fallthrough in spdk_app_parse_args
This issue was only seen in release builds since the
break was hidden under DEBUG.  This seems to indicate
we aren't compiling release builds with -werror in
CI.

Fixes: 8a76c2484 (event/app: allow to enable log flag...)

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5766af1d4a22f9269dd18c47d408a9d05b3ceb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4714
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:16:04 +00:00
yidong0635
846bb4b9e1 nvme/nvme_rdma: Fix possible used uninitialized value.
In file included from nvme_rdma_ut.c:36:
/home/clear/spdk/lib/nvme/nvme_rdma.c:651:22: note: ‘bad_send_wr’ was declared here
  651 |  struct ibv_send_wr *bad_send_wr;
      |                      ^~~~~~~~~~~
In file included from /home/clear/spdk/lib/nvme/nvme_rdma.c:41,
                 from nvme_rdma_ut.c:36:
/home/clear/spdk/lib/nvme/nvme_rdma.c: In function ‘nvme_rdma_poll_group_process_completions’:
/home/clear/spdk/include/spdk/log.h:132:2: error: ‘bad_send_wr’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
  132 |  spdk_log(SPDK_LOG_ERROR, __FILE__, __LINE__, __func__, __VA_ARGS__)
      |  ^~~~~~~~
cc1: all warnings being treated as errors.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I38ae36756b4bacef7e89f0f1737684c8b8981b12
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4696
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-10-16 08:15:57 +00:00
yidong0635
ec51918c07 lib/idxd: Fix warning on cleanlinux with gcc-10.
home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_copy’:
/home/clear/spdk/lib/idxd/idxd.c:761:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  761 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:761:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  761 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  LINK lvol_ut
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_dualcast’:
/home/clear/spdk/lib/idxd/idxd.c:806:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:806:26: error: ‘dst1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c:806:50: error: ‘dst2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_compare’:
/home/clear/spdk/lib/idxd/idxd.c:845:5: error: ‘src1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  845 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:845:27: error: ‘src2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  845 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_fill’:
/home/clear/spdk/lib/idxd/idxd.c:881:5: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  881 |  if (dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_crc32c’:
/home/clear/spdk/lib/idxd/idxd.c:919:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  919 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:919:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  919 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  CC test/unit/lib/util/cpuset.c/cpuset_ut.o
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_copy’:
/home/clear/spdk/lib/idxd/idxd.c:1108:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1108 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1108:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1108 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_fill’:
/home/clear/spdk/lib/idxd/idxd.c:1142:5: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1142 |  if (dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_crc32c’:
/home/clear/spdk/lib/idxd/idxd.c:1218:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1218 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1218:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1218 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  LINK iscsi_fuzz
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_compare’:
/home/clear/spdk/lib/idxd/idxd.c:1255:5: error: ‘src1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1255 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1255:27: error: ‘src2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1255 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I7f1b01c04e4f7287616c590b652aa5cee26d2901
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4694
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-16 08:15:57 +00:00
yidong0635
9714818d04 test/bdev_ut: fix warning about unitialize value.
gcc version 10.1.1 20200619 releases/gcc-10.1.0-223-gf8e16e23d0
(Clear Linux OS for Intel Architecture)

Issue reports:

  CC test/unit/lib/nvme/nvme_ns_cmd.c/nvme_ns_cmd_ut.o
bdev_ut.c: In function ‘bdev_io_alignment_with_boundary’:
bdev_ut.c:2146:2: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 2146 |  free(buf);
      |  ^~~~~~~~~
bdev_ut.c: In function ‘bdev_io_alignment’:
bdev_ut.c:2008:2: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 2008 |  free(buf);
      |  ^~~~~~~~~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I6d1bbf74b230b7bc51646454ddba0db4792f5900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4693
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-16 08:15:57 +00:00
Jin Yu
1903dd1049 test: add packed ring test in blk device
Add an integrity test for the packed ring.
SPDK vhost blk has already supported this format.

Change-Id: I38329d837e0a5c6d4e12b30c7c99e02536ed8ac9
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4595
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>
2020-10-16 08:15:51 +00:00
Sochin Jiang
e9c815ad4c lib/iscsi: add 'state' and 'login_phase' to RPC 'iscsi_get_connections'
In some abnormal condition, iscsi connections can be exceptional,
add these two infomation for monitoring iscsi connections state.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: Ib43128302e8ea057d665e4d6294e28ec7e4f4194
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4613
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-10-16 08:15:40 +00:00
Tomasz Zawadzki
c4a95932a1 module/error: remove legacy config support
This patch removes legacy config support in error bdev module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I348c19f560057b46030aa03adcca073f0906de0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4623
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
5f14cec828 module/aio: remove legacy config support
This patch removes legacy config support in AIO module.
All options through the legacy config are already reflected in JSON.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I43655ab8d3ca787a7e92072b195f3b73fcf4fdbf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4620
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-10-16 08:15:26 +00:00
Tomasz Zawadzki
b850710af6 test/vhost: remove unused bdev_pci.conf
This config file was not used in any tests.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8e32346dcb05fd68f7f64d2a7b4907bb8d80a5d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4618
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
562598c9de test/vhost: remove test for incorrect legacy config
Legacy configuration is being removed, no need to test it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I38eb9f5b77e0457516a03b30d33dc5a11ef35d1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4617
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
d48992413c perf/nvme: simplify discover_bdevs()
This function does need to handle legacy configs and
it's single use did not request any wait_for_spdk_bdev.

Remove those arguments.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic988762c7ca622ff538aeb7bd2bb529e6e6d56e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4616
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
e251e40422 test/vhost: remove unused vm_check_virtio_location()
This function relied on legacy config to work and was unused,
thus is removed in this patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id11dbbcba3dc5b4981c03eca945c7d40fb0f7ce6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4615
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
b7db237d09 test/blob: move blobiowait test to JSON config
Legacy config will be soon removed, change to JSON config.

While here, removed superflous sourcing of nvmf common and
-r on rm for a file.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifd45c644192b57661131e0b3e369e389a4500432
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4614
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
7f139e549b lib/blob: extent_page shall never occupy md page 0
Search for md_page to be used as extent page started
from 0, which is completely valid md_page.

This page can be free when for example blob with id 0
was deleted and some other requested a new page for extent.

There are already existing blobs that have extents
pointing to 0, which means unallocated.
Unfortunetly it means 0 can never mean md page 0.
If that already occured for someone, this extent page was already
lost during blob/bs reload and nothing can be done.

With this in mind following assumptions are made for extent pages:
- 0 means unallocated extent page
- UINT32_MAX means we ran out of md pages, and should not be persisted
- [NEW] extent page can never occupy md page 0

That last one is new addition in this patch.
bs_allocate_cluster will now always try to find md page from 1 or higher.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia17ce5bbca2fab4fb4487e4e263f3a0aa120bf17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4314
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>
2020-10-16 08:15:16 +00:00
Tomasz Zawadzki
63e257ed34 lib/blob: update pages array during blob load
When loading a blob and parsing its metadata,
the array of pages was not updated.
Serialization was unaffected, since the current pages
array is unused there.
Behavior was working correctly for first page,
but did not for any blob with more than one page.

Unfortunetly blob_persist_zero_pages() never zeroed out
the pages, neither blob_persist_zero_pages_cpl()
released the md pages.

Resulting in md pages being claimed even after blobs
deletion.

This patch now fills out the active pages array with
the appropriate page numbers from metadata.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6ff1f4fe95684119d283c2471fdbbea464da8151
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4504
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>
2020-10-16 08:15:16 +00:00
Tomasz Zawadzki
34f84c5845 lib/sock: zero out sock_impl opts
By design the opts for each implementation
can not match spdk_sock_impl_opts.
During get_opts for specific implementation
only used fields are filled.

Yet iterating over all spdk_sock_impl_opts fields
would yeild garbage values for unset fields.

This is the case right now when doing save_config RPC
with uring enabled. A garbe value for enable_zerocopy_send
is returned.

sock.c:829:62: runtime error: load of value 165, which is not a valid value for type '_Bool'

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie0512a7dffc36c8ff89256d08f8a2f4fefcf9e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4699
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-10-16 08:15:10 +00:00
Tomasz Zawadzki
f285205333 module/lvol: remove SPDK_INFOLOG from I/O path
There is no good reason to track every single I/O
to the module and especially not at INFO level behind
a log flag.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I16a772ae4d49d3c1963ca223ef0bc2068b405988
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4713
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:14:59 +00:00
Tomasz Zawadzki
1a884e94e4 lib/log: do not use spdk_log_get_flag() in macro for log flags
Especially SPDK_INFOLOG() should not call spdk_log_get_flag() function,
instead rely on the log flag structure.

This caused performance degradation in places that used SPDK_INFOLOG
too extensively.

Due to nature of the macros, in the meantime new debug log in
iscsi was improperly named. This wasn't caught because of the
macros reliance on spdk_log_get_flag(), where if name wasn't
registered - no log was printed and no compilation occurred.
Going back to using the structures, gives immediate feedback
that there is no SPDK_LOG_ISCSI log flag.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I262eadb5aee29caa2a5cd719c82ca4963ea24576
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4712
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:14:59 +00:00
Shuhei Matsumoto
186c834f04 bdev_nvme/opal: Use spdk_bdev_part_base_construct_ext() to pass bdev_name
This is a drop-in replacement of spdk_bdev_part_base_construct() by
spdk_bdev_part_base_construct_ext().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0c719683b5a9cd6dffce057552982d8e44871ab1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4580
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
5bb0d8f204 bdev/error: Use spdk_bdev_part_base_construct_ext() to pass bdev_name
Use spdk_bdev_part_base_construct_ext() to pass bdev_name and
remove the spdk_bdev_get_by_name() call. Remove the created configuration
only if non-zero return code other than -ENODEV is returned.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieb5ee5d7e1ccc984df1e84205be18c7b93799bba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4579
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
d719c79309 bdev/split: Use spdk_bdev_part_base_construct_ext() to pass bdev_name
Use spdk_bdev_part_base_construct_ext() to pass bdev_name and
remove the spdk_bdev_get_by_name() call.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ce2e892949c7e6a78d90699e3826ff57ee3c2ee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4578
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
db8bd99588 bdev/part: Add spdk_bdev_part_base_construct_ext() to pass bdev_name
Add an new API spdk_bdev_part_base_construct_ext() to pass not bdev but
bdev_name to fix the race condition due to the time gap between
spdk_bdev_get_by_name() and spdk_bdev_open(). A pointer to a bdev is
valid only while the bdev is opened.

In the new API, spdk_bdev_get_by_name() is included in
spdk_bdev_part_base_construct_ext() and the caller has to know if
the bdev exists or not. Hence spdk_bdev_part_base_construct_ext()
returns return code and returns the created part object by the double
pointer.

Another critical change is that base is just freed if spdk_bdev_open_ext()
failed with -ENODEV. The reason is that if we call spdk_bdev_part_base_free()
for that case, the configuration is removed by the registered callback
and so bdev_examine() will not work.

The following patches will replace spdk_bdev_part_base_construct()
by spdk_bdev_part_base_construct_ext() for the corresponding bdev
modules.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2db027a159559c403cdfbd71800afba590b0f328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4576
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
c59f0022c3 bdev/part: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is just a drop in replacement of spdk_bdev_open().

Hold the passed remove_cb in struct spdk_bdev_part_base, and use
it in the new callback function bdev_part_base_event_cb. The resize
event is not supported for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I51c251f04bda13bd6712417010648717f7bf793f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4572
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: Paul Luse <paul.e.luse@intel.com>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
7e1a85aff2 CHANGELOG: Move bdev_examine_bdev from bdev section to RPC section
bdev_examine_bdev is not a public SPDK API but a JSON RPC method.
Hence move the description from the bdev section to the RPC section.
Additionally, clarify auto_examine is disabled by setting bdev_auto_examine
of the RPC bdev_set_options to false.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6de7db9769a20ad8435292a6fb302f102ef5d68d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4646
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-10-16 08:14:34 +00:00
Shuhei Matsumoto
bba9e8dbca bdev/part: Fix wrong doc about return value of spdk_bdev_part_base_construct()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I133f08648b783d3faa8e1a8d3655812630106dab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4586
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>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
aec30063e3 bdev/compress: Pass bdev name instead of bdev pointer to _prepare_for_load_init()
This patch removes the call of spdk_bdev_get_by_name() from
create_compress_bdev() by calling spdk_bdev_open_ext() and then passing
bdev descriptor to _prepare_for_load_init().
vbdev_init_reduce() returns the return code of spdk_bdev_open_ext()
directly if it is error to process the ENODEV case correctly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie80ce4104ceaa5726db976e33cd35352d5c91703
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4571
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>
2020-10-16 08:14:34 +00:00
Shuhei Matsumoto
c3ed33f475 bdev/compress: Keep bdev open from reduce initialization to bdev claim
Previously bdev was closed after reduce initialization and was re-opened
before bdev claim.

This patch series will fix the race condition due to the fact that
bdev pointer is valid only while bdev is opened.

Hence keeping bdev open from reduce initialization to bdev claim
is better.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I00914db0aef8547c0826061bb0e500735b0b97a1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4567
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-16 08:14:34 +00:00
wanghailiangx
10f712bc99 nvmf_rpc: remove a redundant '\n'
For example:
Got JSON-RPC error response
response:
{
  "code": -32602,
  "message": "Invalid transport type 'rdma'\n"
}
The \n here is redundant.

Change-Id: I30a22f93f2be2550fdbe2af2d90eaa1c381dc7ae
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-15 08:24:55 +00:00
Vasuki Manikarnike
ed65607cf9 lib/nvme: Hold ctrlr->ctrlr_lock before calling nvme_ctrlr_fail
Fixes #1615

Signed-off-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Change-Id: Ib38f38a1086ec804222ccb94dfb3d41a85b62a8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4608
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-10-15 08:24:47 +00:00
GangCao
2475faff1e lib/nvmf: destroy the mutex in the error case
Change-Id: I9663075cfa0770ae81112b9b225bb993168025f0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4652
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-10-15 08:24:22 +00:00
Ben Walker
5efa3d61ff nvmf: Add spdk_nvmf_subsystem_disconnect_host
This will disconnect all connections to a subsystem from a given
host identified by HOSTNQN.

Change-Id: Ibc9cea1f08a58a05dbac3a0bb47df8d8a58e7c10
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4556
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: Changpeng Liu <changpeng.liu@intel.com>
2020-10-15 08:24:05 +00:00
Ben Walker
ce594c1e43 nvmf: The nvmf subsystem host management RPCs no longer pause subsystems
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I03f8840708853cc0dfba383979f9e4abc157a4b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4582
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
2020-10-15 08:24:05 +00:00
Tomasz Zawadzki
4e8e97c886 log: remove internal log.h header
There is nothing left here, so remove it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib947d42bc577dbebb4650b1be885e05a80f8f8cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4541
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
2020-10-15 08:23:39 +00:00
Tomasz Zawadzki
324ebbfcb9 log: remove SPDK_ERRLOGDUMP
This macro was used in only single place and served no real
purpose.

spdk_log_dump() is more commonly used directly, so use it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idea720cdee767c7c6cdc30db10003ef42b88c4a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4540
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: Mellanox Build Bot
2020-10-15 08:23:39 +00:00
Tomasz Zawadzki
7b5d9b063d log: remove log levels from internal log.h
There is no need to keep the log level in internal header.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0f732af4a18fd16d9c5b26efc051f122a117a9e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4539
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-10-15 08:23:39 +00:00
Tomasz Zawadzki
8a76c2484a event/app: allow to enable log flag for release builds
Log flags could also report on SPDK_LOG_INFO level by using
SPDK_INFOLOG() macro. Yet this did not result in additional
log due to check for debug build.

This patch allows release builds to use that flag.
Meanwhile the -L option besides turning on particular log flag
changes print log level to SPDK_LOG_DEBUG.

Applied changes to serveral applications to follow the
behaviour of event framework.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0d6cce33263c350d6d83300d60e7d15bdfe4b64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4557
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
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>
2020-10-15 08:23:39 +00:00
Shuhei Matsumoto
779a6bdf82 bdev/compress: Replace spdk_bdev_open() by spdk_bdev_open_ext()
This patch is just a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iffb253ba3a46f03f9927c4ba4206376509cbb5fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4566
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
01e6b54572 bdev/delay: Open base bdev first using spdk_bdev_open_ext()
vbdev_delay_register() gets bdev name instead of bdev pointer as a
parameter, and open the corresponding base bdev first using
spdk_bdev_open_ext().

The purpose is to fix the race condition due to the time gap
between spdk_bdev_get_by_name() and spdk_bdev_open(). A bdev pointer
is valid only while the bdev is opened.

Resize event is not supported for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib9f43965bcf28f8ca0d16fd2c73219253805f254
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4565
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
f057ffbaff bdev/passthru: Open base bdev first using spdk_bdev_open_ext()
vbdev_passthru_register() gets bdev name instead of bdev pointer
as a parameter, and open the corresponding base bdev first using
spdk_bdev_open_ext().

The purpose is to fix the race condition due to the time gap
between spdk_bdev_get_by_name() and spdk_bdev_open(). A bdev pointer
is valid only while the bdev is opened.

Resize event is not supported for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib8894cf857ef814f6721e4244237c8156f147426
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4564
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
c491fa5b91 lib/bdev: Change ERRLOG to NOTICELOG when bdev is not found in spdk_bdev_open_ext()
spdk_bdev_get_by_name() is included in spdk_bdev_open_ext() and
when we use spdk_bdev_open_ext() for some bdev modules, for example,
pass-through bdev module, the case that bdev is not found in
spdk_bdev_open_ext() is normal.

Hence change the corresponding ERRLOG to NOTICELOG.

Besides, change the wording to "Currently unable to find bdev with name"
to indicate there is a chance that it will be there later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I055bce51d1aa7f005efab28359746f17858dfe48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4589
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
c0e0693145 lib/bdev: spdk_bdev_open_ext() returns -ENODEV if bdev whose name matches is not found
For example, for pass-through bdev modules, it is acceptable that
bdev whose name matches is not found when creating a pass-through
bdev.

The next patch will replace spdk_bdev_open() by spdk_bdev_open_ext()
for pass-through bdev module.

spdk_bdev_open_ext() includes spdk_bdev_get_by_name(). Pass-through
bdev module has to know if spdk_bdev_get_by_name() returned NULL
in spdk_bdev_open_ext().

Hence change spdk_bdev_open_ext() to return -ENODEV if spdk_bdev_get_by_name()
returned NULL.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I525a7118481586161bd0e8c07b96a887c0a04210
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4575
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
0238bb734a lib/vhost_blk: Open bdev by bdev_name first in spdk_vhost_blk_construct()
Open a bdev whose name matches bdev_name first in spdk_vhost_blk_construct()
to avoid using spdk_bdev_get_by_name() to fix the race condition
due to the time gap between spdk_bdev_get_by_name() and spdk_bdev_open_ext().
A pointer to a bdev is valid only while the bdev is opened.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I99fedd696aa44bb46c1fcc4f49ca37069f7adfef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4502
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-14 08:07:06 +00:00
Shuhei Matsumoto
a22d8a530f lib/nvmf: Add an API spdk_nvmf_subsystem_add_ns_ext() to pass bdev_name
Add an new API spdk_nvmf_subsystem_add_ns_ext() to pass not bdev but
bdev_name to fix the race condition due to the time gap between
spdk_bdev_get_by_name() and spdk_bdev_open(). A pointer to a bdev is
valid only while the bdev is opened.

spdk_bdev_open() has been replaced by spdk_bdev_open_ext() but the
issue still existed.

Update the corresponding unit tests accordingly.

Then replace the internal of spdk_nvmf_subsystem_add_ns() by
spdk_nvmf_subsystem_add_ns_ext() call.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifcaa2121129ef22d5e61c9a8f7c640ff37a64485
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4485
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-14 08:07:06 +00:00
yidong0635
cf51adeaae lib/net : Initialize global TAILQ HEAD variable at definition.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I2cd730957f9d839dd18969d0e9c9261ce0300e66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4599
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-14 08:06:25 +00:00
yidong0635
55478de6e4 lib/blobfs: Initialize global TAILQ HEAD variable at definition.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I3306e38781ceb2e98fbf9e62c4e02dd010ce62f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4598
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-14 08:06:25 +00:00
yidong0635
a3d1419b05 example/ioat: Initialize global TAILQ HEAD variables at definition.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I0364992ae1af0e102e5a05857bb4b3251765f7ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4597
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-14 08:06:25 +00:00
yidong0635
232bfc75e0 module/bdev: Initialize global TAILQ HEAD variables at definition.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I957e6a72878fa6c523942710544de981202fa311
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4596
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-14 08:06:25 +00:00
Jacek Kalwas
e1a9774cdc nvmf: clear-out qpair during poll group add
There are operations on nvmf which depends on proper values of qpair
attributes which can be intepreted as internal state.
e.g.
nvmf_ctrlr_process_fabrics_cmd execution relies on qpair->ctrlr
spdk_nvmf_qpair_disconnect relies on qpair->disconnect_started

As poll group add is like a registration of qpair into nvmf lets try
to initialize it to a defined and expected state.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I10494e7f70ff58ec5460cab1de8a52fd21cc4a48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4479
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: Ben Walker <benjamin.walker@intel.com>
2020-10-14 08:05:29 +00:00
Tomasz Zawadzki
ffbddd4f3e lib/log: move internal log to public header
This change will allow external libs to register
SPDK log flags and use log macros by external libs.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I03ef088580bbf23bd22ad1a36817ca84c5ba8edd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3954
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-10-14 08:00:35 +00:00
Tomasz Zawadzki
2172c432cf log: simplify SPDK_LOG_REGISTER_COMPONENT
This patch removes the string from register component.
Removed are all instances in libs or hardcoded in apps.

Starting with this patch literal passed to register,
serves as name for the flag.

All instances of SPDK_LOG_* were replaced with just *
in lowercase.
No actual name change for flags occur in this patch.

Affected are SPDK_LOG_REGISTER_COMPONENT() and
SPDK_*LOG() macros.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I002b232fde57ecf9c6777726b181fc0341f1bb17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
2020-10-14 08:00:35 +00:00
Tomasz Zawadzki
e19b294a22 log: rename log flag literal to align with SPDK_LOG_* scheme
Couple log flags did not follow previous scheme of naming
so rename it.

This will simplify next patch that replaces all the literals
with names provided for the flags. Avoiding accidental
changes in log flag names.

SPDK_NOTIFY_RPC -> SPDK_LOG_NOTIFY_RPC
SPDK_LOG_CRYPTO -> SPDK_LOG_VBDEV_CRYPTO
SPDK_TRACE_VBDEV_OCF_VOLUME -> SPDK_LOG_VBDEV_OCF_VOLUME
SPDK_LOG_JSON -> SPDK_LOG_JSON_UTIL

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I00cb0a7994d8aaf28b03828b93b1dbb18215089f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4498
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-14 08:00:35 +00:00
Tomasz Zawadzki
cafc1994ee log: add underscore to lvolrpc log flag
This makes it more in line with other flags.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2d2f720a6cf1a6aa0cf3ddc0691c7ffc0adc43fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4538
Reviewed-by: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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-10-14 08:00:35 +00:00
Tomasz Zawadzki
17fce4f310 log: change app_rpc flag to lowercase
This makes it more in line with other flags.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic44821318444dc2ea30771aba06201572ca7ef12
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-14 08:00:35 +00:00
Tomasz Zawadzki
dc343a6ea2 log: remove unused log flags
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic9aebb2318723d612f467de7209e457481068fc2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4536
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: Ben Walker <benjamin.walker@intel.com>
2020-10-14 08:00:35 +00:00
Tomasz Zawadzki
1121797b7e log: avoid name conflict with log flags structure
Patch further out the series will be removing "SPDK_LOG_"
portion of the literal. They will be made much shorter and
have potential to conflict with some other structures.

Add SPDK_LOG to the structure itself which will make sure
there is no conflict as is now.

For couple patches the structures will have longer than nessecary
names.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If281fa8b7ae027500b980766d90513f8c3ee187a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4494
Reviewed-by: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-14 08:00:35 +00:00
Tomasz Zawadzki
849aa41d71 log/ut: use register macro in UT
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib42a3aa4f44ef7a5e55f0d59441f24736bebf735
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Mellanox Build Bot
Reviewed-by: Jacek Kalwas <jacek.kalwas@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-10-14 08:00:35 +00:00
Tomasz Zawadzki
617a55953c log: fix register macro ending with semicolon
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I98bf7620da9065e9ab0ac3ba0444ba5998e69b8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Jacek Kalwas <jacek.kalwas@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>
Community-CI: Broadcom CI
2020-10-14 08:00:35 +00:00
Sochin Jiang
b866d5192f lib/iscsi: fix one inappropriate assertion
Port scanning causes iscsi_tgt assertion failure, try using
'nmap -sV ${host} -p ${port}' to reproduce the assertion failure
'ahs_len <= ISCSI_AHS_LEN', fix this issue.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I3ada9f0faf746792264e0ce74eb11eebba9d9432
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4585
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-13 07:48:25 +00:00
Sochin Jiang
8d081e74c1 lib/iscsi: fix another assertion failure of 'assert(task->ref > 0)'
In high read IO pressure, there is a loop call of process_completed_read_subtask_list()
while calling spdk_iscsi_task_response(), this cause 'primary->bytes_completed'
changes, in turn cause multiple calls of 'spdk_iscsi_task_put(primary)', assertion
failes in spdk_scsi_task_put().

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I41d02d318f827f3bb3ad9ba3a06e080b5113cd40
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4083
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-10-13 07:48:18 +00:00
Ben Walker
eda91a7b07 nvmf: Getting or setting the allow_any_host parameter no longer requires
a pause

This now also takes a lock instead of requiring a pause of the whole
subsystem.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7de174f3f56d2b3767e723387c4f2257107d8b19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4581
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-10-13 07:48:12 +00:00
Ben Walker
d67119d8bd nvmf: Don't require a full subsystem pause to change the allowed hosts
The list of allowed hosts is only checked during handling of CONNECT
commands - not in the main I/O path. Protect that list with a mutex
instead of requiring a full pause of the subsystem to allow
dynamic management of the allowed hosts without impacting any
active I/O.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3f7e87cc1fa6de200c422928c07153fc60fab28c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-10-13 07:48:12 +00:00
Ben Walker
bdaee9792e idxd: Perform address translation on all addresses in descriptors
The WQ has not been provided a PASID so virtual addressing is not
supported. This worked previously because all test set ups had IOVA=VA.

Change-Id: I6b08714e246a0dc8d5bc0f31efa4b90b601c5b4c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4558
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>
Community-CI: Mellanox Build Bot
2020-10-13 07:48:05 +00:00
Ben Walker
d48a7b26b3 env: spdk_vtophys buffer argument is now const
Indicate that this parameter is not modified.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1e68f6c5ed4cbfaed0495e969ee1a50c31e9ccac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4583
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-10-13 07:48:05 +00:00
Karol Latecki
2881330dbc add .gitreview to .gitignore
Ignore .gitreview configuration file. It must be placed
in the cloned repo directory in order for git-review
to use it when submitting / fetching changes.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5f027c3208bafcfd16ac980b42a314a2914f5036
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4547
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-12 08:26:27 +00:00
WANGHAILIANG
6a41e84c06 test/blobfs: Drop .ini config in favor of json
Change-Id: I2a4db21149698e06389b280c875658a6a0d69e9b
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2894
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-12 08:26:20 +00:00
Liu Xiaodong
8be2424adf mk: link blobfs_bdev library into applications
With blobfs_bdev linked into applications, targets can
work with blobfs related RPCf methods.

Fixes issue: #1547

Change-Id: Ie501cd4d8d1c87380b78b54864003f45e0c2edc7
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-12 08:26:14 +00:00
GangCao
05752408b7 test/bdevio: add a shutdown function
In the case of handling shutdown signal, a self defined
shutdown function is needed to properly handle the cleanup.

This is to fix below issue:
https://github.com/spdk/spdk/issues/1612

Change-Id: I9e1645980bd4b1340667745eec9ff0f3e7a025c6
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4569
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-12 08:26:07 +00:00
Vitaliy Mysak
ef20d5250f doc: describe running SPDK as a non-priviledged user
Updates #314

Change-Id: Ie26bc867ae926dbb6c0e070be2e1f3e2a2da48fa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2850
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-12 08:26:01 +00:00
wanghailiangx
83d6948ac7 test/external_code: modify some remaining parts for switching to json
Change-Id: Ic79366a527e5aa23e4821ec88533b66e70eafde5
signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4475
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: Changpeng Liu <changpeng.liu@intel.com>
2020-10-09 07:19:16 +00:00
yidong0635
06b537bfdb ocf: simplify code to one line.
I think these two lines code can be simplified one line.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ibfc876e8de1c5a39cde94ed2ad57b5095a098f3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4375
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-09 07:19:08 +00:00
Ben Walker
3844ffc1c2 nvmf: Repack spdk_nvmf_subsystem
Pack all of the hot data into the first cache line. The first cache line
covers everything up to and including the ctrlrs TAILQ.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I184520661743aec91b3bb3d81e53fe8610c9383e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4554
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-09 07:18:49 +00:00
Ben Walker
5e4e4bc485 nvmf: Group bool members of spdk_nvmf_subsystem into a bit field
This saves 2 bytes and allows it to pack nicely with the
changing state bool (which must remember separate for atomic
operations).

Change-Id: Ibb92ae3c74306e60385ae23d0aaf877f33a69095
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4553
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-09 07:18:49 +00:00
Ben Walker
e1ef1e2434 nvmf: Align members of spdk_nvmf_subsystem
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iad0ea4418ffa2cb6a951b06d7f413df988ba640f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4552
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-09 07:18:49 +00:00
Michal Berger
e351dca373 test/nvmf: Replace [ with [[ test in allocate_nic_ips()
The former will force Bash to complain if $ip consists of more than
one ip address. E.g.:

  1:08:55	# '[' -z 192.168.121.37 192.168.121.36 ']'
  line 104: [: 192.168.121.37: binary operator expected

The alternative is to properly quote the $ip inside [, however, [[
is always the safest approach.

Change-Id: Iced7319a106ce35a183840984aa6e6e1e52caa16
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4478
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-10-08 13:11:29 +00:00
Karol Latecki
26811624b8 autobuild/external: preserve PATH env
sudo -E is not enough to preserve PATH, which after
sudo does not contain /usr/local/bin where "meson"
bin needed for DPDK is located.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ied3126dac66fc667a278aa3a973565eab02c1f6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4549
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-08 13:11:22 +00:00
Shuhei Matsumoto
ab808d2b68 lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct()
Pass not bdev but bdev_name to scsi_lun_construct() to fix the
race condition due to the time gap between spdk_bdev_get_by_name()
and spdk_bdev_open(). A pointer to a bdev is valid only while the
bdev is opened.

spdk_bdev_open() has been replaced recently by spdk_bdev_open_ext(),
but the issue still existed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic462422dbc2501c24907f56a36570fbb54fef65b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4482
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-08 13:11:15 +00:00
Karol Latecki
357c9580a1 scripts/vagrant: fix namespace condition
There should be no Qemu param "namespace" added for
emulated nvme drive (i.e. default should be used).
This condition was faulty because ENV variable storing
this information is a text and we check for != 1 as for
and integer.

Change-Id: Ic87aadbbc7eb1ba1ec700bccdb8864726a6562e1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4159
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Mellanox Build Bot
2020-10-08 13:11:08 +00:00
Michal Berger
fba93b3311 scripts/vagrant: Fix check for openstack_network
Previous check was always returning true forcing vagrant to add
additional net device to each VM with the same local ip address.
This interface is not needed by vagrant for communicating with
most of the VMs so make sure it's added for the openstack tests
only.

Change-Id: I64092d5c113d3b5f4575f83db640bf5dd40d4bf8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4542
Reviewed-by: Mellanox Build Bot
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-10-08 13:11:00 +00:00
Michal Berger
ed0c738216 pkgdep/git: Align refspdk config
Recent changes regarding CUSE and BLOBFS tests have not been reflected
in config used for buidling refspdk and the one created by vm_setup.sh.

See https://review.spdk.io/gerrit/c/spdk/spdk/+/3747 for details.

Also, add SPDK_TEST_URING since it's used by CI as well but missing
from config generated by the SPDK tooling.

Change-Id: I59f8e6521094765190f7f30dc923b185c6be9ebf
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4513
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Mellanox Build Bot
2020-10-08 13:11:00 +00:00
Michal Berger
864e8fed8f scripts/vagrant: Allow to define path to a custom Vagrantfile
Also, instead of copying the Vagrantfile, simply symlink it.

Change-Id: I217fb76a809a36bb1ca419d055cae2044a44999f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4460
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mellanox Build Bot
2020-10-08 13:11:00 +00:00
Michal Berger
8cbef7c0dc pkgdep/swupd: Don't try to install tsocks on clearlinux
Due to a typo from c7d1abba18 the installation was being skipped
regardless. Also, according to:

https://docs.01.org/clearlinux/latest/reference/bundles/bundles.html

"tsocks" package is not available in the clearlinux bundles hence
there's no need to waste cycles on trying to install it at all.

Change-Id: I1edc877ed660e1262aaa1d5b308cf4f9e23daf8a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4459
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mellanox Build Bot
2020-10-08 13:11:00 +00:00
Michal Berger
b4fc019be1 pkgdep/git: Don't fail if extra packages cannot be installed
All of these packages are not available on some distros, e.g.
Clearlinux.

Change-Id: I9045681586992c602ff7c95a0caca739e548ab60
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mellanox Build Bot
2020-10-08 13:11:00 +00:00
John Kariuki
057c92e3d8 test/app_overhead: fix aio make issue
AIO not working because the check for $OS==Linux
is before the $OS is set. Therefore, the binary
build does not include libaio

Change-Id: Iab862d0113d637134a5275d46252c60fe27dde5e
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4516
Reviewed-by: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-07 07:47:41 +00:00
Ben Walker
2d03b8ac44 test/iscsi: In ip_migration.sh, use 'ip' to add and remove IP addresses
This eliminates the only known use of the net_interface_* RPCs.
These RPCs are also undocumented.

Change-Id: I92e2dd9ebd59a80518aed5a77aa7f3ccf0371c9a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4304
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
2c379bdabf test/iscsi: In ip_migration.sh, eliminate loop to start targets
The code is actually shorter without the loop

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I872d0bcd6be0945220cfddba61034bd26cbb82f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4303
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
06d2863a67 test/iscsi: In ip_migration.sh, eliminate rpc_validate_ip
This was testing the net_interface_* RPCs, which are about to
be eliminated.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I903eb73c72f5d7cf5ffa322e39296e4692adf008
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4302
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-06 09:36:30 +00:00
Ben Walker
c8a5b48c44 test/iscsi: In ip_migration.sh, eliminate rpc_config function
Two line function called from one spot. Simpler to inline it.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I82818945a672b8c5603f45b6f2b4f072ff2098e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4301
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-06 09:36:30 +00:00
Ben Walker
e8c7327533 test/iscsi: In ip_migration.sh, don't run both targets on the same core
This fixes a 3+ year old TODO

Change-Id: I2516586d120b0f6f8d3d0fc54a5ebdd93aae6bc2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4300
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-10-06 09:36:30 +00:00
Ben Walker
4eec36511d test/iscsi: In ip_migration.sh, put starting the target into a function
This makes it a bit clearer.

Change-Id: I3e9bcc8d5cff3c4cf85ec774114f84a59a9c0f16
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4299
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-10-06 09:36:30 +00:00
Alexey Marchuk
3a2148213f nvme/tcp: Enable zcopy send when qpair is attached to poll group
We can receive buffer reclaim notifications only when a qpair is
attached to a poll group (so qpair's socket is connected to a socket
poll group).
The previous assumption that we enable zcopy only for IO qpairs was
wrong since IO qpair might not use poll groups too (e.g. abort
application).

Fixes issue #1607

Change-Id: I67329d755d81da6606e65eddfeceb20839346d87
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4476
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-10-06 09:35:31 +00:00
Jim Harris
9c20557776 env_dpdk: refactor env.mk to prep for pkg-config
Here we add some new variables which we will be able
to use in a later patch to generate pkg-config files
for this env_dpdk library and our DPDK library
dependencies.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a256096ea08f97eba5d4460405f419624e6f0bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4468
Reviewed-by: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-05 08:29:08 +00:00
Jim Harris
bfae21463a build: add add_no_as_needed and add_whole_archive macros
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56761830e5faac4fe27e93b103004377391721e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4467
Reviewed-by: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-05 08:29:08 +00:00
Jim Harris
e0986329bf env_dpdk: add DPDK_PRIVATE_LINKER_ARGS
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifd93f2566adff91bf975f67e11f5f0afe8451dc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4466
Reviewed-by: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-05 08:29:08 +00:00
Shuhei Matsumoto
b8fbb070f8 lib/nvme: nvme_ctrlr_probe() fails if the controller is being destructed
When we support spdk_nvme_detach_async(), any controller may be
destructed asynchronously. We will be able to know the case by
ctrlr->is_destructed is true and ctrlr is queued in the attached list.

nvme_ctrlr_probe() should fail if the found ctrlr satisfies these
conditions.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I299c2e5ea3c16cc1239899c163bb9e0eb921ade5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
5be704cf97 test/nvme: Use foreach_dev() macro for detach
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf2e50e23c14929a42fff9b155907302b53a4126
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
47d4ead930 example/nvme_manage: Use foreach_dev() macro for detach
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I00149ca74f5af215e8818d051510f73a61abc4a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
ba079831a2 test/nvme_reset: Replace next pointer by TAILQ and a few cleanup
Using TAILQ instead of next pointer will make the object relationship
cleaner and the asynchronous detach opearation easier to implement.

Besides, do the following minor clean up.

Rename g_workers by g_worker and register_workers() by register_worker()
because it holds only a single instance, and clean up references to g_worker.

To fix memory leak at cleanup, add unregister_worker() to free a worker
and its associated contexts.

The prefix, spdk_reset, was not necessary as function name. Rename
spdk_reset_free_tasks() by free_tasks().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0da11108222491e3290ffa5e405eb3ebe70a91bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4435
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
57a4b0f179 test/nvme_overhead&startup: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3095d59b632ea2fc29fc44f8da330cb98c50bed1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4434
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-10-05 08:27:56 +00:00
Shuhei Matsumoto
da08be0f65 test/app_stub: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4640d15015437bdb54ceeb0d1d0269c7ec3ceeb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4433
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-10-05 08:27:56 +00:00
Shuhei Matsumoto
db28850a93 example/nvme_perf: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Change NVMe perf tool in an independent patch to make review easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9fe4ba097356a9887fc284bb8019664936f3cca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4432
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-10-05 08:27:56 +00:00
Shuhei Matsumoto
b218e04c89 example/nvme_fio_plugin: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Change FIO plugin in an independent patch to make review easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If89d189e79506726f2d20cebc100f8a8294b9111
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4431
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>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
4c3fd22850 example/nvme: Replace next pointer by TAILQ except for fio_plugin and perf
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5030dc9eb8f607247f08b4524d37ec2b74826a93
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4430
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-10-05 08:27:56 +00:00
Jacek Kalwas
6d87bc7a8a nvmf: allow transport specific options within subsystem
Change-Id: Id7b7d5205b468237df4c98715ce8d7bc26145f63
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4246
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:23:58 +00:00
Jacek Kalwas
90472b8663 json: new relaxed decode object function
With new funtion it is allowed to successfully parse json values even
if doceder for given key is not found.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I036f263e9050bd2b96aaa3ff61a9542c98365892
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4340
Community-CI: Broadcom CI
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-10-05 08:23:58 +00:00
Tomasz Zawadzki
de016f2756 scripts/check_format: match exact string when moving symbols
Original code removed $symbol prefix from every entry in
$defined_symbols. This was incorrect shown by example
patch next in series.

Original function spdk_json_decode_object() was moved
and spdk_json_decode_object_relaxed() was added.
This resulted in $defined_symbols containing entry "_relaxed".

Now each entry in $defined_symbols is checked separatly to
match exactly to the removed $symbol.

Reported-by: Jacek Kalwas <jacek.kalwas@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1d9931d2e93dc85465ce47a838a176c6ab5f1587
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-10-05 08:23:58 +00:00
Alexey Marchuk
a1dfb34ad5 jsonrpc.md: Fix code block fence
Change-Id: Iaa569482ada24976506d44f7dc1fe95004653c3d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4331
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-05 08:22:53 +00:00
Alexey Marchuk
43773a5a3a sock: Fix memory leak in RPC
Memory allocated for impl_name is not freed in error cases.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: If7cd62d948a05421b0bd5d1599f1275a0f3b4597
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4330
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-05 08:22:53 +00:00
Alexey Marchuk
8614d3fe3a perf: Add cli option to configure default sock impl
Change-Id: I165e6c9287ed576bdf7e34e02c5f27f3052a6456
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4329
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-05 08:22:53 +00:00
Alexey Marchuk
89d9fe558a sock/rpc: Add sock_set_default_impl RPC call
Change-Id: I11160b6e8e2a1500c80a2512a1344094b2813aa9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4328
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-05 08:22:53 +00:00
Alexey Marchuk
079f2d0abe sock: Add new API to set default sock implementation
When uring is enabled, uring socket implementation is
used to create sockets. We may want to use posix sockets
for some reasons (e.g. performance tests). This patch adds
a new API function to set the socket implementation which
will be used by default, e.g. when no impl_name is passed
to spdk_sock_connect/spdk_sock_listen functions.

Misc changes: include spdk_internal/log.h to register
SOCK log component. The new include header already
includes spdk/sock.h and spdk/queue.h, sow remove
direct inclusion of these headers.

Change-Id: I4abad0a59cd033b15bd43a00e3dbdf313fa6b06c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-05 08:22:53 +00:00
Jim Harris
d0b8347d9e dpdkbuild: don't re-install unchanged shared libs
When configuring with --with-shared, you would see all
applications getting relinked, even if nothing has
changed.  This was root caused to DPDK re-installing
shared libraries that hadn't been rebuilt.

Switching from 'ninja install' to 'meson install --only-changed'
fixes this behavior.  Note that meson install doesn't
support -j, but at this point we are only installing
files, not building them - and now we won't even be
installing the files again if they haven't changed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If0491b2ad6e8564ad0fd8dee39a2e357e1329ea9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4465
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-10-02 07:13:53 +00:00
Jim Harris
d37a5797ef build: add SO_SUFFIX for combined spdk.so library
This fixes bug where combined shared library would be
named "libspdk.so."

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9868bf9e1cd6f365e1f28e7a34792ae8b85bf608
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4464
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-10-02 07:13:53 +00:00
Jim Harris
a39c8420dc build: remove spdk.so library from .PHONY
Targets listed in .PHONY are always built - but
in this case if the underlying spdk.so.$VER library
hasn't been modified, there's no reason to redo the
symlink.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife60f1de6dd6d0997bc5adf40d039cfd1dbc88ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4463
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-10-02 07:13:53 +00:00
Jim Harris
a37fbac89a test: run verbose abidiff on abi failure
This will make it easier to know what specifically changed
that requires the version bump.  Use --impacted-interfaces
argument to add further verbosity.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I547d29f65323683c4096b738514ed4ac85ecd4d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4448
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-02 07:13:53 +00:00
Jim Harris
3e159ecf8e test: create cmd arg array for abidiff command line
This will allows us to reuse most of the command
line in a future patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I039d628a0a1b6612c1e4d66395651cb0aa2255a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4447
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-02 07:13:53 +00:00
Changpeng Liu
c1a6a7f2cc readme: add dpdk shared library note to LD_LIBRARY_PATH
Change-Id: Ia9d525bb7d0233eaa76f4c59e8f956e87123afd8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4376
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-10-01 07:12:46 +00:00
Alexey Marchuk
72981e9e4f app/lspci: Link libmlx5 when mlx5_dv RDMA provider is used
It is necessary to link libmlx5, otherwise we'll get a linkage error:
libspdk_rdma.a(rdma_mlx5_dv.o): In function `spdk_rdma_qp_create':
rdma_mlx5_dv.c:123: undefined reference to `mlx5dv_create_qp'

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ib3ee4fd0a6e0c9d605a558da0be47c99af4bc366
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-30 07:26:59 +00:00
yidong0635
a1b31293e8 ocf: add check ctx.
Check ocf_cache_get_priv return value if returns NULL, just exit.
To avoid error.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Id94c4faa537f19ce9b657fbfe82ba76e2a414125
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4436
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-09-30 07:26:39 +00:00
Liu Xiaodong
4cade5a73c bdevperf: print new line in usage
Change-Id: I9031daf3bc8abcb196fbb67f84d344742ea9d261
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4425
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-09-30 07:26:30 +00:00
Anil Veerabhadrappa
9ef1496ba5 nvmf/fc: Initialize transport id for the newly created FC transport qpair
Without this change nvmf_ctrlr_create() will fail to lookup
the subsystem listener matching this qpair.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I855baa16e996737b60dbd745ce84f8c0bc024cf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4450
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-09-30 07:26:13 +00:00
Anil Veerabhadrappa
2fc3ef3231 nvmf/fc/ut: Call spdk_nvmf_tgt_destroy() in the correct thread context
Use the same thread context to call both spdk_nvmf_tgt_create() and
spdk_nvmf_tgt_destroy(). This is required to ensure the accept poller
is registered and unregistered in the same thread context.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I0637c7896ca7504412fbe673355f6904dd81a961
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4449
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-09-30 07:26:13 +00:00
Niklas Cassel
084a062e81 nvme: add getters for ZNS specific data structures
Add getters to the ZNS specific data structures, so that an
SPDK application, e.g. examples/nvme/identify/identify.c,
has the ability to get and utilize the information in them.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I26056161093cc811acb6840ff7e2068e5f6058f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4412
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-09-30 07:26:04 +00:00
Niklas Cassel
c4d1b7d57a nvme: add new state to get Identify IOCS Specific Namespace data structs
Add a new state in the SPDK NVMe state machine in order to fetch
I/O Command Set Specific Namespace data structures.

Right now there is only support for the Zoned Namespace Command Set
Specific Identify Namespace data structure.

The NVM Command Set Specific Identify Namespace data structure is
all zeroes right now, reserved for future use.
The Key Value Command Set Identify Namespace data structure is not
all zeroes, however, adding support for Key Value is outside the
scope of this patch.

The new NVME_CTRLR_STATE_IDENTIFY_NS_IOCS_SPECIFIC state is added
after the NVME_CTRLR_STATE_IDENTIFY_ID_DESCS state. This is because
we need to have fetched the identifiers in the desc list in order
to know which command set a namespace belongs to.

A slightly nicer design might have been to refactor the NVMe state
machine to first fetch the id desc list, then the identify namespace
struct, and finally the identify IOCS specific namespace struct.
However, since this would have required a lot of changes, it didn't
really seem justified.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I62cbc533c2c3eec1ccf0ba9b1c414d5a70919cff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4368
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-09-30 07:26:04 +00:00
Niklas Cassel
64563ada5d nvme: add new state to get Identify IOCS Specific Controller data structs
Add a new state in the SPDK NVMe state machine in order to fetch
I/O Command Set Specific Controller data structures.

Right now there is only support for the Zoned Namespace Command Set
Specific Identify Controller data structure.

The NVM Command Set Specific Identify Controller data structure is
all zeroes right now, reserved for future use.
The Key Value Command Set Identify Controller data structure is also
all zeroes right now, reserved for future use.

The new NVME_CTRLR_STATE_IDENTIFY_IOCS_SPECIFIC state is added
after the NVME_CTRLR_STATE_IDENTIFY state. That way, if support for
the Zoned Namespace Command Set is enabled during probing, we will
fetch the Zoned Namespace Command Set Specific Identify Controller data
structure, regardless if any Zoned Namespaces are attached or not, and
no additional steps will be needed once a Zoned Namespace is attached.

Since we only have one command set to fetch, avoid creating
NVME_CTRLR_STATE_IDENTIFY_IOCS_SPECIFIC substates, although that will
probably be needed when support for another command set is added.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I95535b09b03b7ef2ee9a11eebdbd28aad66d65ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-30 07:26:04 +00:00
Niklas Cassel
a7ddda8166 nvme: rename ZNS data structures
We will later create a lib/nvme/nvme_zns.c file containing zoned specific
operations on a namespace. Since the functions in SPDK have to be
namespaced by prepending the name of the library to the function name,
rename the ZNS data structures in order to make them more aligned with
the coming function names of the getters for these data structures.

Renaming these structs are safe, since they are currently not used by
anyone.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ifd2a99e945806b49f9b213e704acce8d8d2c7037
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4455
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-30 07:26:04 +00:00
Niklas Cassel
b2570934cb nvme: change the type of spdk_nvme_ctrlr::state from enum to int
When adding an additional state to enum nvme_ctrlr_state, abidiff (1.6.0)
will report that almost every public interface in the nvme library has
been impacted, causing test/make/check_so_deps.sh to fail.

While it is possible that by adding another state, the compiler decides
to use a larger data type for representing enum nvme_ctrlr_state, abidiff
shouldn't complain in the first place, since spdk_nvme_ctrlr is only
ever exposed as an opaque handle. It can never be accessed directly.

Jim Harris suggested to workaround this abidiff bug by changing the type
of spdk_nvme_ctrlr::state from enum to int.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8b85446580043e95cf791249d643907587e2f982
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4427
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-30 07:26:04 +00:00
Shuhei Matsumoto
1c2a2bb7f0 bdev/nvme: Move TRID type check from bdev_nvme_create() to bdev_nvme_add_trid()
This clean up the code a little more. Use the term failover instead
of multipath in the error message.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b7fb8fe50b19b5639169c03f5242b9d6f14128b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4390
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
66e85c204c bdev/nvme: Pass nvme_bdev_ctrlr simply to bdev_nvme_add_trid()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4ee5ec24f553d03e784b28b1d252f77a73c06ec8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4389
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
96dbd5e427 bdev/nvme: Make bdev_nvme_add_trid() static function
bdev_nvme_add_trid() is used once in the same file.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I738b7e959d13d419e090a019da6e7f1f09aa7109
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4388
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
dde21d3bbb bdev/nvme: Consolidate the code to create failover path in bdev_nvme_create()
PCIe failover is not supported yet and it is not possible that the
controller is included in g_skipped_nvme_ctrlrs for failover cases.

We can consolidate the code to create failover path in bdev_nvme_create().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide456707a0b66a4b26eaf66392b9b53c3e659d9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4387
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
cced29b595 bdev/nvme: Allocate context at the head of bdev_nvme_create()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id4f8703dbfdd0f12263eef82e51b7df3d8e15d81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4386
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
66f74eb9f7 bdev/nvme: Check if a controller with the same TRID exists first in bdev_nvme_create()
This simpifies the code a little without any degradation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6006266e250f2d083aa12424809d04fac6a9f8f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4385
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
7b9b1eefc0 bdev/nvme: Pass nvme_io_channel instead of spdk_io_channel as a parameter to I/O APIs
_bdev_nvme_submit_request() already has a pointer to nvme_io_channel.
Passing nvme_io_channel simply to I/O APIs will be reasonable
simplification.

Two admin APIs, bdev_nvme_abort() and bdev_nvme_admin_passthru()
get the associated thread to the spdk_io_channel and set it to
nvme_bdev_io. These APIs get spdk_io_channal from nvme_io_channel using
the container_of macro. These APIs are not performance sensitive.
Using the contaier_of macro will be better than extracting the operation
from these APIs because we can keep the changes local to these APIs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I67985075d70551e4fe3bb84dfee15f1e4e882451
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4384
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>
2020-09-30 07:25:54 +00:00
Shuhei Matsumoto
6e82c8f796 bdev/nvme: Pass nvme_bdev_ns instead of nvme_bdev as a parameter to I/O APIs
When NVMe bdev module supports multipath, nvme_bdev will have multiple
nvme_bdev_ns, and I/O APIs need only nvme_bdev_ns. So change the parameter
from nvme_bdev to nvme_bdev_ns for I/O APIs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1e71abbab856112fdd6a333a89ba5f02f4e63ccd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4382
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
2b4896fe3b bdev/nvme: Pass DIF check flags as a parameter to I/O APIs
This is a preparation to pass nvme_bdev_ns instead of nvme_bdev
to I/O APIs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I095478bc3ad305ba940fca101b74e74c7e8e74ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4381
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-09-30 07:25:54 +00:00
Shuhei Matsumoto
b123fb15fa bdev/nvme: nvme_bdev points only nvme_bdev_ns and access nvme_bdev_ctrlr via nvme_bdev_ns
Struct nvme_bdev has a pointer to nvme_bdev_ctrlr and a pointer to
nvme_bdev_ns now, but nvme_bdev_ctrlr can be accessed via
nvme_bdev->nvme_ns->ctrlr, and so nvme_bdev->nvme_bdev_ctrlr is
duplicated.

The upcoming multipath feature will need struct nvme_bdev to have
multiple nvme_bdev_ns pointers.

Hence remove nvme_bdev_ctrlr from struct nvme_bdev and get a pointer
to nvme_bdev_ctrlr from nvme_bdev->nvme_ns->ctrlr.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie5b785cb26e535c7186fe630c1f8b7d598b0ba46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4288
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-09-30 07:25:54 +00:00
Jim Harris
1deb6b9e6b nvme: disable zero copy for client TCP sockets
This seems to be causing some CI test failures.  So
disable zero copy in all cases for now for client
sockets.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iceea09fe65fb90c7df15f500878a473f1ad4152c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4473
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-30 00:21:26 +00:00
Changpeng Liu
276c31cd1f event: return const cpumask for spdk_app_get_core_mask() API
Fix issue #1541.

Change-Id: Ia0ecc049387f1e8eb04f1b55f7a7ace0b4b42491
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4306
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-09-29 09:38:53 +00:00
Tomasz Zawadzki
107dd02126 env: replace MEMPOOL_F_NO_PHYS_CONTIG with MEMPOOL_F_NO_IOVA_CONTIG
DPDK patch (4143b122) included in DPDK v18.05 replaced
MEMPOOL_F_NO_PHYS_CONTIG with MEMPOOL_F_NO_IOVA_CONTIG.

Meanwhile latest DPDK from (28e3c8b2) removed the
MEMPOOL_F_NO_PHYS_CONTIG.

This patch simply replaced the define, since it will
work for any DPDK v18.05+.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I43ada50df31be18c724b2f5078d3f29f3d1c0c71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4418
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-29 09:37:44 +00:00
Michal Berger
e5a08642c5 scripts/setup: Use igb_uio driver as a fallback
Some 4.18.x kernels are shipped with a broken uio driver due to the
following change:

  git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9421e45f5

Try to detect if we are running against a faulty uio driver and if so
fallback to igb_uio driver if present. The priority of picking up the
drivers has not changed.

Note that this commit may be deemed as not needed since from CI
perspective the https://review.spdk.io/gerrit/c/spdk/spdk/+/4342 may
be simply enough.

Change-Id: I9b12511c203c0be0e8f3f462c9c96babde52dc6e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4343
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-09-29 09:37:33 +00:00
Michal Berger
785d6ca209 test/common: Add env switch for testing against igb_uio driver
This is mainly needed by the vg jobs which use distros with broken
uio driver. Currently, this is not the case, however, there is a
plan to add centos8 to the CI pool which suffers from this very
issue.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I17724cf9c14809c3dca5a0817433f1fe27449117
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4342
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>
2020-09-29 09:37:33 +00:00
Michal Berger
0cfefac204 scripts/setup: Update default path to igb_uio driver
Change-Id: I61e4bbdc7fd19c74d2a9bf3f4db0dd2e0278a2e4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4341
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-09-29 09:37:33 +00:00
Jim Harris
84eaed39c1 env_dpdk: remove conditional rte_mempool_ring linkage
This library has existed since DPDK 17.05, so there are
no supported versions of DPDK that do not contain this
library.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I84f2b77046d093989dfa9533f3d1c76e8c243c3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Jim Harris
514fb34ca4 env_dpdk: remove special rte_pci and rte_bus_pci handling
These libraries have existed since DPDK 17.11.  We
do not support any DPDK versions older than that, so
there is no need to conditionally handle cases where
those libraries do not exist.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3906db4d07ae04344b4c3bfaac02da58f248bf75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4392
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Jim Harris
8998ac11c1 env_dpdk: remove rte_malloc library handling
This library was removed in DPDK 2.1 which SPDK has
not supported for a very long time now.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I01cf47078e69b9d396a80f5680a4f1c1c3a9be46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:36:25 +00:00
Jim Harris
9ae6f5893b build: only link rt where needed
Only libraries that are using shm_open require linking
rt when creating the shared library.  Stop including
it on every library and just add it to LOCAL_SYS_LIBS
in the one case where it is used (spdk_trace).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic13128873a76c355b14871a0dea0922488c9cd13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4370
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-29 09:36:25 +00:00
Jim Harris
ed071dd9f9 build: cleanup LOCAL_SYS_LIBS for uuid
LOCAL_SYS_LIBS is meant to define *direct* system
library dependencies for a given library.  libuuid
is directly used by the SPDK util library and then
other SPDK libraries use uuid indirectly through
util.

So only the util library should include uuid in
LOCAL_SYS_LIBS.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0d2d63f48e6f89891164cf2f9dc4c7a6476d4e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4366
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-29 09:36:25 +00:00
Jim Harris
28af4daa0d build: organize DEPDIRS for event libraries
Make the DEPDIRS list a bit more consistent for
event_* libraries - they all depend on 'event' and
the specific library they are enabling, so always list
those first.

Next list the other event libraries that it depends on.

Finally list other libraries used.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1b1d72a0c738aeb9f30641d9e1e0235aabdbfb0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-29 09:36:25 +00:00
Alexey Marchuk
3fa5bb25a9 perf: Add cli param to configure IO buffer alignment
Some HW accelerators may benefit from non-standard (512 bytes)
alignemnt.

Change-Id: I13c46e6ddfe400a6fad65497d3e090411bbfd8c0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4215
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-09-29 09:35:47 +00:00
Alexey Marchuk
37914f3cd6 perf: Add cli params to enable/disable zcopy
Usage:
-z sock_impl_name - disable zcopy
-Z sock_impl_name - enable zcopy

Change-Id: I02b628c63ca6e9e80f81e4571aebdd76fdf90be2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4214
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-09-29 09:35:47 +00:00
Alexey Marchuk
cbacd11a5c posix: Reorder spdk_posix_sock struct
Reorder bool fields to eliminate extra hole

Change-Id: Ia27ee2be42c13d0aba702a1b00c9b89e6620e36e
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4213
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-09-29 09:35:47 +00:00
Alexey Marchuk
d819d1f167 sock: Remove unused spdk_sock::max_iovcnt
Remove unused max_iovcnmt and reorder fields to eliminate hole
in spdk_sock structure

Change-Id: Ic78d809399ab6ac785565ce8f2e132549361bc8c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4212
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-09-29 09:35:47 +00:00
Alexey Marchuk
86865969ff sock/posix: Enable send zero copy for client sockets
In NVME TCP initiator zero copy is enabled for IO qpairs
and disabled for admin qpairs

Change-Id: Ibdf521dccde9b95ec5dd15a5eb2baed8fcf8b88e
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4211
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-09-29 09:35:47 +00:00
Alexey Marchuk
f0d8396e7a sock: Add option to configure zero copy per socket
A preparation step for enabling zero copy in NVMEoF TCP initiator.
This option will be used to disable zero copy
for admin qpair. This is needed since the admin
qpair's socket is not connected to socket poll group
and we can't receive buffer reclaim notification.

Change-Id: Ibfbb8a156aafcd7ba8975a50f790da7fbd37d96f
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4210
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-09-29 09:35:47 +00:00
Alexey Marchuk
a910bc647d nvme/tcp: Calculate requests completed asyncronously
A preparation step for enabling zero copy in NVMEoF TCP initiator.
With zero copy enabled, some requests might be completed out
of "process_completions" call and we should take them into
account to return the correct number of completions.

Change-Id: Iba7973f6da815645bbfad0334619d46b66379226
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4209
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-09-29 09:35:47 +00:00
Alexey Marchuk
2ceff364e5 nvme/tcp: Add synchronization for icreq send ack and icresp
A preparation step for enabling zero copy in NVMEoF TCP initiator.
We should wait for both events to occur before continue qpair
initialization.
Add a new bit to nvme_tcp_qpair::flags to track receiving of icreq ack
since icreq is sent without tcp_req and there is no way to apply
existing synchronization mechanisms.
Move tcp qpair to initializing state if we receive icresp before icreq ack,
this state will be checked during handling of icreq ack to continue
qpair initialization

Change-Id: I7f1ec710d49fb1322eb0a7f133190220b9f585ab
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4207
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-09-29 09:35:47 +00:00
Alexey Marchuk
bc36528cda nvme/tcp: Process poll_group when waiting for icresp
A preparation step for enabling zero copy in NVMEoF TCP initiator.
Since nvme_tcp_qpair_process_completions doesn't process poll
group, we can't get asycn notification from kernel.

1. Add a qpair to poll group before we send icreq in order to be able
to process buffer reclaim notification.

2. Check if qpair is connected to a poll group and call
nvme_tcp_poll_group_process_completions instead of
nvme_tcp_qpair_process_completions when waiting for icresp

3. Add processing of poll group to nvme_wait_for_completion_timeout
and nvme_wait_for_completion_robust_lock since they are used to
process FABRIC_CONNECT command

Change-Id: I38d2d9496bca8d0cd72e44883df2df802e31a87d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4208
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-09-29 09:35:47 +00:00
Alexey Marchuk
a85579d8ef nvme/tcp: Refactor header/data digest using bitfields
Currently host/data digest are bool members of nvme_tcp_qpair
structure. Change the type of this members to bitfield, reserved
bits will be used in the next patches to support zero copy.

Change-Id: If0659bf2445901e45fe0816af5f4fca5f494b154
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4206
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-09-29 09:35:47 +00:00
Alexey Marchuk
7388e54de4 nvme/tcp: Complete request when all acks are received
A preparation step for enabling zero copy in NVMEoF TCP initiator.
Make sure that we complete a request (call user's callback)
when all acknowledgements are received. For write operation -
when we received send cmd ack, h2c ack and response from target.
For read operation - when we received send cmd ack and c2h
completed

Since we can receive send ack after resp command, store
nvme completion received in resp command in a new field
added to tcp_req structure

Change-Id: Id10d506a346738c7a641a979e1c8f86bc07465a4
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4204
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-09-29 09:35:47 +00:00
Alexey Marchuk
2d4af0c174 nvme/tcp: Add synchronization for subsequent R2T requests.
A preparation step for enabling zero copy in NVMEoF TCP initiator.
Some NVMEoF TCP targets can send several R2T requests. We should
check that we finished the previous H2C (received buffer reclaim
notification from kernel) before sending the next H2C.
This patch adds a new ordering bit indicating the described case
and 2 fields to nvme_tcp_req to store the values from the last R2T
request which will be applied when send ack is received.

Change-Id: Iaa5ad846712ca18a8382680baa02413c18c4eb37
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4203
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-29 09:35:47 +00:00
Li Feng
0907db57c1 vhost-scsi: support parameter changed notification
If the capacity of scsi bdev has changed, vhost-scsi should
notify the guest to handle this change.

Change-Id: I1087b28cdb719f6b727ff0ae486cee6a0719bb0c
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4124
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-28 08:33:18 +00:00
Li Feng
5029fe14b6 scsi: add bdev resize callback support
Currently, the scsi bdev only supports the hotremove event,
and the scsi library uses the deprecated `spdk_bdev_open` function.

In this patch, add the resize event support, so the upper layer
could do more actions, like vhost-scsi could notify the guest os.

For the scsi compatibility, add _ext suffix for some public api.

Change-Id: I3254d4570142893f953f7f42da31efb5a3685033
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4353
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-09-28 08:33:18 +00:00
Shuhei Matsumoto
1e6152c185 test/nvmf_target: Test ANA by Linux kernel host native multipath
Create a subsystem with two listeners.

Linux kernel NVMe host connects to the subsystem via the two listeners.

Then while the host runs FIO, change ANA state of the two listeners.

The expected result is that FIO completes without any error.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb8174e87ab0d1e15cf345684431cd109789452c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4121
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-28 08:32:30 +00:00
Shuhei Matsumoto
fae6cbbaed test/nvmf_target: Virtual network using veth and bridge for TCP transport
Disconnect test requires not the second TCP port but the second IP address,
and hence it is disabled for TCP transport now.

Besides, related with this, popular Linux iSCSI initiator requires
not multiple TCP ports but multiple IP addresses for login redirection
feature. Using multiple IP addresses will be reasonable also for
NVMe-oF TCP transport.

Hence following the recent change in iSCSI test, create multiple
IP addresses network using veth device and ether bridge.

After this patch, target_disconnect test will be enabled for TCP
transport automatically.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I593090dd5b763e90dceb8eeee7a7b79971367b8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4089
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-28 08:32:30 +00:00
Jim Harris
913a5d1ff8 test: simplify so minor version check
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I117aa3738c58cdede88625d141fcff94139c5c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4423
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-09-28 08:31:48 +00:00
Jim Harris
d368ee4a72 test: check that we do not bump major so rev twice
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic1d247ff1335310ca0e4be947ca9f602ee7f874e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4422
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-09-28 08:31:48 +00:00
Jim Harris
7d6c341a59 sock: revert major rev to 4
This was accidentally bumped twice (3 to 4 to 5) since
v20.07 release.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5bda3349fa5c1fce37166fe4b640ff722bb7e3a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4421
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-09-28 08:31:48 +00:00
Ziye Yang
0903e14b05 nvmf/tcp: Change value of SPDK_NVMF_TCP_DEFAULT_MAX_SOCK_PRIORITY
It should be 16 but not 6. For example, it will have 16 priorities
when configuring ADQ with Intel's 100G NIC.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iebdf7b379c15f3b5fd16dba2ad87ec55af04577f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4235
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>
2020-09-28 08:30:50 +00:00
wanghailiangx
adb7cf05d3 test/deallocated : Fix memory leak about context.
Here code returns but context isn't freed.
And we can change to break here also.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I8f2173ae3599c13c99c7d70c19e2f8ce0c023f38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4396
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-09-28 08:30:38 +00:00
Michal Berger
b9ba32aa63 scripts/setup: Check if VMD controllers are allowed to be used
Recent refactors removed the behavior introduced with a6edaa9600.
Bring it back and don't try to rebind the VMD devices if they were
not explicitliy allowed in the setup.

Also, shuffle the code a bit and put verification pieces under one
block where $mode is being determined.

Change-Id: Ie2cc41e402f20147b98ab288d623ac76a4472839
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4398
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-09-28 08:30:24 +00:00
Jim Harris
ebc227d9b2 bdev: move bdev_rpc library contents
We have some RPCs defined in the bdev library itself,
others in a separate bdev_rpc library.  There's no need
for the separate library - just move them all into the
bdev library.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I298eedb88924197e64eb315369efb10f402903a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4364
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: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
73b483c6d2 event: move app_rpc contents
There is no need to have the application-level RPCs
defined separately from the event library itself
(which defines the application framework).

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic264ed761f5ec1a40d604e63395c5740af4be1a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4363
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: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
2e31825512 event: move log_rpc contents to event library
The log_rpc library serves little (if any) use in
isolation.  It makes more sense to just include
this code in the event library.  The event library
already depends on and uses the log library, and it
is natural to just enable these RPCs directly in
that library instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie39b8598ce0c06729a13d188ce00da44a996accc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
Jim Harris
de0e2297b2 log_rpc: move log_enable_timestamps definition
This RPC was originally put into the app_rpc library,
but the log_rpc library is a better home for it, since
other log-related RPCs are already there.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ba5ac6cdeb57fb4219244690590c8fabbc3f59a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:43:42 +00:00
yidong0635
ee17068b88 nvme: fix a typo.
Meanwhile, to verify an issue about git push unittest failure.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idac60e5832390eb8bdce68aee639be2e9ac6cff6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4373
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:42:56 +00:00
Shuhei Matsumoto
583fa214a3 lib/nvme: Add two public APIs to get ANA group ID and ANA state of the namespace
Add spdk_nvme_ns_get_ana_group_id() and spdk_nvme_ns_get_ana_state()
to getthe ANA group ID and the ANA state of the given namespace,
respectively.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id5f1f7ee488a1eb2a7a77f9986a3bb89146628e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4354
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
cc2b6962f9 lib/nvme: Keep ANA state per namespace up-to-date
Add ana_state and ana_group_id to struct spdk_nvme_ns and keep
them up-to-date by updating when spdk_nvme_ctrlr is created or
ANA change notice is received asynchronously. For both cases,
struct spdk_nvme_ctrlr holds the latest ANA state.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I311fe1c8015c8b8ac9659c38661244706c04b3e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4287
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
3befb518b0 lib/nvme: Add an internal API nvme_ctrlr_parse_ana_log_page()
Add an internal API nvme_ctrlr_parse_ana_log_page() to parse an ANA
log page and execute the specified callback function for each
ANA group descriptor in the ANA log page.

We will be able to copy the ANA group descriptor to the caller instead.
To do that, we will need to inform the size of the descriptor first,
but the size will not be constant.

Passing parser to the API will be more convenient.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd8fda30a83965948017fb8ad992c0d889197cde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4279
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
a0befabdd4 lib/nvme: Controller holds the latest ANA log page
When creating a controller, allocate a buffer to the controller
and read ANA log page into the buffer.

When receiving ANA change notice, read ANA log page into the buffer
to keep the contents up to date.

The next patch will provide a public API to get the contents of
ANA log page the controller holds.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If5c653f4e80d157e5120bb754e6660250b2b8fa1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-25 11:42:44 +00:00
Shuhei Matsumoto
06d25b7021 lib/nvme: Add an internal API nvme_wait_for_completion_robust_lock_timeout
Add an internal API nvme_wait_for_completion_robust_mutex_lock_timeout()
and related internal APIs just call it with adjusting parameters.

nvme_wait_for_completion_robust_lock_timeout() will be usable for
the current use cases of nvme_wait_for_completion_robust_lock() and
future use cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2b499643930256a39ebe279f56a399f20a7a2fde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4217
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: Changpeng Liu <changpeng.liu@intel.com>
2020-09-25 11:42:44 +00:00
Ben Walker
fcc187e3cf test/iscsi: In ip_migration.sh, don't pass -i to iscsi_tgt
The goal is to make each one start in a different shared memory
group, which is the default behavior. This test is very old and
may predate that being the default behavior.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id7bb38cf4f54e8844d5e76046a19c56003855519
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4298
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-09-25 11:30:09 +00:00
Ben Walker
5ebc93507b iscsi: Allocate connections array from regular memory
No longer required to allocate from shared memory. No tools
use this anymore.

This removes the final call to the event library from iscsi,
so we also drop that dependency.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I41a6877b782cb927d9ac7d206ccd36a8195efc42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4346
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-09-25 11:30:09 +00:00
Ben Walker
ed1b78529d iscsi_top: Convert to C99
This is already valid C, so compile it using the C compiler.

Change-Id: I5e7a7b0dfcbbe6402a1774fc2fcf53778355d3a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4345
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-09-25 11:30:09 +00:00
Ben Walker
1477d36597 iscsi_top: Get connection info using RPCs
Instead of relying on shared memory, just grab the connection info
using JSON-RPC.

Change-Id: I46843e9c77d0dcb0e0cbc7f805dee9fc13dc0ba5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4344
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-09-25 11:30:09 +00:00
Ben Walker
336157bb8f net: Remove the net_framework subsystem
This was not used by anything. It was intended for use by user-space
TCP stacks.

Change-Id: I416589e421784882c693bcc5b03fe1dbcc4b1bd3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4297
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:30:09 +00:00
Jim Harris
47c45d243a test: do not try to execute blob_ut if it doesn't exist
We do not compile blob_ut on systems with Cunit version
that is too old.  So modify unittest.sh for this case
specifically, so that users with an older Cunit version
can still run the rest of the unit tests.

Fixes issue #1601.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifd226a47a2ff712ad1f14fd12e1cb796e44be6b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4372
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-25 11:29:55 +00:00
Michal Berger
e1ac33d8b3 pkgdep/rhel: Ignore subscription-manager failures
It seems that RHEL systems can be actively used without an actual
subscription. Since we don't really want to bother with this side
of the system, simply ignore all subscription-manager's failures.

See https://github.com/spdk/spdk/issues/1542 as a reference.

Change-Id: I76a58cb38bb77b3b6deb12e0cc8ccca5f883d5a7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4360
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-25 11:29:05 +00:00
Michal Berger
0cd90081c0 pkgdep/rhel: Install yum-utils regardless of the $VERSION_ID
Also, put it on yum's cmdline separately since it doesn't really
belong to repos[] - it provides proper tooling not the actual repos.

Change-Id: I26c0c90b52f5b4fa914c116477092df525b4448f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4359
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-09-25 11:29:05 +00:00
Tomasz Zawadzki
0f06b929c9 test: do not skip check for building cuse/uring/fuse
Those modules are now enabled and tested on CI.
ABI reference build was updated to include those components.

Workarounds for blobfs_bdev can now be removed too.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4ef321dcb0ce80b13e856a1ca97ed072f7b5ddc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3747
Reviewed-by: Karol Latecki <karol.latecki@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-09-25 11:21:38 +00:00
GangCao
8dcdaafa89 App/spdk_lspci: add the nvme module for the lspci operation
This is to solve below issue:
https://github.com/spdk/spdk/issues/1574

Where the nvme driver is not registered and triggerred NULL
core dump.

Change-Id: Ia25d6f1a755737dcbb0b87e831a77ce7f7d515ed
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4352
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-09-24 09:44:16 +00:00
GangCao
6bc1f09f61 lib/nvmf: destroy the mutex properly
In the both normal and exceptional case, the mutex
will need to be destroyed.

Change-Id: I39c815f2adffbd3786b45a938c476dcbb66a438f
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4339
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-24 09:44:16 +00:00
Karol Latecki
fa1cfaa659 test/nvme_perf: print used bdev.conf
Print bdev.conf we're going to use in test
after generating it.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8b74b8afb9c4fca200b961d0d0d9818578ef1307
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Karol Latecki
bb54b617e2 test/nvme_perf: use polling for io_uring mode
Setting should be "-1" for polling, otherwise "0"
works as hybrid-polling.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5f1fb602f750162a7c164703859f2e74c9092146
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Jim Harris
acfb968aa8 bdev/nvme: avoid spdk_bdev_io_get_buf call when possible
The bdev layer nicely handles the case where we call this
function with the buffers already present - it just
immediately calls the get_buf_cb.  But this adds extra
overhead in the case where the buffer is already present.
Since nvme has no alignment restrictions, we can just
check the iovs directly and avoid the extra call to
spdk_bdev_io_get_buf when possible.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I66df0fde574a35e995a3432999d75bdbf9b27212
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4317
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-23 08:12:23 +00:00
Jin Yu
c1bfc56488 bdev: directly split io when split io get buf
Change-Id: I8f88a9794eff4c302de85d56da90319cf2cc2f47
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4243
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-09-23 08:12:16 +00:00
Ben Walker
aa6b6f081d thread: Update thread->last_tsc at the start of polling
It may have been a long time since the thread last executed
so ensure this time is accurate.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iaa4c35b50cdc05ebb41724ed9946c5232d242ee3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4321
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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-09-22 11:41:30 +00:00
Ben Walker
c99e1d60d3 thread: Passing NULL to spdk_thread_get_last_tsc gets current thread
value

If the user passes NULL for the thread, just use the current thread
to get the last tsc.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1a2b61d9765e1ef59927ffec7c49f2a2b62590f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4320
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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-09-22 11:41:30 +00:00
Ben Walker
7deedab66a bdev/nvme: For writes, if there is only one iov element call
write instead of writev

Call spdk_nvme_ns_cmd_write_with_md if there is only one iov element.
Use spdk_nvme_ns_cmd_writev_with_md only if there is more than one.

This is about a 15% improvement in I/Ops.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1a99b5507d37cde04e81feada65b14554ad01a17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
3870092dd1 bdev/nvme: For reads, if there is only one element in the iov don't use
readv API

It's cheaper to call spdk_nvme_ns_cmd_read_with_md than it is to call
spdk_nvme_ns_cmd_readv_with_md, so do a quick check of the iovcnt and
use the best one for the job.

This is about a 15% improvement in I/Ops.

Change-Id: I82e6677d1ac47abf9919f95e651e7a7595c5e9a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4316
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:41:30 +00:00
Ben Walker
85ddcf6f8d nvme/tcp: Clean up error message
Fix some spelling and make the message clearer

Change-Id: Ib291542a9735d6409db84f16c530e78567123f67
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4249
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-09-22 11:40:58 +00:00
Tomasz Zawadzki
35e54647fb intel-ipsec-mb: update submodule to v0.54
Updated required NASM version to 2.14,
since intel-ipsec-mb v0.54 now requires it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I10cee6aea941593b828a6a171297d7e997d0f30c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3868
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-09-22 11:40:50 +00:00
Darek Stojaczyk
30116833fa autobuild: add SPDK_TEST_NATIVE_DPDK to test again pristine DPDK master
This was previously done in a Jenkins script. Move it
to autobuild.sh inside the repo where we can all see it.
Use new meson/ninja build system while at it.

To test, use autorun.sh with the following cfg options:
SPDK_RUN_EXTERNAL_DPDK=/tmp/spdk/dpdk/build
SPDK_TEST_NATIVE_DPDK=1

SPDK_RUN_EXTERNAL_DPDK can point to a different path,
but needs to have correct access permissions for current
user,

I had to reorder some code in autobuild.sh. Since
SPDK_RUN_EXTERNAL_DPDK needs to specified the ./configure
script can't be run without existing dpdk directory,
so the dpdk build needs to happen before the initial
./configure as well as the ocf pre-build.

Change-Id: Ibc57094806b361dc3c6acf55942f04a938e5194f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/868
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-22 11:40:25 +00:00
Changpeng Liu
778e4c0020 nvmf: make nvmf_ctrlr_process_fabrics_cmd() as a static function
Unlike ADMIN and IO commands, the FABRIC command is only processed
in the ctrlr.c file.

Change-Id: Ic4e01c7f81c98631a2c7cb603343b301f8ba63e1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4307
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: Ben Walker <benjamin.walker@intel.com>
2020-09-22 11:40:18 +00:00
Maciej Wawryk
fa5801703c test/vm_setup: Enable noninteractive packages install in debian like os
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Idd43435d10ff54bb091a4a35cd0d803c7e62caf0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4278
Reviewed-by: Michal Berger <michalx.berger@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>
2020-09-22 11:40:08 +00:00
Maciej Wawryk
1c62e9f828 scripts/vagrant: Remove unused openstack stuff
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I92c1f303f805f536975652beddd41f0fad4012b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4154
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-22 11:40:01 +00:00
Niklas Cassel
069b536766 nvme_spec: add Zoned Namespace Command Set Specific identify data structures
Add the I/O Command Set Specific Identify Namespace Data Structure
and the I/O Command Set Specific Identify Controller Data Structure
for the Zoned Namespace Command Set.

These data structures are defined in the NVMe Zoned Namespace Command
Set Specification.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I1434765ecbb22e1020c6b299cd05ba8a614b1cda
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-22 11:39:53 +00:00
Niklas Cassel
d1db020954 nvme: add a csi parameter to nvme_ctrlr_cmd_identify()
With the introduction of namespace types, the identify command has
gained an additional parameter: Command Set Identifier (CSI).

This parameter is similar to the existing parameters NSID and CNTID,
and is not used by all CNS values.

Most notably, the CSI parameter is not used for the existing CNS
values 00h (ID NS) and 01h (ID CTRL).
There are new CNS values, e.g. 05h (ID IOCS specific NS), and
06h (ID IOCS specific CTRL), which do take the new CSI parameter.

The new CNS values instead return Command Set Specific data structures,
which is basically an additional data structure. Therefore, the CNS
values 00h and 01h are very much still in use.
(Even the NVM Command Set has a Command Set Specific data structure,
even though all fields in that data structure are currently reserved.)

Since the CSI parameter is unused by all the existing calls to
nvme_ctrlr_cmd_identify() (since none of the calls send in a CNS value
that uses CSI), simply send in 0 for all existing calls.
No functional change intended.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia2b2324393a0707152b2f8511f0a22ad4a12bd46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4309
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-09-22 11:39:53 +00:00
wanghailiangx
6ca498c197 script: fix a setup.sh error "No such file"
Error log as below:
06:27:53    # nvme_namespace_revert
06:27:53   # /home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh
/home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh: line 109: /sys/bus/pci/devices/0000:80:04.2/driver/remove_id: No such file or directory
home/storage/workspace/opal-end-to-end-reservation-autotest/spdk/scripts/setup.sh: line 110: /sys/bus/pci/devices/0000:80:04.2/driver/unbind: No such file or directory
 06:27:54 # trap - ERR

Change-Id: I302e58143f0e165b17a9b5edd14121e6282f55a7
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4094
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-21 14:00:27 +00:00
Ben Walker
77ab6f2839 nvmf: Eliminate spdk_nvmf_tgt_accept()
The poller is now created internally to the library whenever a target
is constructed. Applications are not expected to poll for connections
any longer.

Change-Id: I523eb6adcc042c1ba2ed41b1cb41256b8bf63772
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3583
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: Changpeng Liu <changpeng.liu@intel.com>
2020-09-21 07:55:54 +00:00
Michal Berger
4be6d32b97 pkgdep/git: Create etc directory in git's custom path
By default, git will use path relative to the prefix it was built
with to determine location of git{config,attributes} files. In
our case, that would be /usr/local/git/etc.

Lack of this directory may be problematic for vagrant's proxyconf
plugin. If it picks up git binary at our location, it will depend
on existance of the /usr/local/git/etc directory. In case it's
missing it simply fails as git won't create it on its own. To
avoid that, let's create it ourselves.

Change-Id: Ie1fadd36d5888866b20375a7184031c73058fe3d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
3c98c8f764 scripts/vagrant: unset private_key_file when password auth is used
The main purpose of this is to force vagrant into using its own
ssh keys when password authentication is requested. Normally,
when ssh.password is defined, vagrant will attempt to inject its
own ssh key, by using provided password first, and re-use the key
for the new ssh session to provision the VM.

However, some vagrant boxes may come with their own embedded
Vagrantfiles which define custom ssh keys. If password auth is
requested for such boxes, vagrant will not use its own key, nor
the ones that may be defined by the vagrant box. Instead, it will
fallback to interactive, password authentication. From the CI pool
perspective this is not desirable.

On other note, this ties to the ongoing work of building indepdent
images for the CI where vagrant boxes will be deployed with a
custom ssh key alredy provided inside the box.

Related work:
trello.com/c/gAfo9mH1/208-vagrant-improvements-box-packaging
trello.com/c/9Dxp2Y9c/248-packaging-centos78-and-freebsd1112-with-packer

Change-Id: I49035b426519d9b24bcdab573d335ee622130560
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
d0ea1dfede scripta/vagrant: Fix unit typo in the help output
Change-Id: Idd707f20a0d8f6942606ec846ac27363000ddc80
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
47a87a0eb6 config/vm_setup: Don't fail on FreeBSD when os-release file is missing
Instead, define $ID, $VERSION_ID on our own based on FreeBSD's
version we are running on - 69d5d77bfb added etc_os-release package
as a pkg dependency so this change makes sure we have a chance to
actually install it.

Change-Id: I09b350ce3ae3f7c5d2f998f3d251f50e1277f846
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4261
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
aa46af008d scripts/vagrant: Don't expect an argument for -u option
This is a bool, hence it doesn't require any additional
arguments.

Change-Id: Ibc438f77c5c63ec5dc38007826268a494d8e661d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4239
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
db31afaaef pkgdep/git: Rearrange order in which install_refspdk() is called
Since refspdk has its source built, we should give it a chance to
avoid any potential issues with missing dependencies. To do that,
let's run it at the very end after all other sources were already
put in place (this is mainly relevant to FreeBSD where cmdline
for ./configure is hardcoded).

Change-Id: Ic07129c7b879eff7fddd734c9c4a6787df3da7ec
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4190
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
b85b7e2b93 pkgdep/git: Don't indicate error if vagrant installation is not supported
This would unecessarily print out usage() and call exit which wouldn't
be respected since all sources (except {,ref}spdk) are installed in the
background anyway.

Also, since std{out,err} may be bloated with bunch of messages comming
from different sources, explicitly mention Vagrant name in the echo.

Change-Id: I737f5cf08d6ae3d2d494add143d1dfaf89beeead
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
4ea04101e0 pkgdep/git: Use -R instead of -r on freebsd for cp
On Linux, these two options have the same meaning, however, on FreeBSD
systems -r is treated as -RL. This dereferences all the symlinks copying
directly files they point at. This doesn't work very well with git since
it will detect that as a type change, aborting following checkout.

Use -R to make sure all special files are properly copied as well.

Change-Id: Ib066896cf730b0906bcd30449f1e98a31d70ff31
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4185
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
4a50398caf pkgdep/git: Call install_extra_pkgs() only on Linux distros
Change-Id: Ic93b83dab25957bd3d99527fccb9374f4f23d110
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4184
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: John Kariuki <John.K.Kariuki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
d8956215ed pkgdep/git: Fix distro ID lookup for FreeBSD
Change-Id: I8fedd12c29479ef8b12d0604442f5bf1c29e7d86
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4183
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
c631e747af config/vm_setup: Add function placeholders
Change-Id: I4479afa3554065ab3f4826393732f6f45cedcf82
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4182
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
684b104389 scripts/pkgdep: Disable liburing installation on FreeBSD
Change-Id: Ifc5e28feacc27f1607a2aa19f3147c6cc9cad106
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4161
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2020-09-18 07:36:52 +00:00
Michal Berger
3b102b4f57 scripts/pkgdep: Remove call to install_sfhmt from freebsd.sh
This function is now being called from common.sh instead.

Change-Id: I90df5e3ea543a96fcede33b90369371191dffd07
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4160
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:36:52 +00:00
Ben Walker
597ab5915a doc: Document log_get_flags
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I68fbc371ab360ecc1009d559542ca29671c16c92
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4256
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-09-18 07:25:15 +00:00
Ben Walker
92d6cc60bd doc: Document log_clear_flag RPC
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I70c2754a39a5f6a9cd4c6b78e818e7c9c46dcd8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4255
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>
2020-09-18 07:25:15 +00:00
Ben Walker
80d7b670b4 doc: Document log_set_flag RPC
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I9ab1b6b2b1c3d12ce3ed04172c8e165d989460ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4254
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>
2020-09-18 07:25:15 +00:00
Ben Walker
cacc10761f doc: Document log_get_level RPC
Change-Id: I68a0036a204af22266a7c4313ebc85af64e2526f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4253
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-09-18 07:25:15 +00:00
Ben Walker
4fa81e020f doc: Document log_set_level RPC
Change-Id: If3b4d81501513e4b368e67dd9c9476fb1cf2dda3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4252
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-09-18 07:25:15 +00:00
Ben Walker
5afe86cfa4 doc: Document log_get_print_level RPC
Change-Id: Ieb693fc9d977c57238e3b9dd1c86727a7bcdd7ec
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4251
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-09-18 07:25:15 +00:00
Ben Walker
34eb121016 doc: Document log_set_print_level RPC
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ic9cd5f19b4e487569855a61575ca0cf83b971866
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4250
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-09-18 07:25:15 +00:00
Ben Walker
888c47d179 rpc: Fix header level of iscsi_portal_group_set_auth
It should be a level 2 heading

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I6c23b6ac53c1a3c3ce53fde67ae3f4f40a2d43f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-18 07:25:15 +00:00
Ben Walker
1da395bc10 rpc: Document iscsi_initiator_group_remove_initiators
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5c8adc433640b0f44222db73421896dfc01bb298
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4108
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-18 07:25:15 +00:00
Ben Walker
c04abc6398 rpc: Document bdev_examine
Change-Id: I6ad591479453fd1df812d241b7884fee9f6c2fbb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4107
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:25:15 +00:00
Ben Walker
d61da0ccda scripts: Break check_format up into functions
Change-Id: I3e3bd44826453e0ff5cc5b01769e81b5fdd660ff
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4073
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-18 07:25:15 +00:00
Ben Walker
9f6f02f22e scripts: Detect shellcheck errors by looking at the length of
shellcheck.log

shellcheck does not seem to reliably return error codes, at least
on the 0.7.0 version packaged on Fedora. Instead, look at
whether shellcheck.log contains any output.

Change-Id: Iec3c4f416844eed6a6c75b9204e24c2bc7243f7a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4072
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-18 07:25:15 +00:00
Ben Walker
0ee7697e4d scripts: Always use tty mode for shellcheck
Even on version 0.7.0, the diff mode throws up a bunch of errors
that don't appear in the tty mode. We'll have to deal with those
at a later date.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ic7001b9cf793e696bbf4bab0b0630e8d705a6905
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4071
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-18 07:25:15 +00:00
Niklas Cassel
726ac67c55 nvme: use the most appropriate is_active() function
There are two different is_active() functions.
spdk_nvme_ctrlr_is_active_ns() which iterates through the active_ns_list,
and spdk_nvme_ns_is_active(), which simply checks the nsdata.
There is an event callback that refreshes active_ns_list when a relevant
events has occured.

In nvme_ns_construct(), nvme_ctrlr_identify_ns() has just been called,
so we know that nsdata is as fresh as possible.

Hence, there is no reason to iterate through a less fresh active_ns_list.
Since we know that the nvme_ctrlr_identify_ns() call was done through the
same controller, we also know that the active/inactive is from the
perspective of the correct controller, so that is not a reason to use the
less efficient is_active() function.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I185f59b53e16e70163e33a3909f4b55ebf631cc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4293
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-18 07:25:06 +00:00
Niklas Cassel
743271d92d nvme: cache the command set identifier
Since the command set identifier might be accessed at several
different states in the nvme state machine, cache it so that
we don't need to loop through the ns id desc list every time.

This is similar to how other identify fields are cached using
nvme_ns_set_identify_data().

None of the identifiers in the desc list (including the new CSI)
can change over the life time of a namespace, so caching them
should be safe.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ie06180a4b3750dfa1a42f47afe0f7f9e3ec04ba9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4266
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-18 07:25:06 +00:00
Niklas Cassel
a7de7dee23 nvme: remove superfluous else statement
If the nvme completion was an error, the function will return,
so there is no reason for an else statement.

In fact, the else statement in nvme_ctrlr_identify_ns_async_done()
differs from the coding style used in other nvme_ctrlr_identify_*
functions, and arguably makes the code harder to read.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If76b823b7ca04ab98abb2912927c344ee9f12314
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4265
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-18 07:25:06 +00:00
Niklas Cassel
c31fc45324 ut/nvme: use nvme_ns_construct()/nvme_ns_destruct() in nvme_ns_ut.c
Use nvme_ns_construct()/nvme_ns_destruct() for each subtest.
This is what lib/nvme uses when creating/deleting namespaces,
so it makes sense to use the same functions in the unit test.

If we explicitly call memset(), we might hide real problems,
since e.g. nvme_ns_destruct() does not clear all struct members
in struct spdk_nvme_ns.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia0ffce3d0a29088282e9fc8fc5413b98d1fe7c63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4264
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-18 07:25:06 +00:00
Niklas Cassel
07525a91b5 nvme: clear the ns id desc list in nvme_ns_destruct()
Clear the ns id desc list in nvme_ns_destruct().

Without this, someone can get stale data by calling e.g.
spdk_nvme_ns_get_uuid() on a destructed namespace.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I965dd4cd6101d3a77eddbd582b9618b3436d39c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4263
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-18 07:25:06 +00:00
Jim Harris
792807a444 nvme: fix infinite loop when aborting queued reqs
When we disconnect a qpair, part of the code path is
calling _nvme_qpair_abort_queued_reqs.  This takes
care of aborting any requests that were queued waiting
for slots to open on the submission queue.
It walks the STAILQ one by one and manually completes
them with ABORT status back to the caller.

But if the callback path submits another request, this
request may also get queued to the end of the queued_req
TAILQ.  This can result in an infinite loop.

The solution is to use an STAILQ_SWAP to a local, empty
STAILQ.  Then we ensure we only abort the requests that
were queued when _nvme_qpair_abort_queued_reqs() started
executing.

Fixes issue #1588.

I used the multipath.sh test to reproduce this on my local
system. If it ever dropped into the STAILQ loop in this
function, we would hit the infinite loop.  With this patch,
I confirmed locally that now we safely avoid the infinite
loop and the test passes.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I657db23efe5983bd8613c870ad62695a7fc7f689
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4284
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-17 21:34:58 +00:00
Changpeng Liu
5198fbeda8 test/blobfs: add 1 second delay before checking the mount point
The thread loop function fuse_loop_new_thread() may not be executed
before checking the mount point.

For #1572 case, only one notice log as follow:
"Mounting filesystem on bdev BlobfsBdev to path /tmp/spdk_tmp_mount..."

For normal cases, there are two notice messages:
"Mounting filesystem on bdev BlobfsBdev to path /tmp/spdk_tmp_mount..."
"blobfs_fuse.c: 267:fuse_loop_new_thread: NOTICE: Start to loop blobfs..."

So add 1 second delay here.

Change-Id: I8f36fa538cb8864c94fe8110ced38703b7e2e413
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4260
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-09-17 15:25:16 +00:00
Jim Harris
7d5318cfb1 nvmf/fc: simplify nvmf_fc_master_enqueue_event
Remove some of the boilerplate code from each case and
replace with just an spdk_msg_fn assignment.

This also reduces the size of an upcoming change needed
in this function.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4257
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-17 15:25:09 +00:00
Li Feng
ae8c48d4bb vhost-scsi: support live recovery
When the vhost-scsi target needs live recovery, check the inflight share memory,
and resubmit the inflight io.

Signed-off-by: Li Feng <fengli@smartx.com>
Change-Id: I785476c8835053a4e8d4f1d692437feaf3a9ace1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4092
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-17 15:25:03 +00:00
Tomasz Zawadzki
9b294aeaa6 ut/blob: fix CU_VERSION check for clear linux
On clear linux the # was interpreted as bash comment.
The result was that no file was included and CU_VERSION
was undetected.

Removing the backslash before hash resolves it on clearlinux,
but breaks on fedora 31. Workaround in this patch portable
for both, as strange as it looks.

For future reference:
Fedora 32, Make 4.2.1, gcc 10.2.1, bash 5.0.17
Clearlinux, Make 4.3, gcc 10.1.1, bash 5.0.16

While here, added more specific string detection for
CU_VERSION. Before patch e7a86c42 only CUnit header was scanned,
now other output from CC is. This will prevent accidental
matches in the future.

Fixes #1562

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia4aa9fcbc3ad810755cfecd745c5c1ecd2a70717
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4240
Community-CI: Broadcom CI
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-09-17 15:24:50 +00:00
Tomasz Zawadzki
a06628195e blobfs/fuse: add 'event' as dependency for blobfs_bdev
This was missed in CI, due to disabled SPDK_TEST_BLOBFS
test flag in UT job that performs check_so_deps.sh.

Error seen when it is enabled:
there was a dependency mismatch in the library blobfs_bdev
The makefile lists: 'bdev blob_bdev blobfs json jsonrpc log rpc thread util'
readelf outputs   : 'bdev blob_bdev blobfs event json jsonrpc log rpc thread util'

Temporary workarounds have been added, ignoring blobfs_dev
in the abi check test. This will allow for better transition
on CI side. After this patch is merged, UT job flags on CI will be
updated to include SPDK_TEST_BLOBFS and abi reference repository
will be recompiled with this flag.

Next patch in series removes this workaround. It will be merged
after work on CI side is done.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4753a918d5760f154d4a59349747a0b1356e9c91
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3961
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-09-16 07:59:08 +00:00
Alexey Marchuk
e7c92b2426 nvme/tcp: Rename r2t_recv, set this flag when send_ack is 0
Rename ordering bit r2t_recv to h2c_send_waiting_ack, that is more
descriptive name.

Change-Id: I6d6143ff4c1cccc74e11226b7974706808092f9a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4202
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-09-16 07:58:59 +00:00
Alexey Marchuk
dc88d13129 nvme/tcp: Move tcp_req ordering bits to union
This makes it easier to zerofy ordering bits.

Change-Id: If5696bfedfff1bf75e41c1449eac7fccb469e98b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4201
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-09-16 07:58:59 +00:00
Alexey Marchuk
8db652e17e mk: Build crypto/qat when --with-reduce is specified
DPDK compilation fails when we configure SPDK using --with-reduce:
../drivers/common/qat/qat_qp.c:18:10: fatal error: qat_sym.h: No such file or directory
 #include "qat_sym.h"
          ^~~~~~~~~~~
But when SPDK is also configured using --with-crypto, DPDK is built successfully
--with-crypto enables build of crypto/qat driver and meson config for
this driver adds dpdk/driver/crypto/qat directory to QAT includes. This
directory contains the missing qat_sym.h and qat_sym_pmd.h files.

Group common drivers required by crypto/reduce

Fixes issue #1529

Change-Id: I7a53411798091e9a3c16442f3951ff73138d7337
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4179
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-16 07:58:32 +00:00
Maciej Wawryk
2e2a0b947d scripts/vagrant: Change host ip in local.conf
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I68766e986268352159114dc2ddc9104a17a31718
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4137
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-16 07:58:21 +00:00
Alexey Marchuk
eb78b90ca8 nvme/rdma: Check that SGL descriptors fit into ICD
The issue happens when SPDK RDMA initiator is connected to a remote
target and this target reports rather small (or zero) ICD and we try
to send several SGL descriptors.
Since SGL descriptors are located in ICD, we should check that their
total length fits into ICD. In other case sending such a command
will cause RDMA errors (local length error)

Change-Id: I8c0e8375dae799bc442ed2fab249cad2c4ccce51
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4131
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-09-16 07:58:13 +00:00
Maciej Wawryk
0b510f0e83 scripts/vagrant: Add network interface for openstack tests
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I094f8e3c98fb9be4f952efa9ff751e0b1144e391
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4125
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: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-09-16 07:57:56 +00:00
Sochin Jiang
5363eb3c4c lib/blob: fix an uint32_t overflow in blobstore init
uint32_t supports at most 2TB at most, we need to handle
the larger blobstores, fix this overflow problem.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I27950eb759e9cb9ad48fa4aa8dd1976b4e852832
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4075
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-09-16 07:57:42 +00:00
Shuhei Matsumoto
8701f636c6 test/nvmf_example: Not echo but substitute directly to NVMF_EXAMPLE variable
Following the last patch, simply set NVMF_EXAMPLE directly without
using echo.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibc3b9268263f44c0b865a15a1ed1a15a404ed23e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4091
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-09-16 07:55:28 +00:00
Shuhei Matsumoto
0ecb36c727 test/nvmf: Use $USER instead of logname to follow other cases
$USER gives the login name who logged in the terminal and
logname prints the login name who logged in the session.

test/nvmf/common.sh has used $USER to start the SPDK application,
as non-root but test/nvmf/host/perf.sh and
test/nvmf/target/nvmf_example.sh have used logname to start the
example application as non-root.

It looks OK to use $USER to start application as non-root like other
cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0a17e3bd37a76e4d808e5816ba6716920f8f340
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4090
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-16 07:55:28 +00:00
Shuhei Matsumoto
5cf0c3707f lib/nvmf: Use macro constant for ANA descriptor to avoid variable length array
In C language, we cannot use constant at compile time. Hence the
local array _ana_desc[] is not a fixed size array but a variable
length array.

We can avoid using variable length array by changing const variable
to macro constant.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7333a8078d3102c4bd5088f56f6530846854c85f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4093
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-16 07:55:28 +00:00
Shuhei Matsumoto
c8cb51d4bc lib/nvmf: Add nvmf_subsystem_listener_set_ana_state RPC
Add an new RPC, nvmf_subsystem_listener_set_ana_state.

Find the specified subsystem listener, and then set the ANA state
of the listener by calling nvmf_subsystem_listener_set_ana_state().

By adding a string and an enum to the existing context structure,
nvmf_rpc_listener_ctx, and adding an operation type to the existng
enum, nvmf_rpc_listen_op, reuse the existing code and data as much
as possible.

Besides, insert line break into a few long lines and fix wrong
error log.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6fb2dfbb1f9c5f56848eba21d2a733fbed802614
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4080
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-16 07:55:28 +00:00
Shuhei Matsumoto
071d80f37b lib/nvmf: Add an internal API nvmf_subsystem_set_ana_state()
Add an internal API nvmf_subsystem_set_ana_state() to change the
ANA state of the subsystem listener whose trid matches.

ANA optimized state, ANA non-optimized state, and ANA inaccessible
state are supported. ANA change state is not used and ANA persistent
loss state is not supported.

After changing the ANA state of the subsystem listener, on each poll
group, controllers, whose the subsystem listener match, send ANA
change notice.

Initiators query ANA log page anyway if they receive ANA change
notification. False positive notification should be avoided but is
acceptable.

To avoid any concurrency conflict, simply compare ctrlr->listener and
the passed listener.

It may be better to execute nvmf_subsystem_set_ana_state() on the
subsystem thread but currently the RPC thread adds and removes a
listener to and from the subsystem, respectively, and the subsystem
has been suspended while executing nvmf_subsystem_set_ana_state().
Hence we keep this as a future enhancement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If1910b79dd33d904114e258ae2c5e868947cdc52
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4079
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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-09-16 07:55:28 +00:00
Shuhei Matsumoto
523f2a85d3 lib/nvmf: Set up ANA Change Notice
If the ANA reporting feature is enabled for the subsystem,
- set ANA Change Notice of Asynchronous Event Configuration to 1
- set ANA Change Notice of Optional Asynchronus Event Supported to 1
- set ANA Non-Optimized state and ANA Inaccessible state of ANA
  Capability to 1.

ANA Change state is not used and ANA Persistent Loss state is not
supported for now.

The next patch will actually support ANA Change Notice using an new
RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4db2e33dd2879cdf995adcab41ef53728b27a201
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4087
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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-09-16 07:55:28 +00:00
Jeffry Molanus
c66275c075 lib/sock: do not fail spdk_sock_flush() on ENOBUFS
When net.core.optmem_max is not set high enough, a call to sendmsg()
might fail with ENOBUFS. Currently this is treated as an error.

When we have no more buffer space left, we should continue to process
any completions and by doing so, free up the auxiliary buffers we ran out
of.

With this change I was able to run perf against the spdk target with a
purposely set to a low, value of optmem_max, where previously it would
fail.

This fixes github issue #1592

Signed-off-by: Jeffry Molanus <jeffry.molanus@gmail.com>
Change-Id: Ieeeed4fbecd827d0da815456b57fbe81495fe54d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-16 07:55:22 +00:00
Karol Latecki
e4ff3a5bf1 test/nvme_perf: add iodepth_batch options for fio tests
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ia029df5c8c75eff6ba8db9f21756b91a8a0d9720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4104
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
67d4ef8dab test/nvme_perf: remove "case" blocks from results parsing
These were not really needed and parsing functions had to
be unnecessarily called multiple times.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I277125bbb3d598a348164e8834843d0d04f1434c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4098
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
c2f804d753 test/nvme_perf: fix kernel fio results maths
Calculating kernel fio results did not take
number of workload retries into account for latency
stats.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I418845d2f6be328827e4217c2eca761b0c211504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4096
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
20df041193 test/nvme_perf: use float arithmetics
Using only Bash for calculation in this script
results in operating only on integers, which lead
to wrong results being saved after test run.

For example - submission latency of 0.175usec was
saved as 0usec.

Change-Id: I6f9924d12189631ab6d0bdc5385e642b6c2aa34f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Xiaodong Liu
195fb4e40e bdev/aio: assign new io-ctx to each io-ch
It aims to avoid bdev starvation by setting separate
io_context to each bdev_aio io channel and link them
into group channel.

Previous, each ch of aio_bdev on a same spdk_thread shares
same io_context. If one of them submits too many IO to the
io_context, then other channels will be starved.
Moreover, if the first bdev_io gets NOMEM error, then the
following IO of this bdev have no chance to get processed.
The bdev_aio starvation can be reproduced by bdevperf in
v20.04, by:
./bdevperf -q 100 -w randwrite -t 5 -c hdd.conf -o 1048576
(hdd.conf defines 2 aio_bdevs of HDD)

Change-Id: Ic709323f5baeb2f8f7250b75ad872ec4156b5e78
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3808
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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>
Community-CI: Broadcom CI
2020-09-15 07:14:18 +00:00
Jacek Kalwas
4e06de69b8 nvme: expose functions to manage queue identifiers
In cases where the SPDK nvme driver is being used as a validation/test
vehicle, users may need to allocate a currently unused qid that can be
used for creating queues using the raw interfaces. One example would be
testing N:1 SQ:CQ mappings which are supported by PCIe controllers but
not through the standard SPDK nvme driver APIs.

These new functions fulfill this purpose, and ensure that the allocated
qid will not be used by the SPDK driver for any future queues allocated
through the spdk_nvme_ctrlr_alloc_io_qpair API.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I21c33596ec415c2816728a600972b242da9d971b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3896
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-09-15 07:13:46 +00:00
Seth Howell
848e9e2dd9 lib/nvmf: modify subsystem_state_change.
If we are already in the desired state,
just call the callback directly from the
subsystem_state_change function. That way
we save a lot of message passing.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6cf8563524610d9125d53266e3c0e179e064bf63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3760
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-15 07:12:54 +00:00
Seth Howell
8ff8bf0713 lib/nvmf: add synchronization to subsystem state change.
This is important to avoid doubling up on state changes
and hitting asserts.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If8797ea13a5c224cee85e53e9b2542012423b37f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3759
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-15 07:12:54 +00:00
Jim Harris
bd16f57472 blob: switch to bit_pool for tracking used_clusters
We still need to be able to explicitly set specific
bits in the cluster array during initialization and
loading (especially recovery), so we use a bit_array
during load, and then convert it to a bit_pool just
before calling the user's cmopletion callback.

This gives a roughly 300% improvement over baseline
on a benchmark which does continuous resize operations.
The benefit is primarily from saving the lowest free
bit rather than having to always start at bit 0.  We
may be able to further improve this by saving extents
in the bit pool as well, although after this patch,
the benchmark shows other hot spots different from the
bit search.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3975
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-15 07:12:44 +00:00
Jim Harris
0d2a5bbe17 util: add spdk_bit_pool
spdk_bit_pool is a wrapper around spdk_bit_array with the
intentions of providing much better performance for allocating
from a fragmented bit array.  The cost of searching a large bit
array for a cleared bit can become expensive so the spdk_bit_pool
will provide an ability to track extents of recently cleared
bits.

This initial commit does not adding the tracking yet - it is strictly
a wrapper around spdk_bit_array with enough functionality to replace
the use of spdk_bit_pool in SPDK blobstore with equivalent performance.
This will allow us to switch blobstore to use this minimal
wrapper first, and then iteratively improve spdk_bit_pool to provide
the better performance.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I95d0d12db47eac73e0641eb7f94fa5df43d42e45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3974
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-09-15 07:12:44 +00:00
Jim Harris
04eb8e05d6 blob: allocate ctx in bs_alloc
The ctx allocation was duplicated after both bs_alloc
calling sites, so this reduces the code a bit.  This change
also enables some future changes involving the used_clusters
bit array.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4ea98f079dbe385654e9cb9c0c58a1926a990c9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3973
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-15 07:12:44 +00:00
Jim Harris
39caf843a1 blob: consolidate init, load and dump ctx objects
This will allow for some additional simplifications
in future patches.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie421ad35f8c0efbb775fbe6bf85799af515264ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3972
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-15 07:12:44 +00:00
Jim Harris
0a19f43e05 blob: move spdk_bs_load_ctx earlier in the file
This prepares for some future patches.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If63c83f76e839b796c58200ddb0ca2137fbc4288
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3971
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-15 07:12:44 +00:00
Jim Harris
835fbef712 blob: simplify bs_allocate_cluster
Have it both find and set the lowest available cluster
bit index.

This will temporarily hurt the performance for cluster
allocation, since it will always search starting at
bit index 0.  But upcoming changes in this patch set
will fix that again by using a new spdk_bit_pool object
that will do allocations much more efficiently than the
current implementation here.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad199c9166b82cb9a31597a080f5a28823849e60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3970
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-15 07:12:44 +00:00
Jim Harris
ded02d0929 blob: batch used_cluster_mutex operations
Currently if we create a blob of 128 clusters, we
lock/unlock the used_cluster_mutex 128 times - once
for each cluster.  Same when those clusters are released
when the blob is deleted.  Batching these lock/unlock
operations is very easy and gives a noticeable
efficiency improvement.

My local benchmark (1GiB ramdisk, 4KB cluster size,
128 clusters/blob) creates enough blobs to fill the
blobstore and then continuously deletes and recreates
them.  Performance increases 20% on that benchmark
with this patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic503accf1ca1ab1af7254b4067771d956f52014d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4069
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-15 07:12:44 +00:00
paul luse
7ad510b930 doc: add jsonrpc docs for compress bdev RPCs
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I38585f1cd609bb53f90ec8c169b14fb09808b6e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4155
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-14 09:19:19 +00:00
paul luse
2b29a2b16c bdev/compress: rename RPC to match standard naming
Not sure how this one was missed back during the big rename party.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia00819a2c2e8c81ad0499f4081667dde04fa726e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4140
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-09-14 09:19:19 +00:00
Changpeng Liu
fd5e781afc nvme: don't loop MMIO reads if the controller is already in failed state
This may happen when resetting a controller, if the ADMIN queue failed
to reconnect, the controller is set to failed state, so for this case
we don't need to loop until timeout, just exit.

Change-Id: I2b37af5453086cd64f3609c41eb8f6475da55fd4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: <dongx.yi@intel.com>
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: JinYu <jin.yu@intel.com>
2020-09-14 09:19:07 +00:00
Jacek Kalwas
8387e97f90 nvmf: simplify listen_associate interface
There is no need for this interface to be async.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1f21b53e90b7d165b6b5fb2e1226ce7591966b58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4181
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-09-14 09:18:57 +00:00
Jacek Kalwas
ae207216fb nvmf: remove request exec backdoor
It was introduced for the purpose of executing fabric cmds when
subsystem and qpairs are not active. It was rather workaround than
solution for transport type like vfio-user. spdk_nvmf_request_exec
is a preferred way of passing request obj into nvmf layer.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4f989de27bfd494c744017599909c2e200f0f233
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4180
Community-CI: Broadcom CI
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>
2020-09-14 09:18:49 +00:00
Shuhei Matsumoto
ce7eee9861 lib/nvme: Enable Async ANA Change Notice if supported
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida297aaf5b8212dde5abfe8e2d3df8d333f6c109
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4157
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-14 09:18:35 +00:00
Shuhei Matsumoto
6c6efee89d lib/nvme: Set Add ANA log page to be supported by controller
If ctrlr->cdata.cmic.ana_reporting is 1, set the corresponding
field to true.

Then use its API in the identify application.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e74bc4c114883e4aecdbee7a6f1a02027db23a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4156
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-14 09:18:35 +00:00
Ziye Yang
a6db2f3590 sock: enable placement_id configuration in sock layer
This patch is used to enable placement_id getting
in sock layer and also add the rpc support.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I70de57b0ed392a0aefce9d3ff1f61ef924015a87
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4146
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-11 10:04:22 +00:00
Ziye Yang
ebb903d46e sock/uring: Add the support for enable_quickack
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: If908173600b7803dcf0e130f185dfdaec70c71c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4148
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-11 10:04:22 +00:00
Ziye Yang
2c80fce02d sock/uring: enable "enable_recv_pipe" in uring sock
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: If62030a011ded73181b88f90fe87586a907af9ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4145
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-11 10:04:22 +00:00
Niklas Cassel
174a5fe140 nvme: add initial namespace types support
Add support for getting the Command Set Identifier for a given namespace.

The SPDK_NVME_CAP_CSS_IOCS feature can be implemented on top of an old NVMe
specification. If the feature is set, retrieve the NS ID Descriptor List
regardless of the NVMe specification version. The quirk is still respected.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I7b257115ecb0d813ba75201c0f48960c7070dcc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4085
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-11 07:29:51 +00:00
Niklas Cassel
5c861295dd nvme: warn if found UUID descriptor length is incorrect
Warn if found UUID descriptor length differs from NIDL for NIDT_UUID.
This will help identify non-compliant NVMe controllers.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Idf0daff9996147f38413318d1cd7fc3f929c5ce4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4138
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-11 07:29:51 +00:00
Ziye Yang
e699355434 bdev/rbd: Still use rbd_aio_read/write if iovcnt=1
In most cases, there is single element for iov array,
so using rbd_aio_read/write is enough.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Id3ccbb4a4ff10be9d4546c8e89e6dc596d0f3a72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4122
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-09-11 07:29:20 +00:00
Maciej Wawryk
90477acc7c test/pkgdep: move ibverbs-utils and rdmacm-utils to package list
Remove LIBRXE_INSTALL from pkgdep/apt-get because we dont use it any more.
Move ibverbs-utils and rdmacm-utils to package list for allway install in vm_setup.sh

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0b0952bb898802a7f69460f7d6b2f41be3d82572
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4101
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-11 07:29:01 +00:00
Pawel Piatek
8ea52a41d1 test/vm_setup: install vagrant dependencies
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I8e02f30b96fd8434e5da206eba657ba524a413a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3577
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-11 07:28:45 +00:00
Pawel Piatek
2188940e63 test/vm_setup: add vagrant-install option
Add option to install vagrant and it's plugins
required to run SPDK test VMs'.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I89c9802ebb80bd411ebe93dbc98e54fb32779e4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3576
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-11 07:28:45 +00:00
Pawel Piatek
69d5d77bfb test/vm_setup: various improvements
- improve package manager detection
- add error function
- exclude "git" from managers
- use etc_os-release package on FreeBSD
- use newer bash built-in "test" ( [[ ) instead of old fashioned ( [ )

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Id88d60e027bf9993e04f6cdf1d9e23f2249135af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3575
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-11 07:28:45 +00:00
Karol Latecki
ba3dcb6fcf doc: add SPDK NVMe-oF TCP 20.07 performance report entry
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib93d9d5eed5b6571f3839279cc34daad4b828a73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4150
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-11 07:11:36 +00:00
GangCao
bd8afe1fc3 examples/ioat: add an assertion for the memory allocation
Change-Id: I3ac420bd12c68cfeb41b77fff2b708076f5b87e5
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4123
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-09-10 07:11:18 +00:00
Shuhei Matsumoto
9c1d648315 lib/nvmf: Add nvmf_subsystem_get_listeners RPC
Add an new RPC, nvmf_subsystem_get_listeners.

ANA state is per listener and per subsystem, and is stored in
subsystem listener. We can return ANA state by the existing
nvmf_get_subsystems RPC but it's confusing that listen addresses
have ANA states.

To change ANA state, we will provide a RPC to change ANA state of
only one selected subsystem listener.

To query ANA state, it will be convenient to get ANA states of all
listeners of one selected subsystem.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic3baad6eac65d7af6e0cab2c4059e1458d41e6e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4059
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-09-09 07:20:16 +00:00
Shuhei Matsumoto
a60865bff6 doc/jsonrpc: Add missing content for the existing nvmf_subsystem_remove_listener RPC
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id889eceee9b2560df585ccaf665c98b7739da37b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4078
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-09-09 07:20:16 +00:00
Shuhei Matsumoto
151eff43dd lib/nvmf: Remove unused structures and macro constants in nvmf_rpc.c
Data structure and macro constants for multiple listen addresses
and namespaces are not used anywhere in nvmf_rpc.c

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idd8bc61e22f9e9918a88f017a024cab239ff5e53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4060
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-09 07:20:16 +00:00
Shuhei Matsumoto
83eb352b3c lib/nvmf: Add nvmf_subsystem_get_qpairs RPC
Add an new RPC, nvmf_subsystem_get_qpairs to retrieve the list of
qpairs of an NVMe-oF subsystem.

This RPC will be usable to verify if NVMe ANA works.

Pause and resume the subsystem to access the qpairs safely.

One subtle issue remains. The JSON RPC returns success even if
resuming the subsystem fails. Write FIXME to address this.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9d90a01b1117dee00d85b2e21b4f4d02d80db531
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4050
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>
2020-09-09 07:20:16 +00:00
Ziye Yang
a9c0fdd77d bdev/rbd: Use the non-timer poller.
The timer poller could add the latency since we poll it every 50ns.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia3d0ec56658b9365fdd34b67663a3365eb738451
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4081
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
2020-09-09 07:20:04 +00:00
Tomasz Zawadzki
bc0394250f lib/blob: explicitly pass ctx where possible
Some of the functions were only referenced directly.
There is no need to use void* or pass any bserrno,
in some cases.

Let's be explicit.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib26dda7068965838f38dad856ea1e456fd87a655
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4061
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-09 07:19:57 +00:00
Jim Harris
3c31f6dc03 blob_ut: add create_loop
This test repeatedly creates and deletes blobs to
confirm that the used_md_pages and used_clusters
bit arrays are managed properly.  This test exposed
the bug reported in #1590 which has now been fixed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-ID: If5d7b7f03cc2fb9daac928573c73430b74ea9a51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4038
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-09 07:19:57 +00:00
Tomasz Zawadzki
c8c73af940 lib/blob: add clearing extents to persist path
This looks like a major omission on persist path.
Especially visible for cases where blobstore was not
reloaded between blob creations/deletion.

Added writing out zeroes to md_pages that contained
truncated extents (resized down).
After zeroes are writen out, md_pages for those extents
are released. In case of blob deletion, extents are
resized down to 0 so all extent pages are released.

Fixes #1590

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9a2a1190e3f1f3b5d1bb806191c1fe4d27df7780
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4051
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-09-09 07:19:57 +00:00
Alexey Marchuk
e9b9510a86 nvmf/rdma/tcp: Use spdk_env_get_core_count to estimate cache size
Usage of spdk_thread_get_count is wrong since there might be many
threads allocated by other modules. Transport buffers are used by
transport poll groups, their number is equal to the number of cores.

Change-Id: I4bc748e93c3b204bf3b3ec73f17257b927a7f428
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3882
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: Changpeng Liu <changpeng.liu@intel.com>
2020-09-09 07:19:50 +00:00
Alexey Marchuk
903fdb752b nvmf/transport: Use mempool_get_bulk to feel pg cache
When we try to evenly divide transport buffers between poll grouos,
e.g. when we run spdk_tgt on 8 cores, set num_shared_buffers=32768
and pg buf_cache_size=4096, the last pg can't retrieve enough
buffers to fill cache. In my case if only got 4040 buffers out of
4096. Missing 56 buffers were cached by previous poll groups.
That occurred due to mempool has per lcore cache of 512 elements
and when it becomes empty, the cache is refilled. It seems that
each poll group cached extra 8 buffers.
The issue doesn't occur when we use mempool_get_bulk.

Change-Id: I866d58aa03986a3cffe27402b12f9a2519097f83
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3881
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-09-09 07:19:50 +00:00
Michal Berger
b80667550f scripts/setup remove flakiness from tests
This removes all the sleeps called after setup.sh reset. These
sleeps were meant to wait for devices given tests depend on.

Change-Id: Ibb86c9f6f8d5f1b05d165e84d9019530af84f9ea
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4035
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-09-09 07:19:43 +00:00
Michal Berger
6182bff272 pkgdep/common: Fix liburing's .so lookup
liburing.so is a link to actual lib created under /lib, not
/usr/lib{,64}.

Instead of checking hardcoded paths, simply check the ld cache.

Change-Id: I65954490d0b79e17de791d8045a1758cbbb381f5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4020
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-09 07:19:36 +00:00
Michal Berger
97ab0917e7 pgkdep/rhel: Disable liburing on Centos7|RHEL7
Change-Id: I9986004a2573af239286eef2fb6f67662f2598d5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4019
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-09 07:19:36 +00:00
Michal Berger
8ef9f7b2af pkgdep/rhel: Add ELRepo, Ceph repos for Centos, RHEL
ELRepo's elrepo-testing holds missing btrfs packages.

On Centos, system repos provide centos-release-ceph-* packages which
install necessary Ceph repositories to provide ceph package.

Also, group these repos into single array and install them in one
bulk. Use yum-config-manager to enable EPEL's|ELRepo's repos instead
of mixing it with unnecessary install step.

Change-Id: I3ba9c6f713ac7e28c7f1ba1e4482d2f2839eeb6a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4018
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-09-09 07:19:36 +00:00
Jim Harris
2431578990 nvme: increase size of uevent buffer to 1MB
In production environments, there could be large numbers
of uevents other than nvme hotplug events.  We want to
ensure we never lose an nvme uevent due to ENOBUFS
(i.e. overflow).  So allocate a bigger receive buffer
for the netlink socket to ensure we never lose any events.
We only allocate one netlink socket per SPDK application,
so the extra memory consumption is not really a concern.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I663fbb093516a01a8980a1517245f92d8c76f7aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4070
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-08 07:49:32 +00:00
Jin Yu
ba773a54c7 nvme: fix keep alive issues in host side
There are two bugs:
1, When the target response 0, it means target does't
support keep alive.
2, Change the interval time to us so when the keep alive
timeout is 1ms then the interval is 500us.

Fix github issue: #1565

Change-Id: I75707ab0e4e639209a9c50ef326492fae213044d
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4077
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-08 07:46:40 +00:00
yidong0635
744448260b test/nvmf: Remove duplicated code target second port.
This is already defined in nvmf common file. so remove it.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I40b003c8361fe889e9ed6a2add9878e362b5e966
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4056
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>
Community-CI: Broadcom CI
2020-09-07 09:29:49 +00:00
Shuhei Matsumoto
f1c4238322 lib/nvmf: Factor out internal of rpc_nvmf_subsystem_get_controllers() to reuse
Factor out the internal of rpc_nvmf_subsystem_get_controllers() into
a function rpc_nvmf_subsystem_query() to use it for the upcoming RPC,
nvmf_subsystem_get_qpairs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibe62bcfadf6b33ef26c018a3667f280b6fcd8fdf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4049
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>
2020-09-07 09:29:37 +00:00
Shuhei Matsumoto
98145aa6b1 lib/nvmf: Replace raw number 0xffffffff by SPDK_NVME_GLOBAL_NS_TAG
For nsid, use SPDK_NVME_GLOBAL_NS_TAG rather than raw number
0xffffffff wherever possible.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I23e989786263172e13bab40c011cf58beb06fabf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4055
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>
2020-09-07 09:29:37 +00:00
Seth Howell
1b249c38ad lib/nvmf: modify add_ns rpc to roll back changes in failure.
This can happen and we should make a best effort to return
the subsystem to a coherent state when it does.

maybe fixes: issue #1416

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic3d0376984733e6664295305be82fca678c515b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3437
Community-CI: Broadcom CI
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
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-09-07 09:29:25 +00:00
Seth Howell
1e337a1eb2 nvmf/subsystem: New path when we fail to change the subsystem state.
This can happen and we should be prepared for it.

Maybe fixes: issue #1416

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I77f48dbcabf702f88df56ad7e866bbcb830fc239
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3393
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-07 09:29:25 +00:00
Vitaliy Mysak
d8190d0288 lib/env_dpdk: replace printf() and fprintf(stderr,) usage
And modify test/env/vtophys to resolve linking errors.

SPDK_PRINTF() and SPDK_ERRLOG() use spdk_log() procedure which is
customizable and redirectable, so it is preffered over printf()

In case of test/env/vtophys/ program,
we have to make it an app first to avoid linking errors.

Change-Id: Id806ec3bb235745316063bbdf6b5a15a9d5dc2d9
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1944
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>
2020-09-07 09:28:39 +00:00
Darek Stojaczyk
494dc66ddb mk: don't link env if not needed
Some SPDK apps were linked with env even though they
didn't use it.

Top-level makefiles can now specify SPDK_NO_LINK_ENV=1.

Change-Id: I057baa5b620f20d829185025dc2e8efdcfa03fac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3417
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-09-07 09:28:39 +00:00
Michal Berger
3fdfea7bac config/pkgdep: Allow for sourcing OS-based routines
vm_setup.sh currently depends on package managers to determine which
SPDK dependencies must be installed, however, this may cause issues on
systems which provide more than one package manager, e.g., dnf and
yum. Due to that fact, some packages were missing since they were
bound to a specific package manager instead of the distribution, case
and point, nbd. Also, some OS-dependent steps had to be duplicated,
like repo refresh on Centos8, since either of the managers could be
in use.

To address the above, allow for souring of OS-based routines to
overwrite defaults set based on given package manager.

Change-Id: I0d8d88dea4521e9c76b187c69743e4e09aa724e6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4017
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>
2020-09-07 09:28:25 +00:00
Michal Berger
f2d958973a pkgdep/yum: Attempt to install wget prior installing nbd rpm
Change-Id: I907ae092d0d46ec6fea89ad24660f6ac6b555c2a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4016
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Michal Berger
8a0d613e6f pkgdep/dnf: Refresh repo on Centos8
The d09acccf changed the order in which dnf, yum managers are picked
up, however, the refresh step was not moved to dnf which actually is
by default shipped with Centos8. Simply add the missing step.

Change-Id: I6f845d794b79ff01d4abfff098b0b29a9c489189
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4015
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Michal Berger
f1896c3d1c pkgdep/yum: Add missing call to sudo
Change-Id: I7d8b0a457f51ca1214009c758e25c44ab2d6755c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4014
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-09-07 09:28:25 +00:00
Alexey Marchuk
f7b4dd3492 pkgdep: Add a workaround for Centos7.x aarch64
There are 2 issues:
1. building of ninja fails with missed skbuild dependency.
This dependency can be installed with scikit-build module
2. The build of ninja wheel fails due to cmake version. E.g. centos 7.6
uses cmake 2.8 and cmake 3.x can be installed as another package.
It is needed to create a soft link to cmake3 with `cmake` name so
that cmake3 is used instead of cmake 2.8

Change-Id: I53910d8d73b233d3f3a9059ab10938477c5db57b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4062
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-07 09:28:09 +00:00
Michal Berger
342c08d0b0 scripts/setup: Define fallback driver for each device type
Most distros ship these drivers as modules, however, some, like
clearlinux, have them compiled directly in the kernel (e.g. nvme).

In case modalias lookup fails, have a fallback prepared just in case.

Change-Id: Ib9da8ff69edbb0c4ce427aa089fa7d04b399a20b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4047
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-07 09:27:55 +00:00
Michal Berger
d6c499f3ee scripts/setup: Fix check for mounted devices
The previous approach didn't take into the account systems where root
partition is representend in a virtual form of /dev/root (see
clearlinux). In case the device was bound to virtio this would fool
setup.sh into thinking nothing is mounted and proceed with unbinding
the entire rootfs.

Fix this by checking the maj:min numbers of the device instead of its
name against the mountinfo list.

Change-Id: I0feb2584869f6bb72df3e9a4e619620240cfce3b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4046
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
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-09-07 09:27:55 +00:00
Michal Berger
44775a8062 scripts/setup: Add env switch for block dev sync
Make sure that setup.sh waits for block devices during the tests.
This is to make sure that the underlying controllers are ready to
be talked to and minimize the amount of their flakiness.

Change-Id: Id09445de7ac7ccf4c9f679ee2b6c4bdd14c89733
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4029
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-07 09:27:42 +00:00
Michal Berger
0897e4dbfe scripts/setup: Keep track of the driver given device is bound to
Change-Id: I4c3a54d017f2ed26ce1fa5afb539063f73fadbc1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4031
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-07 09:27:42 +00:00
Michal Berger
4f1701f60f scripts: Add tool for keeping uevents in sync
This script tries to be smart by mainly looking up all the kernel
events caught over the netlink. This is done in order to mitigate the
amount of flakiness test scripts may suffer from while waiting for
given device to pop up. This mainly concerns nvme devices when they
are moved back from user space - the time from when the ctrl is bound
to the driver until the block subsystem finally gets the device can be
substantial (even > 2s). Consider:

  $ setup.sh reset; sleep 10s

  vs

  $ setup.sh reset; sync_dev_uevents.sh block/disk nvme0n1

Where the latter could recover some of the seconds back:

  $ time { ./scripts/setup.sh reset; ./scripts/sync_dev_uevents.sh block/disk nvme0n1 ; }
0000:82:00.0 (8086 0953): uio_pci_generic -> nvme
0000:00:04.0 (8086 0e20): uio_pci_generic -> ioatdma
0000:80:04.0 (8086 0e20): uio_pci_generic -> ioatdma
0000:00:04.1 (8086 0e21): uio_pci_generic -> ioatdma
0000:80:04.1 (8086 0e21): uio_pci_generic -> ioatdma
0000:00:04.2 (8086 0e22): uio_pci_generic -> ioatdma
0000:80:04.2 (8086 0e22): uio_pci_generic -> ioatdma
0000:00:04.3 (8086 0e23): uio_pci_generic -> ioatdma
0000:80:04.3 (8086 0e23): uio_pci_generic -> ioatdma
0000:00:04.4 (8086 0e24): uio_pci_generic -> ioatdma
0000:80:04.4 (8086 0e24): uio_pci_generic -> ioatdma
0000:00:04.5 (8086 0e25): uio_pci_generic -> ioatdma
0000:80:04.5 (8086 0e25): uio_pci_generic -> ioatdma
0000:00:04.6 (8086 0e26): uio_pci_generic -> ioatdma
0000:80:04.6 (8086 0e26): uio_pci_generic -> ioatdma
0000:00:04.7 (8086 0e27): uio_pci_generic -> ioatdma
0000:80:04.7 (8086 0e27): uio_pci_generic -> ioatdma
* Found nvme0n1

real    0m2.427s
user    0m0.465s
sys     0m0.408s

Change-Id: Ib91efc73742fb00b058d4f54976d27390489ddbf
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3655
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-07 09:27:42 +00:00
Michal Berger
1c8a890bff scripts/setup: Reorder the status's header
Change-Id: Ifeadc3fac3f5d09143dd13ef3d510de9cecffb8a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4032
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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-09-07 09:27:42 +00:00
Shuhei Matsumoto
aeb693ca07 bdev/gpt: Change ERRLOG to DEBUGLOG to show interleaved metadata is not supported
It is a good enhancement for the GPT vbdev module to support
interleaved metadata but interleaved metadata is not critical and
the priority is low.

However the following error log is always collected when there is
any bdev with interleaved metadata.

  vbdev_gpt.c: 552:vbdev_gpt_examine: *ERROR*: GPT module does not
    support block size 4224 for bdev Null0

This does not cause any failure but confuses user. Hence,  change
the corresponding print from ERRLOG to DEBUGLOG.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id58507cbdc830d2b139fb34faa29e08d73c16141
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4058
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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: Broadcom CI
2020-09-04 15:12:48 +00:00
Shuhei Matsumoto
102ab66926 doc/nvmf: Fix the section "Using RPCs" not to use deprecated --max-qpairs-per-ctrlr
The section "Using RPCs" uses the parameter --max-qpairs-per-ctrlr
but it has been deprecated.

Use max_io_qpairs_per_ctrlr instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee0646656e5201e0c7b2ee220ea93b674e07fce1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.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-09-04 15:12:48 +00:00
Ben Walker
4aa0bb676b nvme/pci: Check for command completions after deleting submission queue
After a submission queue is deleted, the device is supposed
to post completions for every command to the completion queue.
Previously, we never looked and completed all commands with
an ABORTED status. Instead, complete any commands in the
completion queue with the status the drive gave them.

Change-Id: If851a365d4f305cf4390454b6b26dd0f7c5b82ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3875
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-09-04 08:14:44 +00:00
Shuhei Matsumoto
68f1681771 lib/nvmf: Control I/O and some admin commands according to ANA state
For I/O commands, block them if ANA state is inaccessible, persistent
loss, or change.

For Identify command, clear capacity field (nuse) to 0 if ANA state
is inaccessible or persistent loss.

For Get Features command, block features, error recovery, write
atomicity normal, reservation notification mask, and reservation
persistence if ANA state is inaccessible, persistent loss, or change.

For Get Log Page command, error information page does not return
any data yet, and hence there is no change.

For Set Features command, if ANA state is inaccessible or change,
block the command if NSID is 0xFFFFFFFF or if feature is error recovery,
write atomicity normal, reservation notification mask, or reservation
persistence, or if ANA state is persistent loss, block the command.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15dd593227e451aa2247c53da42b6acad1757907
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4043
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Shuhei Matsumoto
4688f0819f lib/nvmf: Add ANA state to struct spdk_nvmf_subsystem_listener
Add ANA state to struct spdk_nvmf_subsystem_listener and initialize
it to optimized.

Then ctrlr->listener->ana_state is referred when creating ANA log page.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I978424e51d3f23ca72dee30192bc2693abfe203d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4012
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Shuhei Matsumoto
5b27db6268 lib/nvmf: Check if I/O qpair is on the same listener as admin qpair
We will have ANA state per listener and per subsystem. On the other hand,
NVMe specification defines ANA state per controller.

However, it is possible that I/O qpair and admin qpair are different
listeners on a single controller.

Let's check if I/O qpair is on the same listener as admin qpair if
ANA reporting is enabled.

The case that I/O qpair is on a different listener from admin qpair
is not usual and so the purpose of this check is just to guard SPDK
from any unexpected behavior.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb8d255de7f998e45a59a120c2ed5803258873f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4026
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Shuhei Matsumoto
7bcff376ab lib/nvmf: Add subsystem_listener to struct spdk_nvmf_ctrlr
Find the subsystem listener whose trid matches req->port->trid when
creating a controller, and store it in the controller.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iea343b8d8ae827b554df2245b67aed113469c592
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4010
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Shuhei Matsumoto
e21de9a9cc lib/nvmf: Add trid to struct spdk_nvmf_qpair
Add trid to struct spdk_nvmf_qpair and initialize it at initialization.

admin_qpair->trid will be used to get the corresponding
subsystem_listener via nvmf_subsystem_find_listener() and add it to
struct spdk_nvmf_ctrlr in the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0d1a41aede60de88747eff16c7e04f63d0702596
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4009
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Shuhei Matsumoto
58da62239e lib/nvmf: Add nvmf_ctrlr_async_event_ana_change_notice() to notice ANA change
The new function () will be used in the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I788cfb38d75c3f1f64e1754912b776a80f0f1be8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4007
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-04 08:14:18 +00:00
Tomasz Zawadzki
ccdbd2ed51 nvme/cuse: fix nblocks and block_size in rw path
nblocks is zero based, so read path was missing the increment.

NVMe device that cuse represents can be of any block_size,
so rather than hardcoding 512 - actually verify it.
Both paths didn't request enough of a buffer from cuse.

Reported-by: Niklas Cassel
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I228dc2572bc94ecbcb913e950d912a7ab5be9434
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4037
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>
2020-09-04 08:13:56 +00:00
Tomasz Zawadzki
ef3f0d97ab nvme/cuse: refactor read/write to pass cuse_device and block_size
This patch does not alter functionality, just moves
around where cuse_device and block_size is determined.

Next patch will fix both paths.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5a827b5b4ab080b2aa0f76f5cdcbcb177b38b474
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4036
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-09-04 08:13:56 +00:00
Tomasz Zawadzki
3a8c976aef dpdk: update submodule to DPDK 20.08
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6e0de8a0b2ece373aa3338c8e9d48389aa4c5a46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3865
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>
2020-09-04 08:13:48 +00:00
Tomasz Zawadzki
cff7c8f1f7 test/vhost: workaround issue #1583 by specifying --vq-count
DPDK patch d0fcc38f5
"vhost: improve device readiness notifications"
introduced changes that need to be workedaround when
updating to DPDK 20.08.

This shall be removed after appropriate fix is created
for DPDK.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2f0b4ef4692ba8d9fbb7d1966332def593d1dc34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4001
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>
2020-09-04 08:13:48 +00:00
Changpeng Liu
d653a65eaf vhost: restart session after KICK socket message
Change-Id: I13fbfcde617a963503a479769374cf8dba5fa278
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4024
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 08:13:48 +00:00
Changpeng Liu
7b16ba29fa virtio: use correct number of entries field
Socket message VHOST_USER_SET_VRING_ENABLE will use number of
vring entries as input parameter to indicate the vring is
enabled or not, previously the flag in vhost-user library
wasn't checked before commit d0fcc38f5
"vhost: improve device readiness notifications", so here
we also use correct filed set in SPDK.

Fix issue #1583.

Change-Id: If5ac8a4ba31bdecbb5a64b736346c99e4be0f4b6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3989
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 08:13:48 +00:00
Alexey Marchuk
fe87dcadb7 mk: Remove the content of build/lib in "clean" target
Leaving old libraries leads to incorrectly generated libspdk.so -
e.g. when we configure spdk using --with-uring and after that
using --without-uring then libspdk_bdev_uring.so will remain in
build/lib and will become part of spdk.so built using --without-uring

Change-Id: If482e9cf323b58f3f588b7c3bdb629425ae0ceeb
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3986
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-03 07:43:38 +00:00
Karol Latecki
103147241b test/nvme_perf: add p90 latency to gathered metrics
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic642b7cc7a26a086dbd6da783caf5ca19a5cd95d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4011
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-03 07:43:35 +00:00
Michal Berger
2dcb0569de pkgdep/git: [QAT] Replace linux/cryptohash.h with crypto/sha.h
The former was dropped and merged with crypto/sha.h in kernel 5.8.

Change-Id: I9005592feacc71c9a0e80f06b5de2d65a6bc06d9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4030
Community-CI: Mellanox Build Bot
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>
2020-09-03 07:43:30 +00:00
Michal Berger
d2cbb15c40 scripts/common: Don't cache pci vendor,device ids separately
On its own these values don't uniquely identify a particular pci
device, hence there's no much point in storing them like so.

Change-Id: Icc5cfec28fcccae6cd935dff03fe3ef01826edc4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3950
Community-CI: Mellanox Build Bot
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-09-02 14:43:02 +00:00
Michal Berger
904ac49f4c scripts/setup: Configure binding of the controllers in parallel
There are some devices for which nvme driver takes a long time to
finalize the unbind stage. With that in mind, each device would
add up a significant amount of time needed for setup.sh to complete.

To mitigate such a scenario, make sure the controllers are unbound
in a parallel fashion.

Examples taken from the system with 19 nvmes on board:

[root@supermicro4 spdk]# time ./scripts/setup.sh &>/dev/null

real    0m36.250s
user    0m1.024s
sys     0m1.990s

[root@supermicro4 spdk]# time ./scripts/setup.sh &>/dev/null

real    0m4.848s
user    0m0.867s
sys     0m17.605s

Also, take note that this is currently done only for the nvme
devices since other, i.e., ioatdma, seem to trigger a BUG in the
kernel when unbound in parallel. Some details here:

  https://bugzilla.kernel.org/show_bug.cgi?id=209041

Change-Id: Icaeb2b2ecb306f149587bc5da73743b1519bc5d6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3893
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 14:43:02 +00:00
Michal Berger
5ea549466e scripts/setup: Commonize the driver binding and BDF verification|status
Change-Id: I8c8f4297891a027c3f4c650bba915d0786f46a47
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3892
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
85501619b4 scripts/setup: Use modalias to verify the bdf's driver
Change-Id: I52afb29b69f758b4cbebf4866099e430953ed681
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3891
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
69ae10f785 scripts/setup: Unify block name lookup
Change-Id: Icde3b528d37f6c9a2d8a2fd9f3548f3ee75ceff0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3890
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-02 07:38:48 +00:00
Michal Berger
51b5fa8579 scripts/setup: Group all devices into respective arrays
This is a first patch from a series attempting to merge similar
routines used throughout setup.sh.

Change-Id: I4c71b88f7556b0e9e2f65a37b8175914022486a4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3889
Community-CI: Mellanox Build Bot
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-09-02 07:38:48 +00:00
Seth Howell
58216dd07e lib/nvme: fix mem leak in req submit.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If64c06177605a8f57d87ba22b86fe58ddebd6f7a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3921
Community-CI: Mellanox Build Bot
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-09-02 07:38:38 +00:00
GangCao
4803dc36fc Blobfs: add an assert for the memory allocation
Change-Id: Ie9c75206b61242c71ce6f4f408bbdd44f9633077
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3998
Community-CI: Mellanox Build Bot
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>
2020-09-02 07:38:23 +00:00
Alexey Marchuk
3aaf8e0a0b nvmf: Stop pg poller when all qpairs are destroyed
We stopped the poller to early, so we were not able to
reap all completions on ibv CQ, so RDMA qpair was not freed.
This patch stops the poller when all references to poll group
are released (all qpairs are destroyed)

Fixes #1578

Change-Id: I15c1697db13aef9da7567c7312476306c3ee1d62
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3962
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.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-09-01 07:51:45 +00:00
JimboLuCN
dd3d5800b0 script/rpc: fix bdev_set_qos_limit's usage error
Signed-off-by: JimboLuCN <jimbolucn@gmail.com>
Change-Id: I67db5c7ef81ae77edefcc5ecf058826d3be8d2e8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3981
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-01 07:51:38 +00:00
Ziye Yang
03aa8995e9 lib/sock: Fix the coredump issue in sock_map_realese
When tested on Linux 5.8 kernel and configure spdk
with debug mode (--enable-debug), and test SPDK NVMe-oF
tcp transport, and we see the coredump in sock_map_release
with the following statements:
	assert(entry->ref > 0);

After debug, I can confirm that the placement_id value got
from the following function (sock->net_impl->get_placement_id)
changes.
It means that: When the sock is added into the poll group
(spdk_sock_group_add_sock), we get the placement_id (named as
Value(begin)); and when the sock is removed from the poll group
(spdk_sock_group_remove_sock), we get the plaemednt_id on
the same sock (named as Vaule(end)). I found that
Value(begin) ! = Value(end).

So our solution is for a socket, we will get placement_id once,
then we can solve this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1d0cf39247b53410260561aca5af38130cc0abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3983
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-09-01 07:51:27 +00:00
Tomasz Zawadzki
49601c040f test/check_so_dep: skip rdma dependency if not configured with RDMA
Similar to internal vhost library, rdma lib should be ignored
if SPDK was not compiled using --with-rdma.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic747f96f96182c04592bec44ff64ceafd11634f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3963
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-09-01 07:51:19 +00:00
Michal Berger
e989faa936 scripts/pkgdep: [rhel] Add warning about working under RHEL system
Additionally, fall through potential yum failures to try and install
what's available in repos given system is using.

Change-Id: Icf7f5f3db1d72b67414c7d7e4badb8416a9d25b1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3873
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:41 +00:00
Michal Berger
1338e698d1 scripts/pkgdep: [rhel] Configure EPEL repo prior installing any packages
For some RHEL releases, especially 8.x, EPEL repo is crucial in order
to install most of the package dependencies, hence we need to make
sure it's in use.

Change-Id: Iaaa1f901e6fffddb65b98fa98b21b9e77e59760f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3872
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-09-01 07:50:41 +00:00
Michal Berger
f724f6b9c4 scripts/pgkdep: [rhel] Use python36
On rhel 8.x standard appstream and baseos repos don't provide python
package. Use python36 instead as it's available there.

Change-Id: I125aa3370bdb11f67f2774e00e70196df9680f13
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3871
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:41 +00:00
Michal Berger
d70ecbe935 scripts/pkgdep: [rhel] Don't use hard link for a python binary
This limitation may simply fail if /usr is part of a separate
mount|fs so softlink it instead.

Change-Id: I1e0387c2792c0bbd20d83e9739b3882a7cbbbf50
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3870
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-09-01 07:50:41 +00:00
Jim Harris
3fe748f728 blob: move bs_release_cluster
We will use it earlier in this file in a future patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I554f2073185d466bd0b4e98bdeec721f763c1b44
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3969
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
8ba7450e8c blob: simplify check for available cluster count
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56a9ca114b84ded4ac23a9eaacadaa6df8f031cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3968
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
f5b949d5fd blob: simplify free cluster counting in inflate path
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5716290476d4abdf8646a36206f07acb5b2dd4ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3967
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
2d87587fe5 blob: claim clusters inline during initialization
When claiming clusters as part of blobstore initialization
or recovery, just call spdk_bit_array_set directly rather
than going through the bs_claim_cluster function. We will
be modifying how runtime cluster allocation works so need
to separate the two use cases.  This code is very small so
inlining it has minimal code impact.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaaa1c817e57b4a2eea62eb4683407364bac1fcc0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3966
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Jim Harris
b7d508f5e5 blob: use spdk_bit_array_load/store_mask functions
These functions were added during FTL development and
are more efficient than the roll-your-own implementations
blobstore had previously.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie09e5c305e6e171af0258e805f2aac3b88822b5e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3965
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-01 07:50:33 +00:00
Shuhei Matsumoto
70a2063998 lib/iscsi: Remove a DEBUG_LOG which shows error when target is not found
This DEBUG_LOG causes misunderstanding to us.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7f538a796fa025fe79210b26225650bd11065511
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3938
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Shuhei Matsumoto
a6b43f82b4 test/iscsi_tgt: Test login redirection
Run two iSCSI target applications, the first application has a
public portal 10.0.0.1:3260 and the second application has a private
portal 10.0.0.3:3260.

Each application creates a target which has the corresponding portal
and a NULL bdev. The NULL bdev has the same configuration between
two applications.

By using NULL bdev, we do not have to worry about shared storage.

Then move between two portals by using temporary login redirection
function.

We tried to differentiate only TCP port but such idea did not work
with the popular iSCSI initiator, open-iscsi.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I578f3b57d738ade6da74a0ec3d7fbb140139669d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3440
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Shuhei Matsumoto
25359fb900 test/iscsi_tgt: Virtual network made of three interfaces using veth and bridge
To test iSCSI login redirection feature, we need multiple IP addresses
for target application. Furthermore, it is nice if multiple iSCSI
target applications run.

This patch creates such network virtually using veth device and
ether bridge but keeps compatibility even after this patch.

Create three veth interface pairs and one bridge. One pair is for
initiator and two pairs are for targets, and all pairs are
added to the same bridge.

Create two network namespaces for targets and add one pair to
the first namespace and add another pair to the second namespace.
Namespace is not created for initiator.

Necessary connectivity is tested using ping after creation.

iSCSI login redirection test code will follow.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If0ca7b4a7af652602f3d6a7ea5669a06ce41a5f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3887
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-31 15:22:44 +00:00
Karol Latecki
7ff4e2af79 bdev/null: make md_size inclusive for dif_type
When using --dif-type option --md-size should be
required as well.
Update & improve bdev_null_create rpc.py help
messages as well.

Change-Id: I6588a97aef6c8792bab7a41ece17c0461bb36844
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3949
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-31 07:47:48 +00:00
Michal Berger
7932bcd6b0 test/common: Fix typo in process_core()
Change-Id: If554ab52da8ec130628b819870dd98ffc2a7a68b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3964
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-31 07:47:32 +00:00
Michal Berger
63ebdf5943 test/nvmf: Use NOT() for the negative multicontroller test
Change-Id: I5f631c854e0cb8440508dc24bcee033b481cf741
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3930
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: Ben Walker <benjamin.walker@intel.com>
2020-08-31 07:46:43 +00:00
Vitaliy Mysak
d267d0e874 lib/log: add RPC to toggle timestamps
Allow toggling log timestamps on and off by adding new RPC call.

Change-Id: I34c84bf89fae352ade266fbf7fd20594ff67bced
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2024
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-31 07:46:36 +00:00
Ziye Yang
cf99beb87e sock/posix: Fix the overflow issue of sendmsg_index
The type of sendmsg_idx is uint32_t, so the maximal
is 2^32 -1, so it could be overflow and get 0, so
we should fix it.

PS: I think that our code may have potential defect.
In my experiment, I try to init sendmsg_idx with 2^32 -1,
so the first req->internal.offset = 2^32 - 1.
But for the ee_info and ee_data in "struct sock_extended_err"
got from _sock_check_zcopy is all 0 in the target side.
So it means that the this req will never be completed.

With the increase of sendmsg_idx (the type is
uint32_t), sendmsg_idx will finally goto 2^32 - 1, so I
think it will still kick the issue I described.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic9aaf629d73d5b7e2c81800a4f7f92c728adbc34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3948
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>
2020-08-31 07:46:14 +00:00
Michal Berger
a79e33eb54 test/nvmf: [multicontroller] Run bdevperf tests without data verification
Change-Id: I8e5f6c286a640e0e8077cf08388a4b6c5af30169
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3929
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: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-28 22:00:50 +00:00
Karol Latecki
a8e5914833 perf/nvmf: remove pylin no-member error
Add an abstract method in Initiator class to get
rid of pylint "no-member" error.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I83ac1a498d55f6390a5b36038a9532121a9e5d0a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3922
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-28 07:30:36 +00:00
Karol Latecki
f252ff1f16 perf/nvmf: add option for TCP dif_insert_or_strip
Change-Id: Id5b6082f0ac87e76335f807d1758693d6813bf98
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3920
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-28 07:30:36 +00:00
Karol Latecki
66f42f3703 perf/nvmf: set protection information on null bdevs
Use --dif-type and --md-size option for bdev_null_create
rpc when creating null bdevs. Needed for DIF/DIX comparison
tests.

Change-Id: I15de25d498ff7c239cfca291e10aa16acb4f09eb
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3919
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-28 07:30:36 +00:00
Karol Latecki
7049fe936f perf/nvmf: Allow using multiple nullblock devices
So far only single null block device was allowed in
the setup for the purpose of latency measurements.
Rename setting to "null_block_devices" and use an int,
rather than a bool, so that multiple null block
devices are created.

Change-Id: Id543cf3bfbc7d9c171f8605909e1971cabbdfcc7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3900
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-28 07:30:36 +00:00
Tomasz Zawadzki
cb6151c357 lib/log: fully remove log backtrace prints
Patch (922d90c8) removed backtrace printing.

Some of API was leftover in header files,
so this patch removes them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieb2069e707dee2a196f0cecc283064661a0ae9a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3953
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>
2020-08-28 07:19:40 +00:00
yidong0635
b2c86b35db vhost/vhost_scsi: Fix coredump issue for non-scsi device.
Remove assert and add exit codes instead. That in non-debug mode, these
could lead coredump. We don't want the vhost target be crashed after
recieved  invalid commands.

fixes issue: #1575

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ifef6d8f9c32150213bc2c80787e92d428d4c49c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3951
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-28 07:19:27 +00:00
Michal Berger
83d830e745 test/blobfs: Call process_core() from rocksdb.sh test
rocksdb.sh is run independently from the autotest.sh as part of the
BlobFS-nightly-autotest job. In case a rogue file lands in the dir
where the results are stored, i.e., a core dump, CI may fail to fetch
the artifacts due to not sufficient permissions. To avoid that, make
sure cores are always processed as part of the test.

Also, adjust permissions across the entire $RESULTS_DIR, just for the
good measure.

Change-Id: I8df7799cc7ed7424950cc26250597a0e2d73bc9f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3943
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-08-28 07:19:09 +00:00
Vitaliy Mysak
ea2000cf56 event: disable cpumask check
cpumask can be changed by spdk_thread_set_cpumask()
during the time that event takes before it arrives
on _schedule_thread() function, which would make the
function assert(false), even though that is ~ok~.

Currently, that can happen right after thread is created
or between two successive calls to spdk_thread_set_cpumask().
But most importantly, it will constantly happen if we
introduce rescheduler.

This patch just disables the check for now.

Change-Id: Ie6dfe22d6eff2c908c367d1311436cc6769a6960
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3905
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>
2020-08-27 08:49:18 +00:00
Shuhei Matsumoto
767df1289a lib/iscsi: Increment StatSN when sending asynchronous logout request
Without this increment, the following warning messages were collected
when processing the corresponding logout request.

 iscsi.c:4426:iscsi_pdu_hdr_handle: *DEBUG*: opcode 6
* iscsi.c:4398:iscsi_update_cmdsn: *DEBUG*: StatSN(5) advanced
 iscsi.c:2519:iscsi_pdu_hdr_op_logout: *DEBUG*: reason=0, ITT=74000030, cid=0
 iscsi.c:2531:iscsi_pdu_hdr_op_logout: *DEBUG*: CmdSN=92, ExpStatSN=5, StatSN=4, ExpCmdSN=92, MaxCmdSN=155
* iscsi.c:2546:iscsi_pdu_hdr_op_logout: *DEBUG*: StatSN(5/4) might have dropped
 iscsi.c:4506:iscsi_pdu_payload_handle: *DEBUG*: opcode 6

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee2677317dd8974abdb69141eed7fb5e538933ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3940
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: Ziye Yang <ziye.yang@intel.com>
2020-08-27 08:37:00 +00:00
Shuhei Matsumoto
438fa38e4a lib/iscsi: Check if data comes really after processing logout request
When the PDU receive handler processes the header of the logout request PDU,
conn->is_logged_out is set to true.

However, if conn->is_logged_out is true, conn->pdu_recv_state is set to ERROR
before the PDU receive handler completes processing the logout request PDU.

Then if conn->pdu_recv_state is ERROR, conn->state is set to EXITING
after returning from the PDU receive handler.

Response PDUs are sent asynchronously now and may not be sent even after
returning from the PDU receive handler.

On the other hand, outside the PDU receive handler, the current connection
is closed if conn->state is EXITING.

Hence logout response PDU may not be sent to the initiator.

For the case that the initiator logs out and then reconnects when receiving
asynchronous logout request, missing logout response is critical
because initiator waits until receiving logout request and gets timeout.

This patch moves the check if PDU comes after logout to the place
just after getting a PDU header.

At the new location, data segment of the PDU is not received yet. But
logout request PDU does not have data segment and initiator will not
send additional PDU after sending logout request PDU, and by this patch,
iSCSI target will continue to stop receiving any new PDU after processing
logout request. Furthermore, even if there is any remaining data in the
kernel buffer, the kernel will discard or flush it when closing the socket.

Fixes issue #1571

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9554f4d54f3db80bf86abd6bffe81bac8c234531
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3928
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: Ziye Yang <ziye.yang@intel.com>
2020-08-27 08:37:00 +00:00
Shuhei Matsumoto
59ad0a04fa examples/nvme_identify: Print ANA config in Identify Control Data Structure
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2416e32007c682aaf314ab45d29fc5b4523031ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3918
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-27 08:36:51 +00:00
Shuhei Matsumoto
6206e46883 lib/nvme: Set ANA transition time value
ANA transition time shall be non-zero if controller supports ANA
reporting. Linux NVMe host sets this value to 10, and we don't
have any reason to change from that.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61396695dacf47fad40e3cea3311e555729d9e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3909
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: Changpeng Liu <changpeng.liu@intel.com>
2020-08-27 08:36:51 +00:00
Shuhei Matsumoto
9c08d43ab7 nvme_spec: Update for asymmetric namespace access change notices
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9909335ba2b6c45c4fb8a32403c0364711006640
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3908
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: Ben Walker <benjamin.walker@intel.com>
2020-08-27 08:36:51 +00:00
Jacek Kalwas
477d9500a3 env: fix pci driver registration
Registration macro now generates function based on driver's name.
It allows to have multiple registration within single source file.
Similar pattern is used e.g. by SPDK_NVMF_TRANSPORT_REGISTER.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ied0887e8dae7fe9ca1517313be5eff8f218b7e98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3895
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-08-27 08:36:43 +00:00
Tomasz Zawadzki
b3e230a116 ocf: update submodule to v20.03.1
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I25f2010fbeda8d6c415e9166d6f4e827f3355c46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3886
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>
2020-08-27 08:36:29 +00:00
Tomasz Zawadzki
0ed85362c8 isa-l: update submodule to v2.29.0
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieffb7838f7cc93d8902c7c28f8002f08e3a1172b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3869
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>
2020-08-27 08:36:29 +00:00
Michal Berger
23dbe85bd0 test/common: Make sure autotest clears rxe devices upon exit
Change-Id: I78caf98735aa4c3e073d7faaf839bbeffbd10d26
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3847
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:36:17 +00:00
Michal Berger
60f3b6b218 rxe_cfg_small: Align the way how devices are added|removed
This is done to be more conscious of what net|rxe devices ar currently
in use to make sure we don't unnecessarily write to infiniband class.

Also, this makes use of net/infiniband class more consistent between
both the add and remove actions.

Change-Id: I0ba3bc3a14047e12a804bfdf3aca8c089d34d6b0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3825
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:36:17 +00:00
Seth Howell
3f190fe170 nvmf/subsystem: find intermediate state in helper function.
This will be used in another place later.

This patch is part of a series aimed at improving recovery
when we are fail to change the subsystem state.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I24bfbeb3d006584003164540d6ede540dbcafa86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3392
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-08-27 08:36:09 +00:00
Pawel Piatek
dca3fdc482 script/vagrant: vagrantfile refactoring
- reorganize the code to cleanup main loop
- other small syntax improvements

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I0a2b9ac9e78db2f96ed49d3e7e4d938425c76fa9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3720
Community-CI: Mellanox Build Bot
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>
2020-08-27 08:34:43 +00:00
Pawel Piatek
282b1945ef script/vagrant: split into functions - setup libvirt
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I3ff2bec5f016c4436efb99824d7891858391b657
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3719
Community-CI: Mellanox Build Bot
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>
2020-08-27 08:34:43 +00:00
Pawel Piatek
2e617732ba script/vagrant: split into functions - setup virtualbox
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I69516c217a1517d064f88f3700eeb88066568180
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3718
Community-CI: Mellanox Build Bot
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>
2020-08-27 08:34:43 +00:00
Pawel Piatek
b9e3b917e7 script/vagrant: split into functions - deploy test vm
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I301a100f24f8bb7d20756ccfd0fcd29405956cfc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3717
Community-CI: Mellanox Build Bot
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>
2020-08-27 08:34:43 +00:00
Pawel Piatek
211be73970 script/vagrant: split into functions - setup ssh and vagrant-cachier
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I871ec3f64ba3680ea382ac5e71c5bab4e340c94a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3716
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
221c5b5ee2 script/vagrant: split into functions - setup disks functions
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ibbb6ab720dc8a95bcb1daebc3f8f555c3fce69c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3715
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
dc7f3206a1 script/vagrant: split into functions - clear cflags
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I8842fda241403d7bfc0ec0da144848777d44921a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3714
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
d0426c8775 script/vagrant: split into functions - spdk local copy of nfs
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I613e02a88ce4fbfcb67e913574fe3978ba9cb7b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3713
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
b5fea1314b script/vagrant: split into functions - copy functions
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I9cfa65e6b447bd629e984a495b133c186ff76f55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3712
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
e08eae22f6 script/vagrant: split into functions - setup proxy
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I82e101afca9e6bc43c49aa6a755e0c3afffb349e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3711
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 08:34:43 +00:00
Pawel Piatek
0b46c777bd script/vagrant: avoid unnecessary strings interpolation
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ie6e306011249fcdaeb96d3dcdf9807f6ec2d9926
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3710
Community-CI: Mellanox Build Bot
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>
2020-08-27 08:34:43 +00:00
Pawel Piatek
9620760bea script/vagrant: vagrant file - checkboxtype refactoring
- rename to get_box_type
- use hash to map distro to box type

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I5608b04d813ad1b37ae4dbbc418217a61bd96a52
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3480
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@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>
2020-08-27 08:34:43 +00:00
Michal Berger
dd8cbf8411 test/common: Fix matching on core dump's name
find's -name doesn't work with regexes hence the applied pattern
didn't match on plain "core" name (as the expression would suggest to
match on). Replace it with additional shell patterns to include some
additional common core_patterns - this is relevant for the tests which
may be run indepdendently from autotest.sh and still use core_pattern
with its default setting.

Change-Id: I5ba1bc44b156a68779d09688718b7c634b6d8cba
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3942
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-27 08:34:18 +00:00
Michal Berger
68740678e1 test/blobfs: Allocate enough memory for db_bench tests
Currently, BlobFS-nightly-autotest jobs are failing due to this test
not having enough memory around. Change that by allocating some
overhead depending on what CACHE_SIZE was set to.

Change-Id: I9b122189d39a7a73ab8521f699324516d09ae1c3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3941
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-27 08:34:18 +00:00
Jim Harris
150339cc59 cpuset: fix parse_mask
The loop here was counting the bytes in the cpus array,
but the lcores are represented by bits.

While here, add a unit test that exposes this bug and
demonstrates it is now fixed with this patch.

Fixes #1570.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3931
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
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-08-27 08:34:07 +00:00
Monica Kenguva
e25747e547 doc: split bdev userguide update
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ibbeefa306fcbac6e942a016bf918f1465c68fa24
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3684
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>
2020-08-27 08:34:01 +00:00
Karol Latecki
d1b0a447f3 doc: add SPDK NVMe-oF RDMA 20.07 performance report entry
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7019d3a7da36db98ef8718c497ba44a0ebcc811c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3932
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 07:24:22 +00:00
Karol Latecki
61a12db8e5 doc: add SPDK Vhost 20.07 performance report entry
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I94cb153be4e3d4dbb86af635d78c5e61e49f6b37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3910
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-27 07:24:22 +00:00
Maciej Wawryk
b5fd1f86f4 scripts/pkgdep: Fix mkdir liburing in clearlinux
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I29630dd873134f6617dcbbdd4fee7c9483121af7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3883
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-26 15:50:25 +00:00
Seth Howell
309200661f lib/nvme: pass up rc from failed connect in reset.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8041728de7bb7bdb35fb1570f3c2fb20feef8664
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3877
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-26 09:47:24 +00:00
Seth Howell
316f92d118 lib/nvme: pass up fabric connect rc to app.
This will allow applications to understand why
they were unable to connect.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic04c7e72098c6ec1823de7d6a07d90150ef5ac20
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3836
Community-CI: Mellanox Build Bot
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-08-26 09:47:24 +00:00
Xiaodong Liu
e7a0a45e8a bdev/rbd: put back io_channel in create_cb
In function's error processing, the io_channel should
also be put back.

Change-Id: Ibd3a616244a77fcc29a5ec5d1d1ca53f5412e8c6
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3859
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-26 09:46:57 +00:00
Michal Berger
e1dc45b0fa test/bdevperf: Keep bdevperf output around
Potential bdevperf failure is hidden out from the user as it's
std{out,err} is redirected to a file which is purged upon exiting
from the test.

For the sake of debugging, print contents of the output file before
removing it.

Change-Id: Ifd0ff94aa1812ec518c60ada5a63342d7d5b80dd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3917
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-26 09:46:50 +00:00
Michal Berger
f574014a24 test/common: Add small function for printing and purging files
The main use case is to make sure that files, which are normally
purged upon exiting from the tests (regardless if the test finished
successfully or not) are also printed out to stdout - this is done
for the sake of debugging any potential failures that might have
been hidden out in said tmp files which we don't want to keep
around.

Change-Id: I294c3bdc8f45be49e414bf45f80848be89355360
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3916
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-26 09:46:50 +00:00
Michal Berger
3797a38dc6 test/nvmf: [multicontroller] Don't wait indefinitely for the controllers
Also, replace unexisting pass call with a simple sleep.

Change-Id: I5c0197109410df51df3ebe81596b5c0b1b103343
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3915
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-08-26 09:46:50 +00:00
John Kariuki
8fdd4d70cc doc/spdk_top: add spdk_top documentation
Add documentation for the new spdk_top application

Change-Id: I49a2ab3b354a1da6583f1b2aea4901cb38dd2363
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3254
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: Paul Luse <paul.e.luse@intel.com>
2020-08-26 09:46:29 +00:00
yupeng
2b16cfff9e bdev: free g_bdev_examine_allowlist before the app exit
Add a bdev_examine_allowlist_free function, which releases the members
in g_bdev_examine_allowlist. Invoke it in bdev_mgr_unregister_cb.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I47faf6959066da6679716b2f2abfab8ac8b8dd79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3880
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-25 08:02:43 +00:00
WANGHAILIANG
af4fa14891 module/bdev_raid: remove an ERROR log which occurs every times
This ERROR log is: bdev_raid_rpc.c: 276:rpc_bdev_raid_create: *ERROR*:
the rpc param strip_size is deprecated.
raid_bdev_write_config_json() generates a bdev.json:
    {
      "method": "bdev_raid_create",
      "params": {
        "name": "raid0",
        "strip_size": 64,
        "raid_level": "raid0",
        "base_bdevs": [
          "Malloc4",
          "Malloc5"
        ]
      }
    },

rpc_bdev_raid_create() will check this req.strip_size,
it always print this ERROR log:
else if (req.strip_size > 0 && req.strip_size_kb == 0) {
		SPDK_ERRLOG("the rpc param strip_size is deprecated.\n");

So I replace "strip_size" with "strip_size_kb" here.

Change-Id: Ic9570c88dd336a755ccd53690962eddbaac22e1b
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3885
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
2020-08-25 08:02:37 +00:00
Jim Harris
178291a516 nvme: read all uevents
Currently when the uevent processing code finds a non-uio/vfio
uevent, it just stops its loops and returns.  This means that if
there are a lot of non-uio/vfio uevents, the netlink socket buffer
can build up until its full because only one non-uio/vfio event
gets drained per spdk_nvme_probe() call (which may be very
infrequently).

So modify parse_event so that it does not indicate error when
a non-uio/vfio event is found.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3876
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-24 07:38:33 +00:00
Jim Harris
79f508b047 iscsi: set last_nopin when connection is established
This ensures we don't send a nopin immediately after
a connection is established, in case the nopin poller
fires before the connection reaches full feature phase.

Fixes #1441.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3902
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>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2020-08-24 07:38:24 +00:00
Xiaodong Liu
d84ae74d29 lib/event: fix a wrong deletion
Change-Id: I1b88174837c8e03d9e505b6a6270cca1bffa9806
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3878
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-08-24 07:38:10 +00:00
Tomasz Zawadzki
846ca67594 lib/blob: remove requirement for md_page alignment
The md_page alignment is not really required for md_page
buffers.
Allocating 4k aligned buffers all the time, causes memory
to be heavily fragmented. Due to DPDK keeping track of the
allocation in the same DMA region as the allocation themselves.
Removing this alignment requirement will help DPDK when searching
for the right part of memory in the heap.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reported-by: Mike Cui
Change-Id: If2f4ca2be38d432d5740f6145b5e0ff46237806b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3853
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-08-24 07:38:00 +00:00
GangCao
0e91da2f78 Script: update the JSON content generation
Change-Id: Id34e7fc85cb992d76e35a7370a49dbd79a0f5922
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3846
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-24 07:37:53 +00:00
GangCao
bb0f64daa9 Vagrant: update the used Bdev
To solve below issue:

https://github.com/spdk/spdk/issues/1550

The default one is Malloc0 which is not used.

Change-Id: I36b64457e8583c8243b8b9d6714c42e2d43ade7d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3831
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-24 07:37:53 +00:00
Changpeng Liu
8bb7511fd9 examples/nvme: don't print CUSTOM transport as unknow trtype
Change-Id: I9f85d2f7f7f2625180b9a530d24a02be5414f593
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3879
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-24 07:37:31 +00:00
Michal Berger
34cbbf3bf0 scripts/pkgdep: Add bash-completion for SPDK apps and tools
This adds basic bash-completion support for apps commonly used within
the repo. It's meant to work with standard bash-completion package
available for most of the distros out there.

Change-Id: If2f92c85537aa7a56d32b46450f2afa0298e7fed
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3526
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>
2020-08-24 07:37:21 +00:00
Ziye Yang
d4d2e317b5 nvme/tcp: Make the return value consistent.
We should make nvme_tcp_ctrlr_connect_qpair always return
negative value if this function fails.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I457e704e39d7a3acd298fd48e89e8ea51e2ed4ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3809
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-24 07:37:13 +00:00
Karol Latecki
c7f8e73906 scripts/nvmf_perf: fix syntax error
Missing comma causes Python interpreter to
raise syntax error.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Id86bd10fb55ae2284ebc1c0c36babfe946302d1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3897
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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-08-21 17:59:13 +00:00
Changpeng Liu
5adf099eed nvme: don't send Identify NS ID Descriptor List to inactive NS
The specification says it will return INVALID FIELD if the NS
is in inactive state.

Fix issue #1551.

Change-Id: I1b32f023ed665d410f4705e439068699e2b2f8de
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3860
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-21 08:45:31 +00:00
Alexey Marchuk
fdf2490a32 nvmf/rdma: Don't destroy qpair if rdma_accept fails
Failed qpair will be destroyed on generic nvmf layer during handling
of error code returned from spdk_nvmf_poll_group_add.
The current approach leads to heap-use-after-free.

Change-Id: I99331150fa36a3c3c18176589afb973dee449b3a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3538
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>
2020-08-21 08:26:15 +00:00
Michal Berger
23040b8b0c test/common: Log all system uevents during autotest
This may be useful in debugging and pinpointing devices which may
take longer time to initialize during the tests.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5abad17e1a2690a063b6152462dcf49d22c70d0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3656
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-08-21 08:25:34 +00:00
Maciej Wawryk
d1fc288376 scripts/nvmf: add dpdk memory measurements
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6c836114b71b1c5ee1dbbf7900c7314bb5619a48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3551
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-08-21 08:25:22 +00:00
Seth Howell
24b6d3cbdb test/nvmf: add a test for attaching to controllers.
Just demonstrate the several ways we have to use the
attach_controller rpc.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I86d2f9f2dd55f7637d0f2ecc46a3817221001a8f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3615
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-08-21 08:25:14 +00:00
paul luse
c3fd3e95bb lib/accel: change task alloc from global mempool->per chan list
The one large global mempool was a waste of memory for apps that
don't use the accel framework as its always allocated a pool sized
to handle a heavy load with multiple threads.

Instead move to a per channel list of just 1024 tasks greatly
decreasing the memory footprint but still able to scale as more
threads are added.

Also renamed all accel_req to acccel_taak and simply task to
accel_task as this was being touched anyways and not consistent.

fixes issue #1510

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0e93ca6270323e2df4b739711c5d9b667a52e1eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3740
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-08-21 08:25:04 +00:00
Alexey Marchuk
8bec9feb76 nvme/rdma: Remove unused spdk_nvme_send_wr_list
nvme_rdma_qpair::sends_to_post is not used, remove it and
spdk_nvme_send_wr_list structure

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: If9c42736d4e796a947bbfe80f59efd2fd7f77859
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3822
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>
2020-08-21 08:24:43 +00:00
Alexey Marchuk
58f43df1f5 nvmf/rdma: Handle several ibv events in a row
Currently rdma acceptor handles only one ibv event per poll
Taking into account the default acceptor poll rate (10ms), it can
take a long time to handle e.g. LAST_WQE_REACHED events when we
close huge amount of qpairs at the same time.
This patch allows to handle up to 32 ibv events per acceptor poll.

Change-Id: Ic2884dfc5b54c6aec0655aaa547b491a9934a386
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3821
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-21 08:24:43 +00:00
Michal Berger
8e43a261ea rxe_cfg_small: Remove unused function
link_up_rxes() is not used anywhere so remove it. That said, make sure
that link_up() is called while adding the rxe device(s).

Change-Id: Ic0f9573b911d83d58b42f62d104ef916aa010e4e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3824
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-21 08:24:29 +00:00
Michal Berger
0b4d8bf59e test/nvmf: Always remove lingering soft rxe devices
In case there are lingering rxe devices present on the system, adding
them again under the infiniband subsystem will simply fail the test.
To avoid such scenario, make sure that we start the rxe with a clean
slate by removing all soft devices first.

This is mostly relevant for systems running jobs which init the rxe
but don't run tests which call to revert_soft_roce() for cleanup (see
BlobFS-autotest as an example).

Change-Id: I12997fbaf7343ae3e9bc0b38f5455f6332c4e6c5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3823
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-21 08:24:29 +00:00
Seth Howell
ce83fc2aff lib/nvme: remove qpair from ctrl list in connect fail path
This is an oversight that can cause issues with looping
through the list if we end up allocating the same qpair
twice.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I513ea35398f4b724366c21be144531fbfbdb4347
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3835
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-08-21 08:24:18 +00:00
Jim Harris
ed7848f2df blob: handle overlapping open case
We only create one spdk_blob object for a given blob, and just
increase the ref_count if it is opened multiple times.  bs_open_blob
would do the lookup for existing opened blobs.

But if the blob is opened again, before the previous open operation
has completed, we would end up with two spdk_blob objects for the same
blob.

Solution is to do another lookup when the open operation completes.
If we find the blob, free the one we just finished opening and return
the existing one instead.

Also added unit test that failed on the existing code but passes now
with this patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reported-by: Mike Cui
Change-Id: I00c3a913b413deddf06f0b63f7a669efb2b5658f

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3855
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-21 08:24:09 +00:00
yidong0635
361cddfd63 nvme/nvme_pcie: Remove unused codes.
pctrlr->cmb.mem_register_addr and pctrlr->cmb.mem_register_size
are assigned after spdk_mem_register.
if spdk_mem_register is failed , ctrlr_map_cmb hasn't been executed.
they are not be used.
So remove them.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I3d1996eee8b5260b79c4c3e0a2e1d376da2343b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3856
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-21 08:24:00 +00:00
Changpeng Liu
01b6bd8a92 nvmf: fix the associate timeout value
SPDK poller uses microsecond as the input parameter, so we need to
change the correct value when opts.association_timeout is expressed
by millisecond.

Change-Id: Ia674f0115ea176b998e4c0c70b8ce75b28984701
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3861
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-08-21 08:23:45 +00:00
Changpeng Liu
5d5a9077a3 nvme: don't assert on custom transport
Change-Id: I2d425c127dc070f7bb508f5a61e6304f6042fdf7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3857
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-21 08:23:19 +00:00
Shuhei Matsumoto
1da94ed7b8 rpc/nvmf: Add ana_reporting parameter to nvmf_create_subsystem RPC
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9adc8373050e68872a4d9e89518c137e61005254
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3852
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: Changpeng Liu <changpeng.liu@intel.com>
2020-08-21 08:22:40 +00:00
Shuhei Matsumoto
6f2265734d lib/nvmf: Optionalize ANA reporting feature
After supporting ANA reporting by default, Linux kernel 5.3 reported
error when parsing NVMe ANA log. The newer kernel fixed the issue
but we should optionalize ANA reporting feature to avoid error for
Linux kernel 5.3 or before.

Add a bool variable ana_reporting to struct spdk_nvmf_subsystem
and disable ANA reporting and initialization of related variables
if it is false. We can expose MNAN (Maximum Number of Allowed
Namespaces) even if ANA reporting is disabled. But MNAN is not
required if ANA reporting is disabled. So do not set MNAN if it is
false too.

Add a public API spdk_nvmf_subsystem_set_ana_reporting() to set
ana_reporting by the nvmf_create_subssytem RPC.

The next patch will add ana_reporting to nvmf_create_subsystem RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icc77773b4c9513daba2f1a9fdaf951d80574f379
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3850
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: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-21 08:22:40 +00:00
Shuhei Matsumoto
4cc04a1251 lib/nvmf: Add nvmf_subsystem_get_controllers RPC
Add an new RPC, nvmf_subsystem_get_controllers to retrieve the list
of NVMe-oF controllers of an NVMe-oF subsystem.

One of the main use cases will be to get identification information
of NVMe-oF controllers to configure their ANA states dynamically.

Pause and resume the subsystem to access the controllers safely.

One subtle issue remains. The JSON RPC returns success even if
resuming the subsystem fails. Write FIXME explicitly to address this.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf8d1cf56850a705e343b86022d101b4c7204199
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3848
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-21 08:22:40 +00:00
Wang Shilong
78ba12ecf4 module/blobfs: fix segmentation fault when fuse mount fail
if mountpoint doesn't exist, fuse mount will fail and @bfuse
will be null, blobfs_fuse_stop() try to access it without
check which cause segmentation finally.

Patch also improve test messages output to include
terminator properly.

Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
Change-Id: Idba23e3922778f1985d1f4841a1701cdc272ef17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3863
Community-CI: Mellanox Build Bot
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-21 08:22:25 +00:00
Alexey Marchuk
09d6e90a9a nvme_perf: Add warmup
Add -a cli parameter to enable warmup stage.
Move ns_ctx statistics-related variable to a new structure
for easier cleanup.

Change-Id: Id536209bc49322f1bc9b5c2296f98f0183b7d4b9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3784
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-08-20 09:36:03 +00:00
Karol Latecki
6127b1a33b test/common: use sudo to remove old temp files
Most common scenario is to run SPDK tests using "autorun.sh",
which calls autotest.sh with "sudo" and permissions are not
an issue then.
However we have a number of tests which are run independently
(e.g. test/fuzz/autofuzz.sh) and try to remove old temp files
before sudo is used to elevate privileges. This causes tests
to fail early.
Using "sudo" explicitly in autotest_common.sh to remove old
files will fix the problem.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I84f75c189bb04d0e3208dfc4f221d07d17db5ee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3819
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-08-20 09:35:47 +00:00
WANGHAILIANG
fa729fd3a7 configure: add a tips for installing libubsan
In practice, libubsan has been installed but there will still be such alarms sometimes.
In fact, this has something to do with the GCC version.
Most users may not think of it immediately, so they will be confused and waste time here.
So I think we should add a hint here.

Change-Id: Ib01cf4b35be5b75a3620aea556f4c097a1ee7a01
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3832
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-20 09:35:41 +00:00
Michal Berger
98678abe89 vm_setup: Add some missing dependencies
btrfs-progs and xfsprofs are required by some of the tests, e.g.
the nvmf/target/filesystem.sh.

abigail package provides abidiff needed for check_so_deps.sh tests.

Change-Id: I5199fafef2ac03ce04ea3709e9ff76fefa1ac717
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2923
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-08-20 09:34:23 +00:00
Michael Haeuptle
43ad7febb2 lib/nvmf: Fixes stuck subsystem RPC
A subsystem RPC is not transitioned to a paused state when there
are ios outstanding (tracked by subsystem poll group).

In general AERs, are not tracked as outstanding IOs. However,
there are 3 paths in nvmf_ctrlr_async_event_request which do not
adjust the outstanding io count.
If we get into any of these 3 paths, the subsystem pause can hang
forever.

The issue was reproduced with hot plug stress testing under load.
We can get into the second path (SPDK_NVME_ASYNC_EVENT_TYPE_NOTICE)
under these circumstances:
- An AER completion is sent to the initiator due to a namespace change
(e.g. hot remove/add)
- In this case, type is set to SPDK_NVME_ASYNC_EVENT_TYPE_NOTICE
- The initiator sends a new AER admin command, hitting the second path
where we return without adjusting the outstanding ios.

Fixes: 1552
Change-Id: I45f781966cc1e9a601b2305c7985a21154d802e8
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3854
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: JinYu <jin.yu@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-08-20 09:31:17 +00:00
Michal Berger
59c1e1690e test/dd: Lower the number of block size tests
These tests take significant amount of time on bare-metal systems
causing some random timeouts in the CI pool. Reclaim some time
by lowering the number of test iterations.

Change-Id: Id70e00230e0e49dc0f2f1ccc4d499420fc84d7dd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3843
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-20 09:27:21 +00:00
Michal Berger
4eed3b0839 test/dd: Make the AIO file smaller
Make the footprint of the test smaller by creating smaller AIO file -
2G instead of 8G. Adjust offseting as well to not fall outside of the
device|file.

Also, cap in half the size of the source file.

Change-Id: I625eebe545477239606cd65ac6949cca4a2b8c80
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3842
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-20 09:27:21 +00:00
Michal Berger
a52c6b194c test/dd: Remove plain_copy test
This test is unnecessarily redundant since posix tests cover this
functionality in detail.

Change-Id: Ice7a6616a2106c098ff32595547371ea4c716d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3841
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-20 09:27:21 +00:00
Sochin Jiang
db3d1201a4 lib/blob: fix a data corruption bug
There is a fatal bug that could easily cause data corruption when using
thin-provisioned blobs. In blob_request_submit_rw_iov(), we first get
lba by calling blob_calculate_lba_and_lba_count(),
blob_calculate_lba_and_lba_count() calculates different lbas according to
the return of bs_io_unit_is_allocated(). Later, we call bs_io_unit_is_allocated()
again to judge whether the specific cluster is allocated, the problem is it may
have be allocated here while not be allocated when calling blob_calculate_lba_and_lba_count()
before. To ensure the correctness of lba, we can do lba recalculation when
bs_io_unit_is_allocated() returns true, or make
blob_calculate_lba_and_lba_count() return the result of
bs_io_unit_is_allocated(), use the second solution in this patch.

By configuring more than one cpu core, md thread will run in a separate
SPDK thread, this data corruption scenario could be easily reproduced
by running fio verify in VMs using thin-provisioned Lvols as block
devices.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I099865ff291ea42d5d49b693cc53f64b60881684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3318
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-20 09:26:23 +00:00
Ziye Yang
0d3cc15a62 nvme/tcp: Correct the incapsule data usage
According to page35 in recent NVMe-oF spec (
NVMe-over-Fabrics-1.1-2019.10.22-Ratified), ioccsz is used
to restrict the incapsule size of I/O command, so do not
restrict the NVMe-oF OPC command and also the admin command.

We accidently trigger an bug in kernel since we do not send
the fabrics command with the incapsule and make the kernel
coredump, though the kernel has bugs.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I869a2c8ab7b9c2ac1e5cc5b603920662591c2c64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3837
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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-20 09:26:06 +00:00
yupeng
2d30df9b0b bdev: add bdev_examine_bdev API
The bdev_examine_bdev api will examine a bdev explicitly. After
disabling the auto_examine feature, a user could call
bdev_examine_bdev to examine a specific bdev he/she wants.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: Ifbbfb6f667287669ddf6175b8208efee39762933
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3219
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-20 08:56:53 +00:00
WANGHAILIANG
f6727316d7 test/opal: add a trap for opal_revert_and_init()
When opal_revert_and_init() is interrupted for some reason,
the spdk_tgt still exists, but it should be killed at the same time.

Change-Id: I8546d3b0b4d6a0fda1687558a664decb535ef2b4
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3830
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:30:04 +00:00
WANGHAILIANG
c4e1d35c13 test/opal: fix a typo for P4510 devices ID
Change-Id: Ic30fe63a60d2a151a47444fa84e1c99d9b69a454
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3829
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-19 07:30:04 +00:00
Ziye Yang
c67fb06d51 nvme/perf: Fix the hang issue of nvme perf.
When using nvme perf program to test against NVME-oF target,
the nvme perf program will hang if we kill the NVMe-oF target.

For example, if we run the following command:

1 On the target side, start a SPDK NVMe-oF target;

2 On the initiator side, we run:
./build/examples/perf -r 'trtype:rdma adrfam:IPv4 traddr:192.168.7.55 trsvcid:4420' -q 128
-o 4096 -w randwrite -t 100

3 Then we kill the NVMe-oF target on the target, the nvme perf program
will hang.

For NVMe perf program, I think that we should check it in

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia864394acdb6e705484dd0db6f015b567eb527a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3774
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:29:26 +00:00
Ziye Yang
2031f8f70d nvme: set the error code if we cannot send keep alive command.
If the transport is broken, we should set errno code in
spdk_nvme_ctrlr_process_admin_completions instead of keeping silence.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie73763e1329e12a8c82a0223d360991f86c39be3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3773
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-19 07:29:26 +00:00
Seth Howell
518a1e013a lib/nvme: make fabrics connect timeout configurable.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If829d399882ef948d95673c17e5689c91386c21d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3795
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:29:19 +00:00
Seth Howell
b3bb3a1bbf lib/nvme: change timeout in wait_for_completions to usec
This allows for much more granular control over the timeout.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib23de21e60eec4207c55320579699edf284f4e16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3794
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:29:19 +00:00
Ziye Yang
85ff3fcea6 rdma: Do not use the poller to handle the qpair exiting.
Generally, this patch did the following work:

Remove the destruct poller. I think that we do not need this,
the destruct poller is specially for Softwaare RoCE case.
Since SoftRoCE will not have IBV_EVENT_QP_LAST_WQE_REACHED event,
we will not wait the last_wqe_reached flag when srq is enabled.
So we can avoid using the poller.

And the purpose of this patch is to solve the coredump issue.
For example, if we run rdma local test such as, e.g.,

test/nvmf/host/bdevperf.sh --transport=rdma

The coredump reason: the qpair is freed twice. Because for RDMA transport,
we do not really remove the qpair from the group if the upper layer
does it.

The first time is called by nvmf_rdma_destroy_drained_qpair in nvmf_rdma_poller_poll,
and the second time is called by nvmf_rdma_qpair_reject_connection in
in nvme_rdma_close_qpair. Since nvme_rdma_close_qpair will always called,
so we need make sure that the qpair will be close after calling this function.
Otherwise we will have the double free qpair. So our approach here is add a flag
("to_close")in rqpair structure and make sure the rqpair be freed after the
"to_close" is set  nvme_rdma_close_qpair

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6f97debbcd29bbb7c6e3f9725907b4102a1d2892
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3661
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2020-08-19 07:28:36 +00:00
WANGHAILIANG
ea80818901 test/bdevperf: fix an int types for offset which can result in core dumped.
Originally, config->offset was defined as int type.
When the capacity of SSD is very large, such as 8T(P4510),
then bdev->blockcnt2 is 7814037168, config->offset is 3907018584.
At this time, it exceeds the maximum int range of 2147483647 and
becomes a negative number, resulting in core dumped.

Debug info:
config->filename is Nvme1n1.
make_cli_job_config offset is -387948712.
This should be:
config->filename is Nvme1n1.
make_cli_job_config offset is 3907018584.

Change-Id: Ia83d88cc4e56d6c97a6d3fc1a2593b6fc31655b2
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3818
Community-CI: Broadcom CI
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-18 15:41:04 +00:00
Shuhei Matsumoto
05cd697757 lib/iscsi: Add MaxR2TPerConnection to iSCSI options
Add MaxR2TPerConnection to iSCSI global options and make it configurable
by JSON RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida95e5c7dac301a22520656709e1aa4d611f31ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3777
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
5af42000c1 lib/iscsi: Make max outstanding R2Ts per connection configurable
By the recent refactoring, we have no static size array for outstanding
R2Ts per connection. It looks that we do not have any critical reason
to prohibit us from making max outstanding R2Ts per connection configurable.

There are some use cases to use large write I/O intensively (e.g. 128KB).
Let such use cases change the value of max R2Ts per connection by their
responsibility to do performance tuning.

Maximum outstanding R2Ts per task are defined both for iSCSI target
and NVMe-TCP target but maximum outstanding R2Ts per connection is
unique for iSCSI target.

The next patch will add the corresponding iSCSI option.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4f6fd3c750a9a0a99bcf23064fe43a3389829aa9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3776
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
fb229e1eb2 lib/iscsi: Count R2T and Data Out PDUs into PDU pool size
It is likely that the raw number 8 in the macro NUM_PDU_PER_CONNECTION
means 2 * DEFAULT_MAXR2T and the raw number 2 means R2T and Data Out, but
is not certain.

On the other hand, the next patch will make the max number of outstanding
R2Ts per connection configurable.

As a preparation to the next patch, add 2 * DEFAULT_MAXR2T explicitly
to the macro NUM_PDU_PER_CONNECTION.

The next patch will replace DEFAULT_MAXR2T by an new variable.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a3be14d53c0abf11d7aade401386601d8fe6c11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3783
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
07f2d83dea lib/iscsi: Change the type of pending_r2t from int to uint32_t
Other count variables in iSCSI library have used uint32_t rather
than int.

Change the type of spdk_iscsi_conn::pending_r2t from int to uint32_t
and add assert to check if pending_r2t is not negative.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9bd296c0142b0808ae822952277c9ecc133e5f62
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3775
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
5aaf754f81 lib/iscsi: Add MaxLargeDataInPerConnection to iSCSI options
Add MaxLargeDataInPerConnection to iSCSI global options and make
it configurable by JSON RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibcd16da2eac64241217bedeb89a7929bbdc67871
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3756
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
bc814aad67 doc/jsonrpc: Increase column width of parameter table for iscsi_set_options RPC
The next patch will add an new parameter max_large_datain_per_connection
to the iscsi_set_options RPC. It is longer than the column width of
the parameter table.

As a preparation, increase the column width of the parameter table
for the iscsi_set_options RPC first.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0f27d608f9c186166cf7a132ae786ba70e398d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3782
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>
2020-08-18 07:27:45 +00:00
Shuhei Matsumoto
5b2c76f062 lib/iscsi: Make the max number of read subtasks for large read I/O configurable
For some use case that there is heavy large read I/O, the performance
bottleneck due to MAX_LARGE_DATAIN_PER_CONNECTION was reported.

The following assumes that all I/Os are large read.

Large read primary task whose I/O size is more than
SPDK_BDEV_LARGE_BUF_MAX_SIZE (=64KB) is split into multiple
read subtasks.

spdk_iscsi_globals::MaxQueueDepth limits maximum number of outstanding
read primary tasks, and MAX_LARGE_DATAIN_PER_CONNECTION (=64)
limits maximum number of outstanding read subtasks.

MAX_LARGE_DATAIN_PER_CONNECTION is also used to calculate PDU pool.

To remove the performance bottleneck, change the macro constant
MAX_LARGE_DATAIN_PER_CONNECTION to a global variable
spdk_iscsi_globals::MaxLargeDataInPerConnection.

We don't see any negative side effect if we set
spdk_iscsi_globals::MaxLargeDataInPerConnection to 64.

The use case that reported the performance issue will change the
value of spdk_iscsi_globals::MaxLargeDataInPerConnection by its own
responsibility.

The next patch will add the value of
spdk_iscsi_globals::MaxLargeDataInPerConnection to iSCSI options,
and make it configurable by JSON RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc30cdb8e00d50f4d3755ff399263cf5d0b681b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3755
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: Jim Harris <james.r.harris@intel.com>
2020-08-18 07:27:45 +00:00
Michal Berger
6733330cf5 test/common: nullglob the tmp storage path pattern
This is to avoid including non-matching pattern as an actual item.

Change-Id: Ie4fbb27e66efa1f56618959bb7db6f0fccfc2847
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3290
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-17 11:56:47 +00:00
Darek Stojaczyk
49473bdc81 test/common: consolidate test params for running with external DPDK
Get rid of WITH_DPDK_DIR and SPDK_RUN_INSTALLED_DPDK,
introduce SPDK_RUN_EXTERNAL_DPDK which can point to
a DPDK dir. It's an empty string by default.

Change-Id: Iff2b3773a4614db07f4196165087a79472e02b9a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/867
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-17 11:56:32 +00:00
Tomasz Zawadzki
52aaee43ab changelog: update titles of releases
When browsing https://spdk.io/doc/changelog.html
left hand side navigation bar is missing some of the
releases.
This is due to missing 'title' of particular release
that is signified by ":" right after version number.

This patch adds missing ":" and fills out missing titles
for all releases, so they show up properly on the website.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3bcb0b2e819d311a033d78101034a7adb2c3395a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3748
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@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-08-17 08:29:15 +00:00
Tomasz Zawadzki
ba3c468647 test/cuse: do not disable exit on error
Originally the idea was to disable error checking,
to match output from Kernel and SPDK NVMe cuse.
This includes passing test commands and failures.

Any discrepancy would be caught by log output diff
at the end.

Flaw in this logic is that test command itself might
be incorrect. We shouldn't depend on that, nor
attempt to cover up some of the failures even if
they occur on both interfaces.

Most probable cause for this at all, was NVMe emulated
in QEMU not really working with all the nvme-cli commands
from this test.

Since the original creation of this test, CUSE executes
on physical devices (to be able to support namespace management).

The behavior there is predictable and works with current
test commands, thus the test exits on any error with this patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I086faf38b2cbbb6225935cc50d4fad14e81f1972
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3032
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-17 08:28:56 +00:00
Seth Howell
0162da7f76 lib/nvmf: add an in_destruct flag to the ctrlr struct
Helps us avoid adding a new I/O qpair while the ctrlr
is being destroyed.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3bf9318b075125b9d432b885fa9f6f2f44d422d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3686
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:28:49 +00:00
Shuhei Matsumoto
5a92ce53df doc/iscsi: Fix description about iSCSI login redirection
By the previous patches, updating redirect portal and requesting
logout are done using different RPCs. Update description to reflect
this change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id1f00bde39446bc2a8de9635135136b8f0194faf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3781
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-08-17 08:26:59 +00:00
Shuhei Matsumoto
e97fd6c936 lib/iscsi: Add iscsi_target_node_request_logout RPC
For the login redirection feature, the current implementation works
only if a portal is redirected from an initial portal to a redirect
portal. However, the login redirection feature should work even if a
portal is redirected from one redirect portal to another redirect
portal.

A public portal group knows only a redirect portal and does not know
the portal group of the redirect portal.

Moreover, it is very likely that an initial portal and a redirect portal
exist in different SPDK iSCSI target applications.

To cover all these concerns, add an new iscsi_target_node_request_logout
RPC to request connections whose portal group tag match for the target
node.

To cover potential use cases, make the second parameter portal group
tag optional.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I612672490722fb22fd4eba055998b7408ab84ca5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-17 08:26:59 +00:00
Shuhei Matsumoto
8cf5581fa9 lib/iscsi: Remove async logout request from iscsi_target_node_redirect()
As written in doc/iscsi.md, typically the login redirection feature
will be used in scale out iSCSI target system, which runs multiple
SPDK iSCSI target applications.

In scale out iSCSI target system, the initial portal, the current
redirect portal, and the next redirect portal are likely to be in
different SPDK iSCSI target applications.

In this case, asynchronous logout request should be sent independently
from the iSCSI target application which has the current redirect portal.

However, we had added asynchronous logout request into the iSCSI target
application which has the next redirect portal. This idea works only
for the case that login is redirected from the initial portal to a
redirect portal.

We remove asynchronous logout request from iscsi_target_node_redirect()
in this patch, and update the corresponding help documents.

The next patch will add an new RPC to send asynchronous logout
request to all connections to the specified portal group and the
specified target.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib0ac72e8cdad7e8c64e446b7495e572fac4b5bae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3779
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>
2020-08-17 08:26:59 +00:00
Monica Kenguva
7a71ae51df doc: Moved RAID section in alphabetical order
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I9db49b40a4d8276ae754f89257cbcdeae7a50914
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3683
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-17 08:25:07 +00:00
Monica Kenguva
7a660b30a4 doc: bdev module path and external bdev info update
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I78ec57d7c0105f5c16261342ddce1294c1a9a2d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3468
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-08-17 08:25:07 +00:00
Seth Howell
7fade028eb test/check_so_deps: remove old suppressions.
These suppressions are only valid for the course
of one release. Now that we have started with a
new release, remove all of the suppressions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1a36bc49bb3a16f98de870cc06e56dbfa75d72d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3722
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-08-17 08:24:46 +00:00
Seth Howell
ada6c8468c test/fuzz: remove AERs from example JSON.
The target changed how we deal with custom AERs
so we can't post them and expect to get an
immediate return anymore. The fuzzing application
doesn't expect to not get a return value from the
target so it just spins forever until it times out
and fails. The solution is to not send AERs over
the wire with the fuzzer.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I24fc890dfc05601953552c98690950d0981d70fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3739
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-08-17 08:21:11 +00:00
yidong0635
815949ed0d test/nvmf: Unify the ports in common file.
Put the NVMF_SECOND_PORT and NVMF_THIRD_PORT to common file.
And clean some wrong comments.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I2ccd420551bfa686a0d46e317b7a8767b171c2d9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3761
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-17 08:20:58 +00:00
Tomasz Zawadzki
b6ad59056d test: remove skipping VPP
VPP implementation and tests are no longer present,
the skips can be safely removed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7a5f194ae87caae897bab53eca1370f56584ba94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3735
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
30a31a16eb sock/vpp: remove VPP implementation
This patch removes implementation of VPP socket abstraction
along with ways to compile it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I089f7703cfc4fb517f8f80f4368e544bced549b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3734
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
050df88c37 doc/vpp: remove VPP documentation
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9f506b415fc0f4b1b102f5c04fbb4d3a1fd9dd5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3733
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
cabc731e9c vm_setup: remove reference to VPP repository
This was unused anyway.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib2604410d82bbcf928f5c7f3f8f4e38815d4bb6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3732
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
99dd44e8da test/iscsi: remove VPP tests
All VPP tests were the same tests as usual posix iSCSI tests.
TEST_TYPE was used to direct which tests to run and in some cases
with what parameter.

Since VPP is deprecated, this type of selection is no longer needed.
All tests will run with default socket abstraction.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I292f1b5141ec8c4dacb4a43c6f51e4d30501a92a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3730
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
7d6e0802a3 test/iscsi: remove SPDK_TEST_VPP test flag
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f8366337591a990bda4af60ea5e15d92b07b61c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3731
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
4eda51a0c0 test/iscsi: only test rpc_config with posix
Since VPP is deprecated, this is no longer required.
rpc_config tests will work for posix and uring
the same for this test.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibc7bd76ea47ca137f3eb4484782cc64ff748fe22
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3729
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Monica Kenguva
685f31d606 doc: uring bdev userguide update
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic365b52d1eb978a0a4c400484bca49f61e4a2708
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3466
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-13 07:54:53 +00:00
Monica Kenguva
802fd5bf41 doc: Minor updates to bdev user guide
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I28047e71535046b898fa14bfb210ec4019614554
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3465
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-13 07:54:53 +00:00
Ziye Yang
b68d89bcc2 nvmf/rdma: Remove the unused data structure spdk_nvmf_send_wr_list
This data structure is not used.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I143fb9256f692d7bd9bb5e14cdc479f64ddcef45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3746
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-13 07:54:36 +00:00
Alexey Marchuk
db09de9866 nvmf/rdma: Update Work Completion error logging
1. Retrieve actual IBV state when we receive WC with bad status
2. Don't log an error if WC status is IBV_WC_WR_FLUSH_ERR. This
means that we are performing qpair cleanup and this WC is expected.

Change-Id: Id23634092f537861e66ca0f83ab79db9e052507b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3736
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-13 07:54:22 +00:00
Jacek Kalwas
47ce1fe307 nvmf: association timer triggered on reset
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I85e886e8912009ec5761b5cd0e5b5cef87b25d6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3463
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>
2020-08-13 07:53:08 +00:00
Jacek Kalwas
c322453ccc nvmf: disable keep alive timer during shutdown
From the time a shutdown is initiated the controller shall disable
Keep Alive timer.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Id499dabce1913b9da2f0b3fd961fdfc8b621afa9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3462
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: Changpeng Liu <changpeng.liu@intel.com>
2020-08-13 07:53:08 +00:00
Jacek Kalwas
71cd42e139 nvmf: association timer triggered on shutdown
After CC.EN transitions to ‘0’ (due to shutdown or reset), the
association between the host and controller shall be preserved for at
least 2 minutes. After this time, the association may be removed if
the controller has not been re-enabled.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I4734600067fd4b7306b46f1325fdd5031e81c079
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2984
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>
2020-08-13 07:53:08 +00:00
xjjx
b70fc69b32 scripts/vagrant: do not try to install vagrant plugins
We assume that vagrant sshfs and proxyconf plugins
should be already installed and we do not want to install
them implicitly. In future this logic will be implemented
in vm_setup.sh script.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I421f6fd691312289ce15d432f989c6f7a7cf35b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3330
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-13 07:09:01 +00:00
rafalste
4d91b4ef01 bdev/ocf: add cache line size
Define cache line size when creating cache device.

Signed-off-by: rafalste <rafal.stefanowski@intel.com>
Change-Id: Ica536a9bda35c355b4dd4e406a241defc1453f53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3449
Community-CI: Mellanox Build Bot
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-08-12 10:39:56 +00:00
Tomasz Zawadzki
102f6256b8 test/cuse: replace sleep with waitforfile
We can do better than "sleep 5". Instead use waitforfile(),
that will wait until the namespace is available.

Moved around the variables with names and checks for the ctrlr/ns
existence after all the tests complete.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8326c2cec0d0cf5aec88b5f80c1126c81eb09436
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2951
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 10:39:29 +00:00
Tomasz Kulasek
549b9f31c6 lib/nvme: implement SPDK_NVME_DATA_NONE data transfer in CUSE
Change-Id: Ifb2a53bdbaabd74b7f412923a97d79b44afde861
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1744
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: Karol Latecki <karol.latecki@intel.com>
2020-08-12 10:39:29 +00:00
Tomasz Zawadzki
a9b5d7af5a test/vpp: remove vpp interface preparation
Enviroment for VPP and posix tests was prepared differently.
Since VPP is no longer tested this patch removes path for
starting VPP application and configuring interfaces there.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie55646207d07bbbd7edddd3caf2f2cc23bf27e23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3728
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:52:36 +00:00
Tomasz Zawadzki
af7a9194c0 test/iscsi: inherit TEST_MODE from autotest_common.sh
Other common scripts for nvmf and vhost already used
TEST_MODE set by autotest_common.sh.
Meanwhile iscsi was processing it for each test script
separately.

This patch simplifies iscsitestinit/iscsitestfini
functions to just use TEST_MODE.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iacbdb552207eff72b41f2adb505e83348567df57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3727
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:52:36 +00:00
Michal Berger
6ca184b027 autotest_common: Don't use cwd for $output_dir
If $output_dir is not set, cwd is used as a designated output dir
throughout the runtime of the script that sourced autotest_common.sh.
This, however, may fail in some particular cases, e.g. when calling
autobuild.sh directly from within the spdk repo. As a result some
*.txt files that are created by scanbuild_make() will end up in the
root of the repo. This causes porcelain_check() to fail as it does
pick these files up after the test is done.

To avoid similar scenarios, simply make sure the desired output dir
is always created and that it resides outside of the repo.

Change-Id: I5b2e142ce9c2a0b8d24d5331f2b52110c9634c67
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2791
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-12 07:52:24 +00:00
Maciej Szwed
210f61ec0e bdev: Return when locking LBA range for fused command failed
Add missing return statement on LBA range locking failure.

Fixes github issue #1531

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I5506f34acd51714b9947b9692d0d5d9793144adc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3737
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-08-12 07:52:09 +00:00
Tomasz Zawadzki
1f543eef54 examples/perf: add back VMD help print
Patch (0f895bbd) accidentally removed the help
print for VMD.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I460440ebab33c6a9f24340fab30f8e4ca87ba044
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3594
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:51:55 +00:00
Tomasz Zawadzki
ca65098591 test/fio: enable QoS with fio JSON config
Test steps were disabled due to issue #1146.
Which has since been resolved by patch:
(991a56f) fio: Continue polling spdk_threads on the init thread after shutdown

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id5c2849a94b23e95bb222b8a70c538f392896a30
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3726
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: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-12 07:51:42 +00:00
yidong0635
d617125df2 test/nmic: Using multi-ports to test muti-paths.
Host connects to nvmf in multiple paths, that we can use
different ports on one nic to test this case.
Then this case can be tested on all machines even though they have only
one nic.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I021e2e1923361ecb4de1e260b2c277f7719f8335
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3590
Community-CI: Mellanox Build Bot
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-08-12 07:51:30 +00:00
Seth Howell
fa01f99692 nvmf/rdma: disconnect qpair from ibv_event ctx
This call can be made directly now that
spdk_nvmf_qpair_disconnect is thread safe. It's
actually better that we do it this way, because
the qp destruct call is guaranteed to block until
the ib events associated with it are acknowledged.

this means that by processing the disconnect before
we ack the event, we will have valid memory to do
the atomic checks.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If6882b7dc568fe4c35f4a35375769634326e9d76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3681
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-08-12 07:51:15 +00:00
Seth Howell
86a6ac995c nvmf/rdma: always go through spdk_nvmf_qpair_disconnect.
We should use this function as the synchronization point
for all qpair disconnects.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic685ac3481765190cc56eeec3ee24dad52e336c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3675
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-12 07:51:15 +00:00
Seth Howell
4bdfe13d4d lib/nvmf: make spdk_nvmf_qpair_disconnect thread safe.
This function should be the synchronization point for all
disconnects regardless of whether they begin on the transport,
from an RPC, or in response to application termination.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If3553ab3a9e265b0938c84832cb9f774852d7565
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3674
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:51:15 +00:00
Monica Kenguva
a70d01d6f7 nvme/identify : print ana log page information
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibdd87ea946c2d7c665779e365c1acfa46f9049e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2919
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: Paul Luse <paul.e.luse@intel.com>
2020-08-12 07:50:44 +00:00
Monica Kenguva
332e846fe6 lib/nvmf: implement ANA log page
SPDK NVMe-oF controller creates a ANA group for each namespace,
ANA group ID matches namespace ID, and default ANA state of ANA group
is optimized, and the MNAN field is set equal to the NN field.

If a ANA log page contains multiple ANA group descriptors, it has
one or more descriptors will not be 8 bytes aligned. Hence we create
one descriptor and copy it to the ANA log page at a time.

Change count will be supported later.

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56ba6aa78983480caa3dfbf22aefc9aeabfd5405
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2920
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-12 07:50:44 +00:00
Monica Kenguva
e36bec7a3d nvme_spec: update asymmetric namespace log page
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icdd0895c12623f859197964f6cea330c07d137ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2918
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: Paul Luse <paul.e.luse@intel.com>
2020-08-12 07:50:44 +00:00
Ziye Yang
d4229b4dd8 bdev/rbd: Remove bdev_rbd_rw and bdev_rbd_flush
Purpose: To simplify the code.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1ab1ceb5367b7a47f72fe1d0d03c607e8c46cb48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3723
Community-CI: Mellanox Build Bot
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-08-12 07:49:04 +00:00
Ziye Yang
6cbbc68296 bdev/rbd: Implement the group polling policy.
This patch is used to implement the group polling
policy instead of each rbd has one poller.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ieb975e656240bcdaf2657410f010d72b156639ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3698
Community-CI: Mellanox Build Bot
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-08-12 07:49:04 +00:00
Ziye Yang
5d097aa7fd bdev/rbd: Simplify the read/write.
We can use rbd_aio_readv and rbd_aio_writev to simplify the code.
Since it rbd_aio_readv/rbd_aio_writev are supported more than 2
years, so can replace rbd_aio_read/write without using "ifdef".

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I924a039110ceed59836c1b904b6e7f8db271ad62
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3697
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>
2020-08-12 07:49:04 +00:00
Wojciech Malikowski
1a91a68fae lib/ftl: Return SPDK_POLLER_BUSY flag only when writes were submitted
FTL core poller should return SPDK_POLLER_BUSY flag only
when some writes operations were processed.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I50e2b536fbec819887148cc045d76c5c5d78beb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3619
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-11 09:49:51 +00:00
Seth Howell
d156d2f771 lib/nvmf: don't free ctrlr->qpair_mask early.
There are 2 messages passed between when
_nvmf_ctrlr_free_from_qpair is executed and when
nvmf_ctrlr_destruct is executed. That leaves time
when the controller->qpair_mask is not a valid
pointer, but it is still in the subsystem
controllers list.

The purpose of this patch is to close that hole.

It is part of a larger series aimed at cleaning up
the controller destruct path.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0c0199c8392ee278f36df56f599beb10e7a46948
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3685
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-08-11 08:34:15 +00:00
Karol Latecki
f803df5129 test/cuse: use waitforfile in revert function
lsblk used in waitforblk() works on blk device names
withouth full path (e.g. "nvme0n1"). This results in
a timeout because we pass "/dev/X" as an argument.
waitforfile() is the way to go in this case.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I47a2b76bce6f15e0ffa2070e581bbf16f9647bdd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3694
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:33:48 +00:00
Michal Berger
16589c826a test/common: Always attempt to restore core_pattern
This setting may be crucial on some systems in keeping core dump files
in order, that's why we should always make sure it's main value is
restored upon exiting from autotest.sh.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I0c81a8c96c2d8f061e95c2614d9c30f4e3cdd5a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3605
Community-CI: Mellanox Build Bot
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-08-11 08:33:29 +00:00
Tomasz Zawadzki
0cf3fced2c test/cuse: reenable nvme_ns_manage_cuse test case
This patch will pass when CUSE tests are switched from
job executing on virtual machines to physical machines.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9c13106084197d8d197ee3c50c920c889c86e645
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2830
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: Karol Latecki <karol.latecki@intel.com>
2020-08-11 08:33:17 +00:00
Ben Walker
991a56f85d fio: Continue polling spdk_threads on the init thread after shutdown
When fio wants to shut down a thread, it stops polling it immediately.
Some SPDK threads need to continue to be polled for a period of time
to allow the message passing to all complete, so this behavior in fio
could lead to a hang. Instead, when fio wants to shut down a thread,
place that thread onto a global list that's polled by the init thread
which lives for the duration of the program. The init thread will
continue polling the spdk_thread until it has exited.

Change-Id: I07292d5ba389167c45a14aa8ffbe72b49e88d17d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3682
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: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-11 08:29:39 +00:00
Seth Howell
4696163e44 test/nvmf: add a host multipath test.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id96f1ffb0efbdf5169cb448de82613fead2701c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2885
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:29:14 +00:00
Seth Howell
d1b0d2cbe5 nvmf/rpc: stop_listen rpc now uses the async stop listen function.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie7352d6f1a9d74557a92c6e39c376856804f021c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3450
Community-CI: Mellanox Build Bot
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: Ziye Yang <ziye.yang@intel.com>
2020-08-11 08:29:14 +00:00
Seth Howell
49ee92a61f lib/nvmf:add spdk_nvmf_transport_stop_listen_async API.
This API differs from spdk_nvmf_tranpsort_stop_listen in
that it also disconnects the qpairs associated with
that listener.

Change-Id: Iadfc6d2debc0ef8f1a8cd5db4f20168aeae8264d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3279
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-08-11 08:29:14 +00:00
Seth Howell
8bff48f63c module/bdev_rpc: modify detach_ctrlr rpc to accept trid.
This will allow us to use this RPC to detach only specific
paths from controllers.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib52e38aa7d4ea096418a6dc0328481c2e8db6c54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3070
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:29:14 +00:00
Seth Howell
ca8c9be341 lib/bdev: fix python docs for attach_controller RPC.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie4e722bd289e29691cad34418d42088c73ac002a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3614
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-11 08:29:14 +00:00
Seth Howell
80dcb258e0 lib/bdev_nvme: fix attach_controller RPC.
This RPC was using snprintf which could potentially
truncate a bad argument silently without alerting the
caller.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1795b2e4086cbaa45390bd11b189755818b5c9e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3613
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-11 08:29:14 +00:00
Ziye Yang
65945c0296 bdev/rbd: Move bdev_rados_context_init to bdev_rbd_handle
According to customers's report, there still exists
the Rados related thread contention with SPDK's reactor thread.
So also meove bdev_rados_context_init into bdev_rbd_handle.

With this patch, QEMU + SPDK vhost + Bdev RBD 's performance
can be improved.

Change-Id: Ie26a140f8d2cfe1a98cd1737f4ff70e9319cdc11
Signed-off-by: Yaowei Bai <baiyaowei_yewu@cmss.chinamobile.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3699
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: <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-11 08:28:39 +00:00
Shuhei Matsumoto
49904470ba doc/iscsi: Add description about iSCSI login redirection
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idac2940bac28b3513bb38c4fd6768fdb38f7a715
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3494
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: Changpeng Liu <changpeng.liu@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
d40a1b7eff doc/iscsi: Remove obsolete limitation of the hotplug feature
iSCSI hotplug should be pretty stable now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie1a4fc167f75f4a1c9f079e53a78552f8ca9714d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3493
Community-CI: Mellanox Build Bot
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: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
4ea197883c lib/iscsi: Add iscsi_target_node_set_redirect RPC
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I090f55debe4ecdc47459bcfe0571a937f064313b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3439
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
420b2353ea lib/iscsi: Inform initiator that target has temporary moved to a different address
If the portal group map of the target has a redirect portal,
iscsi_tgt_node_is_moved() fills the buffer by the redirected address
and returns true.

iscsi_op_login_check_target() calls iscsi_tgt_node_is_redirected() before
calling iscsi_tgt_node_access() because login redirection can be
checked before any or after all security check.

If iscsi_tgt_node_is_redirected() returns true, notify login redirection
to the corresponding initiator.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4573a69c0a32eafcfe48080a033c135e127da321
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3221
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
2c8309e00e lib/iscsi: Update redirect portal of public portal group
iscsi_tgt_node_redirect() updates redirect portal of the initial
portal iin a primary portal group for the target node.

Check if the specified portal group is a public portal group and is
mapped to the target node first.

Then if the passed IP address-port pair is NULL, clear the current
redirect setting. Public portal group and private portal group are
clearly separated and redirect portal must be chosen from a private
portal group. Hence this clear method is intuitive and simple.

If the passed IP address-port pair is not NULL, check if they are
valid, and are not in the specified portal group. Then update a
redirect portal of the portal group map.

Finally, send asynchronous logout request to all corresponding
initiators.

Besides, change allocating pg_map from malloc to calloc to initialize
redirect portal.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I79d826663f4c3d5a117add286f133adeb1ce07f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3222
Community-CI: Mellanox Build Bot
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>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
651f6d6a3a lib/iscsi: Return portals only in public portal group for SendTargets
All redirect portals in private portal groups are temporary and so they
should be informed only by temporary login redirection response.

Then this patch changes SendTargets operation to return portals only
in primary portal groups.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic62ada749886290df2d1490377cc5ca883b3f47a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3492
Community-CI: Mellanox Build Bot
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>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
10d6218444 lib/iscsi: Create portal group as public or private portal group
In SPDK iSCSI target, portal group works almost as identifier of
portal.

To support iSCSI login redirection, we need to have two types of
portal groups, public and private portal groups.

We need portals of public portal groups to redirect to a portal in
a private portal groups at login via temporary login redirection
funciton, and we need to make SendTargets return only portals in
public portal groups.

To do these simply, we mark primary or secondary portal group expicitly
at its creation by this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iccf87a4b9dd1f4a8fbb857a399b8f2dbc7c0b3ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3491
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: Changpeng Liu <changpeng.liu@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
0f22282fc3 lib/iscsi: Check if IP address-port pair is valid as redirect portal
Add a helper function iscsi_parse_redirect_addr() to validate the
passed IP address-port pair.

iSCSI login redirection will support only numeric IP address and
TCP port, and add AI_NUMERICSERV and AI_NUMERICHOST.

This function is almost same as nvme_tcp_parse_addr() and
nvme_rdma_parse_addr().

Besides, update error log in posix_sock_create() to use
gai_strerror(). gai_strerror() will provide more accurate
information as done by nvme_tcp_parse_addr() and nvme_rdma_parse_addr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65c6de81a64dcb26551ce796172d0458e1c298a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3357
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Tomasz Zawadzki
99d3695c2c lib/sock: bump SO_VERSION to 4.0
Following patch was merged while still having parent one
pointing before SPDK 20.07 release.
(61cd9d) lib/sock: Add option to enable or disable quick ACK

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1cbc0acfdd2a1a5403844167a107e0f63a2e213c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3709
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-08-10 14:41:16 +00:00
Shuhei Matsumoto
61cd9d308e lib/sock: Add option to enable or disable quick ACK
TCP delayed ACK can be disabled or enabled by enabling or disabling
quick ACK, respectively.

The recently added spdk_sock_impl_opts is helpful for sock library
to control quick ACK.

Hence this patch adds and uses an option enable_quickack. The option
is effective only for the POSIX sock module.

We have spdk_sock_opts now too but spdk_sock_impl_opts will be better
for this case.

This option is not supported on FreeBSD. FreeBSD users can set the
option globally via sysctl if desired.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic89620267acce5872dc8ecaf7a99bb70ae97e993
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3603
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-10 11:29:20 +00:00
Michal Berger
a9337f72e0 test/common: Check exit status of NOT() execution more carefully
The NOT() function is meant to report a success when given test
fails. This negative testing is meant for specific cases, however,
there may be some circumstances where application failed, but not
for the reasons the tests was aiming for, e.g. upon receiving
signals from the kernel, like SIGILL, SIGSEGV, etc.

To make sure the test is aborted in such a scenario, check exit
status of the execution more carefully. If it matches any of the
defined signals make sure to fail the test. By default, all signals
which generate cores are looked up and SIGKILL which may be sent
out by the kernel as well (in case of the oom-killer).

Also, $EXIT_STATUS var is provided to specifically declare which
exit status NOT() should be looking for if process terminates with
a failure (i.e., for any other reason then receiving a signal).

Change-Id: I67b42ef038ef4553aceaf96d4da139858d819f22
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3448
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:29:02 +00:00
Michal Berger
20708f3531 scripts/pkgdep: Move distro independent parts to a common place
This will avoid adding similar components into multiple scripts
instead of just one.

Change-Id: I83cff1ad883f3a7054d0f21ec20210c81cb6b9c1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3525
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:28:20 +00:00
Pawel Piatek
301b47e446 test/fuzz: fix autofuzz vhost all test
Add -g/--single-file-segments to vhost fuzz client
to allow pass autofuzz_vhost_all test

Fixes https://github.com/spdk/spdk/issues/1482

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ia25fe1f364fe6a11e2ad0ee0dc354f399f385e0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3678
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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-08-10 11:28:06 +00:00
Maciej Szwed
436fa2efae rocksdb: Update rocksdb code to work with spdk/rocksdb branch spdk-v6.10.2
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib907762e9124737a9ea7d4786903446e4ed61abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3461
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:27:32 +00:00
Michal Berger
a44d06142b pkgdep/git: [QAT] Fix logic while checking qat_service status
Change-Id: I3ec62158234f1ab4e7bb462b9297c90b80828b69
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3515
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
95406c93c1 pkgdep/git: [QAT] Do the patching only on the tested driver
Make sure that we patch only a specific version of the driver that
we know works with given patches.

Check if $DRIVER_LOCATION_QAT looks like something we know and
proceed with patching if it does.

Change-Id: I27d82793ecfd6ad4cfb625cf14fcdda9fe822856
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3507
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
f61b3fddf0 pkgdep/git: [QAT] Patch use of PCI/AER related function
The pci_cleanup_aer_uncorrect_error_status() was renamed to
pci_aer_clear_nonfatal_status() in kernel 5.7, details here:

git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f

Change-Id: I233718e02d95f46ccef4d78a4d1f626950cd8503
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3506
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
ea0a034b07 pkgdep/git: [QAT] Patch use of timespec
timespec and other time related types were hidden in 5.6 kernel,
details here:

git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=412c53a680a97cb1ae2c0ab60230e193bee86387

Change-Id: I02ed16f9047337c77cc9ad344bbb40c52b3202be
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3505
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
c7bd3cb4a9 pkgdep/git: [QAT] Extract all parts from the kernel version
This is done as a preperation for oncoming patches which will
require additional pieces of the kernel version to work with.

Change-Id: I365201d8254ee68a0201790dff29474545a4f50a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3504
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
3bd213117a pkgdep/git: [QAT] Remove rdtscll patch
This patch is not needed for the newer version of the QAT driver which
vm_setup.sh installs - it successfully compiles against older kernels
(tested against 4.4.x sources).

Change-Id: Icd3e3171ddcdc1b5e4eb7c45736461cfcaa86cf7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3503
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-10 11:27:23 +00:00
Seth Howell
a22f55658c lib/nvme: add timeout to fabric connect commands.
We can't afford to wait here blocking forever. Add a
reasonable timeout (1 second) to this command.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7e373c5515d42a46403f03d7d09e72225f8910ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3563
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-08-10 11:27:16 +00:00
Shuhei Matsumoto
5682de86c4 lib/iscsi: Add iscsi_portal_grp_find_portal_by_addr() as a helper function
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieec2b9871d931c7ee394bc16444f5a283a9655bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3438
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: Paul Luse <paul.e.luse@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
f5ee7d9bd8 lib/iscsi: Factor out send target portals from iscsi_send_tgts() into a helper function
iSCSI login redirect will change SendTargets. To make the change
easier, factor out sending target portals from iscsi_send_tgts
into iscsi_send_tgt_portals() even if iscsi_send_tgt_portals() is
used only once.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic565421afc9b099a507aac59ef7c741b113efa8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3443
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
1d08c96288 lib/iscsi: Remove unused the param iaddr from iscsi_send_tgts()
Previously we might have any possibility to need iaddr in
iscsi_send_tgts(), but it is highly unlikely now. Let's remove
the param iaddr from iscsi_send_tgts().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide3405706b727a9d6ebaa92ed83509196ff675da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3442
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c15a6180cd lib/iscsi: Add pg_tag to the 2nd parameter of iscsi_conns_request_logout()
The upcoming new feature, iSCSI login redirection will requests
connections whose portal group tag matches to logout asynchronously.
Hence add pg_tag to the second parameter of iscsi_conns_request_logout()
and iscsi_conns_request_logout() checks if conn->pg_tag is equal to
the passed pg_tag.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaea37f28046396404c5b4faed01d748f2944288c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3160
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
aa69140dba lib/iscsi: Remove unused the param conn from iscsi_append_text()
Previously we might have any possibility to need conn in
iscsi_append_text(), but it is highly unlikely now. Let's remove
the param conn from iscsi_append_text(). This patch includes a
minor simplification not to use rc but return directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa009c1374e878f8d3b9c0043ba0352f59010b59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3157
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c0d796d7f8 lib/iscsi: Use fixed size char array to parse string of portal address and port
Dynamically allocated string is not necessary, and use fixed size
char array for simplification instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iada118fbc81f24d0273269f4980bab28bd9c2c23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3161
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
92b28effd4 lib/iscsi: Abort queued R2T task before submitting abort request to SCSI layer
Previously iscsi_del_transfer_task() and iscsi_clear_all_transfer_task()
were called after SCSI layer completed abort request.

However, SCSI layer waits until all target requests are aborted or
completed anyway.

So the timing to call iscsi_del_transfer_task() and
iscsi_clear_all_transfer_task() were not effective.

Hence for ABORT TASK, call iscsi_del_transfer_task() before
iscsi_op_abort_task(), for ABORT TASK SET and LUN RESET, call
iscsi_clear_all_transfer_task() before iscsi_op_abort_task_set().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7c22b7305499e6e7d7335b7b5616a3abac0252c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3149
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Seth Howell
0b81c11ab8 module/bdev: add a function to remove trid from ctrlr.
This will allow us to further develop the ecosystem for multipath
failover support.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I24a8cf13e60e6cc0d5b6374da33c8a4e5b6c499a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3069
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-08-07 15:06:01 +00:00
Seth Howell
1973d10b59 bdev/nvme: modify attach_controller rpc to also add multipath trids.
This allows us to avoid creating a separate rpc just for multipath TRIDs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e83167eaf16e50a72efbd513333a4d09c52be61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2884
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-08-07 15:06:01 +00:00
Seth Howell
e4cc49bc95 bdev/nvme: add failover option to bdev_nvme_reset
When we fail to process admin completions on a controller
attempt to failover to a previously registered trid

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I547bd010f4b339b2af7f2b33027cddad4b4926bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3045
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:01 +00:00
Seth Howell
eafae9ae89 bdev/nvme: pass nvme_bdev_ctrlr struct to adminq.
We are about to instrument some checks in this function
that will access the nvme_bdev_ctrlr struct directly so
pass that directly since the ctrlr is still accessible from
the nvme_bdev_ctrlr struct.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e0d0d6c433149368e84275426362f8283903027
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3340
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-07 15:06:01 +00:00
Seth Howell
0c6979e29b bdev/nvme: add a function for specifying a multipath trid.
This is part of a larger series enabling failover at the bdev
layer for NVMe.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic5c128244699c1a47275145ca7e41aa5f1366259
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3044
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-08-07 15:06:01 +00:00
Seth Howell
d88915f5ff bdev/nvme: rename ctrlr trid parameter to connected_trid
This patch paves the way for introducing a tailq containing
multiple alternative paths to the same controller.

Change-Id: I13d30c12b8e0ce38eae687f9e76740be1d11e4d1
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3259
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:01 +00:00
Shuhei Matsumoto
a4b5041cd0 lib/nvmf: Fix return type to be alone on a line for _nvmf_ctrlr_destruct()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0af1bf6fa8dc5dec0263ea799f166632c10078ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3624
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-06 23:33:00 +00:00
Shuhei Matsumoto
d49d316e63 doc/nvmf_tgt_pg: Update the description about assigning the created qpair to a poll group
The operation to assign the created qpair to a poll group has been
moved from event library to nvmf library. Update the corresponding
part slightly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I80b9b8257b84ba92004baa36a057d1a8cee387bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3623
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-08-06 23:33:00 +00:00
Ziye Yang
4ba5e90176 nbd: Add the O_DIRECT flag when opening the file.
To eliminate the cache issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Id67fabb901de9666e6bad04c9df74a538bdbc659
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3662
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Sun Zhenyuan <sunzhenyuan@baidu.com>
2020-08-06 22:43:20 +00:00
Ziye Yang
7bac9b06f1 nvme TCP: Make the control related pdu also allocated from the SPDK DMA memory
Purpose: To make the pdu management consistent with other PDUs, then
we can easily adapt our code into some hardware offloading solution.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic4a2847fd1b6cacda4cbaa52ff12c338f0394805
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3588
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:28:08 +00:00
Ziye Yang
cca62c633f bdev/uring: Do not use IORING_SETUP_IOPOLL.
Because of the Linux kernel has limitation, IORING_SETUP_IOPOLL is only
used for local devices (e.g., local files, pcie NVMe SSDs etc.). However,
it does not work for devices atttached from the remote. So in order to
make bdev uring generic, Let's do not use IORING_SETUP_IOPOLL to create the
uring.

Change-Id: I6aea1ff222a8a0d67ab040ada75aa0ef6730e725
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3587
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-08-04 18:27:56 +00:00
Alexey Marchuk
864d93c053 nvmf: Add check for bidirectional xfer type
RDMA target can't handle bidirectional xfer type, in debug build
it throws an assert in nvmf_rdma_setup_wr function. NVMF controller
performs checks od opcodes, but the failure happens before this
check. Add similar validation in TCP transport.

Change-Id: I14400b9c301295c0ae1d35a4330189d38aeee723
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3436
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>
2020-08-04 18:27:45 +00:00
WANGHAILIANG
8f7cb5e6dd script/pkgdep: fix pip-3 to pip3
Change-Id: Ibda02ab0efcd333d0623a6efe9c540ddd65b0af2
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3627
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-08-04 16:57:22 +00:00
Darek Stojaczyk
4e0208001c json_config: fix static analyzer false-positive
The variable can't be uninitialized, but gcc complains:

json_config.c:415:3: error: ‘params_len’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
   spdk_json_write_val_raw(w, cfg.params->start, params_len);

Change-Id: I845dcc19fa18c3583c420e66c16c11a3fdf99ad4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3626
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-04 16:57:08 +00:00
Seth Howell
ab3a465554 lib/bdev: fix potential mem leak in part.c
The way this is written currently, there is a
(very very unlikely) chance that the first strdup
fails and the second one succeeds. Just clean that
up.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5ca1106c713753448a2bf988166a2d79ab9fa86d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3610
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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-08-04 16:56:42 +00:00
Seth Howell
305d64589e lib/virtio: fix heap use after free issue.
fixes 79c7744efb

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia7919b8922de7e99b0a9f5266a96940f05f4865c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3609
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 16:56:42 +00:00
Jacek Kalwas
beb468e9c7 nvmf: fix cc.en and csts.rdy setting during shutdown
CC.EN, CSTS.RDY should not be modified during shutdown.
It doesn't make much sense (against nvme spec) and nvmf spec 1.1
doesn't mentioned it (4.6) either.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I7014b10b0217db61c3d380d5c0843808e54577cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3477
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Jacek Kalwas
aedcec8a0c nvmf: disconnecting io qpairs during shutdown handling
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Iaee05abead7c685989d91f965133ee6b9e221f89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3476
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: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Tomasz Zawadzki
809ab045b0 version: 20.10 pre
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I337b43bcf75b00b78081ca6f252bbd74a7f4abfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3621
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-07-31 16:08:17 +00:00
Tomasz Zawadzki
6042d4e9ec changelog: remove spdk_env_get_primary_core change
Patch (e12a4f6) reverted the addition of spdk_env_get_primary_core().
The changelog no longer needs to contain this info.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9ad339f13557b9eec989a806638cb59a8b203355
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3598
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-07-31 16:08:17 +00:00
Karol Latecki
2d11e45ffc test/make: update source abi dir path
Update reference build path to latest build.
Change path to use a generic directory name instead
of using specific SPDK version in the name. That way
in future we can update the build just after the
release, and still make ABI checks for patches which
were not rebased.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I32850a871274773e334057b60b9df238ef85a999
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3532
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>
Community-CI: Mellanox Build Bot
2020-07-31 16:08:17 +00:00
Tomasz Zawadzki
241f290794 json_config: do not attempt to resolve JSON that failed decode
When config entry fails spdk_json_decode_object(),
that basically means incorrectly formatted JSON config.
Decode object is simple enough here - 'method' and optional 'params'.

Before this change SPDK_ERRLOG printed garbage, rather than JSON
object that failed the decode.

We actually should not do it at all:
- the object is not formatted right already
- it might be the last object, so spdk_json_next() won't work

It was not usefull, so this patch removes it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ife67ac0d9a1a66d567bfbdd5896e893f3e8cb3ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3257
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-07-31 08:23:53 +00:00
Tomasz Zawadzki
cebf307b61 json_config: do not assume JSON contains 'params' field
Not all JSON methods require 'params' field to be supplied.
Verification of the JSON is done on server side in
parse_single_request().

We should not attempt to process garbage values on correct
JSON config file during app start.

Segfault can be observed if following valid JSON config is supplied:
{
	"method": "framework_wait_init"
}
Resulting in:
json_config.c:388:13: runtime error: applying non-zero offset 18446744073709551600 to null pointer
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3386067==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000007260ff bp 0x7ffe6ea06890 sp 0x7ffe6ea067e0 T0)
==3386067==The signal is caused by a READ memory access.
==3386067==Hint: this fault was caused by a dereference of a high value address (see register values below).  Dissassemble the provided pc to learn which register was used.
    #0 0x7260ff in app_json_config_load_subsystem_config_entry /home/tzawadzk/spdk/lib/event/json_config.c:391
    #1 0x7cbb13 in msg_queue_run_batch /home/tzawadzk/spdk/lib/thread/thread.c:505
    #2 0x7cd00a in thread_poll /home/tzawadzk/spdk/lib/thread/thread.c:581
    #3 0x7cfe18 in spdk_thread_poll /home/tzawadzk/spdk/lib/thread/thread.c:689
    #4 0x71d6ef in _reactor_run /home/tzawadzk/spdk/lib/event/reactor.c:326
    #5 0x71eb00 in reactor_run /home/tzawadzk/spdk/lib/event/reactor.c:382
    #6 0x71f911 in spdk_reactors_start /home/tzawadzk/spdk/lib/event/reactor.c:477
    #7 0x718237 in spdk_app_start /home/tzawadzk/spdk/lib/event/app.c:691
    #8 0x407e94 in main /home/tzawadzk/spdk/app/spdk_tgt/spdk_tgt.c:120
    #9 0x7f0f2eef2041 in __libc_start_main ../csu/libc-start.c:308
    #10 0x4079ad in _start (/home/tzawadzk/spdk/build/bin/spdk_tgt+0x4079ad)

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7ef1a764467817ad788fdf5dbe17eaeb99dcc22e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3256
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-07-31 08:23:53 +00:00
Seth Howell
0d8f86f842 lib/nvme: don't submit request if qpair is disconnected.
This becomes a problem when the qpair is reconnected.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6677b396cf766684a4891ffbee93aa3e4e83374d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3391
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-07-31 08:23:44 +00:00
Richael Zhuang
612aa86b50 sock/uring: enable pipe buffer on arm64
The pipe buffer has obvious performance influence on arm64. The
following is my test result with 1core, we can also enable it
on arm64 currently like the posix socket. And later we can find
the optimal pipe size that won't cause a degradation for large
payloads.
           randwrite  randread
512 byte     61%       97%
4096 byte    84%       16%
16384 byte   -13%     -17%

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ib4df60751c5e06ef9bd7fc7bb7efafa5ad4de211
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3329
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-31 08:23:36 +00:00
Jacek Kalwas
92f29271d5 nvmf: add aqa property rsvd bits validation
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I824544f8b8faa040a5e0a6802c8ff611d3cb3b86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3249
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-31 08:23:30 +00:00
Jacek Kalwas
e5bf2a1966 nvmf: fix aqa property validation
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4de16c80fda5a39cfcdb15badb0d37acd1a5a21c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3102
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: Jim Harris <james.r.harris@intel.com>
2020-07-31 08:23:30 +00:00
GangCao
51e8c2362b RPC: update the error message for current RPC state
This is to fix below issue:
https://github.com/spdk/spdk/issues/1516

Change-Id: Ibd7b4692b3d94fb7131aa0763d7fb7f6298d4101
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3565
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-31 08:21:37 +00:00
Tomasz Zawadzki
f6fcba38e8 test/nvmf: only disable test cases in top-level script
Some of the tests are skipped when using Soft-RoCE.
Test executed as part of run_test should never
skip a test, as it results in false assumption
that it was executed. See supplemental logs in CI output.

Before this patch bdevperf and srq_overwhelm (if executed),
resulted in misreporting this.

This patch moves all check for Soft-RoCE to top-level
nvmf test script.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6d8941bbadaca2dbf8ab178e30e87d3786fea94c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3597
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-07-31 08:21:23 +00:00
Tomasz Zawadzki
31d2240873 test/nvmf: only check for rxe when testing RDMA
Using Soft-RoCE is only relevant when testing
RDMA transport. For all other cases, we might
treat the IP address as non-rxe.

This simplifies the checks a little bit in couple places.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I996afb364070fbe107bbe97207952f99e4089308
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3596
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-07-31 08:21:23 +00:00
Seth Howell
79aac78398 test/nvmf: don't use Soft-RoCE in Shutdown tests.
Soft-RoCE sometimes returns non-spec compliant values
in the WC entries after the qpair has been disconnected.
This can result in segmentation faults. In order to avoid
this, don't test shutdown on Soft-RoCE.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I604ffaf38aa8da5efa349df0b1b51e7e391d17f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3582
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-31 08:21:23 +00:00
Jim Harris
144068a962 doc: fix raid_level parameter for bdev_raid_create RPC
This parameter is now a string, not an integer.

Fixes issue #1518.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3581
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-31 08:21:16 +00:00
Changpeng Liu
da60639f86 rocksdb: call spdk_app_stop before exit the process
For some other reason when the host didn't have a block
device e.g: "Nvme0n1", we will call exit(1) directly in
the process, the ASAN will report memory leak issue, so
before exiting the process, we call spdk_app_stop to
do the cleanup.

Fix issue #1422.

Change-Id: I7b7a05807625586bd5b97dc31f41e2b86e1b323f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3586
Community-CI: Mellanox Build Bot
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-31 08:21:10 +00:00
Alexey Marchuk
6967fec6df nvmf/rdma: Submit recv to SRQ when AER is released
Currently we don't resubmit receive request associated with AER
request to SRQ. This leads to reducing of SRQ elements and may
lead to non responsive NVMF target.

Fixes #1507

Change-Id: Ie96f8c4be0202ae973e561ebe5ea28688a6a3b72
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3558
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 18:20:30 +00:00
Vitaliy Mysak
8e5d5b8ff6 doc: add bdevperf doc section
Describe bdevperf tool usage and its config file.

Change-Id: I3648e9fcf6eb9e332dadda0d73f52740a19d5ad8
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3602
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-07-30 18:19:10 +00:00
Jin Yu
7ef6d8dd63 virtio: fix scsi double free issue
During virtio_pci_dev_probe, if enum_cb fails, hw needs
to be released. But in bdev_virtio, if vdev fails after
initialization, it will enter the bdev destruction process
which call the modern_destruct_dev function and hw will
be released during the process. So we will encounter the
problem of hw being released twice.

Change-Id: I1e8116283cfd810dfb050f8928f4ecd4bb2d815b
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3566
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-30 08:43:23 +00:00
Jin Yu
79c7744efb virtio: fix virtio hw double free issue
During virtio_pci_dev_probe, if enum_cb fails, hw needs
to be released. But in bdev_virtio, if vdev fails after
initialization, it will enter the bdev destruction process
which call the modern_destruct_dev function and hw will
be released during the process. So we will encounter the
problem of hw being released twice.

Change-Id: Ifba35284c072355ba0e10428b597a1894d32d59e
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3564
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-30 08:43:23 +00:00
Seth Howell
ebba5a0c58 make: add rpath to the shared library build option.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9f39ef73dcd9eaed7e5ca9431ab33aa139d9d268
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-30 08:43:14 +00:00
Ben Walker
a9be2ce64a env: Rename pci_device_rte_hotremove to pci_device_rte_dev_event
Give this a more generic name. We're going to be using these
events for more than just hotremove coming up.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia5356e9ab809807ba4d85ecc212a496e96012bce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3559
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-07-30 08:43:06 +00:00
yidong0635
0d73f143b8 lib/iscsi: Put bits NAND or OR together.
We can OR some of the bits ,and setting them one time.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie919ef66f3b8deea125df47d2194130b364c302a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3489
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-30 08:43:00 +00:00
Tomasz Zawadzki
1350922d09 bdev/ocf: take additional reference for ocf_cache
Fixes #1498

When shutting down the application, it was possible to
reference stale ocf_cache pointer. This was the case
when two or more vbdev_ocf devices were based on top
of single cache bdev.

This issue did not occur outside of the shutdown case,
since RPC only allows deletion of the vbdev_ocf.
This erases on disk metadata and next run of the application,
would not detect such vbdev_ocf.

Shutdown meanwhile works different, by first stopping
the instance of running "ocf_mngt_cache" and later detaching
"core" devices (the ones being cached). This prevented
erasing the on disk metadata and allowed for restarted
application to detect vbdev_ocf.
See patch (1292ef2) for details.

Since references to ocf_cache are copied between vbdev_ocf
[see start_cache()], the reference count inside ocf_cache
was limited to original ocf_mngt_cache_start() and
management queue creation. First call into ocf_mngt_cache_stop()
released all references to ocf_cache. Leaving other
vbdev_ocfs pointing to released memory.

This patch works around this issue by increasing ref cnt
on ocf_cache for each vbdev based on top of it.
It allows to call into ocf_mngt_cache_stop(), but not
release the memory for ocf_cache until last vbdev.

Note:
A proper redesign here is in order:
- either rearranging structures to be based around single ocf_cache,
rather than multiple vbdev_ocf instances
- better use of OCF API to reduce book keeping logic in vbdev

There are plans to implement detach/attach in RPC,
so it should be a focus during that effort.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I560a7fbb1c052bf53970e655bdb60803c561a252
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3574
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 04:02:08 +00:00
Tomasz Zawadzki
868ba17780 bdev/ocf: simplify check for running cache instance
There are additional conditions which SPDK tracks,
that are known before issuing call to OCF.

Two main ones are:
- if vbdev->ocf_cache was not yet created [start_cache()]
- if the cache bdev was opened [attach_base()]

Both happen for the first cache bdev once. Then for
consecutive vbdev_ocf on same cache bdev, reference
will be copied.

This call will simplify checking both conditions.
Calling into OCF with NULL or stale ocf_cache pointer,
rightly so will cause issues with ASAN.

Related #1498

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib202c15bda4cbbffa1516c69168e8bfb80370047
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3573
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 04:02:08 +00:00
Ben Walker
e12a4f6ec8 Revert "thread: add spdk_env_get_primary_core"
This reverts commit 6194cb2e15.

It's unclear whether we need to add a new API for the env layer
for upcoming work. Nothing currently uses it. When we have a clear
need, we can add this back in.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I174276799d650a1365b37a737271a54a796cd455
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3561
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-07-29 14:58:44 +00:00
Maciej Wawryk
35599b776f pkgdep/git: Fix QAT permision error during install
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I813d48674885c78369ec6a7d17c4e147e10f0c0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3530
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-29 14:58:19 +00:00
Ziye Yang
d2a194c4f0 nvme/perf: Do not use IORING_SETUP_IOPOLL
This flag only works for local device. If the device from the kernel
is getting from remote (e.g., /dev/nvme2n1 is from NVMe-oF target),
then it will not work for those kernel devices while using
IORING_SETUP_IOPOLL flag.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide396de9f53b884c4d12af64693293d57fac9523
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3531
Community-CI: Mellanox Build Bot
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-07-29 08:06:11 +00:00
Jin Yu
b45f293d57 vhost-blk: add resize bdev support
This will allow us to resize the backend bdev of vhost-blk
and notify the guest OS that the capactiy of virtio-blk
disk has been resized.

The spdk api entry is `spdk_bdev_notify_blockcnt_change`.
Any bdev if used as vhost-blk backend may need to implement
a rpc that calls this function.

Related DPDK patch has been merged and release in 20.02.
https://www.mail-archive.com/dev@dpdk.org/msg153365.html

Change-Id: I961c61de0fc03e210d776035a40f3a4adfa9b4f3
Signed-off-by: Li Feng <fengli@smartx.com>
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1468
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
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-07-29 08:05:31 +00:00
Seth Howell
0b1799cd98 nvme/transport: addd assert for transport.
Silences a KW error.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifd8d6088a22de7c230d48751be2b3991d0649778
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3553
Community-CI: Mellanox Build Bot
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-07-29 07:37:26 +00:00
Seth Howell
7177e94973 changelog: update with new 20.07 features.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If0db6036203f95efcf2e4e1776e6f6fc9a68d6bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3540
Community-CI: Mellanox Build Bot
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-07-29 07:37:00 +00:00
Maciej Wawryk
817d077a10 scripts/pkgdep: Add liburing to install_all_dependencies function
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I84cbd8c7a5563b704349c95df0c83513dcf91c45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3541
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-29 07:36:50 +00:00
Ziye Yang
27ee283487 pkg dependency: Add the libaio package install.
Some images (especially cloud/containers) may do not
contain this package in default. So we need to add this package
install support.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I2620026534009e8b6c320ecf61b8970947d5a9fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3218
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-28 09:03:52 +00:00
Seth Howell
91bca45725 changelog: alphabetize and consolidate 20.07 section
In preparation for the upcoming release.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8f118289612365a8d2be7baecb20450ae31068c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3539
Community-CI: Mellanox Build Bot
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-07-28 09:03:41 +00:00
paul luse
8d059e7a18 accel: add API to cancel a batch sequence
Added to the framework as well as all 3 engines.  Needed by apps
in the event that they have to fail following the creation of a
batch, allows them to tell the framework to forget about the batch
as they have no intent to send it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id94754ab1350e5a969a5fd2306bd59c38f0a0120
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3389
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-07-27 22:43:40 +00:00
Jim Harris
751e2812bc nvme: do not abort reqs in multi-process cleanup path
When a process cleans up IO qpairs from another crashed
process in a multi-process environment, we must not try to
abort reqs for that IO qpair.  Any reqs will contain callbacks
for the crashed process which we must not try to execute in
a different process.

Fixes issue #1509.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3536
Community-CI: Mellanox Build Bot
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-07-27 22:42:07 +00:00
paul luse
62b3b171cb module/compress: add new parm to RPC for create compress vol
To specify the desired logical block size. Must be 4K or 512.
If no block size is provided a default of 0 means to use the
underlying bdev block size. For cases where something other
than 4K or 512 is desired, format the underlying device
accordingly and don't specify a logical block size on creation
of the compress vol.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I58b71e210cfa77b3237c0c454585c734e2e22aea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3177
Reviewed-by: Ben Walker <benjamin.walker@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-07-27 22:39:29 +00:00
Anil Veerabhadrappa
03fe6a77c8 nvmf/fc/ut: Add missing function stub
Fix the compilation error by adding spdk_nvmf_request_complete()
  function stub.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I564cdb16238d5c45c50895b8b2a512096789ba38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3523
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>
2020-07-27 20:45:21 +00:00
Alexey Marchuk
3d1d4fcf54 nvmf/rdma: Send ibv async event to the correct thread
Since rqpair->qpair.group is set to NULL when we remove the
qpair from poll group, we fail to send event to qpair's thread.
This patch adds a pointer to io_chaneel to spdk_nvmf_rdma_qpair
structure and a function to handle poll_group_remove transport
operation. In this function we get io_channel from nvmf_tgt,
this channel will be used to get a thread for sending
async event notification. This also guarantees that the thread
will be alive while we are destroying qpair.

Change-Id: I1222be9f9004304ba0a90edf6d56d316d014efda
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3475
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-27 17:19:44 +00:00
Maciej Wawryk
8991773390 test/bdevperf: test config file
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6a92345e1c3fae1f7f8b77bc68e0f715e7ac9ed9
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3291
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-27 17:10:31 +00:00
Darek Stojaczyk
6b41a08654 dpdkbuild: build dpdk with meson+ninja
Makefile support in DPDK was deprecated and will be removed soon,
so switch to the officially supported way of building DPDK -
with meson and ninja. Two new tools. Basically, our Makefiles
will invoke meson+ninja for DPDK, no other SPDK components are
affected.

Apparently DPDK wanted to move away from an octopus-like config
system and the ideology behind meson configuration is simple now:
build everything by default. Some PMDs can be explicitly disabled
with meson command line, but all libraries (both static and shared
versions) and test apps are built unconditionally.

How long does it take to build minimal DPDK with meson? Too much.
On my machine half of the total build time is spent on libraries
we don't need at all. (I have some hacks up my sleeve to disable
building those libraries - see the subsequent patch.) As for the
official way of building a minimal DPDK, there was a patch [1]
on dpdk mailing list to introduce more specific configuration,
but it was rejected:

> We talked about this a few times in the past, and it was actually one
> of the design goals to _avoid_ replicating the octopus-like config
> system of the makefiles. That's because it makes the test matrix
> insanely complicated, not to mention the harm to user friendliness,
> among other things.
>
> If someone doesn't want to use a PMD, they can just avoid installing it
> - it's simple enough.
>
> Sorry, but from me it's a very strong NACK.

Let's not follow that direction, hack the DPDK build system instead.

As for advantages of meson+ninja over Makefiles? I can't find any.
It's another build system that does a lot for you with some functions,
magic options, and a built-in dependency system. It seems nice if you know
the syntax, but it's another component that you need to learn, debug,
and possibly find bugs in (there's a lot of github issues open for meson).
I would compare it to CMake.

As for changes in this patch: rather that explicitly disabling
PMDs we don't need, specify a list of PMDs we do need and disable
everything else found in ./dpdk/drivers/*. This way we won't have
to disable the new PMDs as they're added to DPDK.

Meson configuration also sets RTE_EAL_PMD_PATH #define to a valid directory
with built PMD shared libs. When it's set, DPDK dynamically loads all shared
libraries inside. The drivers there depend on DPDK shared libs and fail to
load in static SPDK builds, so we disable them altogether by unsetting
RTE_EAL_PMD_PATH in the meson-generated config file - just like
DPDK Makefiles did. EAL checks for RTE_EAL_PMD_PATH being empty and skips
loading any external PMDs then. We do it for both static and shared libs.
We specify all PMDs at build time for now, so there's just no need to load
them dynamically.

We have three more hacks in our submodule:
 * disable building dpdk apps by commenting-out a line in dpdk/meson.build
 * disable building unnecessary libs (build everything that spdk *may*
   need)
 * build isa-l compress pmd with `-L[...] -lisal`. DPDK expects to find
   libisal with pkg-config. We don't want to prepare a pkg-config file,
   so comment-out a failing check in another meson.build file and provide
   isa-l through CFLAGS and LDFLAGS.

We also need to make some changes to our test/external_code. First of
all, -ldpdk is no more. Meson build generates a pkg-config file with all
libs, but we'll switch to it in a separate patch - for now just specify
all -lrte_ libs one by one. -Wl,--no-as-needed has to be added to some
test cases, otherwise rte_mempool_ring isn't loaded. We don't use any
APIs from this library, it only has a static constructor that provides
a few callbacks used by rte_mempool_create(). Also, since DPDK now builds
both static and shared libraries, we need to add -Wl,-Bstatic to force
using static libswhere required. It's only needed for DPDK libs, but we
use it for SPDK libs as well since there's no harm.

As for performance:
$ ./configure --enable-debug --with-crypto --with-reduce
$ time make -j40 -C dpdkbuild all
with meson:
real    0m8.287s
user    1m7.983s
sys     0m10.548s

before, with the old DPDK makefiles:
real    0m20.232s
user    0m55.921s
sys     0m16.491s

The subsequent builds are much faster too:
$ time make -j40 -C dpdkbuild all
meson:
real    0m0.876s
user    0m0.663s
sys     0m0.217s

makefiles:
real    0m10.150s
user    0m11.740s
sys     0m6.772s

[1] http://inbox.dpdk.org/dev/1a07d1cd59d84dce84e56c10fdabf5e5504560a6.camel@debian.org/

Change-Id: Ic65db563014100bafb12e61ee0530cc2ae64401d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1440
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>
2020-07-24 22:06:11 +00:00
Tomasz Zawadzki
c8c899f492 dpdk: update submodule to DPDK 20.05
With update to DPDK 20.05 EAL requires rte_telemetry,
external make tests were missing specifying this lib.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9f5eaea46b47da48fc81b4fff0199cd75ff6af78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3483
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 22:06:11 +00:00
Tomasz Zawadzki
bc803d6bcc autobuild: disable scan-build on DPDK
There is no need to perform scan-build on DPDK,
as changes there are outside of SPDK repository.

This prepares for next change in series that
updates submodule to DPDK 20.05, with it own set
of failures to address.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iedb143c81339f0d33fec9a5cb58b48e2651b0a4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3522
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>
2020-07-24 22:06:11 +00:00
Tomasz Zawadzki
e63845a6df ocf/test: disable persistent metadata test
related #1498

Updating DPDK 20.05 exposes issue listed in #1498.

Most likely the device removal path has to be re-worked
to accomodate multiple devices on the same cache instance.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I28f71ef2c2e1d9c2d19202cd33a932182bfb122c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3521
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 22:06:11 +00:00
Darek Stojaczyk
cdffd22581 env_dpdk: move NVMe PCI driver definition to the nvme lib
Now that drivers can be registered from upper layers there's
no need to keep them centralized inside env.

(check_format.sh complains that spdk_pci_nvme_get_driver() shouldn't
start with the spdk_ prefix - to workaround that we move the function
declaration from one place in env.h to another - that's enough to
convince check_format it really is a public function)

Change-Id: If86aebd6c997349569c71430ec815b413eb44ef8
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3187
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: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
f425f16385 env: add spdk_pci_driver_register() to the public API
This allows SPDK apps to register new PCI drivers outside of
the env layer, enabling SPDK as a whole with new use cases.

Change-Id: I0c998a9ec249c3ca610b7b3b8b6caf616b16f64c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3185
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
3498c0a886 env: add spdk_pci_get_driver()
An alternative to spdk_pci_*_get_driver();

Change-Id: I20a80b3c655a37fb1c76da21c2b70d5678041fab
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3186
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: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
e6decf684a env_dpdk: add DPDK-independent driver information to spdk_pci_driver
We want to make struct spdk_pci_driver public, so add env-agnostic
fields that define a driver directly to that struct.
PCI driver registration (potentially in upper layers) will only use
spdk_pci_id-s and spdk pci drv_flags, then those will be translated
to DPDK equivalents inside env_dpdk.

Change-Id: Ia24ecfc99ebf0f54f096eaf27bca5ed9c0dfe01d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3183
Reviewed-by: Ben Walker <benjamin.walker@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-07-24 21:42:26 +00:00
paul luse
acee02acc9 module/accel/ioat: fix bug with preparing a fill command for batch
The accel_fw API taks a uint8_t for fill pattern, the ioat build
command expects a full 64.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I55b33706a9e48fe7efd57a06816e11fdd8b7fa4c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3322
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
0cecfcb19b examples/accel/perf: replace mempool of tasks with lists of tasks
For performance.  Also allocate the accurate number of tasks instead
of just blindly doubling to account for batching.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4e5accfd97477f908368f16d3fc1d8f47896a4d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3321
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
f7d25cf7c7 lib/accel: remove dead code
Not needed with new scheme around accel_task in prior patches.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic6f16654db62fe1dc51b0822f0ff92261da4494c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3212
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
e8463f873f examples/accel_perf: updates to match the new accel_fw API
No longer allocate accel_tasks or convert to and from application
tasks and accel tasks.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id2d598d79bebcef522c76c125e65b100266ced57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3210
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-07-24 19:38:46 +00:00
paul luse
ee7e31f9ae lib/accel: remove the need for the app to allocate an accel_task
This was sort of a clunky interface requiring a couple of inline
functions in every app that wants to use the accel_fw moving
forward. By having the accel_fw public API accept a callback arg
instead of an accel_task combined with adding a pool of accel_tasks
in the accel_fw engine we can eliminate this.

After changing the parm to a cb_arg, changes were made to all accel_fw
interfaces to put cb_fn and cb_arg as the last parms in public and
private function calls.

Related bdev_malloc changes need to be in this patch in order to pass CI.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2b75764e534562d91484a094c3352266156d8425
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3209
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-07-24 19:38:46 +00:00
Vitaliy Mysak
6e1528503a bdevperf: config file: threat -T as filename parameter
This will allow to override job config filename from CLI.

Note that -T is required when using job config that has
missing filenames, but then it is optional if job config is not used.

Change-Id: I7d392ff2d0554524cfcb5072182ec806013083de
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
74c1028c80 bdevperf: config file: handle 'rw' argument
Some global argument and some code from verify_test_params()
could be removed.

Change-Id: I923f5f23fafd31ff48049bd16476f01c801bfbb8
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3278
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
fb5c98cecd bdevperf: config file: support multiple bdevs per job
Change-Id: I2aab753eb092378fe61cba9e4ef54070248c4c25
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3252
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
13a0ac2e20 bdevperf: config file: simplify old constructors
Instead of calling bdevperf_construct_job() directly,
create a job_config instance that would express
the same semantics and then use
bdevperf_construct_config_jobs() to create and run actual jobs.
The goal is to unify methods and reduce code duplication.

Change-Id: I724e5788ea74868c9e9c8128d658e720d211f253
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3510
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
32b2d78a3c bdevperf: config file: handle 'offset' and 'length' parameters
This parameters allow for low cost refactoring
because with them we can simplify construct_multithread_jobs()
by creating instances of job_config during its invocation
and then handling those in construct_config_jobs().

Change-Id: I73057a9a65f58e48ac719f30e918d7a05ffc0f28
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3509
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
b18c845893 bdevperf: config file: initial parsing and handling
Implement parsing of config file,
including overall format of sections/parameters (using lib/conf)
as well as filename, bs, iodepth and cpumask parameters (based on FIO).
Also implement creating jobs based on config file.

The only required parameter that is missing is 'rw'.
It will be added in a separatate patch because it requires quite
different code than for other parameters.

Duplications that this patch introduces with respect to legacy
code are addressed in following patches.

Change-Id: Ie19e55dc66369e795a97b53a4223beafa10d8fe8
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 18:53:47 +00:00
Vitaliy Mysak
ceeb92900c bdevperf: change construct_job() signature
Accept job thread as argument
in bdevperf_construct_job().
This will allow for using single thread for
multiple jobs, as it is in FIO if multiple filenames are specified.

Change-Id: I0b6aa69aae1e1bf099170d3d495e0a83f97a857b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-24 18:53:47 +00:00
Karol Latecki
ed2a57a353 test/nvme_perf: add option for dpdk mem measurements
Allow to dump DPDK mem stats mid-test.

Change-Id: I5769bca9b3b10eb9a4114c29ae112d82066511aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3374
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>
2020-07-24 17:09:03 +00:00
Maciej Szwed
67901d4333 bdevperf: Add env_dpdk_rpc lib to bdevperf
env_dpdk_get_mem_stats RPC has been requested to be
available in bdevperf.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I10aea634851e21018b223d7331b1bbeb7630a09c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3520
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 17:09:03 +00:00
Seth Howell
c9bc86c061 lib/nvme: add checks for new states in reconnect_io_qpair.
This function hasn't kept up properly with the states that
we use for tracking the qpair lifecycle.

Add checks for NVME_QPAIR_DISCONNECTING and NVME_QPAIR_DESTROYING.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I51607d4f00e94937b08fca28e766163580d46461
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3359
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>
2020-07-24 15:43:07 +00:00
Karol Latecki
757eddeb59 test/vhost: add option for fio gtod_reduce
Enable gtod_reduce fio option on demand for
better IOPS/BW results at cost of reducing
latency measurements.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0511a5fdc09bb20b5a769ad55f2306b87e5d2dde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 15:41:46 +00:00
Karol Latecki
c3dc7fb5f2 test/vhost_perf: parse fio json results to csv
Parse fio output to CSV.
Calculate average read and write metrics while
parsing and present final results.

Change-Id: I8f6d7f84205be409f0ccbba7a42eb7888b2cb03d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3253
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-07-24 15:41:46 +00:00
Karol Latecki
782681e018 test/vhost: remove unnecessary lines from JSON result file
There is a lot of extra lines at top of the output file
in case fio is used in client-server mode and with json
output mode. These lines make it resulting JSON file
not possible to parse.
Remove this lines so that the JSON file is ready to
be used in any later parsing functions.

Change-Id: Ie575941310f0d17b0285969f6b247f2fa653168c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3237
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 15:41:46 +00:00
Maciej Wawryk
e90d35578a scripts/nvmf: Remove unnecessary function call
Function get_nvme_devices_count in kernel mode is
unnecessary called, this caused fails.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ie1c613f9a46707b9e4f821d03644a8b45bf52966
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3508
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 15:36:04 +00:00
Maciej Wawryk
bf601d5ae4 scripts/nvmf: Add Linux to grep nvme list
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1a0d11e14df481f62752da7dcf622e5eb38e26e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3499
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 15:36:04 +00:00
Maciej Wawryk
efd3f83d72 scripts/nvmf: move get_nvme_devices_count function
Getting number of nvme devices before check if this is
null_block test caused fails.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I55b0399561ddb11b2f6c36408a56c525e813d239
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3497
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 15:36:04 +00:00
Maciej Wawryk
cb94476cfc scripts/nvmf: Set minimal job_section_qd value
job_section_qd cannot be equal 0 because tests will fails.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I910ae8dbbe7e18bc79f8d69a8ae157162b3b861b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-24 15:36:04 +00:00
Xiaodong Liu
6194cb2e15 thread: add spdk_env_get_primary_core
Change-Id: I5b337477e41da7d424cccc48366ca6018b776ee2
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2448
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-24 15:25:57 +00:00
Xiaodong Liu
34ea308e12 test/event: add app_repeat test case
app_repeat is used to test calling spdk_app_start/stop
repeatedly.
* "-t <num>" is used to specify the maximum number of
repeated rounds.
*SIGUSR1 can be used to trigger a new round of
spdk_app_stop/start.
*Shutdown signals like SIGTERM can be used to shutdown
the application.

Change-Id: I10a205ea2e9da3b4ecd6381bf25b457ce909a621
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2447
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 15:25:57 +00:00
Xiaodong Liu
ef7c128a8a lib/event: enable repeated spdk_app_start/stop
With this patch, spdk_app_start/stop can be repeatedly
called by users based on their upper level application's
requirement.
Changes are:
* Add reinit ability inside spdk_env_init and related functions
* Clear g_shutdown_sig_received in spdk_app_setup_signal_handlers
* Clear malloc_disk_count in bdev_malloc_initialize

Change-Id: I2d7be52b0e4aac2cb6734cc1237ce72d33b6de0c
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2260
Community-CI: Mellanox Build Bot
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-07-24 15:25:57 +00:00
Xiaodong Liu
30ff304290 env_dpdk: set g_external_init in end of func
Set g_external_init to false when the function calling
is succeed in the end of function spdk_env_init.

Change-Id: I3fc4b4c87b11ca34354efafdd9644c077309c638
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3455
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 15:25:57 +00:00
Changpeng Liu
29bbb9ba9c bdev/aio: use detected block size as AIO block device data alignment
Currently we provide a warning to users that the specified block
size doen not match auto-detected for AIO device, e.g.: the AIO
device uses 512B as the block size while users input 4096B when
creating SPDK AIO block device.  However, the data alignment
required by kernel AIO device can use the auto-detected one,
we are over-committed for the alignment requirement, so here
just use the auto-detected block size.

Fix issue #1478.

Change-Id: Ia5d02bb66980cbe55ea7039488189d409315552e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-24 09:41:30 +00:00
Changpeng Liu
5d49baeb8e iscsi: use default MaxRecvDataSegmentLength for login response data length
Change-Id: I57205143fc29db96761791f2f6a20b4741875d58
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3458
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 09:41:20 +00:00
Michal Berger
e1287f7f59 scripts/vagrant: Use custom rsync cmdline
By default, vagrant executes rsync with --copy-links argument which
instead of copying the actual symlink is actually copying the file
given link points to. Since symlinks are part of the spdk repo,
they need to be synced "as is" - when symlinks are replaced with
actual regular files, git will report that as a typechange, messing
up status checks that our tests perform.

Change-Id: I72814547c3e876ab2adbc779159ca991f18cbe86
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-07-24 09:41:08 +00:00
Karol Latecki
f4e27ffa14 test/nvme_perf: add option to enable gtod_reduce
Optionally enable gtod_reduce for fio workload.
Results in greatly decreased latency metrics, but
improved IOPS/BW.

Change-Id: Ibe70d8e9a13a18a31e55b60b5cec7b353e2862c3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3379
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
0e897f08a6 test/nvme_perf: add option to set cpu frequency
If intel_pstate is disabled in boot options, allow to
change CPU frequency using "userspace" cpu governor.

Change-Id: I390492c7be28df408f3cbb774ba5360859649fe0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3376
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
88b991768d test/nvme_perf: add option for perftop measurements
Enable perf record during tests and create a report
file afterwards.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If6951ad7425d8c1d4d2935c8af9f40245c1adbf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3371
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
6330ee8fb5 test/nvme_perf: unify fio job section for kernel and spdk
For some reason the routine for generating fio
job/filename sections was different for kernel and
spdk fio modes. This made fio results hard to compare
because even configuration files themselves were not
comparable.
The function was modified to create the same fio
configuration files for kernel and spdk.

While at it, iodepth calculation has been slightly
modified as well. It is now being calculated for each
[ ] job section, so that each "filename" gets the
actual iodepth value specified in test run parameters.

While generating the config file the script will add
NUMA node information as a comment for "cpus_allowed"
and "filename" sections, so that it's clearly visible
how resources are aligned. In case of cross numa
configuration additional warnings will be printed to
screen as well.

For example, a configuration file for running test with
7 NVMe drives, 3 CPUs and effective (per filename) queue
depth of 32 would look like this:

run_perf.sh --cpu-allowed=0,1,2 --iodepth=32
  --driver=kernel-classic-polling [...other params...]
--------
[filename0]
iodepth=96
cpus_allowed=0 #CPU NUMA Node X
filename=/dev/nvme0n1 #NVMe NUMA Node X
filename=/dev/nvme1n1 #NVMe NUMA Node X
filename=/dev/nvme2n1 #NVMe NUMA Node X

[filename1]
iodepth=64
cpus_allowed=1 #CPU NUMA Node X
filename=/dev/nvme3n1 #NVMe NUMA Node X
filename=/dev/nvme4n1 #NVMe NUMA Node X

[filename2]
iodepth=64
cpus_allowed=2 #CPU NUMA Node X
filename=/dev/nvme5n1 #NVMe NUMA Node X
filename=/dev/nvme6n1 #NVMe NUMA Node X
--------

Change-Id: Ida2f781fbb93c4a8c62154e711151152843ab997
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3370
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
b9150897d9 test/nvme_perf: move fio config generation into one place
Configuration file generation was split into multiple
places/functions in scripts. Move it into a single
function. "time_based" fio parameter has been moved to
fio config template file as it is not configurable.
There is still a lot of room for improvement here, because
create_fio_config() function uses mixed local variables
(as function arguments) and global variables.

Change-Id: Ica3717d0d28692d24c861c2d32e729761c5c8647
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3345
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 09:40:49 +00:00
Darek Stojaczyk
d3e1aa05db dpdkbuild: add support for DPDK 20.05
EAL got a new dependency in 20.05: rte_telemetry.

Change-Id: I43df7afe9a84e88f034a7f87fc6a299f0bbd8bac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2590
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-24 09:40:37 +00:00
Maciej Szwed
70452aa911 spdk_dd: Assign app name
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1a107e7768007b6ae539914266ec2ffc5e69cfe4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:00 +00:00
Maciej Szwed
3ac86eef4c spdk_dd: Code refactoring
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I6507843c930263fc5099945fc9286df5e731550f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3481
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-24 09:40:00 +00:00
Michal Berger
a70c87ad8a test/dd: Rerun POSIX tests with AIO
In case spdk_dd was compiled with liburing support, rerun the tests
with forced AIO.

Change-Id: I26bee51b2671c19189a2678f48aef4809b7b1621
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:00 +00:00
Maciej Szwed
6bb13965a5 spdk_dd: Add app parameter to force AIO usage
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I6ac4dfcd7c17b4e3c23830b642a0534e3541af6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3474
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-24 09:40:00 +00:00
Maciej Szwed
0b280d5887 spdk_dd: Add io_uring support
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I285cb9d1c42f9e5e33a49a46fc44caa32576b0cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3271
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-24 09:40:00 +00:00
Maciej Szwed
c68c8a0c30 spdk_dd: Small code refactoring
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I70fbbde597ed5c155002a805867bf49b36185042
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3445
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:00 +00:00
Michal Berger
ef5e01fa48 test/dd: Add function checking if spdk_dd links to liburing
Change-Id: I0b475682152c506f72b8a284285ec0292e3658cc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3328
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:00 +00:00
Michal Berger
f6a0f36c2e test/dd: Add simple test for copying data between two bdevs
Change-Id: I43cb41a033aa5be669f73f7bcd8d8b645e078abc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3125
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 09:40:00 +00:00
Michael Haeuptle
62649a7d7b lib/nvmf: Support custom admin cmd handler for abort
The new abort functionality doesn't take custom admin cmd
handlers into account.
This commit allows setting a custom admin cmd handler
for abort that provides the ability to influence the
bdev lookup to which the abort is sent to.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I3a66c6f863f5ee4d89cb2194dffdc6855945fa8a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3485
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-07-24 07:25:47 +00:00
Shuhei Matsumoto
e2b236ed50 lib/ioat: Update the major SO version for libspdk_ioat.so
ABI dependency check tool complained the following:

00:06:10.012  ************************************
00:06:10.012  START TEST confirm_abi_deps
00:06:10.012  ************************************
00:06:11.559  No corresponding object for libspdk_bdev_uring.so in canonical directory. Skipping.
00:06:12.237  No corresponding object for libspdk_event_sock.so in canonical directory. Skipping.
00:06:12.485  Please update the major SO version for libspdk_ioat.so. A header accesible type has been modified since last release.
00:06:15.388  No corresponding object for libspdk_rdma.so in canonical directory. Skipping.
00:06:15.663  No corresponding object for libspdk_sock_uring.so in canonical directory. Skipping.
00:06:15.954  Processed 55 objects.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2a6cc91ac56ed693ae0676cf64e01ed3ff620ffc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3511
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 07:25:47 +00:00
Evgeniy Kochetov
29f31a90e1 sock: Add sock_impl option to disable zero copy on send
Zero copy send can cause performance degradation with small
payloads. This patch adds an option to disable it if required. By
default zero copy is enabled.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I14f2b21ad375e770cb08f850360898bac675b351
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3344
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-07-24 00:30:45 +00:00
Evgeniy Kochetov
63c5e51ebc sock: Add sock_impl option to disable receive pipe
Receive pipe reduces number of system calls and gives significant
performance improvement with kernel TCP stack and relatively small IO
sizes. With user space TCP/IP implementations there are no system
calls and double buffering introduced by pipe has negative impact on
performance. Receive pipe remains enabled by default.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ic5ddee42293df2c233ba7ffbe6662de7917ac586
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3343
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-07-24 00:30:45 +00:00
Evgeniy Kochetov
59b5ba5ca9 sock/posix: Add helper macros to get/set fields in sock_impl_opts structure
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2fe650556edf22e253976dcd4ddf07d649789d11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3498
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>
2020-07-24 00:30:45 +00:00
Shuhei Matsumoto
81437ff6ce lib/nvmf: Remove req_to_abort parameter from nvmf_ctrlr_abort_request()
struct spdk_nvmf_request holds req_to_abort and so passing req_to_abort
separately is not really necessary now. The internal API
nvmf_ctrlr_abort_request() was added at the stage of prototyping.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9ef2467d6f92422f044650c62a0777b95c0fc1ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3488
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 00:22:24 +00:00
Shuhei Matsumoto
45a2d80429 CHANGELOG: Update about I/O abort feature
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic0b4c704eb6dfee32131a6bc79836f92520fc593
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3471
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-24 00:22:24 +00:00
paul luse
e9b3a0e1b5 doc/accel_fw: Add accel_fw docs and patch series changelog
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3be6c75917b7a5a29a87bc0652a7c1c02af61446
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2872
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>
Community-CI: Mellanox Build Bot
2020-07-23 22:26:39 +00:00
paul luse
f295f5b31a module/accel/ioat: add support for batching IOAT accelerated ops
Also remove the batching check in accel_perf as all 3 engines
now support it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib4cf4b148b50df50a4fc7be9e861cc83f355623a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3155
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>
2020-07-23 22:26:39 +00:00
paul luse
be34c31e16 module/accel/ioat: add batching suport for sw operations
This patch has the basic infrastructure to support the accel
framework batching API but only for commands not HW accelerated
by IOAT, that will come in the next patch...

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6168831ac5698a9e58a81ef35ce919d75a72d0f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3153
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>
Community-CI: Mellanox Build Bot
2020-07-23 22:26:39 +00:00
paul luse
6a9e923da2 lib/ioat: add mew API to get the max # of descriptors supported
Needed by follow-on patches to aupport accel_fw batching in IOAT
module.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie39718f42756c10af131ff7893874d19ea390ecc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3154
Community-CI: Mellanox Build Bot
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-07-23 22:26:39 +00:00
Darek Stojaczyk
3759b87082 env_dpdk/pci: remove driver->is_registered
Now that we support only DPDK 18.11+ and always have
to register pci drivers to DPDK on initialization we
don't need that flag - it's always true.

Change-Id: Ibf1d79155595609fe9093f58e056bea25db6fdb2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3446
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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-07-23 20:48:47 +00:00
Darek Stojaczyk
45528bfef6 env: add spdk_pci_id->class_id
This follows struct rte_pci_id which had class_id as well.
We'll need it to make some additional DPDK APIs public through
the env abstraction.

Change-Id: I794a6cd6b17e48daf53b48fa5abe3d3dcfeaa403
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3182
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
e8e46cb615 env_dpdk/pci: remove device detach callback
You don't get notified when someone starts using your hooked
device, so there's not much gain from knowing when someone
stops.

Remove that callback and also move DPDK device detach under
the same lock which sets the pending_removal flag. This eliminates
a data race window when hotremove notification could arrive
after device was detached, but before it was scheduled to be
removed.

vmd and ioat nest the spdk_pci_device struct and abigail complains
even though the parent structs only have forward declarations in
public headers. Adding those two structs to the suppression list
doesn't help though. Abidiff still complains about the pci device
struct being changed, probably because ioat.h and vmd.h both include
env.h. Abidiff suppresion list should eventually be split per-lib,
but for now ignore struct spdk_pci_device changes globally.

$ abidiff [...]/libspdk_ioat.so [...]

'struct spdk_pci_device at env.h:652:1' changed:
  type size changed from 1024 to 960 (in bits)
  1 data member deletion:
    <SNIP>

Change-Id: I9b113572c661f0e0786b6d625e16dc07fe77e778
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2939
Community-CI: Mellanox Build Bot
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-07-23 20:48:47 +00:00
Darek Stojaczyk
814072fa4e env_dpdk/pci: delay device initialization on hotplug
A workaround for kernel deadlocks surfaced in #1275.

DPDK basically offers two APIs for hotplugging all PCI devices:
rte_bus_scan() and rte_bus_probe(). Scan iterates through
/sys/bus/pci/devices/* and creates corresponding rte_pci_device-s,
then rte_bus_probe() tries to initialize each device with the
supporting driver.

Previously we did scan and probe together, one after another, now
we'll have an intermediate step. After scanning the bus, we'll
iterate through all rte_pci_device-s and temporarily blacklist any
newly detected devices. We'll use devargs->data field to a store
a timeout value (integer) after which the device can be un-blacklisted
and initialized. devargs->data is documented in DPDK as "Device
string storage" and it's a char*, but it's not referenced anywhere
in DPDK. rte_bus_probe() respects the blacklist and doesn't do
absolutely anything with blacklisted ones.

The timeout value is 2 seconds, which should be plenty enough
for an NVMe device to reset, leave the critical lock sections in
kernel, and let us initialize it safely.

Note that direct attach by BDF doesn't respect the blacklist,
so an NVMe attach RPC won't be delayed in any way, it will continue
to work as it always did. Only the automatic discovery & enumeration
is deferred.

Change-Id: I62b719271bd0755bc2882331ea33f69897b1e5e5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1733
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
701d17f6d6 env_dpdk/pci: ignore rte_bus_scan() errors
Extensive testing showed it can fail:
> EAL: eal_parse_sysfs_value(): cannot open sysfs value
> /sys/bus/pci/devices/0000:02:00.0/vendor
> EAL: Scan for (pci) bus failed.

spdk_pci_enumerate() would previously return with error because
of this and e.g. the test nvme hotplug app could immediately exit
with failure. A mis-timed scan shouldn't cause this kind of failure,
so ignore it's return code. This shouldn't cause any issues.

Change-Id: I9253219c218981a747774a8632335963cfb0db53
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2941
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: <dongx.yi@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
3554970375 env_dpdk: drop DPDK 18.08 support
DPDK versions 17.11 to 18.08 reached EOL.

Change-Id: Icfec27b0099f53d6ab00ec3aed63e5d30d94ee4d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2940
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
64c4fafd32 nvme/pcie: dont initiate hotremoval on SIGBUS for VFIO devices
This is an attempt to workaround a kernel data race spotted in #1275.
We have to delay our VFIO interraction until after the kernel handles
the PCIe hotremoval. Otherwise we risk having a deadlock inside the
kernel. We could put a dummy delay in SPDK hotremove routine, but we
don't know exactly how long we have to wait, so wait for the VFIO
hotremove notification to arrive instead. From what I understand it
is always sent after the kerner already releases the critical locks.

This patch breaks hotremove for VFIO devices when running with
DPDK version < 18.05, but those reached EOL already and their support
is removed from SPDK later within this series.

It would be nice to wait for this VFIO notification inside lib/env_dpdk
e.g. inside the detach function, but we don't know there why the
detach is happening. It could be triggered by a user RPC, not physical
device hotremoval.

Change-Id: I2727de923bb2e3e05a83202465330a32a77d7cfc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1732
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-07-23 20:48:47 +00:00
Darek Stojaczyk
f280ce59b7 vmd: dont remove the hooked pci device on its detach
The hooked spdk_pci_device was being removed when someone
stopped using it (detached from it). The following didn't
work:

$ rpc.py bdev_nvme_attach_controller 10000:00:01.0
$ rpc.py bdev_nvme_detach_controller 10000:00:01.0
$ rpc.py bdev_nvme_attach_controller 10000:00:01.0

The second attach can't find PCI device 10000:00:01.0.
To fix it, simply don't do anything in VMD on device detach.
The entire callback will be removed soon. You don't get
notified when someone starts using your hooked device, so
there's not much gain from knowing when someone stops.

Change-Id: I147c24609077be24182ecfd2e273988a2e9e26b2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2938
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
7c6f0ef001 env_dpdk/pci: fix segfault on simultaneous VFIO hotremove and user detach
There was a chance we scheduled a device removal to the DPDK thread
while that thread was already removing the device from a VFIO hotremove
notification (on the DPDK interrupt thread). The second hotremove
attempt touches some freed memory and segfaults.

The VFIO hotremove notification already checks pending_removal flag
under a mutex and sets it to true, so do the same in spdk_detach_rte()
(called from the SPDK init thread).

Change-Id: Ib3f0eb7c0c5c6e1ab8cf253b7711fd149925a143
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1730
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
d3bcd1ca5b env_dpdk/pci: split dpdk device detach and removal
Simplify the code path a bit. VFIO notification is the only
place where detach callback is called from the dpdk intr thread.
Detach checks the current thread and behaves differently in this
case, but it could be the VFIO notification that simply calls
a different function.

So instead of carrying the VFIO notification through the generic
detach routine, carry it just through the DPDK-thread specific
subset. This lets us remove some ifs in the generic routine.

Change-Id: I5e8866e4643ef08fb3cd12621e2d262b5e827c74
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1731
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>
2020-07-23 20:48:47 +00:00
Darek Stojaczyk
b71ee92e3b Revert "pci: fix the hotplug issue"
This reverts commit 301c5aeec9.

The patch doesn't fix anything as the hotremoval could be still
called twice and the second call would do use-after-free.

Change-Id: I78a1120707dbdf36c871ec378a312c4a058fc76b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1729
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>
2020-07-23 20:48:47 +00:00
Alexey Marchuk
1415e38411 make/dpdk: Correct compiler type detection
This commit fixes compiler type detection to suppress
warnings specific for gcc 10.

Change-Id: I66264451792ff84a53001badc7c2f8a452d732af
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3472
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 08:24:49 +00:00
Maciej Wawryk
7dbaf54bf5 scripts/nvmf: Fixed python syntax error
Missing comma in nvmet_cfg caused this error.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I71864c8dc443e2bb73cd9f575eb6540e16bab40e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3470
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-23 07:29:01 +00:00
Karol Latecki
ddba021eea test/nvme_perf: move getopts to main script
There's no reason to keep usage and getopts
outside of the main script.
Other small changes while at it:
- use small letters for all "dir" variables
  (consistent with most of other test scripts)
- try to move default & global variables into
  one place.
- remove long comment from top of the main script.
  It was basically the same as "help" for getopts.

Change-Id: Ic99f4bb1808b55dea80b534f7b4e0a65595ed053
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3335
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
6cebf49243 test/nvme_perf: make fio log_avg_msec configurable
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I92c7af88713ff4aa9e4a7cdf347ca06a303e5a07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3334
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
30491c4675 test/nvme_perf: allow CPU list from file
Read CPU list to use in test directly from option
value of from a file if it's an existing path.
This will make running tests in CI a bit easier.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I174a38ab615c2f2cd2c3b4a95e0ebf886c478a51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3333
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
ae4c75b20d test/nvme_perf: add bdev io cache and pool size option
Allow to set custom size of bdev IO cache and pool
sizes.

Change-Id: I574d1e949f705d8f834539d5879f0a1e72865e00
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3297
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:28:53 +00:00
Seth Howell
f8cf17f58e test/fuzz: fix nvmf fuzzer for AERs.
Something changed about the way we support
AERs in the target. Now, the AER commands remain
queued in the target side causing the fuzzer to
think it is timed out.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8e892a11d9922e84cd7a09e6adc8b69b6db4e8d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3453
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: Karol Latecki <karol.latecki@intel.com>
Community-CI: Mellanox Build Bot
2020-07-23 07:25:28 +00:00
Seth Howell
7192849ed2 lib: add checks for return code of pthread_spin_init
This function can fail with -EAGAIN or -ENOMEM so we
should really check the return value.

Change-Id: I4a443351f3c85032f47e8af9e70b6b71ba3413f5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3240
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:25:21 +00:00
Michal Berger
8b155b6e3b test/dd: Add tests for POSIX flags
Change-Id: I9cfc3ef5012ac125c1afdb26fdcb2d7ff4041e88
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3103
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
55f1698f5f test/dd: Add basic tests for spdk_dd
Change-Id: I78df1a70bc16d4a3f8c11386c3c78a5f0ff12394
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2898
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
cc163dd47e test/common: Add spdk_dd to applications.sh
Change-Id: I08fa2b00ff06384c08b9d5a81ae038aee729209f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2897
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
bfaad6be04 test/common: Fix name of the logflag argument
Change-Id: I3b77027a46ba8d4e5f8733be21891f189a50c91f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2896
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Michal Berger
35babaded1 scripts/common: Use separate function for nvme driver lookup
Check if given pci address is bound to nvme driver via a separate
function - this makes the task of getting list of the nvme devices
that can be used in tests a bit easier since we don't have to relay
on, e.g., gen_nvme.sh where the extra step to get said devices is
to parse the actual config.

Change-Id: I1f15f08a3678c0c41b051348af259e225356c340
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3014
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
eb1f031c88 spdk_dd: Add posix flags support
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie051a399af6dea694faa942a412844c267500d2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3060
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
dcd2a253f1 spdk_dd: Exit gracefully on SIGINT
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I979dd7499a845867893acdb2620ce9f5147d4527
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2996
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
ef72cb11b3 spdk_dd: Create file automatically if it does not exist
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I358b8b3977fc15773c6d354d72b8a30d4327fe76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2965
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
3b3f2e5d0a spdk_dd: Add support for skip and seek flags
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If7878ab1968b791ded0b331ef1d6ce834e18dd79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2963
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
a78468a3f5 spdk_dd: Add copying speed and progress
Display copying speed and progress.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4440bbdbe08402c3a343bb039a635eeeffb0ffd5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
690b189a35 spdk_dd: Add copying functionality
Add basic functionality to copy data between
bdevs and files.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1ed028d304cc61200a81ba5fbbe475b9e12516f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2926
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Szwed
360398c303 spdk_dd: Initial patch for spdk_dd tool
spdk_dd is a tool for coping data to/from files
and SPDK bdevs efficiently.

This is initial patch preparing files, application
help output and arguments parser.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iee31df6f9f4ac1f64d96a30bb4c16fdf285df22e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2925
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-23 07:24:08 +00:00
Maciej Wawryk
03382cf795 scripts/vagrant: Add Fedora32
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibf0d4b51485ad0060afa7117236f1217354d7c0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3314
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 23:27:45 +00:00
paul luse
8cee297c3f lib/idxd: add batching support for compare command
Also one small bug fix w/compare in accel_perf as a result
of changes made in accel_perf sicne base compare was added.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id8e67bd9de9cbd006ac148f4a77807cc3e8e662b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2958
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
8d0334726f lib/idxd: factor out common code used in prep'ing batch commands
Create helper function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I264f0ed067e4657f21ee38d875235b3410d9d04b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2957
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
80da74964a lib/idxd: add support for batching crc32c requests
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I38e8b26272e86e84e579262496b367375976638d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2955
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
e54f14a52b lib/accel: add batch prep for crc32c to accel fw and sw engine
Also update accel_perf to support it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ida7b863de02c64239ec4cfbdc3b0235d4e0521f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2954
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
396b05a3e4 lib/idxd: add support for batching the fill command
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0996db55e78b7b74bf0a603ac0e9825a4d80d2e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2953
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
d207237fc4 lib/accel: add batch functionality for fill command
Also as a minor drive-by, added verify capability for fill that
wasn't there before, useful in making sure the prep function
was working and really should have been there anyway.

idxd support for prep fill will follow.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib54311c1fb98abd2fb61df6603cf3c5300b71161
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2952
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
a7dfca5b45 lib/accel: have the accel fw default to use sw at times
When an engine has not filled out an entry point for an accel_fw
function, call the sw implmentation that's built into the accel_fw
transparently.

Also update the accel_perf app to no longer block attempts to use
capabilities not reported as supported by the selected engine but
instead to print an informational message.

The exception is batch related commands as their implementation
is specific to the engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0b3971d075ced20182f97e95147e8887103e68cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2930
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>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
d137ba3033 examples/accel/perf: add support for batching compare cmd
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3e26ad0fe873ea3e6157cf4f0b8570929457d309
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2929
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-07-22 15:02:06 +00:00
paul luse
11c2e05fd8 lib/accel: add support for batching compare commands
Adds support for both the accel fw and the sw implementation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib8748f272a688a074ca475a86dea14179acc020d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2928
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-07-22 15:02:06 +00:00
paul luse
68a648ca90 lib/idxd: use more appropriate casting of ptr to int values
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8e5b65c43d073bc479be145c3355d1974ee04d04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2916
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-07-22 15:02:06 +00:00
Vitaliy Mysak
8f345eca22 bdevperf: move global options to job struct
This will allow us to specify per-job options
in upcoming bdevperf config file feature

Change-Id: I80b28856bcb16d393fbadf89d6238c824ee9b276
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3062
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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-07-22 12:24:08 +00:00
Vitaliy Mysak
800b18d028 lib/conf: allow multiple sections with same name
Add disable_sections_merge() procedure that will allow
to have multiple sections with a same name.
This behaviour is how FIO treats such sections
and so will be used in bdevperf config file.

Change-Id: If221daeb7753d91b5d2608d25ccbb16f2d43ccce
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3433
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 12:24:08 +00:00
Karol Latecki
a7972f0a54 test/nvme_perf: use config file to select test disks
Use a simple config file to select NVMes for test
instead of selecting them all via gen_nvme.sh.
HW platforms may differ significantly in setup and
capabilities, so using all disks in sequential order
is not always a good way.
(e.g. using "first" four available NVMes for test
may yield not optimal results if it turns out that
NVMes are connected to oversubscibed PCIe switch)

Change-Id: I55dd85799a5859c4764e94e1d8058e01ad9b84f0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3296
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
20995d370b test/nvme_perf: remove --disk-no option from perf script
Script was written in such a way that tests would be
performed starting with all found NVMe disks in configuration.
Then the number of disks for the workload would be reduced in
loop until reaching 1. This is the scenario used in test
case 1, described in SPDK NVMe Performance Benchmark document.

--disk-no allowed to avoid running test in loop, and specify
just a single value for the number of disks to be tested.

Both loop logic and --disk-no are no longer required as
tests are scheduled and run via CI system which picks the
parameters for each test run.

Change-Id: Iad0f4d0d259ac64680fd5bb69d7cbb7e0afff79c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3295
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
0655f92a0f test/nvme_perf: improve fio results parsing
- Change divisor in nsec to usec calculation to "1000".
- Ignore MIX param when rw mode is set to 100% read or
  100% write.
- Use MIX param as number in 0.0-1.0 range for calculating
  summary read+write latency.
- Use jq "//" alternative operator when querying for fields
  which might not exist in JSON object. Assume "0" for
  non-existent fields, otherwise jq reports "null", which
  in turn results in script errors.

Change-Id: Ibc8f91f058d9ae31ee1b60f4b253c42b743ae22f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3294
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
da5c4e093d test/nvme_perf: reorganize fio config generation
Previous changes moved some of the fio CLI parameters into
a bash heredoc to save into a text file, but it was put in
wrong place in the script.

Move global fio parameters a couple lines up so that the
resulting fio config file has the correct form of:
[global]
  global_params
[testjob]
  testjob_params

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3a958fe5ce880ab63a079c345e6b24fd1d3bae32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3293
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
3ef00ffb99 test/nvme_perf: fix nvme perf app directory
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7f2b5bc3f25b444e1be8050a5ec74e884ff13068
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Changpeng Liu
2d1fc3ca06 iscsi: report that long text responses isn't supported
When there are many Target information which exceeds the data
buffer, the initiator and target can use long text responses,
but SPDK doesn't support this feature now, so here we just
report an error here, we may add this feature in following
patches.

Fix issue #1442.

Change-Id: I5962c00943819cd11ce21e610e4b37265451f0cb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3454
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:21:48 +00:00
Ziye Yang
1da44e0604 nvme_tcp: Move the default buffer factor size in nvme_tcp.h
1 Change the default factor from 4 to 8, which can be used
to improve the performance.

2 Change the base buffer size in nvme_tcp.c,
we should not use sizeof(struct spdk_nvme_tcp_cmd),
it is 72 bytes. Normally, the initiator will receive
C2h pdus and R2T Pdus by most, so set the size of using
sizeof(struct spdk_nvme_tcp_c2h_data_hdr) is enough.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I384f4cb026cb8d83e75b639f7256ee8cb8ed1df1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3283
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 12:21:07 +00:00
Seth Howell
f0be991330 lib/nvmf: complete requests in req_process for inactive qpairs.
There is no reason to continue processing these requests if the
qpair is not still active. We should complete them and free
any resources they are still holding.

Also, not doing so can cause issues with trying to access pointers
in the qpair after they are invalid. See issue #1460.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6e570a576983dfedf726dc4a9a83316209403e00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-22 12:20:55 +00:00
Sudheer Mogilappagari
2d877401fd nvmf/tcp: Add recv to busy poll hw queue for data
Call recv to trigger busy polling even when no socket is active. when
epoll_wait returns zero,  the first socket in poll group is used to
trigger busy polling in kernel stack and potentially reap incoming data

Change-Id: I15f04cb4a2c7b382dd07391eda69678fd7919790
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3180
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-07-22 12:20:47 +00:00
paul luse
22058d70fc lib/idxd: add support for batching dualcast commands
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia5b5a346ae5c8470d9792766dba2bcf68c6fe2fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2915
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-07-22 12:20:27 +00:00
paul luse
ec086e6f3f lib/accel: add support for batch dualcast to fw and sw engine
Includes a few related changes:

* slight refactor to have common prep function for batch prep
commands in the sw engine
* added support for dualcast batching in accel_perf example app

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If9f078a0f8eb509d296e60a94331c92a72f8cb10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2913
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-07-22 12:20:27 +00:00
paul luse
90c4ae4582 lib/accel: add batch capability and prep_copy() to sw engine
Doesn't provide any performance benefit but lets apps consistently
use the batch interface regardless of engine. Additional functions
and test code to follow.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia737045560ddd5117a689f7715fa206268bbc13d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2911
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 12:20:27 +00:00
paul luse
93a5e08fc8 module/accel/idxd: remove developer debug mode code
No longer needed.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If29fd918958aaf9b36f9c749512119cecbd8f92e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2880
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 12:20:27 +00:00
paul luse
a34fc12be3 examples/accel_perf: adding batching capability for copy
This patch uses the IDXD batch feature for initial queue depth loading.
As there is a good amount of code needed to support batching on a per
command basis, this starts with only copy.  As other commands are
enabled for batching, they will be added to accel_perf.  If batching is
not available, the perf tool will simply submit the initial queue depth via
a loop, the same way it did before batching.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2669936e4da9b31a1d8fa8f0c71e9f5a6fcae412
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2745
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>
2020-07-22 12:20:27 +00:00
Maciej Szwed
e63eb0375d hw_hotplug: Fix HW hotplug test
Add missing exports

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I35fe3d12ff278aaff62a19e4ce1ac95a96cc4ffa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3377
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-21 09:23:09 +00:00
Karol Latecki
9db3245ed8 test/nvme: recreate spdk/nvmecli git index file
spdk/nvmecli git index happens to be corrupted and
results in a lot of unrelated failures in the CI.
This patch attempts only to mitigate the issue of
unwanted failures by restoring nvmecli repository
to clean state.

Fixes #1496

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic17bffb0bc5bd3222c9f395fb217d2ffae99ceb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3415
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-21 09:22:57 +00:00
yidong0635
0b09b65147 scripts/pkgdep: Fix unrecongnized os ID of opensuse.
Running pkgdep on opensuse, but report error about:
'Not supported platform detected.'

ID=opensuse-leap must link to sles.sh.
So add this.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I059378da2b1a9cb7b7f6953d158956690d80053b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3220
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
Community-CI: Mellanox Build Bot
2020-07-21 09:22:46 +00:00
GangCao
ce1501218b RocksDB/BlobFS: add the related RPC module
Change-Id: Iff2730e3f410a7141004fdcf6ecfd31cb18d321a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3265
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2020-07-21 09:20:06 +00:00
Alexey Marchuk
970c6d099e make/dpdk: Suppress GCC 10 warnings
Suppres the following warnings which causes compilation errors:
1. gcc 10 complains on operations with zero size arrays in rte_cryptodev.c
Suppress this warning by adding -Wno-stringop-overflow compilation flag
2. gcc 10 disables fcommon by default and complains on multiple definition of
aesni_mb_logtype_driver symbol which is defined in header file and presented in sevral
translation units. Add -fcommon compilation flag.

Fixes issue #1493

Change-Id: I9241bf1fd78e86df6a6eb46b4ff787b2f7027b7d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3373
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-20 09:11:10 +00:00
Shuhei Matsumoto
ca1b318f07 example/nvme: add application to test NVMe I/O abort
Add a new sample application to test I/O abort for NVMe backend,
both PCIe and over Fabrics. And enable it to test pool by NVMe-oF
+ delay bdev + malloc bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5aa28b523bdb2c1d4d8c7af05f925c4dd01dda86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2661
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-17 07:21:13 +00:00
Ziye Yang
0f895bbdc3 nvme/perf: Enable the uring support to drive kernel based local devices.
This patch will add the uring support to test kernel based
local devices, e.g., files or local NVMe devices.

To make one binary can support both uring and aio mode when --with-uring
is complied. We also introduce a new global variable g_use_uring to switch
the mode to use liburing or libaio.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I72851168cb377751313d7aa09040ef2a7eb76594
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3214
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:58 +00:00
Jacek Kalwas
81717da169 nvmf: use nvme print completion
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If814edb3c99a7ed9f1800a634f293d3645884457
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3241
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:21 +00:00
Jacek Kalwas
afefd815ca nvmf: use nvme print command
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I22747fb342d2e50f40a3bae4f930957f755a97fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3202
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:21 +00:00
Jacek Kalwas
3e82703056 log: introduce macro to check if flag is enabled
This macro works only in debug build, in release it always returns
false.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I949ac5f3e3ff811bd4590645300c536c5a6afab6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3358
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:21 +00:00
Tomasz Zawadzki
78f44434a6 lvol: report io_unit_size as block_size instead of page size
Bdev underneath lvs has a certain value set as block size,
then lvolstore inherits that as `io_unit_size`,
which ends up as block size for the lvol bdev presents.

Before this patch lvs on device with block size of 512,
would create lvol bdev with block size of 512.
Meanwhile reporting in bdev_lvol_get_lvstores(),
that block_size is 4k instead.

This was result of addition of io_unit_size and
forgetting to update the value here. Previously
only I/O of page_size was allowed.

This patch adjusts the value reported to
io_unit_size.

Alternatively it could have been removed,
or name changed to "io_unit_size".
Yet for API compatibility reason this name
remains.

Info on actual page size which is always 4k,
is not useful to bdev users. No need to add
another field for that.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I19701c408c389f64e25c027c7bba789294bbed94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3289
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-17 07:20:14 +00:00
paul luse
6726defce9 examples/accel/perf: fixup Makefile following earlier patch
that missed this application...
See: https://review.spdk.io/gerrit/c/spdk/spdk/+/614

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I11ffb3e3e89bf2b0093cfc703043bfe73cfe5483
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3319
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: Eugene Kochetov <evgeniik@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:07 +00:00
Jacek Kalwas
b0a28e9509 nvmf: set group to null after qpair removed from the poll group
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I874fdb0771790e4a93bebbf812c30974dadc48e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3091
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>
2020-07-16 07:40:32 +00:00
Ziye Yang
a445e45fa8 sock/uring: Add the uring support in 20.07 release.
We added the uring socket implemenation in 20.04, but
we did not announce anything since uring is experimental
and there is no test in our CI. Now, the uring socket
implementation can be announced because we added the
related test in our CI pool.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1c4fbf84d46f8632e7468bc9833050ba30f90649
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3336
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-16 07:30:51 +00:00
Changpeng Liu
919fdece12 test/nvme: enable OPAL test
Due to the firmware response time for REVERT action, currently
we only enable this test with P4510 drives.

Change-Id: I4b02008ec0b7d2caeba20c566b1cf1b69404ae12
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2816
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-16 07:30:36 +00:00
Vitaliy Mysak
efb72886b3 scripts/vagrant: add fedora31 to create_vhost_vm script
Adding fedora31 to the list of available choices
in create_vhost_vm script.
This requires some changes in Vagrant_vhost_vm because
fedora is configured differently than ubuntu.

Fedora VMs will very useful for vhost tests because
they run on fedora.

Change-Id: Iad2820a9c3fe2621a368be34d9a72b80ad3f4941
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1677
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-16 07:30:22 +00:00
Maciej Wawryk
1cab8c9f19 scripts/perf: Choose only nvmf device
During nvmf perf test, on machines with have local
nvme device figure out that they are added to
fio.conf file, that can caused bad for results.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibb6aa7b29ee63a8c41cd80909bc26d1dc224dd0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3113
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-16 07:30:06 +00:00
Shuhei Matsumoto
26e0ef9a36 lib/nvmf: Make abort execution timeout value optional
Make the abort execution timeout value as optional.

Zero is acceptable and means immediate timeout.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia4b03c65b8bd15899f48be9476ee657446147581
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3104
Community-CI: Mellanox Build Bot
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-16 07:29:46 +00:00
Shuhei Matsumoto
3e1ab5ea18 nvmf/rdma: Wait until request is abortable if it is transferring
If the state of the request is TRANSFERRING_HOST_TO_CONTROLLER,
we cannot abort it now but may be able to abort it when its state
is EXECUTING. Hence wait until its state is EXECUTING, and then
retry aborting.

The following patch will make the timeout value configurable as
an new transport option.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia4b43e79c3b0d9c53ed04b01a9eaa9b117b32d81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3013
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-07-16 07:29:46 +00:00
Shuhei Matsumoto
c1305e71b6 nvmf/rdma: Abort request whose CID matches if it is pending
If the request is queued and is not in completing, we can abort
it safely.

If the state of the request is NEED_BUFFERING, the request is
queued to tqpair->group->group.pending_buf_queue.

If the state of the request is DATA_TRANSFER_TO_CONTROLLER_PENDING,
the request is queued to rqpair->pending_rdma_read_queue.

If the state of the request is DATA_TRANSFER_TO_HOST_PENDING,
the request is queued to rqpair->pending_rdma_write_queue.

According to the current state, dequeue from the corresponding
queue, and then call an new helper function
nvmf_rdma_request_set_abort_status().

Using helper function will be easier to read.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0327f4d2c4728a11b3b6bbc7c2252f0b35263cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3012
Community-CI: Mellanox Build Bot
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-16 07:29:46 +00:00
Shuhei Matsumoto
deec1fc790 nvmf/rdma: Abort request whose CID matches if it is outstanding
Call nvmf_ctrlr_abort_request() if the request whose CID matches
is found and its state is executing.

nvmf_rdma_qpair_abort_request() returns immediately if rc is
SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS, or calls
spdk_nvmf_request_complete() otherwise.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1462a21db7270f3d63f8f293ad4be61d52e74da1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3011
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-16 07:29:46 +00:00
Shuhei Matsumoto
040ee27c16 nvmf/tcp: Wait until request is abortable if it is transferring
If the state of the request is TRANSFERRING_HOST_TO_CONTROLLER,
we cannot abort it now but may be able to abort it when its state
is EXECUTING. Hence wait until its state is EXECUTING, and then
retry aborting.

The following patch will make the timeout value configurable as
an new transport option.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98347b68e8b6b4a804c47894964cb81eae215aaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3010
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-16 07:29:46 +00:00
Sven Breuner
0190e71eb6 module/bdev_compress: Fix use logical block size in vbdev_compress_claim
Use logical block size instead of base bdev block size in
vbdev_compress_claim. This is relevant to enable the compress bdev to
present a logical block size that is different from the block size of
the base bdev (e.g. 512B logical on 4KB base bdev).
However, this is just an internal fix/preparation and there is
currently not yet a way for users to specify a different
logical block size, e.g. through an rpc.py parameter.

Signed-off-by: Sven Breuner <sven@excelero.com>
Change-Id: Id7562f0da234ce11242b7ee78837a317ee51c211
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2858
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-15 07:09:40 +00:00
Ziye Yang
9a6a561149 lib/iscsi: Change the order of executing iscsi_clear_all_transfer_task
In my mind, we should firstly remove the sock from the group, then
all the call_cb of pdus will be handled, then we clear the task,
we can avoid the duplicated resource recycling.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic5fad130e58c9dcb42a237973979b042eabdf43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3309
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-07-15 07:09:24 +00:00
Seth Howell
8e65bfc7e4 lib/log: add a check for localtime() failure
localtime() can technically fail and return a NULL
pointer. We should handle this case.

Change-Id: I5f9d11c5f992453ec3e3804bd17f5d05a863d526
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3245
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>
2020-07-15 07:09:19 +00:00
Maciej Wawryk
c7d1abba18 test/vm_setup: Add clearlinux package manager
Also remove unnecessary jq from pkgdep

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I259e8f00a4a6e9c5463fa9e8bdefb19f9bdaa93d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3198
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-14 07:55:19 +00:00
Maciej Wawryk
3c8451e69a scripts/perf: Add bandwidth measurement to nvmf test
Bandwidth measurement is realized by bwm-ng tool.
Using this measure tool will help us to check network saturation.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I7b95b9b4ac3ca3b1847ec72ab7ea333807befe89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3190
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-14 07:55:08 +00:00
Shuhei Matsumoto
72eedc578d nvmf/tcp: Abort request whose CID matches if it is pending
If the request is queued and is not in completing, we can abort
it safely.

If the state of the request is NEED_BUFFERING, the request is
queued to both tqpair->group->group.pending_buf_queue and
the queue per state.

If the state is AWAITING_R2T_ACK, the request is queued to the
queue per state.

Dequeueing from the queue per state is done in
nvmf_tcp_req_set_state(). Hence explicit dequeuing only when the
state of the request is NEED_BUFFERING.

Most abort operation is common between two cases. We can use fallthrough
in switch-case but factor out the common operation into a helper
function nvmf_tcp_req_set_abort_status() instead because we may use
the helper function in future and using helper function is easier to
read than fallthrough.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1695b084d5d1f2537fbdd512bc3cd136e0f6a65b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3009
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
b8a87e6af5 nvmf/tcp: Abort request whose CID matches if it is outstanding
Call nvmf_ctrlr_abort_request() if the request whose CID matches
is found and its state is executing.

nvmf_tcp_qpair_abort_request() returns immediately if rc is
SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS or calls
spdk_nvmf_request_complete() otherwise.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1abceecc211ee79d8ac18a82dc63b13d313a6f27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3008
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
a7d59c9d75 lib/nvmf: Add three variables to spdk_nvmf_request to avoid temp context for abort operation
Add three variables, poller, timeout_tsc, and req_to_abort to
struct spdk_nvmf_request to wait until the request to abort is
abortable without using any dynamically allocated context.

struct spdk_nvmf_request is already very large (968 bytes), and
the pahole tool checked these variables did not create any extra hole.

Poller pointer and timeout value are usable for other potential
cases, and so use generic names.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7202ade181365ab586d8c30383b3ea0fef82dcff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3260
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-07-14 07:54:42 +00:00
Shuhei Matsumoto
604b4503c4 lib/nvmf: Add nvmf_transport_qpair_abort_request()
State machine is different among NVMe-oF transports and is
encapsulated to the transport neutral NVMe-oF controller and
NVMe-oF qpair.

To implement abort operation for each NVMe-oF transport,
add a function pointer qpair_abort_request to struct spdk_nvmf_transport_ops
and a stub nvmf_transport_qpair_abort_request() to encapsulate
which transport is used.

The following patches will implement qpair_abort_request for each
transport. Each qpair_abort_request() is responsible to call
spdk_nvmf_request_complete() for the abort request.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2beac959ed428c5108cf33691226b7fae5cd24d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3007
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
a8beb79ea3 lib/nvmf: Add nvmf_ctrlr_abort_request() to call nvmf_bdev_ctrlr_abort_cmd() from transport
If nvmf_ctrlr_abort_request() returns SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE,
the caller is responsible to call spdk_nvmf_request_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6ed5f8611bcacd20385dd925b9b2e29ed2200269
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3006
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
91b80fe287 lib/nvmf: Add nvmf_bdev_ctrlr_abort_cmd() to call spdk_bdev_abort()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idc9957aabe0c3c24d2d36f1ac84b847b7455e7d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2959
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
f045d924fc lib/nvmf: Factor out abort operation on the specific qpair into a function
Factor out abort operation on the specific qpair into a helper
function nvmf_qpair_abort_request().

After this refactoring, nvmf_ctrlr_abort_done() calls
_nvmf_request_complete() only if the passed status is zero.
If the passed status is not zero, nvmf_qpair_abort() is responsible
for calling _nvmf_request_complete() instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4828c0e21cc7650210675661d6e1c0fd54c7a2cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2991
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
9975d4a1d2 lib/nvmf: Always return success and only toggle bit 0 of CDW0 for abort command
Description is not clear but according to the NVMe specification,
always set the completion status to success and differentiate only
the bit 0 of CDW0 between success and failure for abort command.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0195e72fe1d7fcc2592f47e9dcf92ac56912282c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1965
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
47b0d4275c bdev/nvme: Support abort IO by using spdk_nvme_ctrlr_cmd_abort_ext()
Change NVMe bdev module to enable abort as IO type.

Change _bdev_nvme_submit_request() to process abort request when the
IO type is abort.

The current thread tries aborting I/O command in the I/O qpair first.
If no I/O command to abort was found, send message to the thread which
is registered when creating controller. The controller thread tries
aborting admin command in the admin qpair next. If no admin command
to abort was found, complete the abort request with failure.

spdk_nvme_ctrlr_cmd_abort_ext() is used to try aborting command whose
cb_arg matches. qpair is set to NULL when trying to abort admin command.

Before calling spdk_nvme_ctrlr_cmd_abort_ext(), save the current
thread to process admin command completion correctly.

spdk_bdev_abort() supports any bdev module other than NVMe bdev
module and does not check CDW0 but checks only if the completion
status is success or failure. So add bdev_nvme_abort_done() and
converts the NVMe completion status to the bdev completion status.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If6aebae0ba2f6c5834ee926e161af9c4d825f341
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2040
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
613c9386ff bdev/nvme: Add thread pointer to struct nvme_bdev_ctrlr
Add thread pointer to struct nvme_bdev_ctrlr. The thread which
created nvme_bdev_ctrlr is set to the pointer.

The thread pointer will be used to limit only one thread to submit
admin abort.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia39d5cbc7a13b0e0022c0d5591069ea8776ef774
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3244
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
9d6bb6decc bdev/nvme: Use SPDK_POLLER_REGISTER to use function name as poller name
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30da42413501d03433ef4550327675471185df3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3243
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
71da42e953 lib/nvme: Add spdk_nvme_ctrlr_cmd_abort_ext() to abort commands whose cb_arg matches
A new API spdk_nvme_ctrlr_cmd_abort_ext() gets cmd_cb_arg as a
parameter, and use it to abort requests whose cb_arg matches cmd_cb_arg.

The caller can set the parameter qpair to NULL if it wants to abort
requests on admin qpair.

Hold ctrlr->ctrlr_lock throughout because abort request is submitted
to admin qpair.

The API is not critical for performance, and so initialize parent
data first.

The API is for a specific qpair, and so hold SQID in the parent,
and it is copied to the children. On the other hand, CID is set
to child when request to abort is found.

Use an new helper function nvme_transport_qpair_iterate_requests()
to add abort request for each outstanding request which has
cmd_cb_arg as its callback context.

The case is possible such that the request to abort is not outstanding
yet but queued. Hence abort queued requests which has cmd_cb_arg
as its callback context too, but it is done only if there is no error
so far.

If only queued requests are aborted and there is no outstanding
request to abort, complete with success synchronously.

If there is no outstanding or queued request to abort, return -ENOENT.

When any abort request is submitted, the difference between success
and failure is only bit 0 of CDW0 according to the NVMe specification.

We cannot the existing helper functions nvme_request_add_child() and
nvme_cb_complete_child() but can use nvme_request_remove_child().
nvme_qpair_submit_request() may use only nvme_request_remove_child()
from these three helper functions. Hence we use req->parent as other
types of request do.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3a271c6542f8e2e6b425b3bf6151f41e924bc200
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2039
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-07-14 07:54:42 +00:00
Shuhei Matsumoto
beff519ea9 lib/nvme: Add a macro spdk_nvme_cpl_is_abort_success to check if abort succeeded
Add an new macro spdk_nvme_cpl_is_abort_success(). This will be used
in NVMe driver and NVMe bdev module later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8348f54ed8c9fd0238661f7d7e61e9e6f36f33c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2800
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-13 08:40:42 +00:00
Shuhei Matsumoto
576a373d58 lib/nvme: Abort queued requests whose cb_arg matches
Use another list dedicated to hold queued requests being aborted
to avoid potential infinite recursive calls.

Add a helper function nvme_qpair_abort_queued_req() to move requests
whose cb_arg matches from qpair->queued_req to qpair->aborted_queued_req.
Then nvme_qpair_resubmit_requests() aborts all requests in
qpair->aborted_queued_req.

The first idea was that nvme_qpair_abort_queued_req() aborts queued
requests directly. However, this caused infinite recursive calls.
Hence separate requesting abort to queued requests and actually
aborting queued requests.

The detail of the infinite recursive calls is as follows:

Some SPDK tool submits the next request from the callback to the completion
of a request in the completion polling loop. For such tool, if the callback
submits a request and then aborts the request immediately, and the request
could not be submitted but queued, it will create infinite recursive calls
by request submit and abort, and it will not be able to get out of
completion polling loop.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8196182b981bc52dee2074d7642498a5d6ef97d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2891
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>
2020-07-13 08:40:42 +00:00
Alexey Marchuk
e137881e4e nvme/tcp: Insert free req at the head of the list
lifo model is more cache friendly

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Id937ab0c1b8b4ce121136144c7d6013bbe5eb963
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3282
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-07-13 08:40:31 +00:00
Evgeniy Kochetov
35429c9b5d sock: Save socket subsystem configuration in JSON format
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I32c25e6410c418ffa00a76559aa7b6999e2269ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/617
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-13 08:40:15 +00:00
Karol Latecki
140a772746 scripts/vagrant: use IDE bus for Arch Linux VMs
The original image was prepared using SCSI bus.
Using IDE explicitly speeds up boot process as the
system does not have to look where to boot from.

Change-Id: Ia9f649d1c46c591135833c02ed60b3c960ad8b98
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2840
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-13 08:40:05 +00:00
Karol Latecki
778312c8d2 scripts/pkgdep.sh: install libffi for Arch Linux
Arch Linux instance is failing on that CI. Seems that
libffi is a dependency for installing configshell_fb
and it's missing.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I988f2fb5e879b9e8882409c9c2772d5bd2c5e045
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2839
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: Seth Howell <seth.howell@intel.com>
2020-07-13 08:40:05 +00:00
Vitaliy Mysak
367c980b45 lib/conf: accept entries of form key=value
In INI config, split key based on whitespace AND symbol '='
This allows to have same format as FIO configs

FIO style config will be used for bdevperf config file

Change-Id: I92c501c839842919afb5c23ed935be010ae2b168
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3151
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-13 08:39:57 +00:00
Shuhei Matsumoto
ee7f961655 lib/iscsi: Unify outstanding_r2t_tasks array and active_r2t_tasks list into the latter
We have no particular requirement to keep both conn->outstanding_r2t_tasks
array and conn->active_r2t_tasks list now.

To improve readability and maintaineability, unify two into the latter,
conn->outstanding_r2t_tasks list. Update unit test accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I25cf7cffbe39ac66e102eb3052340de6ef65c8f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3115
Community-CI: Mellanox Build Bot
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>
2020-07-13 08:39:50 +00:00
Shuhei Matsumoto
d5f3f48b60 lib/iscsi: Fix iscsi_del_transfer_task deletes from both array and tailq
Previously iscsi_del_transfer_task() dequeued the task only from
the array conn->outstanding_r2t_tasks[].

process_non_read_task_completion() had dequeued the task from
the tailq conn->active_r2t_tasks then.

However abort_transfer_task_in_task_mgmt_resp had not dequeued the
task from the tailq conn->active_r2t_tasks then.

This was an apparent bug, and is fixed here. Update unit tests
accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I93f02b2fb670dcee4c32d61c264e3ad5b4f9f43e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3108
Community-CI: Mellanox Build Bot
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>
2020-07-13 08:39:50 +00:00
Shuhei Matsumoto
41f59559e1 lib/iscsi: Return if conn->state is already exited when adding conn to poll group
Previously, we fixed a similar bug that iSCSI target got seg. fault
if connection is being exited between spdk_iscsi_conn_write_pdu()
and its callback iscsi_conn_login_pdu_success_complete() are executed.

This fix was not sufficient and we still saw similar error.

Not only socket write but also SPDK message is asynchronous and
connection may start exiting between iscsi_conn_schedule() and
iscsi_conn_full_feature_migrate().

This patch fix this new issue.

The previous fix was
https://review.spdk.io/gerrit/c/spdk/spdk/+/1275

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5cc422529a335e5f1982693bdf910ac7debe6f17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3074
Community-CI: Mellanox Build Bot
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>
2020-07-13 08:39:50 +00:00
Shuhei Matsumoto
66aec44a4b lib/iscsi: Manage active connections by TAILQ
Following the last patch, add g_active_conns to manage active connections
by TAILQ. We cannot remove the is_valid bit and g_conns_array
to support iSCSI top application, but this change simplifies the
code a little.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8b449f3056ffaed19f23f42d83c912dfba9a7b75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3090
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-13 08:39:50 +00:00
Shuhei Matsumoto
89ae0e3c62 lib/iscsi: Manage free connections not by array but by TAILQ
Previously free connections had been managed by g_conns_array,
and allocate_conn() gets the lowest free connection. This had worked
almost as LIFO, and the just freed connection had been reused
immediately to the new connection.

Using TAILQ makes management of free connections FIFO, and this will
be more intuitive and simpler, and avoid potential issues due to the
fact that we do not know the state INVALID is the current connection
or the current connection is exited and the new connection is allocated.

This patch includes following updates.

Remove the test condition that the connection ID should be zero.
Connection ID is used as Target Transfer Tag (TTT) and TTT is opaque
number. Hence requiring connection ID to be zero is not meaningful.

iscsi_conn_free() calls free_conn() while holding g_conns_mutex, but
iscsi_conn_construct() does not call free_conn() without holding
g_conns_mutex. Hence add g_conns_mutex to the latter.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I204f66469f0bf54845c773da5b4ac86f3c8dca60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3089
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-13 08:39:50 +00:00
Shuhei Matsumoto
e685db2caf lib/iscsi: Rename link pointer to pg->connections from link to pg_link
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I50902ebf0ac1ee103d2bf999578e68637efcc123
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3088
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-13 08:39:50 +00:00
paul luse
fc250841ca idxd: add batch capability to accel framework and IDXD back-end
This patch only includes the basic framework for batching and the
ability to batch one type of command, copy. Follow-on patches will
add the ability to batch other commands and include an example of
how to do so via the accel perf tool.  SW engine support for batching
will also come in a future patch. Documentation will also be coming.

Batching allows the application to submit a list of independent
descriptors to DSA with one single "batch" descriptor. This is beneficial
when the application is in a position to have several operations ready
at once; batching saves the overhead of submitting each one separately.

The way batching works in SPDK is as follows:

1) The app gets a handle to a new batch with spdk_accel_batch_create()
2) The app uses that handle to prepare a command to be included in the
batch. For copy the command is spdk_accel_batch_prep_copy(). The
app many continue to prep commands for the batch up to the max via
calling spdk_accel_batch_get_max()
3) The app then submits the batch with spdk_accel_batch_submit()
4) The callback provided for each command in the batch will be called as
they complete, the callback provided to the batch submit itself will be
called then the entire batch is done.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4102e9291fe59a245cedde6888f42a923b6dbafd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2248
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>
2020-07-10 07:31:09 +00:00
paul luse
cf83cac493 module/accel/idxd: change name of global lock and expand scope
Previous lock protected against a channel counter, renamed as it
now protects multiple values associated with configuration and
reconfiguration.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icfe48aa7df192a7bdf568de418d49c7984d20acf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3175
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-10 07:31:09 +00:00
Jacek Kalwas
ed4b7d12ec nvmf: suppress scan-build warning
Logic error     Dereference of null pointer     ctrlr.c
nvmf_ctrlr_async_event_request  1522

Dereference of null pointer is not possible if sgroup obtained using
ctrlr obj. Adding corresponding asserts suppresses the warning.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I78b32fadd5449ee9b533f65193c70e55cf9a8f1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3251
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-10 07:30:59 +00:00
Jacek Kalwas
4d9ab1e9a1 nvme: pretty print dptr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I576878fbbafc3d17617ceeec99e40565be7d5d3d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3213
Community-CI: Mellanox Build Bot
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-07-10 07:30:59 +00:00
Jacek Kalwas
64f05eb5c5 nvme: pretty print fabric cmd
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib4bc28026cab208d45c8b876714fa525e5bb38f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3200
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-07-10 07:30:59 +00:00
Jacek Kalwas
9cd4723913 nvme: pretty print set/get features
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib6f1811da9a6294983bce04cff01ba1fb5e45607
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3179
Community-CI: Mellanox Build Bot
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: Jim Harris <james.r.harris@intel.com>
2020-07-10 07:30:59 +00:00
Jacek Kalwas
41b360d54e nvme: add missing cmds to admin opc string
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I6cdcf675ebc8ad31d88b5469f87e1eae066b2e3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3178
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-10 07:30:59 +00:00
Jacek Kalwas
61668cc43e nvme: introduce new set of cmd/cpl printers
Having functions without qpair on the interface allows for wider usage
e.g. by nvmf layer.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I3a51ad53f00eb29e2ba2681ef4ff0cc2a197b65d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3176
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: Broadcom CI
Community-CI: Mellanox Build Bot
2020-07-10 07:30:59 +00:00
Ziye Yang
f096f252d0 uring/sock: remove the SPDK_UNREACHABLE
For some exceptional cases (e.g.,
https://github.com/spdk/spdk/issues/1486),
we may detect POLLERR or other events. So for those events,
we can just ingore it, but not use SPDK_UNREACHABLE.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I073575408783ff75e50b40d45ddf09388a2cab96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3262
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-10 07:30:45 +00:00
Ziye Yang
08b9603531 scripts/pkgdep: Install liburing lib in /usr/lib64.
In some OSes (e.g., Fedora30), /usr/lib is not one of the default
library loading paths. So Let's change it into /usr/lib64.

To address: #1471

Change-Id: I89a66b6096fc1096be7f7e7bb6414f0998b3d974
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3261
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-10 07:30:39 +00:00
Jacek Kalwas
0555074965 event: expose base virtaddr as an option
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I062ac2b1de5a89d521bde926433139457f9168f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-09 07:23:40 +00:00
GangCao
249f95daeb BlobFS: fix the case where configuration field is not set
In the case that the configuration field is not set, it will
return "-1" and then implicitly convert to the unsigned
case where the variable is wrongly set.

Change-Id: I7b2c64d653badd731d8e6df46629231343a0ae6d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3236
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-09 07:23:34 +00:00
Ziye Yang
4c9aad0299 nvme/tcp: Report the free entries if sending_ack is set
Previous we fix the same issue in this commit:
cb98b2ab3e

But we forget to fix it here. And we also need to update here,
otherwise we will still face the same issue described in
commit: cb98b2ab3e

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3660dbb6e97c92ea4cb347cfce4bf23c6dfe97ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3242
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>
2020-07-09 07:23:19 +00:00
Michal Berger
0bec3c3c64 pkgdep/git: Don't fail install_qat() if qat_c62x is not loaded
Change-Id: I3784e3f7983a7f66ea68b2bd8b97f98b282e3405
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3201
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-07-08 08:11:20 +00:00
Michal Berger
f0ba1e9e44 pkgdep/git: Remove vpp
VPP is going to be deprecated in 20.07, thus remove support for it
from vm_setup.sh.

Change-Id: Ic5891178bc439ff08475adbb2925b81c4a33525f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3199
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-08 08:11:00 +00:00
Seth Howell
f4d0ab7111 Revert "bdev/nvme: add a function for specifying a multipath trid."
This reverts commit 5f13e0f67f.

Reverting this change to allow for a secondary review.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iad208603034bd892f3f248836459005d3c2b5297
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3041
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>
2020-07-08 07:57:11 +00:00
Seth Howell
0344ba4064 Revert "bdev/nvme: add failover option to bdev_nvme_reset"
This reverts commit 62ded32fd7.

Reverting this change to allow for a secondary review.

Change-Id: I85a059c434f6e634e014e680ae228e95fffdee92
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3040
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>
2020-07-08 07:57:11 +00:00
Seth Howell
3b830202ca lib/nvmf: add an acceptor_backlog transport opt.
This allows users to configure the number of
connection requests outstanding to an rdma port
at once.

RPC included.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8a2bb86b2fb7565cb10288088d39af763b778703
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3097
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-07-08 07:57:04 +00:00
Evgeniy Kochetov
37bf49b1d5 sock: Add dependency on socket subsystem to other subsystems
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I665760166d54f6156b54735015bd2b586e91c345
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/616
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
Evgeniy Kochetov
2569650711 mk: Link applications with socket subsystem
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I03258717bc57f5e0dbc5de217a5e8ce7aa8c36bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/615
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
Evgeniy Kochetov
c5c9a150a3 make: Create variable for event_bdev dependencies
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7468dd242b83af8b41d72e503c212c1ffac1abd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/614
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
Evgeniy Kochetov
0f657329d3 event/sock: Add socket subsystem
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: If62b0d0dfb105854b306601f9913bd287ecdc283
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/613
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
Ziye Yang
d50cbd30b1 nvme/perf: Update the makefile.
We must include nvme.libtest.mk first, because
OS variable is defined in spdk.common.mk referened in
nvme.libtest.mk.

Without this patch, AIO library will not be compiled
because OS variable is NULL.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I760310ab80252237d211a855d18d80ed88119a43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3217
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-07-08 07:56:15 +00:00
Seth Howell
5faea08e71 scripts/check_format.sh: fix naming convention check.
I had previously implemented a portion of the naming convention
check that looked for symbols that had been moved by performing
two checks:

git diff commit1 commit2 -- libname | grep for added function
git diff commit2 commit1 --libname | grep for added functions

and then subtracting the values returned by the second check from
the values returned by the first check. That works as long as the two
diffs are reciprocal (i.e. the first diff is a mirror image of the
second). However, this has proven to not be the case.

This change fixes that check by performing the smae diff twice and
grepping for removed functions the same time.

Change-Id: I09c81921d68436baeee706f2d9a6d30db1d23976
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3229
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-08 07:56:06 +00:00
Michal Berger
9aeaafa1bc test/common: Use mktemp() to determine fallback test storage
Using hardcoded path of /tmp/spdk was a bit problematic due to the
way how CI mixes root permissions with non-root's during test
execution. As an example, see:

https://review.spdk.io/gerrit/c/spdk/spdk/+/2560

Instead of using /tmp/spdk as a fallback, always try to create tmp
directory by generating its path via mktemp(). This way, as with
"autobuild: Use mktemp() for spdk workspace (ae730042)", different
permissions shouldn't be an issue anymore.

Lingering tmp directories will be purge at each set_test_storage()
run.

Change-Id: I93bc60c97b68e66606e98fc83463074fc020e372
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3238
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-07-08 07:55:56 +00:00
Maciej Wawryk
2ba684aa20 script/vagrant: Change plugins_sync_backend to nfs for clearlinux
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ie00ca3d18ebbe94baa272da1bca4baf43df6903a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3110
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-08 07:55:47 +00:00
Tomasz Zawadzki
14ce25ab00 test/cuse: wait for device after reset
This patch adds waitforblk() after rebinding the driver.
If timing was unfortunate, it was possible to issue
id-ctrlr command to a device that was not yet ready.
Meaning the support for fw command was not read properly.

No error was reported due to "set +e", so this patch moves
it till after id-ctrlr.

Example of the error:
# get_nvme_ctrlr_from_bdf 0000:82:00.0
# readlink -f /sys/class/nvme/nvme9
# grep 0000:82:00.0/nvme/nvme
# bdf_sysfs_path=/sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# [[ -z /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 ]]
# basename /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# printf '%s\n' nvme9
# nvme_name=nvme9
# [[ -z nvme9 ]]
# set +e
# ctrlr=/dev/nvme9
# ns=/dev/nvme9n1
# /usr/local/src/nvme-cli/nvme id-ctrl /dev/nvme9
# grep oacs
# cut -d: -f2
/dev/nvme9: Resource temporarily unavailable

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5728a5062cd553eb39d18d9869fdf56319a27777
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2950
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: Karol Latecki <karol.latecki@intel.com>
2020-07-08 07:55:33 +00:00
yidong0635
8c883b977f scripts/spdkcli: Stay on command input.
It will except in the middle of creation if an error command inputted.
usrs hope it could stay on consle. So change this.

For example:
'''
SPDK CLI v0.1

/> lsss
Command not found lsss
/>
'''

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ib8d38b5d3f6db1bae965c56e3b78ff715a574189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2886
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-08 07:55:15 +00:00
Jacek Kalwas
3dff6a3b48 nvmf: add util to get id from ctrlr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If9246be80d9d43863c1f9cc6ee33c1126dc67fd8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2983
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-08 07:55:03 +00:00
Maciej Szwed
b1bb9917a9 bdev/delay: Return poller status based on completions number
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I54d4a41602f678aed4d2df61d7059adc1ae37f78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-08 07:54:38 +00:00
Maciej Szwed
5550beb879 nbd: Make nbd_poll return real busy/idle status
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibced4f525b1fb8f57d493358f5b60a2d4009b5ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3150
Reviewed-by: Jeffry Molanus <Jeffry.molanus@gmail.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>
Community-CI: Mellanox Build Bot
2020-07-08 07:54:38 +00:00
Jacek Kalwas
42f2f01a0e nvme: fix timeout log during ctrlr state change
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Icf6741f059ed92fdf0ee9fd0952acdd07711c69c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3226
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:54:29 +00:00
Ziye Yang
74ef0b3963 mk/spdk.common.mk: Add the uring library support if configured.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idb0e10743270867a451c7a34d0346bf22a7389be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3231
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-08 07:54:18 +00:00
Shuhei Matsumoto
d80c9f6257 lib/nvme: Add underscore prefix to nvme_qpair_abort_queued_reqs()
This is a preparation to the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15356c69e676dc41d3af69caa6d12c1fcb282152
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3071
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>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
f2bd635ecf lib/nvme: Add qpair_iterate_requests() to iterate the common operation among transports
To abort requests whose cb_arg matches, add child abort request greedily.
Iterating all outstanding requests is unique for each transport but
adding child abort is common among transports, and adding child abort
is replaceable by other operations.

Hence add qpair_iterate_requests() function to the function pointer table
of transport, and pass the operation done in the iteration by a
parameter of it.

In each transport, the implementation of qpair_iterate_requests() uses
TAILQ_FOREACH_SAFE() for potential future use cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic70d1bf2613fce2566eade26335ceed731f66a89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2038
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
aa2ea2bed5 nvme/rdma: Follow the fix in TCP transport and restore nvme_rdma_req_put()
Recently two patches were merged but we should have get more reviews.
The fix done in TCP transport will be better because we can keep
the existing functions and make the code change minimum.

Restore nvme_rdma_req_put() and move removing rdma_req from
rqpair->outstanding_reqs to nvme_rdma_req_complete(). One exception
is the case that only nvme_rdma_req_put() is called. For the case
remove rdma_req from rqpair->outstanding_reqs before calling
nvme_rdma_req_put().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3f68dbc88c60af6b8f4ecc3209fde9b763ac3189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3073
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
ad69e739e1 nvme/tcp: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, TCP transport dequeues tcp_req from
tqpair->outstanding_reqs after calling nvme_complete_request() for
the request pointe by tcp_req.

Hence while nvme_complete_request() is executed, tqpair->outstanding_reqs
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, move dequeueing tcp_req from tqpair->outstanding_reqs
before calling nvme_request_complete(). One exception is the case that
only nvme_tcp_req_put() is called. For the case remove tcp_req from
tqpair->outstanding_reqs before calling nvme_tcp_req_put().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f2ac292c60431ac1e27b8657db92b220860a0a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2865
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
e060285ea6 nvme/tcp: Change nvme_tcp_req_complete() to take tcp_req instead of req
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida0ee76015821d7db54b273d14383a245a18047b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3058
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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-07-08 07:54:01 +00:00
Evgeniy Kochetov
b1074c4905 sock/rpc: Add sock_impl_get/set_options RPC methods
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: If1193ef647c85b045d7f14a03a9942783583f553
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/612
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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>
2020-07-07 07:32:32 +00:00
Ziye Yang
449dee3563 nvme/tcp: Fix the sending conflict between cmd and h2c pdu.
As is well known, we may also handle the r2t data pdu receving earlier
before calling the cb function of send_cmd due to the outof order execution
of the lower layer uring socket interface.So we need to fix
this issue, otherwise the data of the sending_pdu will be placed with the
wrong data.

And it will cause the issue shown in
https://github.com/spdk/spdk/issues/1473

Fixes #1473

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idac1ad65761695f3a655b85003861c1d1f4f3875
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3215
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-07 07:31:53 +00:00
yupeng
cb619b5229 bdev: add allowlist to bdev layer
When set bdev_auto_examine to false, the bdev layer will only
examine a device if it is in the allowlist. Currently the allowlist
is always empty. Will add api to add bdev to the allowlist in the
future.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: Iee7597623e7dd4172acc88736d23e0e5a4a2b03e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3101
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-07 07:31:22 +00:00
Ben Walker
30ee8137cf blob: Add a bitmask for quickly checking which blobs are open
This can speed up the check for whether a blob is already open
significantly.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If32b0b1f168fcdb58e61df6281d7b7520725a195
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2781
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: Paul Luse <paul.e.luse@intel.com>
2020-07-07 07:30:58 +00:00
Maciej Wawryk
9de6d03ee4 scripts/perf: Fix kernel fio filename generator
Also check nullblock subsystem number.
There was missing subsystem number definition in tgt_start
for null_block tests, and wrong filenames generator in
kernel section.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iae5bc6f497176d6c2a12ab430f4c6c92104fa4a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2570
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-07 07:30:44 +00:00
yidong0635
eb15a29f27 iscsi/tgt_node: Fix truncation warning on clear-linux-os-33460
Compiling warning :
spdk/lib/iscsi/tgt_node.c:550:42: warning: ‘%s’ directive output may be truncated
writing up to 2927 bytes into a region of size 1024 [-Wformat-truncation=]
  550 |  snprintf(port_name, sizeof(port_name), "%s,t,0x%4.4x",
      |                                          ^~
In file included from /usr/include/stdio.h:867,

gcc -v:
gcc-10.1.0-290-gc32074f6de

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I56fd5adfc461254751b54fd8610949e72ecbd8f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3216
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-07 07:30:31 +00:00
Michal Berger
131e6b0208 check_format: Mitigate #1455
Make sure that git diff ignores all submodules while looking for
changes made by astyle. This should prevent the following issues
from occurring:

object directory /var/ci_repos/dpdk-submodule.git/objects does not exist; check .git/objects/info/alternates
object directory /var/ci_repos/intel-ipsec-mb.git/objects does not exist; check .git/objects/info/alternates
error: bad tree object HEAD
fatal: 'git status --porcelain=2' failed in submodule intel-ipsec-mb

Change-Id: Ie9a39e324674337fdbd6bf627da6e80775ceaeec
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3223
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-07 07:30:14 +00:00
Michal Berger
6ff8cd3dbf pkgdep/git: Don't clone nvme-cli-cuse repo if it already exists
Change-Id: Ie49ac85b1484cf49017ebe980b4111bb9e00ae76
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3197
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-07 07:29:55 +00:00
Michal Berger
38f0b0f4aa pkgdep/git: Fix typo in the nvme-cli-cuse's repo path
Accidentally, checkout command was included in said path, remove it.

Change-Id: I3d497b90552ddcc14be4a45b8794f79e185cfb9f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3196
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-07 07:29:55 +00:00
Maciej Szwed
eb05cbd677 pollers: Fix pollers to return correct busy status
Poller should return status > 0 when it did some work
(CPU was used for some time) marking its call as busy
CPU time.

Active pollers should return BUSY status only if they
did any meangful work besides checking some conditions
(e.g. processing requests, do some complicated operations).

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id4636a0997489b129cecfe785592cc97b50992ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2164
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-07 07:29:31 +00:00
Tomasz Zawadzki
058be487c3 test/ftl: point to absolute path to setup.sh
$rootdir is used already in this script, but couple instances
were left out.
We should always point to $rootdir or $testdir when refering to
scripts and test files.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifeb4527c6fd42881a6e04c1406a765f57498ae7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2937
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
6b19775bd9 test/common: fail the tests if get_nvme_bdfs() returns no devices
Usual way to call get_nvme_bdfs() is to iterate over resulting bdfs.
When no bdfs are returned, most of the scripts do no not execute tests
at all and assume success.

Instead of adding error checking for each and every script for no bdfs,
this patch makes get_nvme_bdfs() exit with test failure.

This assumes that there will never be a test that expects no devices
to be present.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1e41a885c76ce6cc248fb076bc4f4efd4695ff3c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2836
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
9798e12bad test/nvme-cli: exit early if unsupported nvme-cli is used
Only spdk/nvme-cli fork with spdk-1.6 branch is supported.
Even then this will be deprecated at some point in the future,
in favor of nvme-cuse.

This came up when fixing the tests to actually run.
If unsupported nvme-cli is used, compilation succeeds and tests
fail at the functional test part with non-obvious message :
# ./nvme id-ctrl 0000:84:00.0
0000:84:00.0: No such file or directory

Some of the CI machines need to be updated, but this
check will make it easier to gauge what went wrong.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia19121a6c49b9618b8fea9e13304e27089f13dcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2948
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: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
d4658f693a test/nvmf: always test nvme-cli and build it too
nvme-cli tests with NVMe-oF could be silently skipped,
based on presence of the repo on system.

This patch makes it a requirement for tests to run,
and with that builds nvme-cli.

fixes #1469

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I581df5a00988b775e54110f718b95beb88487145
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2970
Community-CI: Broadcom CI
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
f9122e9054 test/common: move nvme-cli compilation to common script
NVMe tests compiled the nvme-cli, but turns out that
NVMe-oF did not. This patch moves compilation to
common script. Meanwhile next one will use it in other tests.

Additionally return to the original directories with
pushd & popd.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica60775a9b8e4347bed28d4c9dfae1acab2cae9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2969
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: Ben Walker <benjamin.walker@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
0f6b0ed67c test/common: point to $rootdir instead of pwd in get_nvme_bdfs
Tests should always have a reference to $rootdir absolute path.
Before this change, result of this function depended on current
working directory.

Test like test/nvme/spdk_nvme_cli.sh where directory was changed,
would fail.

With this change the path to get_nvme.sh script should always be
correct.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id555188f032e179eedd406463446a85e13234b6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2936
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
9803ad73ea test/nvme-cli: clean all previous artifacts from builds
There are a lot of files in the nvme-cli repo on system that
either build up (*.core) or produce misleading logs (*.gcda).

This patch cleans the nvme-cli repository before compiling.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f169b9eaef2dc91b14b324a63b338611f82a6a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2949
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
af761ab167 test/nvme-cli: exit early when not running on Linux
Tests do not work on OS other than Linux, instead of
going through whole script - exit early with error.

Took this chance to move staring the stub, till after
nvme-cli compilation succeeds.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5659888527bc2c25ab10bd871f7820b13f02e3fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2947
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Jin Yu
d76951c7ba nvme_rdma: fix the recvs_to_post.first to NULL
nvme_rdma_qpair_submit_recvs is not judged in
nvme_rdma_poll_group_process_completions path.
If we do not clean the recvs_to_post.first we
may get the wrong current_num_recvs when the rc
is non-zero and call it again.

Change-Id: If0046e711525dcfcb419132a01fed7a09db13ba0
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3163
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-06 07:20:33 +00:00
Jin Yu
05805e54a0 nvme:disconnected state then destroying state
Put the destroying state after the disconnected state.
Because nvme_transport_ctrlr_disconnect_qpair will modify the state
of qpair to disconnected, and in the path of rdma, it will postpone
the deletion of qpair until the release of pg by judging the
destroying state. So qpair is not deleted.

Change-Id: Ica606905cddf67d0ffda14bd48cc5f4e424f01ee
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3136
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: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-06 07:20:26 +00:00
Jin Yu
19228a0602 nvme_rdma:fix current_num_sends to current_num_recvs
Change-Id: I1a3067165c06db3fe7d7fd1c1ec149e845100b27
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3162
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: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-06 07:20:26 +00:00
Simon A. F. Lund
abe077a5ef nvme_spec: add definitions for I/O Command Sets aka. Namespace Types
Definitions for the new I/O Command Set aka. Namespace Types.
Definitions include CNS values, controller capability values, controller
configuration values, and command specific error codes.

Also, addition of the "old" controller capability and configuration
value for "No I/O Command Set or Admin Only".

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: I1256d657d306299365d1aa40b943070b31fcd489
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2932
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-07-03 07:31:31 +00:00
Simon A. F. Lund
ae6c40a4a5 lib/nvme: fallback to NVM when then given command_set is not supported
When the user requests a non-default command set configuration, via the
probe_cb() supplied to spdk_nvme_probe(), which is not supported, then
the controller initialization will not proceed.

This patch changes that behavior into falling back to the NVM command
set and continue with the controller initialization. It is done by
assigning the NVM command set to opts.command_set such that the user
knows in attach_cb() with which command_set the controller is
configured/enabled.

The fallback is needed since the user does not have access to the
controller capabilities register. The strategy left for the user is thus
to try. However, this is an issue, as the user only has one attempt, as
subsequent calls to spdk_nvme_probe() will not trigger probe_cb() for
the controllers whose initialization did not proceed.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Ia414628fcd7d56956649647775462e62d98c0a90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2931
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-07-03 07:31:31 +00:00
Jim Harris
7ff9609f3d nvme: add security send/receive quirk for Intel 900P SSDs
These SSDs set the oacs.security bit but do not actually
support OPAL.  So do not set the controller flag indicating
SECURITY_SEND_RECV support in this case.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3156
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-03 07:31:20 +00:00
Ziye Yang
cd8b9455ad test: Enable uring test in CI pool.
This patch is used to enable uring test in some VMs or machines
in the CI pool.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I75c2ad477f5f648289d8dbb344b75b2408d56a38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3107
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: Changpeng Liu <changpeng.liu@intel.com>
2020-07-03 07:31:08 +00:00
Maciej Wawryk
7303918290 scripts/pkgdep: Add uring install function
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Idabeee49f9a0b9093136cde214e8528f1abc37e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2702
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2020-07-03 07:31:08 +00:00
Jörg Thalheim
e7a86c42a4 ut/blob: more portable cunit version check
headers can be installed in different directories but `/usr/include`

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
Change-Id: Ibc4641813f6f1c904560dfe7d05cb9b40109cea7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3134
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-07-03 07:30:48 +00:00
Sochin Jiang
7137bde120 lib/blob: fix a potential wrong release of md page
blob_insert_cluster_msg() will release the already claimed
md page(intended for extent page) if the corresponding extent page
is found to be allocated. But later blob_insert_extent() may fails,
and this cause blob_insert_cluster_cpl() to release the same md page again,
this could be wrong if this specific md page is clamied by others, thus
cause data corruption. So, put it to zero after released in
blob_insert_cluster_msg().

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I46eba79b24b1950318002dcb27cb51b01ca566ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3152
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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-07-03 07:30:30 +00:00
Jim Harris
16364fdc14 nvme: copy 8 bytes at a time into virtualized CMB
QEMU won't emulate wide (>8 byte) instructions on an MMIO
region.  We tried to fix this previously but it wasn't sufficient.
So this version adds an explicit copy function that will only
copy 8 bytes at a time from the source cmd pointer into the
SQ cmd point in the virtualized CMB.

Fixes issue #1458.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3135
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-02 07:21:38 +00:00
Alexey Marchuk
e762508854 nvme_rdma: Add check for keyed SGL length
The length of a keyed SGL data block is limited by 3 bytes.
Add a check to fail requests which length exceeds 3 bytes.
In other case we can send an incorrectly formed SGL request with
an invalid or zero length.

Fixes issue #1450

Change-Id: I77cdaff5fbf4be5754a3ac6008b8ccd532ac5905
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3056
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-07-02 07:21:31 +00:00
Tomasz Zawadzki
d09acccfe2 test/vm_setup.sh: prioritize dnf over yum
It is possible to have yum on Fedora (either manual install
or via upgrade), yet dnf is the default pkg manager there.
Re-order the list of checks to pick dnf first if available.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I48dfda2a248a7798c9d0c8b3cb4b8a3aa615e2a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-01 09:13:03 +00:00
Tomasz Zawadzki
8bfb8c6a65 test/vm_setup.sh: exit with error when unsupported pkg manager is detected
Exit early from script execution when unsupported pkg manager is found.
Just not before the "--help" has a chance to be called.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I176bf5778dd7b2bc510f54842202113c8614a9d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3054
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-01 09:13:03 +00:00
Tomasz Zawadzki
82540a6fd1 test/vm_setup.sh: use $package_manager var instead of $PACKAGEMNG
When trying to find out parameters through "--help",
the $PACKAGEMNG is "undefined".
So the output from help does not make sense.

Change it so that the help message uses $package_manager that
was detected.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia7ac47dec810588dfa01441b35204a7bf13280ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3049
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-01 09:13:03 +00:00
Maciej Szwed
7ea417e5a3 spdk_top: Issue crash when pollers number changes
Root cause: We hit assert because we don't find
previous poller run counter. This happens when
new poller is created but 'last_run_counter' is
not being initialized for that poller.

Solution:
Force running store_last_run_counter() (which
inits last_run_counter) inside copy_pollers() by
simulating page change by changing value of
g_last_page and calling refresh_pollers_tab() again.

Fixes issue #1436

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I983154ba1f7a46a92cba41c83691f71be8ab40b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2847
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-01 07:54:03 +00:00
Maciej Wawryk
af0057e6e1 scripts/perf: Add effective QD counting
During perf test we figured out, that global qd
settings is split between disks number in filename.
Setting this parameter (multiplied by section disks number
and numjobs) in filename section give as expected value.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I89a44e48f10da131e2e9128f3ff2fbfb197076ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2749
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
Community-CI: Mellanox Build Bot
2020-07-01 07:53:54 +00:00
Karol Latecki
c0ff295493 perf/nvmf: add option to skip SPDK build on initiators
Skip copying and building SPDK on host systems if
specified in configuration file.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I4f9c0dd77e020dfd866f52dc138526e63dd9222d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3075
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-07-01 07:53:32 +00:00
Karol Latecki
d3f46b279b perf/nvmf: aggregate read and write results
Aggregate separate read/write results into
a single stat. Reduces the number of additional
fields and formulas in spreadsheets when preparing
performance reports.

Change-Id: I5fdab35c1bb69aad98f7b9808885801db0416449
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3068
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-01 07:53:32 +00:00
Karol Latecki
9228dd5dd7 perf/nvmf: sum results from all test initiators properly
Test result IOPS and BW are a sum from across all initiators,
but latencies should be an average from accross initiators.

In previous version it was mistakenly a sum, and that had
to be manually handled in Excel spreadsheets when gathering
data for performance reports.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I17e38e3cdd593dcda9730c19decc2d6a72a11130
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3067
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-07-01 07:53:32 +00:00
Karol Latecki
baa1f8a4a1 perf/nvmf: save per initiator results to a file
Save each initiator results to a .csv file. Useful
for a bit more insight than aggregated results.

Change-Id: I1fafe52ba78f2c62abfd0e3c863505515a363cd3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3053
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-07-01 07:53:32 +00:00
Karol Latecki
784553b681 test/iscsi: remove nvme bdev controller test case
Removing verify_add_nvme_bdev_rpc_methods test from
rpc_config.py.

bdev_nvme_attach_controller RPC call is frequently used in
a lot of other low-level test cases. Also this test case
fails when run on a VM with multiple NVMe disks containing
0-namespace and OCSSD emualted NVMes, which is most
probably a result of a very generic regex used to obtain
NVMe BDFs.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I091cc7fa4b426784136cda7423f829dc4a82eae0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3111
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-01 07:51:29 +00:00
Karol Latecki
afa0404c4b Revert "scripts/vagrant: Remove inline shell scripts"
This reverts commit 436b9be9d0.

Reason:
these change makes Vagrantfile rely on env variables (eg. spdk_dir),
which are only set when running scripts/vagrant/create_vbox.sh script.
After create_vbox.sh has finished env variables are not accessible,
but still needed to work with Vagrantfile using Vagrant commands
like 'vagrant ssh' or 'vagrant reload', etc. This results in
configuration errors from Vagrant and scripts being unusable.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I135c42d248c13dfa93c2210dabce49df8116e8f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3055
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-01 07:51:29 +00:00
Ziye Yang
cb98b2ab3e nvme/tcp: Report that we have free entries if send_ack is set.
Without this patch, we will face the following warning code
when compiled with (--with-uring --enable-debug) while testing
big I/O size: 256KB, e.g.,

"nvme_qpair.c: 474:nvme_qpair_resubmit_requests: *ERROR*:
Unable to resubmit as many requests as we completed"

The reason is because the nvme_tcp_request structure is not freed yet
if send_ack is not set, so there will be no entries when there
are other requests submit again.

And this patch can mitigate such issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I4c7616fbd3c82a883b4e9facd257a1a4f66e876d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3123
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-01 07:51:17 +00:00
Ziye Yang
a213592c89 nvmf/tcp: Fix the error return code
It should return "NVME_TCP_PDU_FATAL". I think that
this issue is introduced after we move the data
copy from tcp transport layer to the socket
layer. And it should return "NVME_TCP_PDU_FATAL now",
and it will be consistent with the logic in the same
function.

With this patch, it will fix the big I/O size write
from the initiator.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide018adb603eb13d002fc98886258dd1e2424f7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3122
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>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
2020-07-01 07:51:17 +00:00
Karol Latecki
65d14fd9dd doc: add 20.04 nvme-of rdma performance report link
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I2891ed952d66fe14ccd710c47be7d6bfab8c7bea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3033
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2020-07-01 07:51:09 +00:00
Changpeng Liu
021ebb3529 bdev_nvme/opal: remove unnecessary opal configuration
For base bdevs, we maintain a global list g_opal_base, and
for part bdevs, there is also a global list g_opal_vbdev,
so it's not necessary to use the configuration again, just
unpack it to opal part bdev.

Change-Id: Ia0943610dee3c194a80e44ed8eed8f2370d780fc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3106
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: Jim Harris <james.r.harris@intel.com>
2020-07-01 07:50:59 +00:00
Changpeng Liu
c3ace4f40c bdev_nvme/opal: use spdk_bdev_unregister() when deleting a vbdev
The base bdev's reference number is maintained in the bdev
layer, so we don't need to maintain it in this module.

Change-Id: Iffadbde2dbf35d934f273fdcb4b7d19e96394343
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2986
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
2020-07-01 07:50:59 +00:00
Michal Berger
0a0fe3df5c vm_setup: Remove exec() call from install_git
The 65b8c30d meant to use exec as a mean to "reload" the running
shell, however, exec simply replaces running bin image with a new
one, in this case, another shell. Since this call doesn't return
(unless it fails) this would suddenly leave the caller of the
vm_setup.sh inside the interactive shell.

Instead of re-executing the shell, simply export new PATH pointing
at where new git binary should reside.

Change-Id: I9ab5ba7f8f88602160c8be0f017477e0d1a01c08
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2790
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2020-07-01 07:50:49 +00:00
Michal Berger
4892b9353d vm_setup: Add arg for disabling use of tsocks
This mainly concerns QEMU compilation. For system which have installed
tsocks, vm_setup.sh always tries to pass --with-git to QEMU's configure
even when tsocks is not really used (it determines that based on $CONF
which by default has tsocks enabled and presence of the tsocks binary).
Since in that scenario qemu compilation would simply fail, allow user
to force vm_setup.sh into simply ignoring tsocks alltogether.

This is an alternative for a change which potentially could break the
compatibility by removing tsocks from default $CONF list (I guess there
may be some systems out there that relay on tsocks and its default setup
in the $CONF).

Change-Id: Id3583357878002c79e1a554df664c297a0e39cb3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2020-07-01 07:50:49 +00:00
Michal Berger
a66c52fd5c vm_setup: Install extra dependencies from a separate function
Since most of the sources are executed in a background, there's a
race happening between different instances of package maangers
which are called to install extra packages (for QAT and QEMU).
This mainly concerns apt-get which will not wait for locks on
given files to be released, it simply exits when they are still
held.

To avoid this, simply install all the extra packages from a separate
function before calling routine for a given source.

Running these builds in a background is still not safe in that regard,
since code of the actual source may want to perform a similar tasks,
however, this patch should at least mitigate the issue in its current
form.

Change-Id: Iede83793e1cc739cd3bc5dd4dee90f9c81d55f63
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2786
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2020-07-01 07:50:49 +00:00
Michal Berger
0ccf1fc36b vm_setup: Move gcc version check to git sources
In case vm_setup.sh is called on a bare system (e.g. cloud image), it
will instantly fail since gcc won't be on board, forcing user to either
install it by itself or by running our pkgdep.sh first.

Moving this check to pkgdep/git will mitigate similar issues since
before it's sourced, an $INSTALL portion of the script will have a
chance to run pkgdep.sh on its own (this still depends on user running
vm_setup.sh with -i arg, but still ;)).

Change-Id: I309ca42e8ea15fd14e416fc85fa0e244de2d8262
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2785
Community-CI: Mellanox Build Bot
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>
2020-07-01 07:50:49 +00:00
Michal Berger
7d2b98a770 vm_setup: Preserve environment when calling sudo
Make sure that environment is preserved for each call to sudo to, e.g.
make sure proxy configuration is not lost when executing given package
manager.

Change-Id: If221d8d6546fc0ae4f02bc5814b6688c6d78cdd6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2739
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-01 07:50:49 +00:00
Michal Berger
70dfde6f1e vm_setup: Introduce $GIT_REPOS
Allow to specify a target place for all the git sources and use it
as a full path (instead of cding directly into $HOME). $HOME is
still kept as a default.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Idb60ff8f8108368de2ac241971d221142198c89a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2528
Community-CI: Mellanox Build Bot
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>
2020-07-01 07:50:49 +00:00
Seth Howell
40d20acb72 autotest: always test against SPDK shared objects
We aren't going to run into any runtime issues when
linking against static libs, but we will when linking
against shared objects, so always test against shared
objects in autotest.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2d3d6e90f5fa4c38b3f44cf35e24b4f7e43b60ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2980
Community-CI: Mellanox Build Bot
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-07-01 07:50:27 +00:00
Seth Howell
3852afd6d8 test/nvme: in hotplug test copy lib files.
This gets us ready for the case where we want to run with
shared objects.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84d22cf9def30a27aeb11fcf18eb80080a002ef9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3021
Community-CI: Mellanox Build Bot
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-07-01 07:50:27 +00:00
Seth Howell
36e140b89e mk/spdk.nvmecli.mk: add some missing conditions.
We need to add options to include ocfenv, rte_vhost,
and libiscsi for building with shared objects.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2ba144a6f0101cb84c5ae2d9595f4d58997a3a23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3000
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-30 07:56:40 +00:00
Seth Howell
013b6b5234 move env.sh test under unittest label.
The env tests are actually mainly unit tests
and they can't run against shared objects because
we don't build unittests with shared objects.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0eb1f8cc071539881a545f4e2c36559a825a36fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2981
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-30 07:56:40 +00:00
Seth Howell
05d92eaff7 autobuild.sh: configure without shared libraries for unittests
This will allow us to run the env tests with the other tests.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1716ff25f088c49a010005ae883c57bf09b27bb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2982
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-30 07:56:40 +00:00
Seth Howell
150b9f6219 test/external_code: set LD_LIBRARY_PATH once.
Just set it once instead of doing it over and over.
This cleans up the code a lot.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I91c6ea8c02d964693909b9c53795b0f1ee09c90f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2979
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-30 07:56:40 +00:00
yidong0635
c75dfb4201 nvme/perf: Free resources when abnormal exit.
There are anbormal cases, from callocated nvme qpairs until
connect io qpairs successfully .
We should free these resources when abnormal exit, and codes
just return there.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I08de9c1fe1757a11a118ebedc326d81e2c68b077
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2985
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-30 07:55:33 +00:00
Tomasz Zawadzki
4c156e6379 lib/scsi: downgrade SCSI SO version
Internal headers (such as one in SCSI) should not trigger the
SO versoning fialures. This was addressed by patch:

(f53bf76)test/check_so_deps: limit scope of header checks.

Additionally quite recently another patch increased the SO version
for SCSI:
(6b6a3ff)scsi: add SPC2 RESERVE/RELEASE support

They were not in the same relation chain when being submitted,
so they didn't test against each other.

This resulted in:
SO name for libspdk_scsi.so changed without a change to abi. please revert that change.

For this reason this patch revs down the SO version for SCSI lib.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I69caae6c139e546afe2eeeae3395dc80ff898339
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3114
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 15:01:57 +00:00
Darek Stojaczyk
59a91950ec Pull two additional patches into the DPDK submodule
Pull the following (from branch spdk-19.11.2):
083306680 build/meson: disable libraries we don't need
8c977596d build: don't parse build configs of explicitly disabled drivers

Change-Id: Ib38a0136d3ef6984a67dbb5a092e9e166ae90167
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1524
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-29 09:20:23 +00:00
Yan Wang
abeae98424 lib/blob: check return value after malloc() and strdup()
Signed-off-by: Yan Wang <wangyan122@huawei.com>
Change-Id: Ieaaecfd12ddf7826c2e4ce6dc5f47411e7e077da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2907
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-06-29 09:20:12 +00:00
Darek Stojaczyk
1befc43b2d json_config: fix error message for loading failures
resp->error is usually a JSON object, but it was printed as
a string. For objects, resp->len was the number of fields in
this object, definitely not a length of the string to print.
There was usually just 3 characters printed with no newline.

To print this object we should stringify it using our json_write
library, so that's this patch does.

Before:
json_config.c: 192:rpc_client_poller: *ERROR*: error response: {"co
(missing newline at the end)

After:
[2020-06-19 13:33:57.060869] json_config.c: 220:rpc_client_poller:
*ERROR*: error response:
{
  "code": -32601,
  "message": "Method not found"
}
[2020-06-19 13:33:57.061067] app.c: 714:spdk_app_stop: *WARNING*:
spdk_app_stop'd on non-zero

Change-Id: I5d7aeba2b972782f18b8da0141ed4bfd79833f80
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2971
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>
2020-06-29 09:20:01 +00:00
Seth Howell
f53bf7676c test/check_so_deps: limit scope of header checks.
This prevents us from triggering false positives on internal
headers.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e7f5a8acb7da4351f21dd7619695a6a59ab1881
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2914
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>
Community-CI: Mellanox Build Bot
2020-06-29 09:19:46 +00:00
Seth Howell
03b8afa669 test/check_so_deps.sh: fix output parsing.
The previous revision to output parsing could
cause issues when more than one set of parenthesis
was included in the output.

fixes: 8661ded761

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1cbfac1186fb5ee97518f4b687f38af59c0dcfb9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3092
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>
Community-CI: Mellanox Build Bot
2020-06-29 09:19:46 +00:00
Seth Howell
27f435bc1d lib/nvmf: raise RDMA acceptor backlog to 100.
10 is kind of unreasonable. You could easily start
seeing failures if you had just 3 intiators trying to
connect with 4 io qpairs at once.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9985ffa3b03ebb33880eb5934b60eaafab57c82d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3096
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:19:09 +00:00
Seth Howell
203ed4f673 lib/nvme: report rdma_connect errors up the stack.
This will allow applications to discern specific connect
behavior and make choices relative to it.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I46182c285367ceb8a72511defe4508b3592b4572
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3095
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:19:09 +00:00
Alexey Marchuk
8421f83973 rdma: Fix qpair desctruction in error flow
rdma_qp may not be initialized when qpair is not fully
created. When such a qpair is being destroyed we may pass
a NULL pointer to spdk_rdma_qp_disconnect or spdk_rdma_qp_destroy
and hit an assert. This patch fixes this problem for NVMEoF
target and initiator.

Change-Id: I84787dc1b1211293c2a19f59d47727eaecd9d5a1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3050
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>
2020-06-29 09:18:52 +00:00
Michael Haeuptle
89013903fe NVME: Fixes stuck IOs during hot remove (#1451)
When a NVMe device is hot removed, subsequent calls to
nvme_qpair_submit_request can fail with ENXIO.
The failure path handling for ENXIO did not free the request which
exhausts the qpair's free_req list eventually and all IOs are stuck
going forward.

This fix adds the same cleanup handling to nvme_qpair_submit_request
for this error case as it is done in _nvme_qpair_submit_request.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I5677d53965bdbd6d339c013483cdf42ce782099a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3018
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-29 09:18:29 +00:00
Ziye Yang
ceb07eb8f4 nvme/tcp: Fix send_cb and recv pdu function contention when there is R2T.
When using uring socket, we see following assert

nvme_tcp.c:1018: nvme_tcp_capsule_resp_hdr_handle:
Assertion `tcp_req->state == NVME_TCP_REQ_ACTIVE' failed.
Detailed info is in

https://ci.spdk.io/results/autotest-per-patch/builds/19205/archive/nvmf-tcp-vg-autotest/build.log

We face this issue, because there is also code execution ordering
between "sending callback function" and "pdu receving function".
We did not find it in physical machine testing, but finding it
in vagrant machine in CI.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I5eb241d564c0fc42ce0601b7c85999a2550f0de3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3046
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-29 09:18:13 +00:00
Ziye Yang
c833729b22 sock/uring: Fix the nvmf_shutdown_tc3 failure issue.
If the socks parameter(passed in uring_sock_group_impl_poll) is NULL,
we do not need to handle the sock_flush and prep the pollin task,
otherwise it will cause the assert issue when we reap the task when
we handle the nvmf_shutdown_tc3 issue.

Because in uring_sock_group_impl_remove_sock, we finally
set sock->group = NULL. Without this patch,
when we call uring_sock_group_impl_poll in this function,
pollin_task or write_task are prepared, then in the next round,
we will reap those tasks again.

PS: Error info can be found in
https://ci.spdk.io/results/autotest-per-patch/builds/19186/archive/nvmf-tcp-vg-autotest/build.log

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7e6deaa05e958b52e71e0bbf0ccdd20e35583685
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3031
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:18:13 +00:00
WANGHAILIANG
74050eacd7 script/perf: move "make clean" before "./configure"
I suggest putting "make clean" before "./configure". Like Migration-tc3a.sh (spdk/test/vhost/migration):
ssh_remote $MGMT_INITIATOR_IP "cd $spdk_repo_share_dir/spdk; make clean; ./configure --with-rdma --enable-debug; make -j40"
Otherwise, once the configuration is changed, some outdated compiled files may remain after "make clean".

Change-Id: I7300749986129cbfaef44f8ff72fad0449f4e081
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2805
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-26 07:21:15 +00:00
WANGHAILIANG
a1c00096dd example/hello_blob: Drop .ini config in favor of json
Change-Id: Iea222f4ef072676cbb5e9014a7d98ac08a4e617a
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2967
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-25 07:16:19 +00:00
Changpeng Liu
b18895d025 UT/scsi_reserve: add Persistent Reserve with SPC2 RESERVE/RELEASE test case
As SPC4R31 5.9.3 "Exceptions to SPC-2 RESERVE and RELEASE behavior" says,
add a SPC2 RESERVE/RELEASE test case when PR is present.

Change-Id: Ibd7e703895cb910637677c6cb28b09e014976e9d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2893
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-06-25 07:16:08 +00:00
Changpeng Liu
51fe275f10 UT/scsi_reserve: add a typical unit test case for SPC2 RESERVE/RELEASE
Add a test case for SPC2 RESERVE/RELEASE from 2 hosts.

Change-Id: I7b2a6352aa8a90a291f495f059de8920d6cbc11b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2892
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-06-25 07:16:08 +00:00
Changpeng Liu
6b6a3ff91f scsi: add SPC2 RESERVE/RELEASE support
Some OS(Windows and VMWARE esxi) will send SPC2 RESERVE/RELEASE
commands when formatting the filesystems, but in our previous
implementation of reservation feature, we didn't add such support,
in specification SPC3/4, they all include one section "Exceptions to
SPC-2 RESERVE and RELEASE behavior" feature for compatible support of
SCP2 RESERVE/RELEASE, so we add this support now.

Fix issue #1414.

Change-Id: I65d85ffb3b8f824b0ae4e130f53f01d95735d700
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2802
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-25 07:16:08 +00:00
Michal Berger
9d7b1f7525 vm_setup: Clone spdk from a separate function
Change-Id: I59030c4570a03f8c6dfcf4a5f86426e3b5875744
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2527
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>
2020-06-24 08:23:25 +00:00
Michal Berger
3920b81681 vm_setup: Make vm_setup.sh to use specific source for repo installations
Change-Id: I01613720e078a0fa151ed9a4a17e2faf131510bc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2526
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-24 08:23:25 +00:00
Michal Berger
585c9298e4 vm_setup: Make vm_setup.sh to use specific source for package managers
Change-Id: I8b0ab4255f278090a3d4153463d78f620f9f2d31
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2525
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-24 08:23:25 +00:00
Michal Berger
aede72ef43 vm_setup: Fix target dir lookups for vpp
Change-Id: Iff83e152954cbe4ead2d937e409036bd95100517
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2738
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-24 08:23:25 +00:00
Michal Berger
4290d218f6 vm_setup: Don't perform checkout directly in spdk repo
Perform it inside the a copy instead.

Also, don't copy the repo if target directory already exists.

Change-Id: Icdff80c978c7a8998b113db27bf744503bb29d0f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2737
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-24 08:23:25 +00:00
Michal Berger
c943701c7d vm_setup: Compile refspdk in a subshell
This is done in order to not taint the rest of the environment with
autotest settings.

Change-Id: Iad31096aa29d4893200e64c77f2cf22663f0dfc7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2524
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:23:25 +00:00
Michal Berger
18bc2f70d6 vm_setup: Add dedicated source for git repos
Change-Id: I1d4e854cca192a4d3f74a8ec95431be80a2ff261
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2523
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:23:25 +00:00
Jin Yu
eb76afe78b event: add iova-mode parameter
Export iova-mode parameters in spdk which is useful in
VM environment.

Change-Id: I3f4756b2c3b6cf5d1964a50bbf63f9c596997696
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2910
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-24 08:22:24 +00:00
Ziye Yang
2ac8d3ff5e nvme/tcp: Allocate send_pdu with DMA allocated memory.
Purpose: It will be used to leverage the uring acceleration
later when we use io_uring_prep_write_fixed.

Because for using the Registered buffers feature in I/O uring,
we currently can register all the huge memories. And if we
allocate send_pdus in DMA memory, we can leverage such feature.

Change-Id: Id0ba5f7fe43202027c0378e9cbe74d861aad21e5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3002
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-06-24 08:22:17 +00:00
Ziye Yang
d81d7a2c22 bdev/nvme: fix the compilation warning for unused variable.
The error message is:

bdev_nvme.c:456:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
  456 |  int rc;

Reason: The CI testing pool will always use --enable-debug, but without this
flag, we will see complilation warning.

If we really want to catch this, it is better to really use this rc variable and print
some information.

Change-Id: Iec0ffcec4ec091d36044e3b36a9ac85e677b5c70
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3001
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-24 08:22:11 +00:00
Shuhei Matsumoto
465b2f8a6b nvme/rdma: Inline nvme_rdma_req_put()
nvme_rdma_req_complete() and nvme_rdma_req_put() are called in a
row except a single case. Move clearing completion_flags and req
of rdma_req from nvme_rdma_req_put() to nvme_rdma_req_complete(),
and then inline nvme_rdma_req_put() because nvme_rdma_req_put()
does only insert now. To do this, change the type of the second
parameter of nvme_rdma_req_complete() from struct nvme_request
to struct spdk_nvme_rdma_req.

For the exceptional case that only nvme_rdma_req_put() is called,
change nvme_rdma_req_init() to clear rdma_req->req if returned with
error.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf7e6d245f3a48fb895cd9e6d92596ef833f26d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2876
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
a57aeac1fe nvme/rdma: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, RDMA transport dequeues rdma_req from
rqpair->outstanding_reqs after calling nvme_complete_request() for
the request pointed by rdma_req.

Hence while nvme_complete_request() is executed, rqpair->outstanding_reqs
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, move dequeueing rdma_req from rqpair->outstanding_reqs
before calling nvme_request_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia183733f4a4cd4f85de17514ef3a884693910a05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
299fce881a nvme/pcie: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, nvme_pcie_qpair_complete_tracker() dequeues tr from
pqpair->outstanding_tr after calling nvme_complete_request() for the
request pointed by tr.

Hence while nvme_complete_request() is executed, pqpair->outstanding_tr
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, change nvme_pcie_qpair_complete_tracker() to
dequeue tr from pqpair->outstanding_tr before calling nvme_complete_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9efc200d06d02d8ee2be3cb8e9fd64591bc210d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
aacac0b433 lib/nvme: Get ctrlr simply from req->qpair->ctrlr at spdk_nvme_ctrlr_cmd_abort()
req->qpair and qpair->ctrlr are set at their initialization, and
hence we don't have to store ctrlr to req->user_buffer but we can
get ctrlr simply from req->qpair->ctrlr.

Besides, save a local variable by overwriting qpair when it is NULL.
This is also a small clean up.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1cca763fbaae55079b38f7f16fcf779360232797
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2890
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
43f3a8d99f lib/nvme: Factor out submit abort request into a helper function
To reuse the code for the upcoming new function
spdk_nvme_ctrlr_cmd_abort_ext(), factor out the operation to submit
an abort request into an new helper function
_nvme_ctrlr_submit_abort_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id00bed8fb8dc15b77e3c7f19105c1623588faa53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2494
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
5322f30787 lib/nvme: Fix aborting queued abort requests at controller reset or destruct
ctrlr->outstanding_aborts is counted only for submitted abort requests.
However ctrlr->outstanding_aborts had been decremented for queued
abort requests by mistake.

Subsequent patches will use parent-children for abort requests but
nvme_free_request() is not aware of such relationship.

Queued abort requests had not been canceled or aborted when controller
was destructed. Retry submitting queued abort requests had been
repeated recursively and had caused stack overflow.

This patch fixes all.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ce0ae51ddd5ed3e1e8ac86329c8bdb7a9236b2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
5cbc1d5cae lib/nvme: Factor out retry queued abort into a helper function
To reuse the code for the upcoming new function
spdk_nvme_ctrlr_cmd_abort_ext(), factor out the operation to retry
queued abort into an new helper function nvme_ctrlr_retry_queued_abort().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56bdfefe2c54990c9fd0463303b3d65ccf6e8942
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
9d4751a550 lib/nvme: Fix Abort Command Limit to process as 0's based value
SPDK NVMe driver had processed ACL as 1's based value by mistake,
and SPDK NVMe-oF target sets ACL to 0. Hence If NVMe driver connects
to SPDK NVMe-oF transport, spdk_nvme_ctrlr_cmd_abort() always queued
abort request.

Fix this bug to process ACL as 0's based value in
spdk_nvme_ctrlr_cmd_abort(). Besides, initialize ACL explicitly to
0 in spdk_nvmf_ctrlr_identify_ctrlr() for clarification.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id4f3a469776cdab88bcc6f41e7893885a7b78d8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2513
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
10c4193363 lib/nvme: Set the parent to failure when submission of any children failed
When one of the children is failed to submit, if any children is
already submitted, the function can return success to wait for those children
to complete, but the parent should be set to failure.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ea53856ee58da991bceca0058d1e1f55d42af37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
b3d0c369a8 lib/nvme: Fix wrong completion status when retrying queued abort command
next->cpl should have been set if nvme_ctrlr_submit_admin_request()
failed in spdk_nvme_ctrlr_cmd_abort_cpl().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4114294e398b18148d8a9ad798a656a7686c5a85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2491
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
ntsaravana
8c710c9d63 nvme/fio_plugin: Add Weighted Round Robin(WRR) Support
Added code to enable WRR support in fio plugin

Signed-off-by: ntsaravana <saravanan.ns@hcl.com>
Change-Id: Ie82554538c720e0a956d38716293f45a0fdc709c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2759
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-23 08:58:39 +00:00
Maciej Wawryk
436b9be9d0 scripts/vagrant: Remove inline shell scripts
Moved inline provisioning steps to external script,
to tidy up Vagrantfile

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I65ffae8180c2fb28701be34384b13928877db5fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2946
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-23 08:58:33 +00:00
Maciej Wawryk
6fac35a3f4 scripts/vagrant: Move getting variables into one place
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id63cd5fa330dd21f73875f11ecfd964e67dfd949
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2945
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-23 08:58:33 +00:00
Maciej Wawryk
8f6fdefd53 scripts/vagrant: Add missing equal sign
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iddee2b60137bd22a2a4e28552e27cb2f7e8185e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2944
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-23 08:58:33 +00:00
Karol Latecki
8e8864f27e test/cuse: use 512B block size on namespace revert
Use 512B block size when running nvme_namespace_revert
routine. Need to use this block size because of
vhost_boot.sh test case.

Fixes #1452

Change-Id: I5f41cf2bf9d63b811849a99de6cba9b7b5a1d97d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3003
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.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-06-23 08:04:05 +00:00
Wojciech Malikowski
c10c9bf767 lib/ftl: Evict valid cache entries when destroying io channel
When io channel is being destroyed some of its write
buffer entries could still be a valid cache entry.
This patch evicts all entries during io channel destroy
to keep consistent l2p table.

fixes issue #1434

Change-Id: I4e1cd206102c1f565b0f3e2dc90b5c2b3ed3d28c
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2964
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: Konrad Sztyber <konrad.sztyber@intel.com>
2020-06-22 15:48:47 +00:00
Maciej Szwed
71ccea94ce doc: Update docs about new thread model
spdk_app_start no longer creates threads and appropriate
docs should be updated.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I29736e26faa6a3250a6019e90d9734ff04f6e1fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/518
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: Paul Luse <paul.e.luse@intel.com>
2020-06-22 10:13:56 +00:00
Seth Howell
62ded32fd7 bdev/nvme: add failover option to bdev_nvme_reset
When we fail to process admin completions on a controller
attempt to failover to a previously registered trid

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Icdb43a726969fede4665f2fe59723dd90c5dad0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2883
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Seth Howell
5f13e0f67f bdev/nvme: add a function for specifying a multipath trid.
This is part of a larger series enabling failover at the bdev
layer for NVMe.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0d89e1afab8aeaa90237d0ba780d708154f6e3be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2881
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Seth Howell
af9e73302f bdev/nvme: make the controller trid a pointer.
This lends itself to easily changing the trid during failover.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iae21a98de4f9dd1192a50abac0ec7fb0dd8a2e99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2882
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Ziye Yang
3a1f5364d2 nvme/tcp: Fix nvme_tcp_req free conflict between cmd sending and incoming pdu receiving
This patch tries to solve the out of order
call back handling for cmd sending and the incoming pdu handling.

Normally, the cmd call back will be called before
receving the next PDU from the target if the application
uses the sync manner.

With the uring implementation, after sending the
cmd to the target, we may have the following scenerio:
(1) Firstly receive the incoming pdu(e.g., CapsuleResp pdu, C2hdata pdu)
due to the group polling read event.
(2) Secondly execute the callback function related with NVMe command sending.

This means that the data from the initiator is really sent out to the target,
and the target receives, then sending back the data to the initiator. But the
uring io_uring_cqe event is not handled, thus if we execute
(1) first, it will clean the data structures related with nvme_tcp_req, and the
nvme_tcp_req will be used for other purpose. Then causes wrong behaviour like
the following:

"Rand Write test failed at QD=128 because fio hangs with the following error:
nvme_tcp.c: 971:nvme_tcp_capsule_resp_hdr_handle: *ERROR*:
no tcp_req is found with cid=66 for tqpair=0x7f23d8001710".

And this patch can address this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I5043aaa8adf5033d93dedac15f633f0850e0b9f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2818
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-22 07:47:31 +00:00
Changpeng Liu
6366e361fe test/nvme_arbitration: use extended block size API
spdk_nvme_ns_get_extended_sector_size() is same with
spdk_nvme_ns_get_sector_size() if the drive wasn't
formatted to extended LBA format, but if the drive
was using extended LBA format, it will cause error
without this patch.

Change-Id: Ie845453949c65a9f1d1370227fe3363648f0d0d9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2934
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:19:38 +00:00
Changpeng Liu
bd7689bd18 test/nvme_arbitration: don't print inactive namespace information
There are many log prints such as:
Controller INTEL SSDPF2KX012TZ  (PHAC0016001N1P2EGN  ): Skipping inactive NS 0
Controller INTEL SSDPF2KX012TZ  (PHAC0016001N1P2EGN  ): Skipping inactive NS 0
for inactive namespaces, so here we just register active namespaces for tests.

Change-Id: Idbb89c4e5610b4c725dbc211acaefd1897cceeb5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2933
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:19:38 +00:00
Jin Yu
4539ac58ae vhost: fix vhost_blk_destroy issue
If the vhost dev can't unregister successfully then we
leave the io channel and desc. In the bdev remove callback
we will free them or It would cause heap-use-after-free
issue.

Fix github issue: #1443

Change-Id: I09f4616e181d6657add3acef0ff92336fb9a9643
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2924
Community-CI: Mellanox Build Bot
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-19 07:19:20 +00:00
Ziye Yang
a37fd6e03d uring: remove user's ring file descriptor operation.
According to the description of io_uring_queue_exit:

Tear down function for io_uring. Unmaps all setup shared ring buffers
and closes the low-level io_uring file descriptor returned by the kernel.

So we should remove the close operatoin on ring fd.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I910c6e8acd935925b7985c2aa750df385004eb55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2922
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:18:40 +00:00
Karol Latecki
1d903d69e6 doc: add entry about 20.04 vhost performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3bd4c05e760134d4de166a5733e6189d245699f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2888
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-19 07:17:32 +00:00
Ben Walker
5584232cce nvmf: Remove new_qpair callback from transport accept function pointer
Transports may now call spdk_nvmf_tgt_new_qpair() instead.

Change-Id: Ib3295c488e22517e82f2051055ae47521d76fe56
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-18 07:29:41 +00:00
Alexey Marchuk
268aacb24a rdma: Add new API spdk_rdma_qp_accept
This API is a wrapper for rdma_accept which allows
to remove spdk_rdma_qp_init_attr::initiator_side.

Change-Id: Iba2be5e74e537c498fb11c939c922b2bbda95309
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2908
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-18 07:28:04 +00:00
Alexey Marchuk
5f6ef934df mk/nvme/nvmf: Add deps for RDMA libs
These dependencies were removed in patches that added
RDMA provider. It was incorrect change since it causes
SEGFAULT when SPDK is built with shared libraries

Change-Id: I15f4ff86a75b3d080e1c7c89d75af4959c4ed989
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2900
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-18 07:28:04 +00:00
Seth Howell
0ebb046038 test/nvme.sh: rewrite nvme_fio test to find namespaces using identify
The old version of this test was using a function
that only detects NVMe drives bound to the kernel
driver so it was not finding any work to do.

Instead use identify to find NVMe namespaces.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I937fc364254a926b8d251ec0cb38ea026593d977
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2788
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-18 07:27:51 +00:00
Tomasz Zawadzki
4c21ef3645 test/cuse: revert NVMe namespaces to default state
If for any reason the cuse tests do not revert state
of NVMe namespaces to the original state, the test
machines would be stuck in until manual intervention.

Assumed default state is single namespace,
encompassing available space formatted as 4k block size.

This patch adds nvme_namespace_revert(), which
searches for NVMe devices that support Namespace Managment
and have some space unallocated.
When such device is found, all existing namespaces are removed
and single one created.

Fix #1435

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifc3b04b3f166bf450b884674fa6a482e2fbc4c29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2829
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-18 07:27:36 +00:00
Seth Howell
d5eb583584 post_process: clearly delineate the beginning os script output.
This is a companion change to
https://review.spdk.io/gerrit/c/build_pool/jenkins_build_pool/+/1810
and the two should be merged together to make sure the entire output
of the post process script is included in one file when output from
the CI.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia6506208881f5d745ff63a356d3965426449ecc7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1811
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-17 07:21:44 +00:00
Jacek Kalwas
eb79ef5727 nvmf: expose api to remove qpair from internal poll group
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I681327d405f60757c43b66592d9af7bd7ac2db0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2774
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-17 07:21:36 +00:00
yidong0635
7b77e06801 sock/net_framework: Adding a static inline function to get next framework.
This can remove these duplicated codes.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie6590fc10e72471dbc6f0c1ac9c14eb3edfa3599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2769
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:28 +00:00
Ben Walker
ea02571d0f nvmf/fc: Fix issue with multiple AERs and aborts
Recently support for multiple AERs was added to lib/nvmf, but the fc
transport was not updated.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1755fdc4a6db2c6ce751c34fe5ad1d43e30298f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-17 07:21:21 +00:00
Changpeng Liu
45a3cb2be4 test/bdevio: add data length check for extended LBA format
When the block size is 520(512 + 8) Bytes, we should check the data
length before the tests.

Change-Id: I785e395c9427460238205a52220e8333eee99ec0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2905
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-06-17 07:21:14 +00:00
Changpeng Liu
c19fcb00d0 test/bdevio: consolidate IO valid check into a function
Change-Id: Ib99d6a558e74c3cdc2d12da9a6bcf9b4181de250
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2904
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-06-17 07:21:14 +00:00
paul luse
0aca4d91e8 lib/idxd: clean up some casting and type issues
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If196c51deead9828fd75388f34b5622884c5e2d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2204
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>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
d7b0a892bc lib/accel: minor cleanup: remove extra stack variable in functions
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8d2b286f5e21e0de32f67b3449e3fcf3904a2a9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2401
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>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
89495464b1 examples/accel_perf: add option to provide fill parameter
Before the value was hardcoded, provide it as a user option.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I841a3da266b7ab6e7d71503f2872338d07c8bead
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2139
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>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
0ef079c6e5 examples/accel_perf: add support for dual cast
Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0535720b2b167ee8191e90998e55c2d5ac4ce6ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2130
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: Ben Walker <benjamin.walker@intel.com>
2020-06-17 07:21:05 +00:00
paul luse
a68b315772 lib/accel: add dualcast function
Add to both accel framework and add sw engine implementation.
IDXD implementation and accel example app patches to follow.

Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7df28518505f0d4bbb32cc8e69eb8a231fb29452
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-17 07:21:05 +00:00
paul luse
8d2c520048 lib/idxd: add support for dual cast
Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icadae34a75c35e2db672a193287b147416012a5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2129
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>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
40ec8e97fe examples/accel/perf: check engine ret values and don't stop on fail
A subsequent patch brought me to realize that I was not checking the
return values from operational calls to the engine. Also, noticed
that on any failure we'd stop submitting IO but still wait until the
timer expired to exist. To match what other perf tools do, now
continue to submit even after an error and run until the clock is
out giving an accurate count of transient failures and successes.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5e6a0f382f9090e428ee67fbdfb60926e9c85917
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2879
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>
2020-06-17 07:21:05 +00:00
Tomasz Zawadzki
f2f1060ed2 test/cuse: run namespace managment test if device supports it
In case when no device supporting Namespace Managment was found,
the test case exits without producing an error.
For example QEMU NVMe emulated device does not support it, thus
only physical devices have to be used right now.

This goes against design of "run_test" function, that when executed
should always run and never silently skip.

This patch adds check whether there is a device support and triggers
the test case only then.

Note that original code for selecting the device is still in original
script. This is to enable running nvme_ns_manage_cuse.sh on its own.

Right now CUSE tests are only enabled on VMs so nvme_ns_manage_cuse,
was added to exception list.

This will soon be reverted as the tests are moved to job that
runs on physical machines.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie784696c2628b5fe45ce751b3978abcc03118cd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2828
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
2c47df9419 test/cuse: cleanup and better describe ns_manage test script
Added more comments for clarity.
Moved namespace size calculation to the clean_up() function.

Changed size calculation from nvmcap (id-ns) to tnvmcap (id-ctrlr).
There is noneed to cache the size before deleting namespace,
if we assume that all devices had single namespace encompassing the
whole device.

Changed blocksize from 512 to 4k. All devices in CI should support that,
and usually thats the default.
This could be further improved by reading LBAF and checking the Relative
Performance (RP), but that would convolute the test scripts. This
is good enough.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8a38d00ae1442edf5480e4e72a8a8aa90380cd79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2827
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
933ba7f710 test/cuse: move nvme reset to reset_nvme_if_aer_unsupported() function
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I99925974b6004484a0d308ccd56120360b89b8ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2826
Community-CI: Mellanox Build Bot
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: Karol Latecki <karol.latecki@intel.com>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
4883aeb218 test/cuse: remove superfluous setup.sh
It is already assumed that enviroment was prepared,
setup.sh ran binding the drives.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I864590b57db880b33c7b32deba8d38e4d5637b5b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2825
Community-CI: Mellanox Build Bot
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>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
256f554d9e test/common: add get_nvme_ctrlr_from_bdf()
This is used couple times in cuse test, so move it to common script.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1e9f973e7fb53b0024fb320d37632e1e011ba3e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2824
Community-CI: Mellanox Build Bot
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: Karol Latecki <karol.latecki@intel.com>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
4e0eb251f7 test/cuse: move all nvme-cuse tests under single script
This will help with managing the test execution and preparation.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0bd3612381d031a4015335d162f1296fd6dd213d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2823
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-17 07:20:55 +00:00
Tomasz Zawadzki
24260d2a0d test/cuse: fix conflicting name for cuse tests
"nvme_cuse" name for run_test was already used by one
of the tests in nvme.sh.

This removes the naming conflict and will prepare for further
restructure of nvme-cuse tests, where "nvme_cuse" name will
encompass all cuse tests.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If141fe0ef492e0cde8e68490550de5d48fecb5e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2822
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-17 07:20:55 +00:00
Jacek Kalwas
b3767a239d env_dpdk: expose base virtaddr as an option
This might be helpful if secondary processes cannot start due to
conflicts in address map.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I180dc09b4cad3b0064f009b0f553f5929de6566c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2776
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-16 07:45:07 +00:00
Tomasz Zawadzki
37051fa670 test/vpp: Allow skipping 'iscsi_tgt_vpp' run_test
In SPDK 20.07 will be deprecated, this means that CI
will no longer build or test the VPP component.
With SPDK 20.10 VPP the implementation and test scripts
will be removed.

autorun_post.py processes all run_test instances to
verify that they were executed. Since CI will skip
VPP tests, it needs to be added to list of exceptions.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I06c76643e6189d32471d9f53a0987e52f167844b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2771
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-06-16 07:44:59 +00:00
Ben Walker
ff24db746f nvmf: spdk_nvmf_tgt_accept no longer takes a new_qpair pointer
Calling spdk_nvmf_tgt_accept() now automatically assigns new qpairs
to the best available poll group.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3df2a2c5a28dba45c5ba0cbd1e8c28dd7e56cf9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2813
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-16 07:44:49 +00:00
Ben Walker
c37cf9fbd8 nvmf: Make transport-chosen the only valid qpair scheduler
The transport always knows best.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If66f539033fe11c50dc42e12ec990468588d5739
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2812
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-16 07:44:49 +00:00
Shuhei Matsumoto
e0cd084bcb nvmf/rdma: Clear num_outstanding_data_wr to zero when read I/O to the controller failed
When read I/O to the controller failed, clear
rdma_req->num_outstanding_data_wr to zero to avoid
rqpair->current_send_depth goes to negative after completing data
transfer to the host.

This bug was apparent when the outstanding read I/O was aborted.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62e439f946ef81ea0b5de5280670ed97fe8d977f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2341
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-15 15:28:15 +00:00
Shuhei Matsumoto
af61ab90c7 nvmf/rdma: Skip the state DATA_TRANSFER_TO_HOST_PENDING when the I/O failed
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0036e38004bb0a1afc22d67d347dcd33a61eb0a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2134
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: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-15 15:28:15 +00:00
Maciej Szwed
e7e10859d3 nvmf: Make spdk_nvmf_tgt_accept return the number of events accepted
This will be usefull for pollers/threads stats.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4d1651f3ff6410c258c8bc75c2a68640b67d2ed9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2849
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: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-15 15:28:00 +00:00
Changpeng Liu
d5ebb7e118 test/nvme_reserve: set host identifier at runtime
This will help us to change the host identifier if required, moreover,
some drives sometimes report set host identifier failed when startup,
so set host identifier at runtime making more sense.

Change-Id: I939c059d890b06aa2d51e82e0dede9630a6a1b51
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2860
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-15 15:27:50 +00:00
Changpeng Liu
6b757ecb0f test/nvme_reserve: rename the global variables with "g_" prefix
Change-Id: I6e031f78f9aa773ff105e4124240345b1669f684
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2859
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-06-15 15:27:50 +00:00
Seth Howell
6d169be55b add _ to spdk_nvm*_transport_register constructors.
We don't want these internal functions to show up in the
object files with an spdk prefix.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic14cbe2963e176bddbff1a729b503f972a78419d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2871
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-15 15:27:40 +00:00
Seth Howell
4a27b3882e lib/bdev: add _ to spdk_bdev_module_register
This is technically a function that will remain
static in the library where SPDK_BDEV_MODULE_REGISTER
is invoked. It was missed in earlier checks because it
is created via a macro.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I32a59f88bb7c112183763f222d4e1c8c864c545a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2794
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-15 15:27:40 +00:00
Michal Berger
5327de1ffa scripts/vagrant: [nvme] Enable CMB buffer on demand
Allow to specify additional argument which will tell Vagrant to enable
CMB on given nvme drive. The format of the argument is any string which
is then simply converted to plain "true". E.g.

./create_vbox.sh -b "/path_to_nvme_img,nvme,3,true"

Change-Id: I7de55e46491318b082bf4e2165260091b44d60f0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2725
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-15 15:27:32 +00:00
Karol Latecki
262c35fc9a test/vhost: enable packed ring for BLK in performance tests
Enable Packed Ring option in performance tests. Only BLK
stack for now, as SCSI doesn't have this option yet.

Change-Id: Ie70642dd846ada35926e17204770ea2436089432
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2716
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-15 15:27:25 +00:00
Karol Latecki
2c7ba231d3 test/vhost_perf: use system fio if not specified by user
Use system-wide fio if a specific binary was not provided.
Additionally add 1 second delay after finishing fio run
to make sure fio client-server finishes correctly.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Id7d1e7f70017755206c8fe9942ef8d6051a73bbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2559
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-15 15:27:25 +00:00
Karol Latecki
d3e367a5f1 test/vhost/common.sh: make fio bin variable local
Make the variable local, so that we don't unnecessarily
read it's value from base script in case it's defined.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib4d95d3c67cfa8918c67f0b2642e9a3fe2ca3260
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2558
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-15 15:27:25 +00:00
Ben Walker
e7ceb0b926 nvmf/fc: Fix compilation issue on gcc 9
struct spdk_nvmf_fc_rq_buf_ls_request does not need to be marked
as packed. The static assert that immediately follows will catch
any inserted padding.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id11ac9865a9c60f6d147d0f829d272ca791d0336
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2683
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Ben Walker
d4f72f71e4 build: Don't compile DPDK when doing make install
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I146bc479ddb2c84760a21e4f5a009b9ec8e53700
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2644
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Ben Walker
3352b2a7b1 build: Copy headers to build/include on build
For completeness, now all output is placed into build/ in the
appropriate location. In the future, 'make install' can be changed
to simply copy from there instead of rebuilding.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I236b37868b5f4a2d5c5b910090aeaa9dff0501e2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2381
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-15 15:27:16 +00:00
Ben Walker
85bdd43b40 build: Example applications build to build/example
This mirrors build/bin and build/lib

Change-Id: Ide1d17dfc8b425adfbe67f381c93c236653bd301
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2380
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Ben Walker
c3b5ae0c60 build: Place fio plugins into build/fio
This makes them easier to find. They are now named
spdk_nvme and spdk_bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1f6736d8f7f5b9669583731fb0b710ba54f0d50a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2679
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-06-15 15:27:16 +00:00
Ben Walker
6b9b448e53 build: Output executables from the app directory to build/bin
Automatically place binaries produced from the app directory
into build/bin. This matches with the output in build/lib
that already exists.

Change-Id: I13cd2da71d2f88592e22308fe8a907bf458458b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2379
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-06-15 15:27:16 +00:00
Jin Yu
918177d6fd vhost: set the packed ring as default
The packed ring can supply up to 10% performance promotion.
Let's set the packed ring format as default.

Change-Id: Ie722417d20f3355769eefce4fec9831c60976e6f
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-12 15:45:27 +00:00
Jin Yu
817c7b4f6c thread: add info logs
If the operation function is not specified in spdk thread lib init.
Add a info logs to tell user that you should manage and poll the
thread.

Change-Id: I536c6954c129fbbbc2d19776866fa348d49688ee
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2804
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-12 15:40:31 +00:00
Changpeng Liu
d3e9384c5a test/nvme_dp: return failure correctly when test it in CI
We will skip the test case if the drive didn't report such
capability, this isn't treated as an error case.

For vagrant environment, the namespace size is set to 1GiB or
2GiB, so here we also change the test LBA start from 0.

Also use printf instead of fprintf for normal exit.

Change-Id: Ib9f845ae548452921564aafebd2b23da6310b071
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2768
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>
2020-06-12 15:40:22 +00:00
Seth Howell
8cad1a9d15 nvme/fio_plugin: allow for not supplying a namespace.
This will open up the way for probing and connecting to
all of the namespaces on a pci controller.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8fa3dde9f249ce826659882e66f630b8c25e2701
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2779
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-12 15:39:20 +00:00
Karol Latecki
efc0fb1706 doc: add entry about 20.04 nvme-of tcp performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I02bbd47abd96e8c126f1929ebe0185f5f7ca8e16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2819
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-11 19:52:30 +00:00
Tomasz Zawadzki
bcf04682f1 test/ocf: do not use iter_pci_class_code in OCF test
See commit msg from db43b387:
"Do not use iter_pci_class_code function in tests to
iterate over NVMe drives. This function can return
drives which at the moment of execution can not be
whitelisted for use.

This can result in test errors (such as simply
bdev_nvme_attach_controller RPC command failing) or
even using and deleting data from NVMe drive which
was not meant to be used in tests."

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifa70a51822f78e95b6cddbfe665ea95ec1b423c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2837
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>
2020-06-11 19:52:08 +00:00
yidong0635
d1ad2cc9a4 nvmf/nvmf_rpc: Remove unnecessary returns.
These returns at the end of functions, so remove them.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1f54d812956727e1871f4879c8bc9a526d7d14c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2848
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-06-11 19:51:59 +00:00
Ziye Yang
41219b2b9e iscsi: Add DataSequenceInOrder in discovery_ignored_param
The implementation of Calsoft case tc_login_29_1
is wrong. We should return "Irrelevant" to the initiator
when Session type is discovery.

Also also update the known failure test cases of
Calsoft.

Fixes 958.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I38cd2cf39bf80fd025ab74bc9dfe6ac412d01328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2846
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
Community-CI: Mellanox Build Bot
2020-06-11 19:51:04 +00:00
Karol Latecki
b7200d0eb8 doc: add entry about 20.01 nvme-of rdma performance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7c59908e8e913da022ae9b8dd7abbcf2de019654
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2856
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>
2020-06-10 23:25:08 +00:00
Ben Walker
9135a72cf8 nvmf: Keep a list of poll groups on each target
The plan is to push the logic that assigns qpairs to poll groups down
into the nvmf library. To do that, we'll need to have a list of the poll
groups.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iea59ac1a439dbd1bcae68fb2977a47a855884a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2811
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2020-06-10 14:02:38 +00:00
Monica Kenguva
03e3fc4f58 githooks/prepush: remove clang
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic63b3d89219e96f588f9b43c89de27edd25a22bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2748
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:56:32 +00:00
Ziye Yang
687a9ab516 iscsi migration test: Extend the execution time of fio.
When we conduct the ip migration test (i.e., switch the iSCSI target
process from to first process to
second). This time may exceed the 5s in some cases, so
FIO process will exit with error and make the test fail.
Because The total FIO execution time is 10s, and we sleep 5s
in the script. So propose the following approach:

1 Change the sleep from 5s to 3s, we do not need to sleep
it too long for FIO.
2 Extend the FIO execution time from 10s to 12s.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I07d488c6e8a94733534acc1acd2ba8778c4d2eb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2801
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-06-10 13:55:40 +00:00
Ziye Yang
d0818a2cbb test/iscsi: fix wait for iscsi devices in ip migration test
We should wait until login fully performs before fio tests
to avoid intermittent failures.
(Suggested by Shuhei according to the rbd issue fixed previously)

Fixes 1313

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I331bf6d69bf0a5c9ef6e36c4325334159062f949
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2815
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-06-10 13:55:40 +00:00
Michal Berger
1780a09847 vm_setup: Add dedicated source for yum
Change-Id: I4669573d9fc28fe4c1bb3614abc45f0a83e7399c
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2522
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
4a04fc1976 vm_setup: Add dedicated source for pkg
Change-Id: I394d89b3d69ab559476fc78fdd9ecb47a8a46914
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2521
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
ec43840112 vm_setup: Add dedicated source for pacman
Change-Id: Ied0fbf5251b3fc3f1a6a1b5731958ffebed5e0d0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2520
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
16f36c7b88 vm_setup: Add dedicated source for dnf
Change-Id: I4b536b303d9f689c69cfb98aa500a5799b65f27a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2519
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Michal Berger
2b9ac640b3 vm_setup: Add dedicated source for apt-get
Change-Id: I80fd72d38ceb7e325953bad79728ebe9f9526553
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2518
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-10 13:54:48 +00:00
Shuhei Matsumoto
315d47da4b lib/nvmf: Clean up abort AER request operation
Include completion operation into nvmf_qpair_abort() and rename
it by nvmf_qpair_abort_aer() for clarification. Update unit test
accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I763cc7d24b979e27e8775f4e69730466a2351bdf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2712
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
55c39cd008 lib/nvmf: Change nvmf_ctrlr_abort_aer() to set completion status of aborted I/O to ABORTED
nvmf_ctrlr_abort_aer() has not been used anywhere, and so we may be
able to remove it, but let's update it to set the completion status
of the aborted AERs to ABORTED for future potential use cases, and
then rename it by nvmf_ctrlr_abort_all_aer() to avoid name conflict
with the next patch.

Setting the completion status to SUCCESS is not good in this case
anyway.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie49936429b82dd05724cf8f10a1417e9c5304635
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2709
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
db96437e42 lib/nvmf: Include redirection into spdk_nvmf_request_complete()
Some cases need to redirect spdk_nvmf_request_complete() to the
thread pointed by qpair->group->thread. Abort command will be
included such cases but abort command is executed in the different
file ctrlr_bdev.c. For the convenience, change spdk_nvmf_request_complete()
to include the redirection and extract the core operation of
spdk_nvmf_request_complete() into a private function
_nvmf_request_complete(). In ctrlr.c, call _nvmf_request_complete()
for non-redirected cases.

Besides, locate the definition of _nvmf_request_complete() under the
definition of  spdk_nvmf_request_complete() in a file to trick the format
check tool to avoid false positive, and fix a spell error together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I85546c80e99e01686c9470653e0ddafcf7c6a391
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2115
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
d13e9dde6e bdevperf: Abort the timeout I/O
Change the I/O timeout callback to abort the timeout I/O if g_abort
is set to true. Increase the task pool twice to submit abort task
in parallel.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1722f3c0ec8fc58a400b937895ad365cba7defbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2626
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
3ffdff7c5a bdevperf: Set timeout to detect starved I/O and count timeout I/Os
The following patches will abort the timeout I/O in bdevperf tool.
This is a preparation. Add CLI option to set timeout to detect
starved I/O and add count of timeout I/Os to stats.

spdk_bdev_set_timeout() disables timeout if timeout value is zero.
Hence we do not have to check if g_timeout_in_sec is not zero.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I201682acd321ecd414cfbfd9f5445bf3dc934b41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2625
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
972ca153d3 bdevperf: Add CLI option to disable using zcopy bdev API
This is convenient to evaluate I/O abort for read or write I/O
to the delay bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idceebb9d65938837a57629cc6ec8db6507582116
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2624
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
84caaf5a93 bdevperf: Count Failed I/Os
This is a preparation to support I/O abort by bdevperf tool.

Add io_failed to bdevperf_job and increment it per I/O completion.
Then add io_failed to statistics.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45c15d9644e5d66310fbbe62682015bd81074973
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2623
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-06-10 13:54:40 +00:00
Shuhei Matsumoto
82d77ca6f5 bdev/delay: Set zcopy I/O type to be unsupported regardless of backend bdev module
Delay bdev module does not support delaying zcopy I/O. So change
vbdev_delay_io_type_supported() to return false if the passed I/O
type is zcopy to clarify the use case of delay bdev module.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icea5ae351d7139250710ce491e4ac466b0cc7f98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2622
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
a954d2bf30 bdev/delay: Abort I/O delayed to complete
This addition enables us to test the new abort I/O feature on top of
any bdev which supports I/O type ABORT.

Add the abort I/O handler vbdev_delay_abort() into vbdev_delay_submit_request().

vbdev_delay_abort() aborts the target I/O if it is delayed to complete,
or calls spdk_bdev_abort() otherwise.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I191143357b95eeb56ada708d2d7ce30cf772bdcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2602
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-06-10 13:54:40 +00:00
Michal Berger
8661ded761 check_so_deps: Small refactor
Move all operations on "integers" to proper arithmetic evaluation
constructs. This is to avoid the following seen in the build logs:

  check_so_deps.sh: line 353: [: : integer expression expected
  check_so_deps.sh: line 353: [: : integer expression expected

This can be seen whenever an object file is missing maj.min numbers
from its name.

Additionally, shuffle the code around to simplify parsing of the
abidiff output.

Change-Id: I8f4aef10f11382788533aa2d92e9ffdcd6a72e4b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-06-09 07:38:10 +00:00
Shuhei Matsumoto
44ab133f70 example/nvmf: Fix the case when thread is terminated by communicating with other threads
As we have done for SPDK reactor, SPDK thread termination needs communication
among SPDK threads. So At application shutdown, create the while loop
until all threads are destroyed and in the loop, check each thread
is exited, and destroy the thread if exited or mark it as exiting
and retry checking after traversing other threads.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7a1008b95f3303de17449d574e917eb47cbe54b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2660
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:50 +00:00
WANGHAILIANG
90be351f87 lib/makefile: move vhost_user.c into lib/virtio directory
'make clean' can't remove compiled file in virtio_user directory.
So I move vhost_user.c into lib/virtio directory and fix it.

Change-Id: Ic7d41709d3a5d6cf2333c4deee285800b414a3fb
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2750
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-09 07:37:43 +00:00
Shuhei Matsumoto
c01fe4c530 bdev/delay: Abort all I/Os delayed to complete at reset I/O
Improve reset I/O to abort all I/Os delayed to complete by parsing
all channels. The generic bdev layer stops new I/O submission during
reset processing. So freezing/unfreezing channels is not necessary.

Additionally, clean up the code which run if I/O submission failed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I63e1ba78971944558d9317b63befecd86a6d6b60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
bfc9ddde2d bdev/passthru: Support I/O type ABORT
Passthrough bdev module sets the passed bdev_io to the cb_arg of
the bdev_io submitted to the underlying bdev. Hence call
spdk_bdev_abort() with bdev_io->u.abort.bio_to_abort for the I/O
type ABORT.

Passthrough bdev module returns the supported I/O type of the
underlying bdev. Hence vbdev_passthru_io_type_supported() is not
necessary to change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb7627a92409649ab08ae233ba517fbc1bc55a9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2799
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
269f4a3c25 bdev/null: Support I/O type ABORT
As malloc bdev module supports I/O type ABORT, it will be helpful
if any bdev module other than NVMe bdev module supports I/O type
ABORT.

Update bdev_null_io_type_supported() to return true for
SPDK_BDEV_IO_TYPE_ABORT and update bdev_null_submit_request() to
try aborting the target I/O if queued.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4614c48840ef069a11991486d184d45789bc3000
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2798
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
e2d1dfb4fa bdev/malloc: Always return failure but support I/O type ABORT
Malloc bdev module does not manage submitted I/Os by any list,
and so cannot abort any submitted I/O. However malloc bdev module
can always fail any submitted abort request.

Hence let's update bdev_malloc_io_type_supported() to return true
for SPDK_BDEV_IO_TYPE_ABORT and update _bdev_malloc_submit_request()
to complete with failure for SPDK_BDEV_IO_TYPE_ABORT.

This will enable us to use delay bdev + malloc bdev to test I/O
abort feature conveniently.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If4c411f5ab8589291ac90c10264d3ef30c06df83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2797
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Michal Berger
8ddeccad58 vm_setup: Use pre-defined cmdline when compiling ref spdk on FreeBSD
The selected options are based on how CI runs the make test.

Change-Id: I71d7bc13250f0f4b5212eff4d13794979bcd4b6d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2454
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>
2020-06-08 09:35:47 +00:00
Darek Stojaczyk
6fd492e3e0 test/rpc: remove $PWD requirement
Use context-independent paths instead. This allows running the
test from $PWD different than $rootdir.

Change-Id: Id3835aab46bcd473d3852e5e1e0d6b2c1d241b37
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2752
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
ba23cec182 rpc: don't allow starting RPC server on a TCP port
`-r` and `--rpc-socket` command line options will now require
path for a UNIX domain domain socket. The socket can be still
exposed over TCP with external programs. Hence, for (some)
compatibility reasons, the test scripts, jsonrpc-client, and
rpc.py will still be able connect directly via TCP.

Change-Id: I22a935f1596ce5f9c313b5be42cb85f772368c03
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/605
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
8179b09e99 test/spdkcli/tcp: general cleanup
Polling for TCP connection seems cool, but it's a lot of code
that's impossible to debug. Rely on the same code inside rpc.py
instead. If the connection fails, rpc.py will give us the best
error message we can get.

Change-Id: I1ca99bb2256a38004269927b057335208cc5d968
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1333
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:35:16 +00:00
Darek Stojaczyk
00b52bf5dd scripts/rpc.py: add new parameter to retry connecting
This can potentially replace waitforlisten() in our test scripts.

$ ./scripts/rpc.py -h
  -r CONN_RETRIES       Retry connecting to the RPC server N times with
                        0.2s interval. Default: 0
[...]

$ ./scripts/rpc.py -r 10 spdk_get_version
<SNIP the usual python exception>
rpc.client.JSONRPCException: Error while connecting to
/var/tmp/spdk.sock
Error details: [Errno -2] Name or service not known

real    0m2.452s
user    0m0.242s
sys     0m0.020s

Change-Id: I204da366360647fcce8f8de0eb25b0f576aabc5b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2751
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:35:16 +00:00
WANGHAILIANG
8f0e8ff149 test/nvme: fix a multiple bdf error
If there are two or more Nvme SSDs in system, $bdf includes many bdfs.
Function get_first_nvme_bdf() have no effect on local phy servers.
nvme_rpc.sh will report error as below.

 09:16:06       # /home//spdk/scripts/rpc.py bdev_nvme_attach_controller -b Nvme0 -t PCIe -a 0000:03:00.0 0000:04:00.0
usage: rpc.py [options]
rpc.py: error: unrecognized arguments: 0000:04:00.0

Change-Id: I91be02b874fcc4ee4626c082b16d06e722797744
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2715
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-08 09:34:58 +00:00
Dayu Liu
415abe87fc check_format: fix pattern error of regular expression
In a few tools or languages, slash(/) is maybe a delimiter by default in regex.
An unescaped delimiter must be escaped with a backslash (\).
Otherwise the pattern of regular expression will be error
when delimiter is slash(/) in a few special environment, i.e. in MinGW32 git bash.

Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: I73b556416b98e135eb240078dcc68f80e08c5e74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2488
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-08 09:34:35 +00:00
Maciej Szwed
ade2aa25ac doc: Add description for pluggable RPCs
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iddc4d592aa3a750cb0a977ec9c5257518626e27b

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2420
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:34:26 +00:00
Michal Berger
623c3bc62b rxe_cfg: Fix reporting for net devices with >10G speed
Change-Id: I1bb68d0f5bbc1255671bbeefc98a8d65f66b5918
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2783
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-06-08 09:34:18 +00:00
Seth Howell
4521e05b35 doc: add library documentation.
This user guide details the SPDK library structure,
naming and versioning conventions, and instructions for
use.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1a7ec422730ba169662de76847c77b9433cc3b04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
Community-CI: Mellanox Build Bot
2020-06-08 09:33:58 +00:00
Shuhei Matsumoto
972b3ae3aa lib/bdev: Use not SPDK thread count but core count for mempool cache size
Cache size of mempool is not based on SPDK thread but DPDK thread,
i.e. CPU core. So replace spdk_thread_get_count() by
spdk_env_get_core_count() to determine cache size of mempool in
spdk_bdev_initialize().

Besides, allocate and free stub cores at the corresponding unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icc4deae84c74820af4de61e991fa3f8683add058
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2767
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-06-08 09:33:50 +00:00
Darek Stojaczyk
433223865e Update to intel-ipsec-mb v0.53
From v0.52 to v0.53. The new DPDK build system depends on some
defines only available in v0.53 and up.

Change-Id: Ibd7a985bcc99e0f6a43abc6ba846796fba37e09e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1455
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:42 +00:00
Darek Stojaczyk
da2aa2aca0 test/nvme/hotplug: create QEMU host drives at startup
We used to create them at runtime with QEMU monitor, but
they can be created just once at startup. While here, start
using loops in bash to create/modify 4 equal drives.

Change-Id: Ie73ba3496a1cfb5d5a173118d331d90eee713270
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2144
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:35 +00:00
Darek Stojaczyk
85d0f9a83a test/nvme/hotplug: don't copy unnecessary files to the VM
This cuts down even 10 seconds. We only need a few binaries and spdk
./scripts directory on the VM, not all SPDK sources.

Change-Id: If63bdaec9ee4cf3f42ab7fce1bf107847580dbf7
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2145
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-06-08 09:33:35 +00:00
Maciej Wawryk
90190aef02 scripts/pkgdep: Add clearlinux dependencies for spdk cli
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6c8d705e98d901cb79b6ed66804046bc2ad06e57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2773
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:33:15 +00:00
Shuhei Matsumoto
8d4b319c98 lib/bdev: Change completion status of I/O aborted by reset from FAILED to ABORTED
Using not FAILED but ABORTED for the completion status of the I/Os
aborted by reset will be reasonable and is done in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c8181dd33453a330888cffa93505e6fc462f278
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2708
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
5bc400f382 lib/bdev: Add spdk_bdev_io_get_cb_arg() to get cb_arg of bdev_io
bdev_io is passed to the callback to the timeout I/O, but the context
of bdev_io is stored in cb_arg and spdk_bdev_abort() needs cb_arg.

Hence add an new helper function, spdk_bdev_io_get_cb_arg(), to get
cb_arg of bdev_io.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5eb25ffdad2467c55a1b55f8cf0accef8799bb4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2621
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
97a5ea5796 lib/bdev: spdk_bdev_abort supports I/O splitting
The last patch ensures that the parent I/O terminate with failure
before continuing splitting process if one of child I/O failed.
This simplifies abort operation for I/O splitting.

Then we can use bdev_abort() and bdev_abort_io() nestedly.

Add necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I562bb6675f1fa380bc53dbe369138317ead66fe0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
089d178abb lib/bdev: Terminate parent I/O with failure immediately if one of child I/O failed
Previously, bdev_io_split_done() had continued splitting process
even if the status became failed. To abort split I/O, this patch
changes bdev_io_split_done() to terminate with failure before
continuing splitting process if the status became failed. Add
necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd1ea49c22523e8c06fb45ebdcb2c84a57afd2ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2234
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
fc3e40618c lib/bdev: Add all submitted I/Os to the list including any I/O generated by splitting
This is a preparation to abort split I/Os. To abort any I/O by
bio_cb_arg, they have to be managed by the submitted I/O list.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9459d9d2d3511aad0325dcc20d88610444a4ea04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
29f86a2630 lib/bdev: spdk_bdev_abort supports queued I/O due to buffer allocation
Buffer allocation is done after redirection to the QoS thread.
Hence add a new helper function bdev_abort_queued_io() and add
its call to bdev_io_do_submit() for both buf_need_small and
buf_need_large.

For zcopy API, buffer allocation is done before buffer allocation
but the caller can get bdev I/O object, and can abort the I/O
directly if needed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2d6170de5ab2ba4d260df99db3e376c0e2c5ffaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2250
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
c2ce2f8540 lib/bdev: Rename bdev_abort_buf_io by bdev_abort_all_buf_io
Current bdev_abort_buf_io() aborts all queued I/Os due to buffer
pool capacity, and we want to use the name for the new function
which aborts only the specified I/O if queued. So rename
bdev_abort_buf_io() by bdev_abort_all_buf_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I50a4ef1f5c4d2f8db9a0781413520345a7f13e59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2395
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
0d31e2bae6 lib/bdev: spdk_bdev_abort supports queued I/O due to out of memory
Add abort queued I/O due to out of memory into bdev_io_do_submit().
Any bdev I/O is queued due to out of memory only on the submitted
channel.

Aborting queued I/O due to out of memory is necessary only if
shared_resource->nomem_io is not empty.

Checking if shared_resource->nomem_io is not empty has been done
in this function.

However add the abort operation without and before checking if
shared_resource->nomem_io is not empty because the following patch
will abort queued I/O due to buffer pool capacity.

The purpose is to improve readability by consolidating all abort
operations into a single place.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I69a40f096aff13b84c1ed345fa8bd0dd80cef0e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
f048f3d3d3 lib/bdev: spdk_bdev_abort supports the case when QoS is enabled
When the target I/O is controlled by QoS, the abort request is
submitted on the same channel that the target I/O is submitted.

By using this, add a helper function bdev_abort_queued_io(), and
change _bdev_io_submit() to call bdev_abort_queued_io(), and
call _bdev_io_complete_in_submit() with success if bdev_abort_queued_io()
returned true when QoS is enabled on the corresponding channel.
Add necessary unit test together.

Update unit test accordingly, especially, update stub_submit_request()
to abort the matched I/O, update io_during_io_done() because we need to
know not boolean but the exact completion status now, and update
basic_qos() to reset the rate limit to test the abort I/O feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16ca21e7c32cabfdce5d0e5c27a8af8bb00f11c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2230
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-06-08 09:28:27 +00:00
Shuhei Matsumoto
5771019fc0 lib/bdev: Factor out bdev I/O complete operation in _bdev_io_submit()
The following patch will add another spdk_bdev_io_complete() call
in _bdev_io_submit(). Then, factoring out set/clear in_submit flag,
incrementing counts and calling spdk_bdev_io_complete() into a helper
function will be simpler.

in_submit flag is set and clear in bdev_io_do_submit() anyway,
and bdev_qos_io_submit() needs in_submit flag only for
bdev_io_do_submit().

All cases to call spdk_bdev_io_complete() in _bdev_io_submit() are
not performance critical.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb783d7d001a9c36e61d791c664c67fdc46a09e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
339a0419d3 lib/bdev: Rename bdev_abort_queued_io by bdev_abort_all_queued_io
Current bdev_abort_queued_io() aborts all queued I/Os, and we
want to use the name for the new function which aborts only the
specified I/O if queued. So rename bdev_abort_queued_io() by
bdev_abort_all_queued_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2125d91bffc870a0a4be4bb74037c1d27bce2d36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
8889f7b7f4 lib/bdev: Add SPDK_BDEV_IO_STATUS_ABORTED to notify the upper layer correctly
The I/O aborted by the abort command should be completed with SC = 07h, i.e.,
"Command Abort Requested". However, if the generic bdev layer or non-NVMe
bdev module aborted the I/O, the aborted I/O would complete with SC = 06h, i.e.,
"Internal Error". To fix this unexpected behavior, add an new I/O status
SPDK_BDEV_IO_STATUS_ABORTED and update spdk_bdev_io_get_nvme_status() to
set SC to 07h if the I/O status is SPDK_BDEV_IO_STATUS_ABORTED.
If the NVMe bdev module aborts the I/O, the I/O status is set to
SPDK_BDEV_IO_STATUS_NVME_ERROR and SC is set as expected.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc99a97248a8d54a8c8d2fab74a90c7ce99c2e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2582
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-06-08 09:28:27 +00:00
Shuhei Matsumoto
7cd20dd3f5 lib/bdev: Add spdk_bdev_abort API
Add spdk_bdev_abort function as a new public API.

This goes all the way down to the bdev driver module and attempts to
abort all I/Os which has bio_cb_arg as its callback argument.

We can separate when only a single I/O has bio_cb_arg and when multiple
I/Os have bio_cb_arg, but unify both by using parent - children I/O
relationship. To avoid confusion, return matched_ios by _bdev_abort() and
store it into split_outstanding by the caller.

Exclude any I/O submitted after this abort command because the same cb_arg
may be used by all I/Os and abort may never complete.

bdev_io needs to have both bio_cb_arg and bio_to_abort because bio_cb_arg
is used to continue abort processing when it is stopped due to the capacity
of bdev_io pool, and bio_to_abort is used to pass it to the underlying
bdev module at submission. Parent I/O is not submitted directly, and is
only used in the generic bdev layer, and parent I/O's bdev_io uses bio_cb_arg.
Hence add bio_cb_arg to bdev structure and add bio_to_abort to abort structure.

In the meantime of abort operation, target I/Os may be completed. Hence
check if the target I/O still exists at completion, and set the completion
status to false only if it still exists.

Upon completion of this, i.e., this returned zero, the status
SPDK_BDEV_IO_STATUS_SUCCESS indicates all I/Os were successfully aborted,
or the status SPDK_BDEV_IO_STATUS_FAILED indicates any I/O was failed to
abort by any reason.

spdk_bdev_abort() does not support aborting abort or reset request
due to the complexity for now.

Following patches will support I/O split case.

Add unit tests together to cover the basic paths.

Besides, ABI compatibility check required us to bump up SO version of
a few libraries or modules. Bump up SO version of blob bdev module simply
because it does not have any out-of-tree consumer, and suppress bumping
up SO version of lvol library because the affected struct spdk_lvol
is not part of public APIs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I515da688503557615d491bf0bfb36322ce37df08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-06-08 09:28:27 +00:00
Shuhei Matsumoto
b62bfbf6a9 lib/vhost: Remove and inline spdk_vhost_blk_get_dev
Having spdk_vhost_blk_get_dev required us to bump up the SO version
the vhost library when we updated bdev.h but spdk_vhost_blk_get_dev
has not been used publicly, and can be inlined very simply.

So remove spdk_vhost_blk_get_dev from include/spdk/vhost.h and inline
it to the place which had used it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98c233b81d7980d4e2c5bd3c0a65d747f183e1e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Ziye Yang
18450e8b82 nvme: solve the spdk_nvme_connect compatibilty issue.
This is used to make spdk_nvme_connect can support
the old library for compatibility.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I49d92fb473c3cbabd8e1240785b920480202eee9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1998
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@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-06-05 09:04:11 +00:00
Ziye Yang
05cd548cf1 nvme: Fix the field initialization of struct spdk_nvme_ctrlr_opts
Purpose: Make the initilaization in order.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I66962073a02b6a4c2fc79ac343cdf5310075dd63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2766
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-05 09:04:11 +00:00
Jacek Kalwas
000e6f5b87 nvmf: move cdata subset from transport to ctrlr
Having that transport can decide about particular ctrlr attributes not
globally but per ctrlr.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ia3fb0d4e576cb9f8ce6df75f775e2fd5727d7f48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2757
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-05 09:04:01 +00:00
Jacek Kalwas
0ba47879b5 nvmf: allow to override sgls
Useful for transport specific layer to inform that SGLs are not
supported or to adjust settings.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ia849f5af206538408664fd20ea4e7dcb9da6f6f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-06-05 09:04:01 +00:00
Jacek Kalwas
182ca74940 nvme: extract cdata sgls as a separate struct
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1418703a32c8e80a42cf30074ef743eb3c380de0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2755
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:04:01 +00:00
Darek Stojaczyk
4c6a9cdfa4 test/common: remove discover_bdevs()
There were many cases in the past where discover_bdevs()
is the first app to parse given (invalid) config and silently
fail without even printing the exact error. That's because
the spdk app that's started inside that function has &>/dev/null.

discover_bdevs() is currently used only in nvme perf scripts,
so move it there. It should be probably simplified there,
but the priority for now - and the purpose of this patch - is to
remove it from autotest_common.sh so that no one is tempted to use it.

Change-Id: I1d5840dde9272cdaa1ff282022c6ec29a297df50
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1554
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:50 +00:00
Darek Stojaczyk
8c007d46fc test/vhost/initiator: remove unused fio sections
They had no effect, only the first section was run.
I'm not sure how to run more than one, but it's not
a problem if we stick to just one. There's another case
right below where no `--section` param is specified and
all sections are run.

Change-Id: I399bef07b671ee81bd289e77f2a8203c96268807
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1553
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:50 +00:00
Darek Stojaczyk
2fc1a2d056 test/vhost/initiator: inline create_bdev_config()
This function is not really reusable. Inline it to have
a simple, top-to-bottom test flow.

This already shows the test is unnecessarily complicated.
If anything with lib/virtio goes wrong this file is the last
script that will be used for debugging. It would be OK if
there simpler tests for lib/virtio, but there are not.

While here, also add comments for the three major steps
in this test script because it finally looks sane.

Change-Id: Ic8ae611d853d4a685d38aa3112d16e396b0e110d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1552
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:50 +00:00
Darek Stojaczyk
ce85fac4c3 test/vhost/initiator: use RPC daemon
About 1 second speedup. We can use RPC deamon everywhere except for
load_subsystem_config (since it's not a real RPC and it's handled
differently).

Change-Id: If14964c6688976e0f2edec40198c30d5cbc21e83
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1551
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:50 +00:00
Darek Stojaczyk
473007425e test/vhost/initiator: don't use test/vhost/common.sh
That common.sh requires e.g. qemu installed, which is
completely unnecessary for this test.

vhost_kill() used to clean up e.g. leftover fio files,
but now instead of deleting them, just tell FIO not to
create them by using --verify_state_save=0 fio param.

Change-Id: I5e63dad5681e715ee5dac131ec9b5c17bfdac2eb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1550
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:50 +00:00
Wojciech Malikowski
c6dbe0ab0e lib/ftl: Keep tracing functions under define flag
Tracing functions introduce performance overhead
so by default keep them only in debug builds.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I08e0a139c3efa87b0f46b7e7a026b0676f3e8634
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1924
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:31 +00:00
Darek Stojaczyk
21e2a71515 nvmf: remove spdk_nvmf_tgt_transport_write_config_json()
This wasn't implemented anywhere. There's
spdk_nvmf_tgt_transport_write_config_json() which
dumps the config of a specified target.

Change-Id: I0ca247f88109f07c33fb109ac58776d2d633e233
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2760
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-05 09:03:26 +00:00
Seth Howell
c2312f6cb3 test/check_format.sh: remove moved symbols in naming check
There was an edge case in this check where a public symbol
definition was just moved and that movement triggered this
check. Going forward, check the diff for symbols that were
both added and removed in the same patch. This indicates a
symbol that was just moved instead of newly added.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I71bbcd6d6b3e0a2133e77c29f4ec7a4f2b09e3c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2765
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-06-05 09:02:44 +00:00
Michal Berger
cba9514dec rxe_cfg: Drop librxe and port minimal rxe_cfg functionality to Bash
Since rdma-core handles the entire libibverbs suite, and because it
dropped rxe_cfg in favor of iproute2's rdma tool, building librxe is
not needed anymore. That said, the functionality of the rxe_cfg that
our test suites are using is basic and useful enough to be preserved
in a form of a simple Bash script. This can be used to avoid full
overhaul of the code which would need to be adjusted for iproute2's
tooling. In case more complex rdma configuration link-wise is needed,
iproute2 dependency can be added then.

Additionally, some of the nvmf functions have been simplified to make
use of the rxe_cfg port.

The formatting of the status cmd is left compatible with the rxe_cfg.

Change-Id: I594a24b73472a16d51401bcd74fd30c415b24ddb
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-05 09:02:27 +00:00
Darek Stojaczyk
d3030f6b95 scripts/setup.sh: add a newline before VMD status section
VMD section wasn't separated from virtio.

$ scripts/setup.sh status
<SNIP>

IDXD Engine
BDF             Vendor  Device  NUMA    Driver

virtio
BDF             Vendor  Device  NUMA    Driver          Device name
VMD
BDF             Numa Node       Driver Name

Change-Id: Iffecf06a036ec1a9738c8edd74664eb2d22c45fa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2763
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-05 09:02:20 +00:00
Tomasz Zawadzki
1da4d6548d dpdk: update submodule to include fix for vhost from CVE-2020-10722 to 10726
Updated submodule from branch containing DPDK 19.11 to DPDK 19.11.2

That includes fixes for DPDK vulnerabilities:
- CVE-2020-10722
- CVE-2020-10723
- CVE-2020-10724
- CVE-2020-10725
- CVE-2020-10726
Along with other fixes done between those DPDK maintenance releases.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I33e14eba54568a2313bb0020bad9be3fdfc6836b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2562
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:02:13 +00:00
Tomasz Kulasek
c9bde257f0 doc/nvme: remove dynamic creation/deletion of namespaces limitation
Change-Id: I32c09f5151db579312479d07c668b08fc404f399
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/652
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
f6fd2f521f test/nvme: add reset to ns manage test if AER ns change not supported
If Namespace Change AER is not supported by controller we
need to reset controller after changing namespace configuration.

Change-Id: I640e925fa02881c7b8541f2c0353e78c51074cdc
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1912
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
1e529db263 test/nvme: add nvme ns manage nvme-cli test
This test creates/deletes namespaces with Namespace Manage commands
and checks if appropriate NVMe CUSE device nodes are created/removed.

Change-Id: Iecbb4949c3843e41d4dbf365b0a57de3362c8947
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1131
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
550d4867a0 lib/nvme: update io msg producers on ns manage
Change-Id: I20adb92ae4e13e775b5e70617c705afd32e16c9e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/681
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
2b9a331d0b test/nvme: dynamic nvme cuse devices update test
This test changes the range of active namespaces and checks
if apropriate CUSE devices for namespaces was stopped/started
properly on CUSE update.

Change-Id: I9683a0ab6ff28328d4788c49a834cef31c0582cc
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/780
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
11aca20442 nvme/cuse: add spdk_nvme_cuse_update api
spdk_nvme_cuse_update_namespaces() API allows application
to repopulate namespaces on NVMe CUSE devices.

Change-Id: I5375b13bcc91b17cd26b4dc6f02d83dc33826542
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/658
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>
2020-06-05 09:01:44 +00:00
Darek Stojaczyk
482ca8eb60 test/nvme/hotplug: always print QEMU monitor output
Always print QEMU's output to the screen - there's not a lot
of it and something may come useful. Let's know what's happening.
The text-based QEMU monitor always runs in an interactive mode,
so post-process its output a bit:

$ monitor_cmd info status
QEMU 5.0.0 monitor - type 'help' for more information
(qemu) info status
VM status: running
(qemu)

Clean it up by removing the first line, then filter out any
lines prefixed with "(qemu) ".

Change-Id: I20b56bbdfc868bc11468dea5ef246cf1db1b4ab8
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2143
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-06-05 08:17:22 +00:00
Michal Berger
25f4704e5c vm_setup: Fix package name on apt-get-based systems
Neither Debian or Ubuntu have qemu-img in their package repos. The
actual qemu-img tool comes with qemu-utils instead.

Change-Id: Id7cd538144850f3e2da47e279c9f10d5e7179617
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-04 07:21:05 +00:00
Michal Berger
d6225f0116 vm_setup: Install qemu packages on yum-based systems
Change-Id: Ifdaf1e03e82a3167d994945661d9e5f0fba9224e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-04 07:21:05 +00:00
Michal Berger
c9d3d5a159 vpp: Apply Fedora 30 patch on Fedora 31
Fixes introduced by 9307ff5a are applicable to Fedora 31 too, thus
use the very same copy of the patch while compiling vpp on that
version of the system.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4445497f928a1a509c5adbccfe244ff9eef7275b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2676
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>
2020-06-04 07:21:05 +00:00
Michal Berger
9d4264dad2 vpp: Make sure to provide full-blown ply module on Fedora systems
Change-Id: Ib894655d69c507c4dbc3aebd72105eb85737e16d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2675
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>
2020-06-04 07:21:05 +00:00
Alexey Marchuk
1551197db5 rpc: Deprecate max_qpairs_per_ctrlr parameter
This parameter describes the number of admin and IO
qpairs while admin qpair always exists and should not
be configured explicitly.
Introduce a new parameter `max_io_qpairs_per_ctrlr`
which configures the number of IO qpairs.
Internal structure of NVMF transport is not changed,
both RPC parameters configure the same nvmf transport parameter.

Deprecate max_qpairs_per_ctrlr in spdkcli as well

Side change: update dif_insert_or_strip description -
it can be used by TCP and RDMA transports

Config files parsing is not changed since it is deprecated

Fixes #1378

Change-Id: I8403ee6fcf090bb5e86a32e4868fea5924daed23
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2279
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-06-04 07:20:45 +00:00
Wojciech Malikowski
074cdb4d06 lib/ftl: Do not check busy flag when appending
In append case checking if zone is not busy before
submitting to it is unnecessary. This patch improves
append performance.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I42f3b31815aa10aed6b0374c2247f857683822f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1923
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-04 07:20:34 +00:00
Wojciech Malikowski
4ebe50f9ab lib/ftl: Fix write statistics calculation
This patch fixes user writes statistics counting.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I209582645c1d523bb5d639f2d32ca09b3f3dc477
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1922
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-04 07:20:34 +00:00
Seth Howell
bd06eb2c4c nvme/perf: use the poll group API in perf.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8dda8c048467fd814225a13c31386676609354be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2009
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
8cd855f3a7 nvme/perf: actually poll unused qpairs.
I think the main point of having unused qpairs in
the perf application is to simulate the performance
drag of having active qpairs sitting idle on an application.

If we don't poll these unused I/O qpairs, there is no real performance
effect (in terms of cache evictions, wasted cycles or otherwise).

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie67223eae57a9bfbfaa703a401b0960f88552e11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2008
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-04 07:20:16 +00:00
Seth Howell
1039254319 nvme/rdma: add cq resizing.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6350d76b8c1e778c18e693b2dfbb10dd36b3e3d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1927
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
67b0dcfe29 nvme_rdma: add tracking for rdma objects in qpair.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0b45aed21dc649888bb9d93c5937fb553f35eb27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2568
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
8bef6f0bdf lib/nvme: rdma poll group with shared cq.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifde29f633f09cccbebfdcde5ab2f96d9590449f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Darek Stojaczyk
922d90c806 log: remove backtrace printing
It was broken since long ago. --enable-log-bt doesn't change
anything. log.c expects SPDK_LOG_BACKTRACE_LVL to be defined
for backtrace to work, but it's not defined anywhere.

Apparently nobody needs this, so remove it.

Change-Id: I2313fd24198b0bf718663f2eafee9b5c6efa0a7f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2194
Community-CI: Broadcom CI
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-06-03 07:39:08 +00:00
Seth Howell
7ef497012a test/nvme: move nvme_fio test before kill_stub call
This test was after the part in the nvme.sh script where
we kill the stub. So the call to get_nvme_bdfs was invariably
returning nothing.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ice98cca8878ccff06057da5f96607eccffc5da39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2746
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-06-03 07:39:08 +00:00
Maciej Wawryk
7b2bcd270c Fix distribute bdevs between provided NICs
Using setup.sh with whitelisted only one disk, function
spdk_tgt_add_subsystem_conf skip this one disk.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1f6d77cf20cc181935f95f2996da8e31c36d0ac1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2232
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-03 07:38:18 +00:00
Changpeng Liu
38b80ba531 examples/fio_plugin: only enable Bit Bucket SGL with READ commands
We only enable this feature for READ commands in the NVMe driver, so
also ignore the WRITE commands in fio plugin tool.

Change-Id: Iecf43326e1a2a3b3540a1391e09a33d2443bd546
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2730
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-06-03 07:38:12 +00:00
Changpeng Liu
da0ddc351d test/nvme_reserve: return failure if tests had errors
This will help us to capture the error case in CI.

Change-Id: I4ff348e492d6acd18ff4552b9a233965db5a1019
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2734
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-03 07:38:08 +00:00
Changpeng Liu
d9c6b6bb64 test/nvme_reserve: move examples/nvme/reserve to test/nvme/reserve
This only covered one test case for NVMe reservation feature, so remove
it to test directory.

Change-Id: I7920679ce14dd4d6a9164cb7663016bc7a3a4929
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2732
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-06-03 07:38:08 +00:00
Changpeng Liu
4088860a03 examples/nvme_reserve: unregister the registrant key at last
When testing the application, after release the reservation, the
registrant is still there, so we need to unregister the registrant
at last to restore the drive to a clean state.

Also set the CPTPL to 10b, it means Reservations are released
and registrants are cleared on a power on, we will move the tool
to test/nvme directory in following patch as this is only one
test case for NVMe reservation feature.

Change-Id: I271a61985940958b9f36887f9cd97841841ba2d6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2731
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-06-03 07:38:08 +00:00
Tomasz Zawadzki
e757878190 accel: always write JSON with an array of objects for accel modules
Patch below added writing out json configuration for accel modules.
(fad052b0) accel: add write_config json for accel modules

Out of two current modules, only idxd reported its confi out.
When idxd was not compiled in, then "framework_get_config accel"
RPC did not return a valid JSON. Following JSON was returned:
{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":}

Where "result" never had any property given.

This patch adds array object to encompas all accel modules.

Next patch in series will try to address the issue on JSON
level.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0758db5406896f2a204920417619a3ab6fbde98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2550
Community-CI: Mellanox Build Bot
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: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-03 07:38:01 +00:00
Seth Howell
ae8099ca2b test/check_so_deps: add suppression for spdk_net_impl
This type was changed. We can avoid updating the major
version of libspdk_sock though because this type is in
the spdk_internal sock header.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib0d6cc0d99f97a34f618f776ac28e15e0a750356
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2741
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-03 01:08:45 +00:00
Seth Howell
134939077d test/make: add check to confirm SO minor version is only revved once.
We don't want to rev this more than once in a release cycle. The idea
behind that is that nobody should be making shared objects from a commit
between two releases so we only need to rev once per release cycle.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8162683152bf86f41061309d341a54959e1c3646
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2682
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>
Community-CI: Mellanox Build Bot
2020-06-02 09:52:40 +00:00
Richael Zhuang
e1fc678b65 test/blobfs: fix a bug that $SPDK_TEST_STORAGE is NULL
Move "source $rootdir/test/common/autotest_common.sh" above where
$SPDK_TEST_STORAGE is used, or else $SPDK_TEST_STORAGE is NULL for
its value is assigned in autotest_common.sh.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ie86af6034847ca2c046b18cd67cd8ad5707697a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2694
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-02 09:52:20 +00:00
Maciej Wawryk
4e6f8167ea scripts/vagrant: Clear environment variables in clearlinux
Clearlinux after installation has no empty environment variables,
which caused test failtures.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8e0673a22c1fe3cf93232704bf8950be357a21b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2717
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: Maciej Szwed <maciej.szwed@intel.com>
2020-06-02 09:52:08 +00:00
Maciej Wawryk
8a1160fb77 scripts/pkgdep: Add ClearLinux dependencies to pkgdep.sh
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id3ce1b6ffe06c4d32a8585f7a8afc336b8372629
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2643
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-06-02 09:52:08 +00:00
Maciej Wawryk
9839e8cbf7 scripts/vagrant: Add clearlinux to Vagrant scripts
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ia3b9255abf84ace0d8eec7db3cd9b7293285a9c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2642
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: Karol Latecki <karol.latecki@intel.com>
2020-06-02 09:52:08 +00:00
Maciej Szwed
a2606d4b5d all: Fix warnings found by gcc 9.3.0 and 9.3.1
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie7c5b7b1c2d59a1f927eb5602f4ea5a003eff287
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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-06-02 09:51:57 +00:00
Darek Stojaczyk
59ff57b93c scripts/check_format: use version_lt to compare shfmt version
It turns out we have a function to compare version numbers.
It additionally handles cases like "3.0.10 > 3.0.9". The
previous code returned false, the new one returns true.

version_lt() actually tests for less or equal, so compare
against 3.1.0 - the real minimum shfmt version we need.

Change-Id: Ibd18c4505e5b81c0073a907f23c3fc034cfbafbe
Suggested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2574
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-06-02 09:51:14 +00:00
Michal Berger
a15eef8b03 vm_setup: Check for btrfs-progs on apt-get based systems
Currently, Ubuntu 20.04 exposes btrfs-tools under different name,
btrfs-progs. Be nice and fallback to that package name if btrfs-tools
installation fails.

Change-Id: I78d51b081069b252c59b13d2347cdd077938131a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2671
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-06-02 09:50:32 +00:00
Darek Stojaczyk
6f5b39115d test/iscsi_tgt: silence shellcheck SC2029
This is detected by some shellcheck versions.
The wiki for this error tells us we should ignore it if we
know what we're doing.

Change-Id: I461dcceace652bc9abd1cfb9f6a2794b98016e96
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2429
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>
2020-06-02 09:49:06 +00:00
Ziye Yang
d8cafc28bb Sock: The created pipe for sock should have a minimal value.
Thus, we can make sure that when read data is larger than
the pipe size, it will not read the data into the pipe.

Change-Id: I87f3b03fd9b81eb693e9eae0fea9eef7d1b9eaa8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2450
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-02 09:48:59 +00:00
Seth Howell
a354903737 check_format: compare commits against previous commit.
Previously when doing the naming conventions check, we were
checking against master which was causing some weird issues on
patches which weren't rebased. The much simpler check is to just
compare each patch against the previous one.

This method still works to prevent any bad changes from getting
merged, but handles naming issues on a patch by patch basis.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic031ce07ca1c67819b792dc292dcf6c50df5b1a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2733
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-06-02 09:48:43 +00:00
Ziye Yang
ef9fd47d07 sock/uring: Fix the connection close issue when the initiator closes the connection unexpected.
When the initiator terminates the connection suddently, we

found the keep alive timeout issue, e.g.,

nvmf_ctrlr_keep_alive_poll: *NOTICE*:
Disconnecting host from subsystem nqn.2016-06.io.spdk:cnode1 due to keep alive timeout.

The root cause is that we did not closes the connection on our target side on time
whening using uring sock, and this patch can fix the issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I295f58bbdbae0ac3f5308f6eadef6a75c5ad07d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2544
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-02 09:48:15 +00:00
Evgeniy Kochetov
9bcc052bfe ut/sock: Add get/set_opts unit tests for posix sockets
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: If53c1da8501c0c2abf8443643cfc8198c3254811
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/611
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>
2020-06-02 09:48:00 +00:00
Evgeniy Kochetov
74b184e73a sock/posix: Add recv_buf_size and send_buf_size socket layer options
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ifb7d542c4da83070344c4baa512da459ba73ec90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/610
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>
2020-06-02 09:48:00 +00:00
Evgeniy Kochetov
bc157de238 sock/posix: Add get/set_opts methods to posix socket implementation
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ibfd731dd6e84f9fd4074ff88d1159ffe8c913970
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/609
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>
2020-06-02 09:48:00 +00:00
Evgeniy Kochetov
e9e8735628 ut/sock: Add unit tests for spdk_sock_impl_get/set_opts
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2025fad3dd19ac706cdbbe28c5684441d2d07374
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/608
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-06-02 09:48:00 +00:00
Evgeniy Kochetov
eb0faf2634 sock: Add spdk_sock_impl_get/set_opts function
spdk_sock_impl_get/set_opts functions allow to set different socket layer
configuration options. Options can be set independently for each
socket layer implementation.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I617e58366a153fae2cf0de1b271cc4f4f19ec451
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/607
Community-CI: Broadcom CI
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-06-02 09:48:00 +00:00
Darek Stojaczyk
c965542795 test/external_code: use default HUGEMEM in setup.sh
Fixes #1382

System memory gets fragmented over time and repeated hugepage
allocations fail, giving us intermittent failures on CI. Linux
allocates those pages only when requested hugepage count is bigger
than current hugepage count, so in order to prevent any additional
allocations just stick to a single count all the time.

autotest_common.sh already exports HUGEMEM=8G for Linux systems
and 2G for BSD ones. `setup.sh reset` doesn't touch the hugepages,
so practically only the first `setup.sh` will allocate memory now.

The two setup.sh calls are run with sudo, so they need
HUGEMEM="$HUGEMEM" to work.

Change-Id: I48b4a720bad4e1da14e78313b4db0eb60a177c38
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2374
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2020-06-02 09:47:48 +00:00
Michal Berger
477761a277 vm_setup: Drop install_iscsi_adm
It was targeted only for Fedora 26 and this particular version reached
its EOL two years ago. Additionally, new version of the iscsiadm tool
was relased since (as part of the iscsi-initiator-utils package).

Change-Id: I14136e98b378f0b44a4a43c5ae7a129cf8f7c306
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2701
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-06-01 13:07:46 +00:00
Seth Howell
6f97efb784 test/make: add leaf type changes check to check_so_deps.
This is an important aspect of ABI versioning.

There was a change to the spdk_bdev_opts struct
which is accessible from the public API that results
in an ABI change.

There was also a change in the spdk_accel_module_if struct that
will affect new modules so its major version needs to be revved.

There was also a change in the publically accessible rmda_hooks
structure which forced an ABI change in the NVMe library.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5cc6886fe01b4adc2836b6e15995471f0361dc29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2663
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 13:07:30 +00:00
Seth Howell
4bca12f1fe lib and module: remove remaining _spdk prefixes.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84ae9fd59ea6472762083aae88ed50a20a28eceb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2463
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-06-01 13:07:30 +00:00
Seth Howell
57c2b0c5a3 lib/util: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id87b6eae46e7503796904676edfa22d821673a9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2462
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 13:07:30 +00:00
Seth Howell
0af754f0f7 lib/thread: remove _spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iab2dba0e7cbbedaeb12f2dd8ac3c8041eb19804c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 13:07:30 +00:00
Seth Howell
1a9c19a954 lib/nvme: remove spdk prefix from internal headers.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iccde5860b83217163428ff504cba87a1cf209720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-01 13:07:30 +00:00
paul luse
230f827a38 misc comment/echo cleanup, replace use of word DMA for consistency
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I186c68250e7e882e80ed49964dd9dbbba988612d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2111
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 09:22:54 +00:00
Seth Howell
6d18ea425b lib/nvme: force qpair disconnect before aborting rdma requests.
This is needed for shared completion queues which can still give us
successful completions on aborted requests if the qpair hasn't been
disconnected.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I85cf1a81ef563d8c02d684b09d2f7ad5008e38cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1961
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:22:05 +00:00
Seth Howell
b4e060b560 lib/nvme: check that req is not null in RDMA.
When a request has been aborted, it's possible to get a completion
for an rdma request but the rdma_req->req object has already been
cleared to NULL.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5f7b1b96ff4be8c436aae9a7e2a7c9927d04e627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1960
Community-CI: Mellanox Build Bot
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-06-01 09:22:05 +00:00
Tomasz Kulasek
c62887ad0b nvme/cuse: add dynamic nvme cuse devices update
This patch adds a posibility to update cuse devices after cuse
device registration.

During NVMe controller life cycle there's a posibility to create
and delete namespaces with Namespace Manage feature from NVMe
spec 1.4.
To guarantee consistency, after changing the number of namespaces
NVMe CUSE devices must be repopulated after Namespace Manage
operation.

This patch introduces cuse_nvme_ctrl_update() entry point to allow
repopulate NVMe CUSE devices.

Change-Id: I478faae040027965321af585abfc34eaf35c908c
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/650
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-01 09:21:48 +00:00
Tomasz Kulasek
a7567709a6 lib/nvme: implement SPDK_NVME_DATA_HOST_TO_CONTROLLER in cuse
Change-Id: I07bc1771eec284f90d887a0a806d315fbc989428
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:21:48 +00:00
Tomasz Kulasek
8da21f69d3 lib/nvme: rework cuse admin command
For now only controller to host transmition is implemented
for CUSE.

This patch separates cuse_nvme_admin_cmd_send() entry point
to be used to implement another transmition directions.


Change-Id: Ic9013a30c16cf71957c8b411ee00a43c7aa8bbb6
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-01 09:21:48 +00:00
Tomasz Kulasek
8365e15666 test: fix load cuse module before test
Change-Id: Iaa2284b5e2de8ae563936d881c5ad7fa7a6b179d
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2637
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-01 09:21:48 +00:00
paul luse
b9218b7ac6 examples/accel perf: add compare workload
Optionally let the user specify what % into the buffers there should
be a miscompare if desired.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3a5524de5e0f7cb91fcf92e76f937bdf280a515b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2109
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 09:21:32 +00:00
Seth Howell
964463e420 lib/blob: remove spdk_ prefix from bs_batch_read_bs_dev
This function was removed from the public API last release
when the map file was introduced, but I didn't clean up
the name at that time.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3101723b504531ce2c51dba2feb063511dd32684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2443
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:21:14 +00:00
Seth Howell
61d85773f6 lib/nvmf: remove spdk_ and _spdk prefix from functions.
I missed a few files in this library the first time.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2ad55355e6348eaa10384a148dd45deb9f68fc2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:21:14 +00:00
Shuhei Matsumoto
75343ec40a lib/accel: Remove inclusion of SPDK event library
Replace inclusion of spdk/event.h by spdk/log.h in lib/accel/accel_engine.c.
There had been no dependency with SPDK event library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8709b582747de932c1251635940e0aba54211c2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2691
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
11d3806efb lib/bdev: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from lib/bdev/bdev.c. Its dependency
had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icfea104b20172e624574506a41fa92524ebc8627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
507833736c lib/nbd: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK NBD library. Its dependency
had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I33d89ccc0c37417d658992a33c3ece793e658011
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2689
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
f21f51bd81 lib/nvme: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h and spdk_internal/event.h from
SPDK NVMe library. Their dependency had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide3a0902b1cebb9c9033ade45d7488622e38696c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2688
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-06-01 09:20:41 +00:00
Shuhei Matsumoto
207c959a2c lib/nvmf: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h and spdk_internal/event.h from
SPDK nvmf library. Their dependency had been removed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibc6c52ab41555d9b29afc3e16c1c3fd0bf5fc63a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2687
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
6917f6e061 lib/iscsi: Remove inclusion of SPDK event library except shared memory ID for iSCSI top application
iSCSI library still needs to include SPDK event library only for
shared memory ID to allocate shared memory for iSCSI top application.

We will move the code to module library separately later but remove
all other inclusion of SPDK event library in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I21d77b9cc00c6a1f512546a6a0202c8fa5623bed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
1b5ad8adb4 lib/scsi: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK SCSI library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a6278f86cb99da76f26090d11f62ec9fdf956c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2685
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-06-01 09:20:41 +00:00
Shuhei Matsumoto
8656468020 lib/vhost: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK vhost library. Dependency
of SPDK event library had been removed from SPDK vhost library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5853dee6e8225834f030db9a3317be47c1355a27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2684
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Michal Berger
f385076a1b pkgdep: Make pkgdep.sh to use distro-specific source files
Change-Id: Iee7ba04c489ee1192f6fd65c6647c78536440246
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2508
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>
2020-06-01 09:20:24 +00:00
Michal Berger
af8f939e2f pkgdep: Intrdouce FreeBSD-specific source
Change-Id: I3617a08089b11ace54f34ce2f21bd120a9aa05a3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2507
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
511de06bb5 pkgdep: Introduce SUSE-specific source
Change-Id: Ie106459d7dbe92e32933dad569b79c348a8f0052
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
75febdfba7 pkgdep: Introduce RHEL-specific source
Change-Id: Iaa29cdb1920ec3283c1fa62dd4fc20d4c58b1340
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2505
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>
2020-06-01 09:20:24 +00:00
Michal Berger
ca95a71863 pkgdep: Introduce Debian-specific source
Change-Id: I71b129b3928f1d5881f42ebfd1510a3fb4055cd3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Michal Berger
b4c74897f3 pkgdep: Introduce arch-specific source
Change-Id: Ib28364c84a46b98c36ea7202412b34231324f226
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 09:20:24 +00:00
Shuhei Matsumoto
7641283387 ut/nvme_pcie: Fix a few assert conditions which had used not == but =
A compiler got warning for these mistakes.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9772910b6a3cc9d6e45cfae1c19048179d16189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2710
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:20:12 +00:00
Alexey Marchuk
88c8d88918 nvme/pci/ut: Initialize hotplug_fd
Change-Id: Ib189ddacfb38bb56aa89a4d81723867eada31833
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2713
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-01 09:19:55 +00:00
Ben Walker
f20e375b91 build: Make spdk.app_cxx.mk work like spdk.app.mk
These had diverged. Make them work the same way again.

Change-Id: Ib6d93a7042584493315fe1e348dc8ede9ab320f0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-29 15:43:45 +00:00
Ben Walker
290d058a8c build: Make (DIRS-y) depend on mk/cc.mk
In parallel make, it was previously possible for sub-directories
to start compiling before mk/cc.mk was checked. This doesn't
really cause a problem, but set up the dependencies to ensure
it is always checked before proceeding with the compilation.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I9152095eaebf21e242aa5472f800f036fe8d0751
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2554
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-29 15:43:45 +00:00
Michal Berger
c988348361 check_format: Use $output_dir to store shfmt patch in
If $output_dir is set, putting the shfmt diff there will make it
easier to extract it and/or look it up from the side of the per
patch build.

Change-Id: Iefb601a29f165e59b7670a8878e95bb6b16c9650
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2277
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-29 14:59:53 +00:00
Maciej Wawryk
6f702d4ea7 scripts/perf: Fix type error in run_nvmf.py
TypeError: unsupported operand type(s) for /: 'int' and 'range'

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8266c80cc886a51b43d9719b8bf845ffd0730b03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2259
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-29 14:59:40 +00:00
Changpeng Liu
3b6622046e nvme/pcie: use 16 bits width access API for PCI_COMMAND register
PCI_COMMAND register with offset 0x4 is 16 bits width.

Change-Id: I86483e58a3ac680efaae6ff7edaadde8efc289f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2589
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-29 14:59:24 +00:00
Jin Yu
d33466d0a9 unit: add a UT for the multi async reqs
The UT can test the received aer reqs number and
check if the reqs are continuous.

Change-Id: Ifa1cb9dd4cdae5526fc80fe6c1b504ad9873d0f8
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2549
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 14:59:08 +00:00
Jin Yu
b7cc4dd7dd nvmf: support multi AER events in nvmf target
Add the AER events in nvmf target from one to four.

Change-Id: Ie31988b49d68bdbc28ab2e09c783e681d3017e2b
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2548
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 14:59:08 +00:00
Shuhei Matsumoto
3d857e3611 nvme/arbitration: Increment current_queue_depth only if I/O submission succeeded
current_queue_depth should have been incremented only if I/O submission
succeeded.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibdcae2d4e8d5b804faaac2392226252c95dfb634
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2586
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-29 14:58:30 +00:00
Shuhei Matsumoto
948bf82228 test/nvme: Increment current_queue_depth only if I/O submission succeeded
current_queue_depth should have been incremented only if I/O submission
succeeded.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib26b42b0ab195eba7536b2403a31d42305d77433
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2585
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-29 14:58:30 +00:00
yupeng
240b243af5 bdev: add doc for bdev_auto_examine
Explain the bdev_auto_examine parameter of the bdev_set_options rpc.
Add bdev_auto_examine parameter for the bdev_set_options
in the python rpc client.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: I268cd5c01129180467967c2ebfffa7c3ba7e5b1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2580
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 14:58:16 +00:00
Tomasz Kulasek
c84b3cccdd lib/nvme: fix do not use cuse session on fail
Change-Id: I9946829183c43286da4be6bda887a4d13d93e398
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2612
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-05-29 14:58:03 +00:00
Jim Harris
89e47f6014 nvme: create netlink socket during nvme_driver_init
This helps ensure thread safety on creation of the
netlink socket, when probe is called from multiple
threads at once.  It is also a lot more clean - we just
create it once, rather than checking every time probe
is called to see if it has to be created.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2681
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 09:26:05 +00:00
Jim Harris
18f79f2449 nvme: add mutex to nvme_driver_init
This will allow spdk_nvme_probe and variants to be
called from multiple threads in parallel.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2680
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-29 09:26:05 +00:00
yidong0635
80d7bc3060 app/spdk_top: Include header file by case.
For compatible on different OS, need to using __has_include.
And this can't be simplified.

ncurses file is different on openSUSE.

Fixes issue #1400.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I612e7c37d054da90206499bcdfe8cc06cd8cc360
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2638
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-28 07:14:17 +00:00
Seth Howell
684b3a49f0 lib/nvme: split request resubmission into function.
This will need to be done separately for poll groups.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0e432493bdb02e13fe5c73a8a09911cef573307b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1664
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-28 07:13:44 +00:00
Seth Howell
63732d8880 lib/nvme: split cq completion processing to its own function.
This helps create a separation between processing a qpair and processing
a completion queue which can be shared across multiple qpairs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I111dd16ec4327854f232988a96891a65813f00e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1166
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>
2020-05-28 07:13:44 +00:00
Tomasz Zawadzki
7b8964c5c8 lib/env_dpdk: rename pci_init/fini() to pci_env_init/fini()
Patch below removed spdk_* prefix from functions in env_dpdk:
(15d0ae62) lib/env_dpdk: remove spdk prefix from internal functions.

This resulted in name conflict with libpci PCI Utilities library
pci_init() function.

Fixes #1407

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie6d6eea3a7b8a0f0223bd14bbe258061460a81dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2611
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-28 07:12:42 +00:00
zkhatami88
fe3fab26bf nvme/rdma: Using hooks in reg mr
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Change-Id: I9493fe82b5b758c0092d20ef18b79d652fefed85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1905
Reviewed-by: Ben Walker <benjamin.walker@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-28 07:11:39 +00:00
yidong0635
f7a4356b21 ocf/ctx: Fix warning of using uninitialized value.
Warning:
ctx.c: In function ‘vbdev_ocf_ctx_log_printf’:
ctx.c:503:2: warning: ‘spdk_lvl’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  503 |  spdk_vlog(spdk_lvl, NULL, -1, NULL, fmt, args);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiling with ocf module, here should add default.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I645a1044e58b63d5a58fde19baa3c125f97e0a7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2603
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-05-27 07:37:12 +00:00
GangCao
34430edda7 nvme: add the ctrlr traddr in the error message
In the case, there are several ctrlr used, it's better to
have the traddr to indicate which ctrlr has the issue to
shutdown.

Change-Id: Ie564bb70566ba5822938efc99125d063f7b4ae4a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2588
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-27 07:36:58 +00:00
GangCao
391dd1c268 Blobfs: update the display string
Change-Id: Ia891b7ccac5ccb2def7b59d081750d7ec5f9729e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2604
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-27 07:36:50 +00:00
Michal Berger
6e08a3146c pkgdep: Use major version of the pip bin
pip3 can come for different python releases (3.6, 3.7, etc.) and
depending on which version is installed some maj.min bins may simply
not exist.

Change-Id: Iefc26902161e2e3578d07e99a9e742b132ef11f0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2565
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>
2020-05-27 07:36:39 +00:00
Ziye Yang
59e44bcbb3 Revert "sock/uring: use batched manner to get the cqes."
This reverts commit 79215d80c1.

Reason: Find the bugs while using batched. For example, if
we fetch 3 CQEs, A, B, C and put it in a cqes[] array.
Then we leverage io uring cqe seen to handle, Then we handle the
CQE A, then invokes the call back related with A. In A's call back,
it may also call the reap function (sock_uring_group_reap),
then the CQEs will be handled again. Thus the CQEs B and C can be already
handled. Then we will handle B or C again, then it triggers the error.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I67ece3b24e677b88d66d08722b00539693b42e1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2543
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>
2020-05-27 07:35:40 +00:00
Karol Latecki
821824888b test/blobfs: do not skip rocksdb tests
Do not skip if db_bench is not available.
Explicitly fail.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I96b0fde50aedf20654a114a2c28d24bfed478b11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2515
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-27 07:35:32 +00:00
Shuhei Matsumoto
777bd353d2 example/nvmf: Add periodic round robin poll group migration
Add simple periodic round robin poll group migration to the example
application to exercise SPDK thread dynamic scheduling.

Add CLI option to enable the feature manually. Default setting is
disabled, and the period is specified as micro second.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4639e94ce00611a600ff068e754ee6f31905565c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2556
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:11 +00:00
Shuhei Matsumoto
8b93c646ae example/nvmf: Support dynamic SPDK thread rescheduling
Add the flag, resched, to struct nvmf_lw_thread.

Add an new function nvmf_request_spdk_thread_reschedule() to set
the resched flag of the current thread to true.

nvmf_reactor_run() checks the resched flag and call
nvmf_schedule_spdk_thread() and clear it if it is true.

Enable the thread operation SPDK_THREAD_OP_RESCHED and add
nvmf_request_spdk_thread_reschedule() to the case of
SPDK_THREAD_OP_RESCHED in nvmf_reactor_thread_op().

Following patch will add repeated calls to spdk_thread_set_cpumask()
to exercise the feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I60a4213c139b3e6f16ccb7065dea34ffe760de13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2541
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:11 +00:00
Shuhei Matsumoto
ab6dbff72a example/nvmf: Replace locked linked list by lockless ring for run queue
Replace mutex and linked list by lockless ring for nvmf_reactor->threads.

If we create event call, we will be able to keep linked list and
remove only mutex. However, simple replacement of locked linked list
by lockless ring will be enough for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I590a385ff018ad20c7d6752b0a3a5562e3b68510
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2579
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:11 +00:00
Shuhei Matsumoto
10190302d2 example/nvmf: Create only a single SPDK thread on the master core at startup
Stop creating the default lightweight thread per POSIX thread. Additionally,
substitute the created master thread into g_init_thread directly as a
preparation to the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I09643491e6b5aaf91d9958481f05e264a2ac5f7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2542
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-27 07:35:11 +00:00
Seth Howell
f7ebaeaa59 lib/lvol: remove spdk_ prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic8446a9e577e7f55f09b365f2f1e41b44f81e4bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2441
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-05-27 07:35:02 +00:00
Seth Howell
1a9ed697f0 lib/jsonrpc: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iea58ebd26b28cae1531946d0833e7be666a46127
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2440
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-05-27 07:35:02 +00:00
Seth Howell
33ebd2cac0 lib/ftl: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2dd8028e9a56fa861e2f66118c3c751c54098fe3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2439
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-05-27 07:35:02 +00:00
Seth Howell
fd36120639 lib/event: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie9aef08d8c46ed9eef883784578fa795e2cd60fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2438
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Seth Howell
b5d68d5934 lib/blob: remove _spdk prefix from all functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb33816e5b66266987845172c27c87667ac0a596
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2437
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Seth Howell
d145b9779f lib/bdev: remove _spdk prefix from functions.
We want to avoid confusion between _spdk and spdk
prefixes.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I72b7948d94b0e9d695ae6b323fbd8bb6e4c143e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2436
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-27 07:35:02 +00:00
Seth Howell
0506fd21ff scripts/check_format: add a check for proper naming conventions.
This test prevents anyone from adding a function that begins with
spdk to the lib or module directories without also adding that file
to the corresponding map file and a header in spdk/include or
spdk_internal/include.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ife7db13d4bb8fec7570c8492ac3326222a850c36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2423
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-27 07:35:02 +00:00
Changpeng Liu
4d4766b716 test/blobfs: fix the heap-use-after-free issue
When testing fuse with blobfs, we used "bs=4k count=32" as the test case,
but when it comes to bdev layer, the IO size is 64KiB, and alignment is 4KiB,
so bdev_io_get_buf() will return error as the following message:

bdev.c: 789:bdev_io_get_buf: *ERROR*: Length + alignment 69632 is larger than allowed

so here we can resize the AIO alignment size from 4096 to 512, because the bdev memory
pool default alignment size is 512, with this change the error will not occur in
bdev layer.

For the umount operation, since the fuse module will use send message to do the umount,
here we can insert one second barrier to wait for the umount to be completed before
killing the process.

Fix issue #1406.

Change-Id: Id3c67900c87a5797718c28c184a925275f90c7d4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2587
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-26 07:21:24 +00:00
Dayu Liu
b8ac3e8acd read_fd_message: distinguish prints of log message
When VM shutdown there will be an error message 'VHOST_CONFIG: recvmsg failed' printed.
The return value of recvmsg will be 0 when the peer has performed an orderly shutdown,
or -1 if an error occurred. So adding logs to distinguish these two different situations
to avoid confusing and to hint accurately.

Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: Ia4b806a11d3c6ddf076c61d1caad4fa7b16fb9b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2557
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-25 09:08:00 +00:00
Shuhei Matsumoto
a9430856b6 example/nvmf: Deprecate spdk_thread_lib_init() by spdk_thread_lib_init_ext()
Replace spdk_thread_lib_init() by spdk_thread_lib_init_ext() to
support dynamic SPDK thread scheduling in this sample application.

Add nvmf_reactor_thread_op() and nvmf_reactor_thread_op_supported(),
and then pass them by spdk_thread_lib_init_ext().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9498d45d74757d8893b2b415fe28bf65f8fd02d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2540
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: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
bda55ddb6b example/nvmf: Create and destroy lightweight thread per poll groups dynamically
By following the SPDK NVMe-oF target application, create and destroy
a lightweight thread per poll group instead of assuming a pool of
lightweight threads already exist at start up time. Each poll group
is only accessed from the associated lightweight thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0a221594d51373237f4ead07a3f5592dbbffa7a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2539
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: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
2a6ce9e2ce exapmle/nvmf: Destroy dynamically exited thread at nvmf_reactor_run()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6782e8c59df5f20cb6c368482633875d6e9b7235
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2538
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
8753fdb645 example/nvmf: Run SPDK threads by FIFO to avoid deadlock
if spdk_thread_poll() calls spdk_thread_create() to create SPDK
thread dynamically, it will acquire nvmf_reactor->mutex and will
cause deadlock because the queue nvmf_reactor->threads is accessed
by any POSIX thread by holding nvmf_reactor->mutex.

If any non-owner POSIX thread manipulate nvmf_reactor->threads by
holding nvmf_reactor->threads, like general priority based scheduler,
running SPDK threads by FIFO will be better.

Change nvmf_reactor_run() to dequeue a SPDK thread from the head, run
it, and then enqueue it to the tail. Release nvmf_reactor->mutex
while spdk_thread_poll() is executed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b4040cc4d995beaf4a1f9ed8260bb1254d7d7fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2537
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
9bea56c004 example/nvmf: Enlarge critical section guarded by g_mutex in nvmf_schedule_spdk_thread()
nvmf_schedule_spdk_thread() is not so performance critical but
should work as designed. Guard the whole operation to decide the target
core by g_mutex. This matches the reactor's _reactor_schedule_thread().

If _reactor_schedule_thread() is refined, change this accordingly too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9382230577442897d4d2d22b85b1ae4edd77aa98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2536
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Sochin Jiang
aaca23fb4b lvol: let thin_provision flag be consistent with Blob
I found this flag weird while debugging a lvol with
thin provisioned Blob, so make it consistent with it's Blob.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: Iae555020d5781dfcf4d4f072a47e9573d35b8705
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2435
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-22 10:42:28 +00:00
Jin Yu
13cc64fd53 nvmf: decrease the aer notification code
Using an inline function to decrease the aer notification code.
It also can benefit from adding new async events later.

Change-Id: Id0f7c57fd66ade303c625d1d1af10d41dead8994
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2547
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:21:39 +00:00
Jin Yu
9396422b36 nvmf: fix aer request judgment
Fix potential bug. In nvmf_ctrlr_abort_on_pg(), when run into
the request_complete it can trigger this bug because in nvmf_qpair_abort
the ctrlr->aer_req was set to NULL.

Change-Id: I37a7e3c76c6616ca4ecbc6d9d2776ee32449c796
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2545
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:21:39 +00:00
Seth Howell
fadfef63d1 lib/nvme: provide mechanism for tracking request completions
Add wrappers around the request and response values and track
those using the wr_id value.
This will come in handy when we start doing poll group based
completion processing.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaff75b03e41d49f53e55e0ce65d384567988fc9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1165
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-21 09:21:27 +00:00
Alexey Marchuk
48dee973ac nvmf/rdma: Do not log an error for recv WC with error status
When we don't use SRQ and close a qpair, we will receive completions
with error status for all posted ibv_recv_wrs. This is expected and
we don't want to log an error, use debug severity in this case.

Fixes #1387

Change-Id: Ia8efb8f24628880454fab1d7f6188e7b31cffb67
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:20:46 +00:00
Sochin Jiang
e230d49ae2 blob: fix a wrong memset parameter
A wrong parameter is passed to memset when loading blob->active.clusters,
this leads to an unpredictable wrong lba value using thin provision LVOLs
while submitting IO requests, thus causes EIO error using QEMU vms.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: Iecea80cfa58f7a025603430d666fd9cd4d3fea8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2431
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:20:30 +00:00
Tomasz Kulasek
8d69fd9139 test/vm_setup: install required nvme-cli tool
Currently used fork of nvme-cli (nvme-cli v1.8 with our patch)
doesn't work well with namespace manage feature (e.g. namespace
deletion or working with NSID=0xffffffff). These problems seems
to be fixed in later versions of nvme-cli (v1.11.1 for now).

Nvme-cli tool must be patched to support namespace devices
exposed as character devices. Required modification is
already merged with current nvme-cli master in

  commit: e770466615096a6d41f038a28819b00bc3078e1d

and hopefully will be available in the next release of nvme-cli
(>1.11.1).

Next steps would be:

 1) Change the commit hash to a release that includes mentioned
    patch.

 2) Drop the compilation when system repos contain the right
    release.

Change-Id: I07846cba955e580f5a8861ad4c7e50e7f4adccfb
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2417
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:20:17 +00:00
Maciej Wawryk
a36e9605c0 Change fio version to 3.19
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8b50640db9b832f35a6f8fb9c2a151bea2f084a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2370
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-21 09:20:01 +00:00
Seth Howell
4bd48a3d97 scripts/check_format: remove extra output from shfmt check.
All of the other checks simply print OK if the test passes
this check prints out a lot of text (especially when run at the
tip of long patch series) that can make it difficult to tell if
anything is actually wrong.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie681d200aa13f208e4afa1ab419cbad63ef6606c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2403
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:42 +00:00
Shuhei Matsumoto
cac5022e61 bdev/crypto: Stop access bdev_io->internal from bdev module and fix an issue
crypto_dev_poller() had set IO error to bdev_io->internal.status
but _crypto_operation_complete() checked io_ctx->bdev_io_status
and overwritten bdev_io->internal.status by spdk_bdev_io_complete().

On the other hand, internal fields of struct spdk_bdev_io should
have been avoided.

This patch fixes both.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia3d4887f34fdecc765b88246c3e66ce1871ff30f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1907
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-05-21 09:19:23 +00:00
Seth Howell
a3f72b2e5a lib: net, notify, nvme, rocksdb remove spdk_ prefix.
remove only the spdk_ prefix from static functions in
the above libraries.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I59ce032c3312fa73f30c133fd62e603c1eee2859
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2365
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
0be5557cad lib: json-nbd remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idbf8d37fbac4e3a9eff253095efb2525c9094d94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2364
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
a7592dbe13 lib/event: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I22ea328f19d7cdb766c12c4c15c188963f971226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2363
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
3456377b45 lib: accel, bdev, blob, env_dpdk remove spdk_ prefix.
Hitting only the static functions from the above libraries
with the spdk_ prefix.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic6df38dfbeb53f0b1c30d350921f7216acba3170
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2362
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
d18e63206a mk/lib: add a check that major and minor version is set for libs.
Also, while we are here, consolidate setting SO_SUFFIX to one spot.

Previously, it was possible for a library to slip through
without an SO version.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4db5fa5839502d266c6259892e5719b05134518c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
2c56786eca module/accel_idxd: add an SO version.
This was overlooked when the module was merged.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia7bd8710741bf5a82e7dd27925ecef1e59ed2938
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2360
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-21 09:19:00 +00:00
Michal Berger
fe711156e8 tests: Switch to $SPDK_TEST_STORAGE for writing out bigger tmp files
Change-Id: Ic400a470373fe59e89b2400af4f4264872281d64
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2368
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-20 14:17:02 +00:00
Michal Berger
1430096aed test/common: Storage detection for the tests
Instead of blindly dumping tmp files at random places, try to
determine the best place for given file based on the available
storage.

Change-Id: I92a7adf6cd17222510fa76969856a50f74966c0f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1868
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-20 14:17:02 +00:00
Changpeng Liu
44f69a9e51 nvme: add a quirk for QEMU emulated NVMe SSD
When starting the QEMU NVMe SSD with "cmb_size_mb=XX"
parameter, the controller memory buffer feature is
enabled in the Guest, the SPDK NVMe driver running
in the Guest will allocate the submission queue in
the controller memory buffer by default, it will use
memset and SSE instruction when copying NVMe command
to the submission queue entry or zero the whole
submission queue, inside the memset implementation
the AVX2 instuction will be used if the CPU can support
such feature.  However, due to the limitation in the
QEMU, the maximum access width to the PCI BAR space is
set to 8 Bytes, SPDK will report illegal instruction
in Guest.

Here we add a quirk for the QEMU emulated NVMe.

Fix issue #1362.

Change-Id: Ib5e2e4198d39ce7f8455175f7db283db0b01eebf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2196
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 14:16:52 +00:00
Changpeng Liu
b2947f528f 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: Ieadf271a0c8530f2440cded05ad139483a8c5937
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2383
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-05-20 14:16:44 +00:00
Tomasz Zawadzki
18504e3f4d vm_setup: update QEMU branch based on 5.0.0
This patch updates the suggested branch to 5.0.0,
which at this time contain all necessary patches to run
FTL tests.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idddea7154565f710a8325ec73de98cfe52e6ab8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:16:35 +00:00
paul luse
b57103a0c8 lib/idxd: add support for compare operation
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibfcc5c2f4a169c4625ab4f58fbcb8957677a3427
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2108
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:16:22 +00:00
paul luse
3ef64e0c2b lib/accel: add compare function to accel fw
Along with the sw engine back end implementation for it. IDXD
back end will follow, the use in the accel perf tool as part
of verify.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia1013cd884ff71990f898320d6a22e96e16ad2a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2107
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 14:16:22 +00:00
Michal Berger
7a0274fc38 test/ocf: Drop .ini config in favor of json
In persistent-metadata test,
add a sleep because of issue #1348

Change-Id: If9ecaf660ac7ed18614d87cc775e60371ca84a97
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:14:50 +00:00
Maciej Wawryk
e96d3280a0 scripts/pkgdep: Add ninja and meson packages to minimal install option
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I36cba747313349f9dbe9d98e6e6297e1a449af3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2517
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-20 14:14:29 +00:00
Ben Walker
76aed8e4ff Revert "env: Use rte_malloc in spdk_mem_register code path when possible"
This reverts commit 6d6052ac96.

This approach is no longer necessary given the patch immediately
preceeding this one.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5aab14346fa5a14dbf33c94ffcf88b045cdb4999
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2512
Community-CI: Mellanox Build Bot
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-05-20 14:14:21 +00:00
Ben Walker
cf450c0d7c env: Add spdk_mem_reserve
The spdk_mem_reserve() function reserves a memory region in SPDK's
memory maps. This pre-allocates all of the required data structures
to hold memory address translations for that region without actually
populating the region.

After a region is reserved, calls to spdk_mem_register() for
addresses in that range will not require any internal memory
allocations. This is useful when overlaying a custom memory allocator
on top of SPDK's hugepage memory, such as tcmalloc.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia4e8a770e8b5c956814aa90e9119013356dfab46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2511
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:14:21 +00:00
Seth Howell
8668141b41 make: remove spdk.map.
As of now, all of the libraries and modules have their own
map file specified. Get rid of the generic top level one and
add a test to make sure that these files have been specified.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I329004e7442c7975731fc973455c93e724982952
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2359
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-20 14:11:31 +00:00
Seth Howell
dbaa2c7906 lib/vhost: remove spdk prefix from static functions in vhost_rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib555a3da41142730ab09107368e78dcfd684feac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2308
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
4d112ac217 lib/vhsot: remove spdk prefix from static functions in vhost_nvme.c.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If2b818bc90a957f8478c68009175a0436dac4876
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2307
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-20 14:11:31 +00:00
Seth Howell
ba5c5cc344 lib/vhost: remove spdk prefix from static functions in rte_vhost_compat.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I66ec9330b18e222a3a523a55f5f61f3c20610cae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2306
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-20 14:11:31 +00:00
Seth Howell
dd81d57565 lib/vhost: add static qualifier to spdk_vhost_scsi_device_background.
This variable is only used in this function.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib1836662e8068f6a459ce8746b45b5dca08079e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2305
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
0059b45510 lib/vhost: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9935151ef41be20199a19085c1775d15f9ab6ba2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2304
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-20 14:11:31 +00:00
Alexey Marchuk
9b86f31a38 nvme/rdma: Handle failed send/recv as a fatal error
Do not make attempt to resubmit failed send/recv WR, instead
report and error to the upper layer (in case of new request) or
fail a qpair (in case of active polling).

In the case of failed ibv_post_send and disabled `delay_cmd_submit`
nvme_rdma_qpair_submit_request returns an error to the caller.
The caller completes failed request but RDMA layer still keeps
it in a send queue. Later RDMA layer can send the corresponding
WR and notify the upper layer about the completion of the request
for the second time.

Change-Id: I1260f215b8523d39157a5cc3fda39cd4bd87c8ec
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1662
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
8c6a345534 nvme/rdma: Use RDMA provider API to send WRs
Change-Id: I3dc87751d250da84d988b1c7a9c57112b5bd10b0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1661
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
bbb493ce0c nvmf/rdma: Use RDMA provider API to send WRs
Change-Id: I9bd6956d27716ae95abea0fd78adebaa9b288edb
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1660
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: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
a12530d6d2 rdma: Add RDMA provider API to send/flush Work Requests.
Verbs implementation: doesn't differ from the original:
- send_wr: saves WRs in the qpair internal structure
- flush_wr: calls ibv_post_send

Direct Verbs implementation:
- send_wr: calls ibv_wr_start for the first WR;
Calls opcode-specific function to add a WQE to SQ
Tracks queued WRs to return a correct pointer to 'bad_wr'
- flush_wr: calls ibv_wr_complete - it flushes to the NIC
all WRs added between ibv_wr_start and ibv_wr_complete

Change-Id: I65a26914db688af20589f3b69a994d214d860726
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1659
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
daee62a05b rdma: Add mlx5_dv RDMA provider
The new RDMA provider can be enabled by passing
--with-rdma=mlx5_dv parameter to configure script
This provider uses "externally created qpair"
functionality of rdma cm - it must move a qpair
to RTS state manually

Change-Id: I72484f6edd1f4dad15430e2c8d36b65d1975e8a2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1658
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
63c8cea783 rdma: Add API function to disconnect qpair
This is a wrapper over RDMA CM rdma_disconnect function
The wrapper is needed since in Mellanox Direct Verbs
(aka DV) we must move qpair to error state manually
before calling rdma_disconnect

Change-Id: Ia8623c6989e7679591f2da56bafa7f4262eeebf9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1975
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
b4a9d7d318 nvme/rdma: Use RDMA provider API to create/destroy qpair
This patch adds use of RDMA provider API to NVMEoF initiator.
Makefiles have been updated with new RDMA lib dependency

Change-Id: Ieaefeb12ee9681d3db2b618c5cf0c54dc52230af
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1657
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
ea7a4f3c53 nvmf/rdma: Use RDMA provider API to create/destroy qpair
This patch updates NVMF target to use RDMA provider API
to create and destroy qpairs.
Makefiles have been updated with new dependency on RDMA lib

Change-Id: Iae35aea601380f8d1a6453a7fd6115f781e126f5
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1656
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
7e14f72443 rdma: Intorduce RDMA providers
RDMA provider is used as an abstraction layer and allows
to add vendor specific verbs implementation. This patch adds
an interface to create and destroy qpairs and its implementation
using regular verbs API.
Future patches will add functions to queue/flush Work Requests,
enable usage of RDMA providers API in NVMEoF target/initiator and
add Mellanox Direct Verbs implementation. This abstraction layer
is flexible enough to add other vendor's implementations.
The choice of a specific RDMA provider will be made at
the configuration step, it doesn't add any runtime overhead.

Change-Id: If8eec5bd45c82c71f73a14f6e84121cd02a1d65d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 12:03:50 +00:00
Xiaodong Liu
3ceeab7c8b notify: use noticelog for duplicated register
Change-Id: I36a05589298bcd0311a47a7854017ed01e8bd988
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2446
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:44:19 +00:00
Xiaodong Liu
7cb0266191 module/event: add SIGUSR1 in spdk_kill_instance
Change-Id: I6d2384203efcb4024448aac17ea91ec73b4f23f7
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2445
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:44:19 +00:00
Dayu Liu
ac498b1444 doc: using 4096 block size when bdev_aio_create
Created Linux AIO bdev disk with 8192 block size can not work
on some guest OS, i.e. CentOS 7.x, and may stuck when guest OS startup.
So applying block size smaller than or equal to 4096 bytes may be a more
suitable and common choice for most guest OS or cases.

Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: I0f2ce4e1fd19f337c3128ad3511823c984f0aac8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2489
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@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-05-19 09:44:13 +00:00
yupeng
f233c376b1 bdev: add bdev_auto_examine in bdev_set_options
The bdev_auto_examine flage will impact how bdev layer examine a
disk. If bdev_auto_examine is true, the bdev layer will examine all
bdevs as usual. If bdev_auto_examine is false, the bdev layer will
only examine a bdev if it is in a whitelist.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: If5b26283905f97f8a95ae9065226fa3dae6c27a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2114
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Changpeng Liu <changpeng.liu@intel.com>
2020-05-19 09:43:53 +00:00
Liang Yan
f2ede6b486 bdev/rbd: increase the segment in flush opeartion
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Change-Id: Ibde0f924c1b78c9a8f0f440e944c7eb81631ed1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2490
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: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2020-05-19 09:43:44 +00:00
yidong0635
6be2dde969 lib/log: Eliminate waring about format-truncation.
Eliminate this kind of waring by enlarge string size.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ib6d4d031fc635ce15e996d606f5164f682ec34b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2426
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:43:44 +00:00
Michal Berger
3425fc1fb8 check_format: Don't attempt to review perms of the symlinks
Change-Id: I3cd20ad9f1cadb5ca5e6de78d9b44d5df95f51d8
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:43:37 +00:00
Michal Berger
6c23a6f4d9 configure: Add extra dir for header|lib files lookup
These paths are not being looked up by clang (cc) by default, hence
currently it's not possible for vm_setup.sh to compile ref spdk on
FreeBSD as the compiler is not able to find libunwind.* files.

The reason why it looks for libunwind is because get_config_params(),
which is passed to ./configure, uses hardcoded gcc (not $CC) to check
if libunwind is supported.

This fixes the particular issue with libunwind (and potentially other
files for different options), inconsistency mentioned above should be
addressed separately (Issue: #1397).

Change-Id: I2afe11a669ba248ddb7854aa2a36a36372e944f4
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2434
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-18 10:17:07 +00:00
Michal Berger
0e79a79df3 vm_setup: Check for compiler version while compiling QEMU
Since gcc 9.* can be used across different distribution, the old check
no longer applies. Instead of looking for ArchLinux, check the gcc's
version directly to make sure proper options are added regardless of
the distribution (.e.g. Fedora{30,31} is also shipped with gcc 9.* at
the moment).

Change-Id: Ic493f411e8d886cae9bd5e2f389cb632d7b9f98a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2432
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-18 10:17:07 +00:00
Dayu Liu
5cdab5e2e6 doc: fix some typos and align indent when setup.sh --help
Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: Id0a2a3a577adfd5026b662d97d74c9ec6aebeb8e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2396
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 10:14:56 +00:00
Darek Stojaczyk
e5f021c10e scripts/check_format: auto-detect shfmt binary
A newer version of shfmt was released, but the script still
looked explicitly for the older one.

Make it execute the first binary '^shfmt.*' in PATH whose --version
returns at least v3.1.0.

Change-Id: If621abfa4d995a9dc985e6bab8c33aa36c327fae
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2428
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-18 10:14:52 +00:00
Maciej Szwed
0418ef1ef1 rpc: Add test for pluggable RPCs
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I62d8672389723f09e58ed66330e364042f375145

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2419
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-18 10:14:09 +00:00
Tomasz Zawadzki
d3cf561199 nvme/pcie: reduce physically contiguous memory for CQ/SQ
Following patch made sure that CQ/SQ are allocated in
physically contiguous manner:
(64db67) nvme/pcie: make sure sq and cq are physically contiguous

Using MAX_IO_QUEUE_ENTRIES is enough to make sure that either
queue does not span multiple hugepages.

Yet the patch made sure that whole page is occupied only
by the queue. Which unnecessarily increases memory consumption
up to two hugepages per each qpair.

This patch changes it so that each queue alignment is limited
up to its size.

Changes in hugepages consumed when allocating io_qpair in hello_world
application:
io_queue_size		Without patch	With patch
256			8MiB		0MiB
1024			12MiB		4MiB
4096			24MiB		16MiB
Note: 0MiB means no new hugepages were required and qpair fits into
previously allocated hugepages (see all steps before io_qpair
allocation in hello_world).

Intersting result of this patch is that since we required alignment
up to the hugepage size this resulted in reserving even two 2MiB
hugepages to account for DPDK internal malloc trailing element.
See alloc_sz in try_expand_heap_primary() within malloc_heap.c

This patch not only reduces overall memory reserved for the
queues, but decreases increase in heap consumption on DPDK side.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I75bf86e93674b4822d8204df3fb99458dec61e9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2244
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-18 10:13:56 +00:00
Seth Howell
2623c4c4d8 module/sock_vpp: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I06ead997eebd1122f1e504a1176776f5061bcf8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2358
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
937d828f90 module/sock_uring: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8c68fc09952d920d6dcf1d8112ba08490e578f84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2357
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
0bc117a470 module/sock_posix: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I593c0c1500b2175c4d3dc8ac19289f854895b00f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2356
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
5ad576336a module/event_vmd: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie7c85eb24f75592a79d09c5bbd07f6d11c9a6abd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2355
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
650ced4c39 module/event_vhost: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1467ea67269b50f346d84bb926b885c6e581a78f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2354
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
d5570379db module/event_scsi: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb31b8e98bfd12f69519e174b1ef27065ddc035a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2353
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
b257424be4 module/event_nvmf: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibfaa6bca27faf12455bf325bfb97303805c51f14
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2352
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
ab56b08875 module/envet_net: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id1d7226ee3abbcd558d1ec38ababbb3cb1fd5e09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2351
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: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
5c0b8f39a8 module/event_nbd: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id2920389b7cf762cf80006da5dbe582dfdc81438
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2350
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: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
e503deb1d2 module/event_iscsi: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8253838975a44ba8dcccb55ca1b41c27d5e3d231
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2349
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: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
0a52f4e5fc module/event_bdev: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7f82a634ee9c8a28fd52ab288cd1195f7a1ef9c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2348
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
Seth Howell
578cc1c8ea module/event_accel: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I75e3ab924c46208ac8055d4363c732b29c84dabf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2347
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
2259084102 module/app_rpc: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1f3cfd9d712b8dc0111a58af6bfe61f4d1c3f08a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2346
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
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
e69375bff3 examples/accel_perf: Add CRC-32C workload type
This is more to exercise the various CRC-32C back ends than anything
else but will calc a CRC on the source data and if -y is
specified it will also calculate SW (ISA-L)f defined CRC-32C and
compare every operation against what the accel engine came up
with using whatever back-end was enabled.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5ecd3c474717bce4e46d75875a784f888052993e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2073
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>
2020-05-15 08:12:13 +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
GangCao
2234bb665d Transport: allocate a global array of transports
Currently the new transport is dynamically allocated and looks like
not freed when the application exits. Trying to use the
__attribute__((destructor)) function to free the allocated memory,
it will not work in the case of user created thread as this function
is called right after the "main" function while other operations
may be still ongoing.

In this case, add a global array of transports.

Change-Id: I610b1e8114ba2e68abbd09ea5e02a9abce055e70
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2415
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 08:11:54 +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
Vitaliy Mysak
cbe9ea52d0 lib/log: add spdk_vlog function
Some users of SPDK API, such as OCF,
may want to generate logs with arguments themselves.
In that case they would need to first create a buffer
and then pass that buffer as a single argument to spdk_log().
This change adds spdk_vlog() which accepts va_list as argument list,
so it is easier to use spdk_log().

Change-Id: Ie2a3ac481035a250fcd68d0f9b8292008ebb6fe0
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1946
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>
Tested-by: SPDK CI Jenkins <sys_sgci@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
Liu Xiaodong
de11a5b2aa docs/containers: point to actual release
Point to actual release, rather than alpha.

Change-Id: I8a93ac94110e3962d4291a221c8b5d489690e771
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1808
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-05-14 10:57:07 +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
Seth Howell
92f5683343 mk: add a placeholder map file.
There are a lot of SPDK libraries that don't
export any symbols and only have a conxtructor function
which registers function pointers. For these libraries,
we will want a placeholder map file that doesn't export
any symbols.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id84ba51235a77884164843fe3508d7a458835402
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2311
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
29aeb31ab4 lib/vmd: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id248c4023f0f407e070ffd323f1fee8629cfd967
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2310
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
8c85b30d1d lib/virtio: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I54b6df4fc32f48a57053bff33032351ca54c0e1d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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
b869b4b96b lib/util: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0648f245166a0e7b427ede54547a186bee9adf41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2303
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
2fe1348d6a lib/util: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibfc3133aa6aa54d443d7845aa94ae2ea9cc59e95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2302
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
b59b86ae67 lib/util: move some crc32 functions to internal header
Allowing for custom crc32 polynomials isn't really within the scope
of SPDK. SPDK libraries have shifted over to using more optimized
versions of these functions wherever possible (e.g. ISA-L).

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie4837010874e957481dd00896389b38c842445e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2424
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
f8d5189552 lib/trace: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5c2a7048465d959164630289fe6651b288936610
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2301
Community-CI: Mellanox Build Bot
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
74dcd8e250 lib/trace: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id3e4e1f3cd17739f534db9266d56ceda586312c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2300
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>
2020-05-14 10:37:14 +00:00
Kyle Zhang
2187424ab2 lib/vhost: remove dependency on lib/event
In current implementation, lib/vhost assumes that it always runs
together with lib/event, and would call lib/event's functions in
vhost.c. This is not necessary and make program unable to
create/destroy vhost module without init/fini the whole spdk env. It
would cause problems when program runs with vhost and other spdk
components together.

In this patch, we remove the dependency of lib/vhost on lib/event by
adding a global vairable g_vhost_core_mask so that it could handle
core mask by itself.

Signed-off-by: Kyle Zhang <kyle@smartx.com>
Change-Id: I38ceb92ac39b6980955346fda41e968aaead863d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1204
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-13 07:47:01 +00:00
Tomasz Zawadzki
2e55b97d96 setup.sh: execute checking ulimit as a user
When using vfio a warning for memlock limit is printed.
TARGET_USER is one set by caller when executing the script,
or set to user that called the script (even when using sudo).

Yet ulimit was printed for the one executing the script,
most likely root.

This patch verifies ulimit for a particular TARGET_USER.
Along with more explicit information which user the
information pertains to.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I20ad62109bc316295208e21f959ecfc263307e1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1964
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>
2020-05-13 07:46:51 +00:00
Tomasz Zawadzki
887531f6a6 lib/blob: provide better log on blob_load failures
Added blobid and metadata page number to the log.
Previously only number within particular blobs md chain
was displayed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8e881c5824c9d2eadca9f3ac8ee2ac9ffc0e5cae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2058
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>
2020-05-13 07:46:43 +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
Li Feng
bcc28e05d1 vhost_blk: speed up the vhost device boot
When starting qemu with vhost-user-blk multiqueue(set num-queues to
more than 1), the vhost device will be started/stopped many times
(related to the queue num), as the vhost-user backend doesn't know the
exact number of queues used for this device.
The target have to stop and start the device once got a valid IO queue.

When stoping and starting the vhost device, the backend bdev io device
will be deleted and created repeatly.

If the backend bdev is a distribution system, the cost is large as the
network RTT.

In this patch, add a dummy_io_channel to hold a reference to the io
device, so that the io device will not be deleted.

Change-Id: I5737248ec52bee06342ff0873bb89fd0a51665c2
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2020
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-05-13 07:46:29 +00:00
Maciej Szwed
b0bac20ad6 rpc: Add possibility to load module with additional RPC commands
This patch adds '--plugin <module_name>' parameter
to rpc.py script which is used to provide module
name with additional RPC commands that should be
included in rpc.py script. User must export path
to rpc module with PYTHONPATH before calling rpc.py
with this new parameter.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I971429a33cf4ea943d2b7f3abd5a6cb82398d2a4

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2263
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>
2020-05-13 07:46:17 +00:00
Michal Berger
8cc72fe459 test/nvmf: Handle multiple arguments in nvmfappstart()
Change-Id: Ibc75320b2de8885125e0835ead9e208fcace976d
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2092
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-13 07:46:04 +00:00
Michal Berger
871214e2c1 rpc.py: Allow loading json config from different sources
This is relevant in context of rpc_cmd() which was introduced with the
following commit:

     "scripts/rpc.py: add daemon mode" 8b98cdb64a

When rpc.py runs in a server mode, its stdin is already attached to a
pipe connected to its parent Bash process. In such a setup, it's not
possible to use some of the rpc methods, e.g. load_config().

To make use of said methods possible, allow them to load the config
from different sources - a regular file or a string.

Change-Id: I6fa7d13fa1957b6449ce5d5c5a810bd58d0a5703
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2106
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-13 07:46:04 +00:00
Seth Howell
7a2bf6fcb9 lib/thread: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2b1b43c76518c7a00037360b8a1d3c46b4d14f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2299
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-12 21:49:03 +00:00
Seth Howell
90b4350284 lib/thread: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If5d934f7d3f46e5c508e40c0b0c3aea65d3ba113
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2298
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-12 21:49:03 +00:00
Seth Howell
ca87d13e56 lib/sock: remove spdk prefix from static functions in sock.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I86311908039368135f0fe2ea68e63cf351f9f79e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2297
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-12 21:49:03 +00:00
Seth Howell
67801f6cca lib/sock: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5cf35dbe14bf29050ea40f31553a10957f7dac11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2296
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-12 21:49:03 +00:00
Seth Howell
1482fdea3e lib/rpc: remove spdk prefix from static functions in rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I60a84c48b2768a2f93a859f78c961294dd590461
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2294
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
91a594ad8b lib/rpc: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2a81c5d7911d2e0cef2346200ae3f3c8740a4e75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2295
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
9654226cad lib/reduce: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3545b884717966cb53999a04435a010e43f9cc45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2293
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-12 21:49:03 +00:00
Seth Howell
6dec2087e9 lib/nvmf: remove spdk prefix from static functions in transport.c.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I601d59c5e182aa4a713eb798b3e73fe97106866a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2316
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-12 21:49:03 +00:00
Seth Howell
4de405ab6e lib/nvmf: remove spdk prefix from static functions in tcp.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If5d29c4236022f949a6f2e44bcd51a6e2a9ea88b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2289
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-12 21:49:03 +00:00
Seth Howell
63c90491e5 lib/nvmf: remove spdk prefix from static functions in subsystem.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I920c7c850cb1cc0081c2e4c3e5744bd63536786e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2288
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
55d8d943a8 lib/nvmf: remove spdk prefix from static functions in rdma.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I651924850083db8b6a84bdee4c9efd1103551daf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2287
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-12 21:49:03 +00:00
Seth Howell
e569a5785d lib/nvmf: remove spdk prefix from static functions in nvmf_rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3a653ca9cd347a8703093e2ddef3c8c8df8b57c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2286
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
e1505a6e48 lib/nvmf: remove spdk prefix from static functions in nvmf.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iddf9359124b079f257b5312c0e304b979c864f6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
54651d5178 lib/nvmf: remove spdk prefix from static functions in fc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I65a2b137c86b063db7b81b28e3d554dfd81fb6b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2284
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
198fd2ce6b lib/nvmf: remove spdk prefix from static functions in ctrlr.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibb72c2fb687506831988b09fddad4fc3dae0e4ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
ce42d9d1c2 lib/nvmf: remove spdk prefix from static funcs in ctrlr_bdev.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I89db40149574345037600140ca1230c1a42a03cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2281
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
9cb21ad60a lib/nvmf: remove spdk prefix from functions in nvmf_internal.h
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9b8d15b52754477c5d120f8d96e0e2c329a32e0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2292
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
5802b8e564 lib/nvmf: add a map file and update major so version.
There were 50 functions and 5 variables that were previously
exported in the library which are actually private symbols.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I08c47255cdefff5948c914b0782e872c28c27130
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2291
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-12 21:49:03 +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
Seth Howell
2bba0bd331 lib/nvme: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I022caf94a5bf78c37cf169c5cbd8911b47a05f00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2247
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: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Changpeng Liu
ba1d0d7220 nvmf: set sgroup for spdk_nvmf_request_exec_fabrics() API
When using spdk_nvmf_request_exec_fabrics() to connect one IO
queue, the qpair->ctrlr is null before this function, and the
qpair->ctrlr will be set to associate controller after the
connect, so it will check the sgroup->io_outstanding count,
then we can hit the assertion.

Change-Id: I747cbfd0541cd12286dab549cd02245aac54f2db
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2062
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-05-12 08:12:29 +00:00
Changpeng Liu
7a9c2d2aef nvmf: add one debug log message when diable CC
Change-Id: Ia02b4369a60e3691568747ea6c6e9f24fb657321
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2061
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>
2020-05-12 08:12:29 +00:00
Jin Yu
132fffd4fd env: add the device ID of virtio device
From the QEMU doc:
1af4:1000  network device (legacy)
1af4:1001  block device (legacy)
1af4:1002  balloon device (legacy)
1af4:1003  console device (legacy)
1af4:1004  SCSI host bus adapter device (legacy)
1af4:1005  entropy generator device (legacy)
1af4:1009  9p filesystem device (legacy)

1af4:1041  network device (modern)
1af4:1042  block device (modern)
1af4:1043  console device (modern)
1af4:1044  entropy generator device (modern)
1af4:1045  balloon device (modern)
1af4:1048  SCSI host bus adapter device (modern)
1af4:1049  9p filesystem device (modern)
1af4:1050  virtio gpu device (modern)
1af4:1052  virtio input device (modern)

Change-Id: I75b04c331aebae9f20fecbca85d64415114ae5ff
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2369
Community-CI: Mellanox Build Bot
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-05-12 08:12:22 +00:00
Michal Berger
15f52aec2f setup.sh: Watch for NUMA_NO_NODE value
The -1 is valid value indicating that the node id for given device
has not been specified. Detect it and map it to "unknown".

Change-Id: Id97d9046be0e4d5ff257bca66ae3e73e906253fe
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2229
Community-CI: Mellanox Build Bot
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-05-12 08:12:09 +00:00
Michal Berger
5853749ba0 setup.sh: Check status of all numa nodes
Use * instead of ? to match all the potential nodes not only those
with a single digit id. The actual node limit is dependent on
kernel's CONFIG_NODES_SHIFT hence in theory, the actual number of
numa nodes may be far greater than 10.

Change-Id: I1d587735b433ed23594725b9d77a44f7cc729494
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2228
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 08:12:09 +00:00
Michal Berger
c8c4f71efe gen_nvme: Be FreeBSD friendly
Since sysfs is not used by the FreeBSD the following error can be
seen each time gen_nvme.sh is run:

  grep: /sys/bus/pci/devices/$bdf/uevent: No such file or directory

Avoid that by looking up the pci address in a way specific to
FreeBSD.

Change-Id: If81e71cece52c2f27dcf68f7a7eba3dd7d8ce10f
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2227
Community-CI: Mellanox Build Bot
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-05-12 08:12:09 +00:00
Michal Berger
d51345c0b9 setup.sh: Add basic function for handling status option on FreeBSD
Change-Id: I64bcc9f06be7e5cca18195bab58f87a4ba74c903
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2226
Community-CI: Mellanox Build Bot
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-05-12 08:12:09 +00:00
Michal Berger
18c0288730 setup.sh: exit from the script if not supported platform is detected
Also, store kernel name in the separate var and use it throughout the
entire script.

Change-Id: Iaa1c4c4aa52fb4aa708fb476478a81e9c6067b58
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2340
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-12 08:12:09 +00:00
Michal Berger
5a436f0c61 scripts/common: Cache vendor|device ids for reverse lookup
Change-Id: I69959547d1c71cf3b65f8eb0b786197650a6ece0
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2225
Community-CI: Mellanox Build Bot
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-05-12 08:12:09 +00:00
Anil Veerabhadrappa
46f1dd6883 nvmf/fc/ut: Add missing function stub
Fix compilation error by adding function stub for
spdk_nvmf_ctrlr_data_init().

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ia934d82fae6240ccd69c26cfa63ca235f820a813
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2366
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-12 08:11:59 +00:00
GangCao
af0081f706 Tool/identify: correct the capacity size in byte
The capacity is calculated without single block size.

Correct the calculation.

Change-Id: I039e4dbdfc00f5d29148efc2c2a553535b7daf70
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2367
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 08:11:52 +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
Karol Latecki
4cfc2e2641 scripts/pkgdep: install yum-utils for CentOS
This will probably be not installed by default in CentOS
installations. If we're going to use "config-manager" then
it requires yum-utils.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7d310e376430b065742b671d983d11dd87bb5fac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2221
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:35:00 +00:00
Karol Latecki
4d7936227a scripts/pkgdep: add missing "assume yes" to install command
Change-Id: I2a1a22e9d665a5b806b42db504062780f4f5ce53
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2220
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:35:00 +00:00
Vitaliy Mysak
419cd3691e lib/log: add timestamps for spdk_log messages
rocksdb test file changed because
it relied on logs format by doing grep/cut,
so failed after format was changed by this patch.

Change-Id: I81b8747560d7c803faec1650a3ead042bee2508b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2023
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:34:28 +00:00
Changpeng Liu
ac257bd4d2 blobfs: remove g_caches_lock finally
All the file add/delete/reclaim actions are in the cache thread now,
so the cache lock isn't necessary now.

Change-Id: Ibccdede78444e39346659f9342bdf104594bc07f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1796
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:34:16 +00:00
Changpeng Liu
87d5d832e7 blobfs: refactor cache_free_buffers()
cache_free_buffers() was only used in the file deletion and unload, and
the file is also freed after that, so here we combine the cache free and
file free together and do the cache free in the cache thread.

Change-Id: I57e9a27c9a6467bcf6c85cd277db3b57e06c98e5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1795
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:34:16 +00:00
Changpeng Liu
76d23f6f4c blobfs: remove the file without cache buffer from cache list
Change-Id: Ibf55e6e2966052bb6f5ce68b2eaa2cafa0b6e459
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1794
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:34:16 +00:00
Changpeng Liu
c41c4c2bab blobfs: add the file with new cache buffer to cache list in cache thread
Also poll thread in the UT to cover the thread context switch.

Change-Id: I3dc765b66aa707c36eb3913b3e0d2c1c3986e282
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1793
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:34:16 +00:00
Changpeng Liu
1fd159bed1 blobfs: remove the unnecessary file lock when freeing request
The channel lock is in free_fs_request().

Change-Id: Ibdb7173a24246463ff4bcff74c58c1f3c7ad7c77
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1792
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:34:16 +00:00
Seth Howell
a0878680c0 include/spdk_internal: remove SPDK_LOG_NVME from nvme_tcp.h
This file isn't exclusive to the nvme lib. As such, it shouldn't
use the internal SPDK_LOG_NVME flag.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib6d239ad2e45e58fb97a5ea70b01ce72afa938c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2246
Community-CI: Mellanox Build Bot
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>
2020-05-11 12:29:07 +00:00
Seth Howell
681b515d9e lib/notify: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If690a7f07503fa082c5822d70ec3cecdbce20baa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2243
Community-CI: Mellanox Build Bot
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>
2020-05-11 12:29:07 +00:00
Seth Howell
d70ed76454 lib/net: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3463a089a0bb6677793215963372ce9c233d4626
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2242
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>
2020-05-11 12:29:07 +00:00
Seth Howell
d7620b3579 lib/net: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I26ff6653b73d931c7b49b47fac506c01990ca42d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2240
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
17b53caab4 lib/nbd: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If4fc856c33d6c0f50b60363664846b8f4e79ffb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2239
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:29:07 +00:00
Seth Howell
c096b64f53 lib/nbd: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9514b06e4c214f68f7dfe13fd70e925628ebec1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2238
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>
2020-05-11 12:29:07 +00:00
Seth Howell
bbb6368e42 lib/lvol: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iec2a50ca4af8fe24f011d4cc6e04606115ba45a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2237
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>
2020-05-11 12:29:07 +00:00
Seth Howell
7b8a717ff8 lib/log_rpc: add a map file.
This library doesn't actually export any symbols.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84a763e73d1b2a189e72361a962852d4a8d8387c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2236
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>
2020-05-11 12:29:07 +00:00
Seth Howell
ab0b76c40e lib/log: add map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib376a31d307a6bb4a3b4fde52b8ec14bc748a539
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2216
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>
2020-05-11 12:29:07 +00:00
Seth Howell
ed0e32a17a lib/logrpc: create a new log flag.
The log_rpc library should have its own flag.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7cfe4c9136089e83bdf2730c727a6602ffbaf83e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2215
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>
2020-05-11 12:29:07 +00:00
Seth Howell
134590a206 lib/jsonrpc: remove spdk_ prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ieeb58943536caf46db77ce22509eccb477fa914a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2214
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-11 12:29:07 +00:00
Seth Howell
1f4f4cc75a lib/jsonrpc: add a map file.
There are several functions in the internal header that
are only used in the library that have kept the spdk prefix.

Add those to the suppression file since nobody in practice will
be using them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iae1666c6f0bb853e62b89858037a5cded38c9b66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2213
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:29:07 +00:00
Seth Howell
1bcbf5d779 lib/json: add a map file.
While we are here, change SPDK_LOG_JSON_UTIL to SPDK_LOG_JSON
It fits better with the naming convention.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I12bc8a44acf3effc5effcbc40ef1ab9af6e52c6c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2211
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-05-11 12:29:07 +00:00
Seth Howell
12a3278a2e lib/ioat: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If7c9db16ab0408280a5ef789556f751f1e0cc8c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2210
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>
2020-05-11 12:29:07 +00:00
Seth Howell
f6dcd815f4 lib/idxd: add a map file.
While we are here, give the library an so suffix
which was missed when the library was initially
created.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I68929127bf672c0f2f7153f9716882d03151480e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2209
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:29:07 +00:00
Seth Howell
54198053d2 test/check_so_deps: remove "filtered out" from function summary.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If93e61e62d420953174ea4da32f2b8b466e4b9a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2252
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>
2020-05-11 12:29:07 +00:00
Seth Howell
46b614d174 test/check_so_deps: pass the conffile to this test.
Apparently the environment wasn't getting passed to this test so
the configuration wasn't being preserved.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I65126e94c82d92fe33e81d2d0a6ef578aa506a34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2251
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>
2020-05-11 12:29:07 +00:00
Seth Howell
4edb1e0370 test/autotest: sleep after clearing hugepage cache
Give the system some time to clear the hugepage cache
after we kick off that operation.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I18de5feee500dae456c6ba3d9759085bc6f4e96e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2280
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:29:07 +00:00
Seth Howell
e4c4a0c191 test/make: remove old suppressions.
The old suppressions were only relevant for the 20.01 release.
We will have new suppressions in the new release though,
so leave the plumbing to write out suppressions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0c673244dfc767c31e646fec980a02ca88be37a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2208
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>
Community-CI: Mellanox Build Bot
2020-05-08 11:31:29 +00:00
Karol Latecki
b5eeb44cb4 test/make: Update ref build path for ABI tests
Use 20.04 reference build instead of 20.01.

Also updatethe NVMe-oF Makefile to reflect a change to the
ABI since 20.04 was released. This has to be done in the same
patch to keep the build from failing.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3201f698ecb441021964debda760866dbbc01a64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2171
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-08 11:31:29 +00:00
Karol Latecki
f6fd622bd4 test/vm_setup.sh: create reference build for ABI tests
Use already cloned sources in spdk_repo/spdk and
create a reference build.

SKIP_ABI_TEST flag is deliberately not added to
autotest_common.sh because of it's one-time use here.
Otherwise autobuild.sh would fail if vm_setup.sh is
run for the first time on the system. There would
be no previous reference builds to use.

Change-Id: I0c32041321ca25b91acb498f852ef14e7869daf1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1653
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>
Community-CI: Mellanox Build Bot
2020-05-08 11:31:29 +00:00
Tomasz Zawadzki
cb7a83f059 unittest.sh: verify additional dependencies by configure flags
There were multiple ways to check if particular UT should be executed.
This script unifies those.

To allow executing unittest.sh as standalone script,
verifying config.h flags was chosen.

FTL is an exception, as it always compiles if built on Linux.
Same condition was kept to execute the UT.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I83b3a58d4574154166af6763e7d1c38d75b8475d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2019
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-08 11:30:27 +00:00
Haichao Li
9cc9165947 doc/jsonrpc: Fix volume size description error
The function bdev_lvol_create and bdev_lvol_resize actually passes in the size parameter
as bytes instead of magebytes.

Signed-off-by: Haichao Li <haichao.li@arm.com>
Change-Id: Ic47e799fb461c51816e696f2b03aa41ac517d421
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1906
Community-CI: Mellanox Build Bot
Reviewed-by: Yibo Cai <yibo.cai@arm.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-08 09:58:53 +00:00
Michal Berger
d596ba87b2 check_format: Introduce shfmt tooling for .sh style enforcement
Add new dev tool for enforcing proper formatting of the Bash code
across the entire repo. This is done in order of defining a common
set of good practices to follow when writing .sh|Bash code.

As powerful as shfmt may be, it allows only for some specific rules
to be enforced, hence it still needs to work side by side with
shellcheck syntax-wise. If it comes to style, following rules are
being enforced:

  * indent_style = tab - Lines must be indented with tabs. The exception
			 from this rule is the use of heredocs with
			 <<BASH redirect operator. Spaces can be used to
			 format the line only if it's already preceded
			 with a tab.

  * binary_next_line = true - Lines can start with logical operators. E.g:

			      if [[ -v foo ]] \
			      	&& [[ -v bar ]]; then
				 ...
			      fi
  * switch_case_indent = true - case|esac patterns are indented with tabs.

  * space_redirects = true - redirect operators are followed with a space.
			     E.g: > foo over >foo.

In addition, shfmt will enforce its own Bash-style for different parts
of the code as well. Examples and more details can be found here:

  https://github.com/mvdan/sh

Change-Id: I6e5c8d79e6dba9c6471010f3d0f563dd34e62fd6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1418
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
Michal Berger
844c8ec383 check_format: Reformat the Bash code in compliance with shfmt
Change-Id: I93e7b9d355870b0528a0ac3382fba1a10a558d45
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1718
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 20:52:21 +00:00
Tomasz Zawadzki
0c1d022b57 docs: fix 20.01 nvmf perf link
There was difference between finally uploaded file and one in docs.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2c33b6d1b2b95ef1c5995c7a259e1ca0208b73ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2241
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-05-07 18:52:59 +00:00
WANGHAILIANG
023e3624e7 lib/nvme: remove lkey and rkey's warnings in nvme_rdma.c
One of these warnings, such as:
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c: In function ‘nvme_rdma_qpair_submit_request’:
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c:1512:29: warning: ‘lkey’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  rdma_req->send_sgl[1].lkey = lkey;
                             ^
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c:1480:11: note: ‘lkey’ was declared here
  uint32_t lkey;
           ^

Change-Id: I67b25cb62c7a0d5b298ebfe7d2673b73261040ef
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2197
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 10:44:02 +00:00
Vitaliy Mysak
6b40857206 lib: replace fprintf(stderr,) by SPDK_ERRLOG
SPDK_ERRLOG() uses spdk_log() procedure which is
customizable and redirectable, so it is preffered over fprintf.
It also prints source location which is useful.

Change-Id: I27574be4a774169f356ebd8dcdfd2a33a057f051
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1943
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:42:40 +00:00
Vitaliy Mysak
caa9d4c87a lib/log: allow omiting filename/lineno information
In spdk_log() accept filename = NULL.
If filename is NULL then source information as well
as log level is not displayed.

This change allows to replace all usages of
printf() and fprintf(stderr,) by
SPDK_PRINTF() and SPDK_ERRLOG() which use spdk_log().

Using spdk_log() instead of printf() is always prefered
since SPDK can be used inside of another application
where SPDK logs could be redirected.

SPDK uses printf()
places where location info is not needed
we cannot replace it by SPDK_NOTICELOG().

This change is in the scope earlier planned task:
https://trello.com/c/lZzBjrw3/10-remove-use-of-printf-fprintf-and-perror-for-logging-in-library-code

Change-Id: I55c24da4a2092bd118fa2c121092d253cedb1cf8
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1942
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>
2020-05-07 10:42:40 +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
d7d9dc126b lib/idxd: factor out common submission code into a prep routine
Prior to adding more operations, make this a bit more efficient.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I02b864f998800c25076233183840bba8bff92196
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2069
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
Ben Walker
3788d6967a bdevperf: Eliminate reactors
Now, each bdevperf_job gets it's own bdevperf_thread. Scheduling the
jobs onto cores is left to the underlying event framework in the normal
case. In the multi-thread case, cpumasks are set on the jobs' threads to
ensure they're distributed appropriately.

Change-Id: I55f1a44b4262d715954b3a63bf00b8d2321fafca
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1512
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-07 10:41:38 +00:00
Evgeniy Kochetov
4b4b3cca9f nvme/ctrlr: Allow targets not supporting Keep Alive Timer feature ID
NVMe spec defines "Keep Alive Timer" feature ID as optional and there
are targets that do not support this. SPDK fails to connect to such
targets.

This patch allows Get Feature "Keep Alive" target to fail with
INVALID_FIELD status. In this case we just continue with keep alive
timer value stored in controller opts structure. This value is already
communicated to target in CONNECT command.

Fixes #1328

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I52e7ea3cb66073ce6cc168a169989bd179041618
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1625
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:41:31 +00:00
Karol Latecki
7066e3c9c7 test/vmd: add setup.sh routines to test script
Detect available VMD subsystems and disks to bind
to userspace for tests.
Re-run the default setup.sh configuration once
tests are done.

Additionally add verify_state_save option to
fio config, otherwise this will not pass 'git porcelain'
in autotest.sh.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5d5bded7ee214f39b96bb6ae1e82d59592629aff
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1959
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>
2020-05-07 10:41:24 +00:00
Michal Berger
ae7300425b autobuild: Use mktemp() for spdk workspace
With issues similar to https://github.com/spdk/spdk/issues/1293 it
would be better to use temporary directories for spdk workspace
instead of depending on the hardcoded path (/tmp/spdk). This will
mitigate potential scenario where permissions of the target dir
are suddenly changed in-between autobuild runs.

Change-Id: If44a2dcce712a185287186f33e7361223dc6d451
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1863
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-05-07 10:41:08 +00:00
Tomasz Zawadzki
7f007b44a9 lib/blob: clear blobid and md_page on blob_create failure
Blobid and md_page is claimed as first step of blob creation.
If blob creation failed, both should returned to be used by
other blobs.

This caused multiple reports of:
"Metadata page 1 crc mismatch"
when loading blobstore due to md_pages not actually containing
the written out md pages.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I495452c578d879f749281cebf8975eb2c1c7f79a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2057
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 08:30:19 +00:00
Tomasz Zawadzki
519d720902 scripts/rpc: do not list positional arguments for the subparser
Main subparser for rpc lists all positional arguments. Like so:
positional arguments:
  {framework_start_init,start_subsystem_init,framework_wait_init,....

This again is duplicated with better help message.

This patch just removes this list, leaving the most detailed one.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5e6b9d0dd6ccf68bfe1cd5959ed509032738c037
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2126
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-05-07 08:26:54 +00:00
Tomasz Zawadzki
0d105d4f1f scripts/rpc: do not list commands for the main parser
The main parser will show usaged like so:
usage: rpc.py [-h] [-s SERVER_ADDR] [-p PORT] [-t TIMEOUT] [-v]
              [--verbose {DEBUG,INFO,ERROR}] [--dry_run] [--server]
              {framework_start_init,start_subsystem_init,............

The above contains very long list of all RPCs.
This is duplicates help from the subparsers, which contain
more descriptive help message.

This patch replaces the usage with:
usage: rpc.py [options]

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ibf400987103f5571f79c57d8a9588d97f463d773
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2125
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-05-07 08:26:54 +00:00
Tomasz Zawadzki
17c2f4ee8f script/rpc: do not send rpc when no arguments provided
Any time script is called an RPC is called and socket
connection is attempted.

This should not be required when no arguments were provided,
such as calling help to explore possible options.

Example of the error:

[tzawadzk@PowerEdgeFour spdk]$ sudo ./scripts/rpc.py
Traceback (most recent call last):
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 40, in __init__
    self.sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./scripts/rpc.py", line 2438, in <module>
    args.client = rpc.client.JSONRPCClient(args.server_addr, args.port, args.timeout, log_level=getattr(logging, args.verbose.upper()))
  File "/home/tzawadzk/spdk/scripts/rpc/client.py", line 56, in __init__
    "Error details: %s" % (addr, ex))
rpc.client.JSONRPCException: Error while connecting to /var/tmp/spdk.sock
Error details: [Errno 111] Connection refused

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3734e1603fa7151fd53b99b8af4ea79bf82fe0f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2124
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:26:54 +00:00
Michal Berger
d9d62e1103 test/vhost: Attempt to read qemu.log uppon exiting
This gives a chance to quickly see why qemu might have failed, i.e.,
why the .pid file has not been found.

Change-Id: Ia1a5ae417164c865eede07cdb6dd4df1edc0b0b9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2005
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
08f0abebb4 test/vhost: Use heredoc to create run.sh
This is to make the code that's about to be written out more clear
and drop the unecessary usage of a subshell.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I024012b08fc3c29d3c37c59a42e64d8429929799
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2004
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
16e16c7700 test/vhost: Properly terminate last case
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ib09c3fb8a250e29f5915992f89eda7dbbff3516d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2003
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
64471319e3 test/vhost: Document and simplify handling of the $disks
From the code, and due to lack of any help() or usage(), the way how
$disks are meant to be declared was not clear right off the bat.
Comment out how the argument should be formatted and cleanup its
usage within the code.

Change-Id: I3a4b077d5026f6f17d0ccc27183d2a89222169f5
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2002
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
e1ddec2ca4 test/vhost: Convert $cmd to an array
The way how qemu cmdline for run.sh was being prepared was a bit
convoluted and simply hard to read. Instead of having it as a single
string, use it as an array and as such expand it for run.sh to use.

Change-Id: I1ee1bafbdd8a367a69c266d5a33c4d728fc0fe7b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2001
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
417b77941a test/vhost: Fix arithmetic check against $max_disks
The size of the nvmes[] was being compared against a plain string
(which in arithmetic context always evaluates to 0) due to improper
var referencing.

Fix this by using (( )) to be more flexible and not depend on the
parameter expansion syntax.

Change-Id: I56fd3b98940961475638099dc66aec5544c832c7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2000
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-07 08:24:15 +00:00
Michal Berger
36e573fc6b scripts/common: Introduce cache for the pci devices
Expose a cache of pci devices in form of an assoc array that could be
looked up during the runtime of a script like setup.sh.

In case of setup.sh, caching speeds up execution quite visibly:

config run, no caching:
real    0m4.488s
user    0m1.440s
sys     0m1.260s

config run, caching in use:
real    0m2.876s
user    0m0.365s
sys     0m0.420s

Note that for initial config runs, binding controllers to proper
drivers is the actual bottleneck.

status run, no caching:
real    0m1.877s
user    0m1.252s
sys     0m0.984s

status run, caching in use:
real    0m0.371s
user    0m0.242s
sys     0m0.204s

reset run, no caching:
real    0m2.559s
user    0m1.409s
sys     0m1.322s

reset run, caching in use:
real    0m0.960s
user    0m0.432s
sys     0m0.419s

Additionally, in case common tools, e.g. lspci, are missing, fallback to
sysfs to pick all needed devices from the pci bus. Targeted for Linux
systems only.

Change-Id: Ib69ef724b9f09eca0cbb9b88f1c363edc1efd5dc
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1845
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-07 08:23:52 +00:00
Seth Howell
a34329e831 autotest: clear system caches before running setup.sh.
This will help avoid the recent error with not being able
to allocate enough hugepages on VMs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaf495458210da79501c7168104efe97c63b7afc7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2212
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-07 08:23:43 +00:00
Karol Latecki
2c0980de71 doc: add entry about 20.01 nvme-of tcp perfomance report
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iad93eef663a4603d0923b5d39296a5714c07f964
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2199
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-05-06 19:47:46 +00:00
Wenhua Liu
a4340e4501 Set low watermark in NVMe/TCP target to a more appropriate value.
In SPDK NVMe/TCP target, when initializing the socket, the low
watermark is set to sizeof(struct spdk_nvme_tcp_common_pdu_hdr),
which is 24 bytes. In our testing, some times there might be very
small data packet (as small as 16 bytes) be sent to wire. After
this, if there is no more data sent to the same socket, this small
data packet won’t be received by NVMe/TCP controller qpair thread
because the size hasn’t reached the low watermark. Because of this,
the qpair thread is waiting for more data come in and the initiator
is waiting for the IO request to be completed. Hence the delay
happens.

As the minimum data that allows target to determine the PDU type is
sizeof(struct spdk_nvme_tcp_common_pdu_hdr), which is 8 bytes, we
changed low watermark setting as below. With the change, the problem
was gone immediately.

Change-Id: I14ccc4c84b77e33a617726e7455304aca29d5d57
Signed-off-by: Wenhua Liu <liuw@vmware.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2138
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-06 12:44:06 +00:00
Jim Harris
cfb65ba611 test: add generic unlink wrapper
reduce library uses unlink, but the unit tests need to
override it in a specific way.

But linking unit tests with LTO requires the wrapper
definitions be in objects/libraries listed *after*
the object/library that refers to it.  So we need to
make the unlink wrapper somewhat generic.  We do this
by exporting a string and callback function that the
user can set to enable a user-defined function to be
called when unlink() is called with a specific file
name.

Also revert 3ef6d06 as part of this patch, since we
no longer require the workaround that it implemented.

Fixes issue #1357.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1ee4c424ad31fe7d91d7b524ed47aedd279e5b5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1948
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-06 12:43:57 +00:00
Jim Harris
c4868f30d3 ftl: remove duplicated spdk_ftl_init_fn typedef
This typedef is already in the public header file.
clang complains about the redefinition, even though
it is identical.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2135
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-06 12:43:57 +00:00
Darek Stojaczyk
c29329fe21 test/common: add NOT() utility function
Change-Id: Idde98fbbf7ff1f66caf4e46d217baf62b78a2e2a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1152
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-06 12:43:48 +00:00
Darek Stojaczyk
52330a6b60 test/common: silence xtrace on create_test_list()
When grepping the log for a particular test script file,
e.g. lvol_test.sh, we get 20 matches from all the grep | sed | awk |
etc... Only the last match is the actual script execution. So
silence the first 19. They're not particularly useful anyway.

Change-Id: I96c64a1c6d79cecd4966d3c1faddbc014ea8b5b1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2102
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-06 12:43:41 +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
Tomasz Zawadzki
4f6fe26199 version: 20.07 pre
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id618504d902f17cda37b6e11a8a9e63e26e49f5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2100
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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-06 12:43:20 +00:00
Karol Latecki
01425928ed test/vhost: fix vhost migration tests
Bug introduced in:
9fc706f test/vhost: improve run_fio --local option

The original "nohup + no-wait" for spawned local VM fio
processes was probably as expected. Turns out we can't
"wait" for fio processes in some cases, and migration
is one of them.

run_fio() must start fio and exit immediately, so that
parent script can have a chance to do the migration
process while fio is still running.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3c0ab65e96bfa0b020eb42df76b14deda2b43e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1937
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-05 08:04:21 +00:00
Richael Zhuang
7565da8a9f Makefile: add -lfuse3 when building with --with-fuse
Building with --with-fuse failed:
undefined reference to symbols starting with 'fuse_'.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Iff4000c4cc609052271979cf8807aba7efd98469
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1424
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-05 08:04:08 +00:00
Maciej Szwed
2bd001620f scripts: Add SSL certificate option in rpc_http_proxy
This is required for SSL verification when running on https.
Added argparse to handle multiple optional arguments.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib8731bafaaf38264ed86ed84ca7eeca5ff4935b3

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2122
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-05 08:04:00 +00:00
Seth Howell
c89b28a9eb test/external: Add setup call to test_make.sh
This makes sure that we will have the hugepages we need
even on systems that don't have them configured by default.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9a0d82e0abf6363c1c037732b543c05e8931f97e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2141
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-05 08:03:48 +00:00
zkhatami88
58a8fe2eee nvme/rdma: When RDMA hooks exist, prefer spdk_zmalloc for internal
allocations

Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Change-Id: I7f810ee78fecca7eb8a4387f6d63e1a952966e57
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1593
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: Jim Harris <james.r.harris@intel.com>
2020-05-05 08:03:39 +00:00
Changpeng Liu
1b7cd386d5 test/blobfs: set blobfs cache size when starting fuse
mkfs also uses 512MiB as the default cache size, so here
we also use 512MiB for fuse, or the fuse will allocate
4096MiB.

Fix issue #1309.

Change-Id: Icb4c3a175107bb56f4f84a0b0435d05f6f44f15e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2112
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-04 10:26:50 +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
514be889ca examples/accel perf: Use new accel engine capabilities API
Make sure the selected engine supports the attempted operation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib8e0835b8d05fbd309f36749c7740c5ec7239c02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2026
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
9d94a8d53a idxd: clean up some enum style issues for consistency
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I523176cc49951e6d6513b86b1e05ca8e2b5e62f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2022
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>
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
2755fbdf35 scripts: fix configure & autotest scripts that check for Intel proc
Used to determine whether IDXD isto be  configured, previous check
did not work on FreeBSD, only Linux.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I70148ee2f0fffc83c2b89d2de6e81193b9357d3f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2060
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
Wojciech Malikowski
40e5d4a0bc lib/ftl: Check non evicted blocks during relocation
Since ftl write buffers are associated with IO channels
there can be situation that block that is being relocating
could be still in cache. Such scenario is very likely when
ftl is throttling user IO. l2p update should handle such
situation when data is coming from relocation.

Change-Id: Id0bb53d8ce45213b05bafa9ebcb843ce8eadbc7a
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1439
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-30 07:51:50 +00:00
Wojciech Malikowski
ead6c54c75 lib/ftl: Set write pointer for zone in full state during initialization
Zone in full state should have write pointer set to
the last block plus one to be consistent with internal
ftl write pointer tracking.

Change-Id: Ib81124e7a8451f8daec82d3d41dc55f6ed328ba2
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1437
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-04-30 07:51:50 +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
Karol Latecki
a3e5b5d0ec test/vhost/initiator: use single file segments
Single file segments allow us to work with both
1GB and 2MB hugepages.

Change-Id: I2a455f9d23fafbf0746423f69379b74939ac2e9c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2021
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-29 16:12:36 +00:00
Karol Latecki
df4e823cfc test/vhost: check if virtio dev can be used
Check which driver is in use for detected virtio pci device.
If it's not uio or vfio then don't use it.

Change-Id: Ibf901c71e0125394c6cb8fd1499fc723f2308010
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2018
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-29 16:12:36 +00:00
Seth Howell
85f72985ad CHANGELOG: Update for 20.04.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I885f986281dde559cf32a3eaefc95d281181f29a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2030
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-29 10:58:39 +00:00
Darek Stojaczyk
acd931d212 test/vhost/initiator: generate json config at runtime
Drop the static configuration file from spdk repo and
generate it with save_config RPC instead. This also lets
us drop a huge wart from those test that is discover_bdevs.

Change-Id: I74b2adbc2f391a04db9acd9ac7d0e8f381b41da0
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1549
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-29 06:43:57 +00:00
Darek Stojaczyk
5913f98d46 test/vhost/initiator: don't override the ERR trap
It's set once in autotest_common.sh and must not be set anywhere else.

Change-Id: I575d42f2b5caa38d9836f26b8aa6e414682d9554
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1548
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-29 06:43:57 +00:00
Darek Stojaczyk
3ac4e0a067 test/vhost/initiator: allow running as non-root
There's no reason to require running as root, so
remove the check for that.

Change-Id: I4fa97e5a500f4715c6949b8d84bfad4b59b1c474
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1547
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-29 06:43:57 +00:00
Darek Stojaczyk
4f00be338c test/vhost/initiator: remove obsolete code
Remove a lot of lines which don't do anything.

Change-Id: I7244c24332c36ad02634abe82ddf606f4c3faddc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1546
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:43:57 +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
Vitaliy Mysak
33f97fa33a lib/ocf_env: fix incorrect value for free memory estimate
OCF relies on our env to get information about free memory.
It then uses that information to return a descriptive
error if not enough memory is available.
But no other calculation done based on that value.

Our implementation was not correct because it returned
the size of available physical memory in the system,
while we use HUGEPAGE memory for most of OCF operations.

There doesn't seem to be a reliant API for getting
the size of available HUGEPAGE memory, so instead
return UINT64_MAX, as it is done in ocf/env/posix/ocf_env.h.
This way, OCF will not know ahead of time if there
is enough memory available, but it will still fail
properly on operations that require too much memory.

Change-Id: Iec2e3cfa8453253513d5861d7e6acf0e08dad1e9
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1976
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:42:33 +00:00
Jonathan Richardson
51d69a7f54 configure: Fix parsing of DEFAULT_CC from cc.mk
Commit 649367850 (make: Allow CC and CXX to contain spaces) requires a
change to configure script also so that when it reads DEFAULT_CC from
cc.mk it retains all characters after DEFAULT_CC=. Currently only the
first two fields are retained.

Change-Id: If28493f7f2fb8e96fdf5a653ec30700abc8ce55e
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1787
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:42:09 +00:00
Richael Zhuang
6f0bb206e6 test/lvol: fix error in thin_provisioning test
thin_provisioning test throws error "fio: failed parsing rw=-62910464"

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I0b8e425b6871eea5a650bd339c947b9bdafa6d5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1914
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:41:38 +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
Seth Howell
3bd113eae7 lib/vhost: Don't dereference svdev->name in dev_remove.
If the vdev is marked for hotremove, it is possible that the
name has already been freed resulting in a heap use after free,
so remove the warning about a vdev being marked for hotremove
to avoid a segfault when removing a device.

This was observed in the vhost fuzz tests.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2891ca2bee70d72fb7b0dff96d569e9b92fe84eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2071
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-04-29 06:38:53 +00:00
Seth Howell
6607e124c1 Changelog: alphabetize the 20.04 changelog.
While we're here, clean up some grammar, typos, and
make sure we are using a consistent voice.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie7a59d974a04e6beb65101fe3039db4d101538a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2029
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-29 06:34:45 +00:00
Seth Howell
deb18088f8 autopackage: don't build with lto on bsd.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Icdfa299bbbf8f1b00d891c17da1404bab97a310e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2059
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-29 06:32:12 +00:00
Seth Howell
bf0561f741 nvme/nvme_rdma: assign rctrlr in each qpair->ctrlr check
While in practice the qpair->ctrlr variable will not change within
the disconnect function, when the code is built without debug enabled,
gcc thinks that rctrlr may be uninitialized.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I355cd62f3a2baaba65d806e3746f615a0dc37f58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2056
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-29 06:32:12 +00:00
Seth Howell
3ef6d0613d autopackage: Don't build unit tests with lto.
Some of the unittests require symbols that don't work well
with the lto option. For example when you build reduce_ut.c
with the lto option, the __wrap_unlink symbol cannot be found.

Also, while we are here, add a check to configure for unit tests
built with lto.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaf76cd050565ce2ff13b4230d7a3b735fd5384a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2055
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:32:12 +00:00
Jacek Kalwas
f74fdce93d nvmf: allow to override KAS
Useful for transport specific layer to inform that Keep Alive is not
supported or to adjust granularity.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I636fda3eadcb96cd8a4b79570fc4e3cc6a58fe93
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1545
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-28 13:48:17 +00:00
Jacek Kalwas
538f1354e0 nvmf: allow to override virtual controller capabilities
Virtual controller capabilities can be overridden on transport
specific layer. The current behavior shall be preserved.

This can be useful to limit or extend the default based on transport
type.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I754f0d957a46f219adc1e55f792e79c7546ddb43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1274
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-28 13:48:17 +00:00
Vitaliy Mysak
20bc88d284 scripts/vagrant: fix exporting array in bash script
In create_vhost_vm we export SDPK_VAGRANT_DISTRO
variable to vagrant subprocess that is called
during the script.
But if SPDK_VAGRANT_DISTRO is an array variable,
then Vagrant will not see it
and always default to ubuntu16.
This small patch fixes that.

Change-Id: I45e9ed4f847e4fa10b90650a613f9cfe17ee38e3
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1676
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-28 13:47:46 +00:00
paul luse
1477f3d17b env.h: fix two comment typos
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia00152ebcf328c1b4a8bec9caeed1d58d8cdaf02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1926
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-28 13:44:51 +00:00
Karol Latecki
65b8c30d54 test/vm_setup.sh add missing step to install_git
"make configure" was missing.
Run "exec $SHELL" to reload current shell and use
new git thanks to updated PATH.

Change-Id: Ia92a6a3ce3ccf515a23353d91b8cde3a13b7c92b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1997
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-28 13:44:32 +00:00
Karol Latecki
cc619301fd test/vm_setup: move git commands after package installation
Couple of reasons here:
- "install" should run first, as it runs pkgdep.sh which
  actually installs git for all distros.
- Because of that we can remove ArchLinux and Centos7
  git installation with package manager - this is already
  covered by pkgdep.sh.
- install_git routine relies on wget and autoconf, which
  have to be installed first.
- install_git routine (which actually upgrades git on
  Centos7) makes it possible to use "git -C". Default
  1.85 git version on that system does not support that.

Change-Id: I1422f8c2a1c49eb38f4253909a152a7bc99b173f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1995
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-28 13:44:32 +00:00
Karol Latecki
4b7f11ec88 test/vm_setup: add wget to list of installed packages
This might be a bit confusing, but it seems some of the
distributions using "minimal" install do not come with
wget installed, and it is used frequently in our provisioning
scripts. I stumbled upon this issue with Centos7, but am
adding wget for all distros, just to be sure.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I9621d5ce92014623d76d70c9e22d9eefa9ea0203
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1994
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-28 13:44:32 +00:00
Karol Latecki
b72e4f34b0 test/vm_setup.sh: fix typo in vpp install routine
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I4673114664d2856080083b18fe5dfdbbf3b98082
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1991
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-28 13:44:32 +00:00
Seth Howell
0d5541fa8e spdk_top: one more round of allocation checking.
The last round of kw fixes introduced one more kw warning
for null pointer dereferences relating to draw_filtering_menu.
This will resolve all of those.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaeec3694cd951fcd3e0d4de235221b2645bcd0c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2053
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-04-28 13:44:15 +00:00
Tomasz Zawadzki
6395370be1 lib/conf: make INI deprecation less verbose
spdk_conf_allocate() was not the best place to put
INI deprecation warning.

Depending on the application, config could be allocated
without passing config file.
This resulted in app framework applications to print
this error on startup even without config file.

Much better place is spdk_conf_read() which requires
a file to be passed. Then and only then, deprecation
warning is printed with this patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I75979655880f9273dfe5ce65262f08934df596cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2051
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-04-28 13:36:35 +00:00
Seth Howell
be62a4c359 spdk_top: Add asserts and checks for NULL pointers.
There are several memory allocations and funtion calls
that could theoretically return NULL in spdk_top. In
practice, these things are not likely to happen, but it
is necessary to add asserts and checks for them just in
case and to silence several KW warnings.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5f2f1a9050e47d22b725727bff156a128f1525c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2027
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-27 13:50:11 +00:00
1102 changed files with 91286 additions and 46812 deletions

View File

@ -30,6 +30,7 @@ fi
echo "Running make with $COMP ..."
echo "${MAKE} clean " > make.log
$MAKE clean >> make.log 2>&1
echo "${MAKE} CONFIG_DEBUG=n CONFIG_WERROR=y " >> make.log
$MAKE CONFIG_DEBUG=n CONFIG_WERROR=y >> make.log 2>&1
rc=$?
@ -75,64 +76,6 @@ fi
echo "$MAKE clean " >> make.log
$MAKE clean >> make.log 2>&1
if [ "$SYSTEM" = "FreeBSD" ]; then
echo
echo "Pushing to $1 $2"
exit $rc
fi
if ! hash clang 2>/dev/null; then
echo "clang not found; skipping the clang tests"
echo
echo "Pushing to $1 $2"
exit $rc
fi
echo "Running make with clang ..."
echo "make CONFIG_DEBUG=n CONFIG_WERROR=y CC=clang CXX=clang++ " >> make.log
$MAKE CONFIG_DEBUG=n CONFIG_WERROR=y CC=clang CXX=clang++ >> make.log 2>&1
rc=$?
if [ $rc -ne 0 ]; then
tail -20 make.log
echo ""
echo "ERROR make CC=clang CXX=clang++ returned errors!"
echo "ERROR Fix the problem and use 'git commit' to update your changes."
echo "ERROR See `pwd`/make.log for more information."
echo ""
exit $rc
fi
echo "make clean CC=clang CXX=clang++ SKIP_DPDK_BUILD=1 " >> make.log
$MAKE clean CC=clang CXX=clang++ SKIP_DPDK_BUILD=1 >> make.log 2>&1
echo "make CONFIG_DEBUG=y CONFIG_WERROR=y CC=clang CXX=clang++ SKIP_DPDK_BUILD=1 " >> make.log
$MAKE CONFIG_DEBUG=y CONFIG_WERROR=y CC=clang CXX=clang++ SKIP_DPDK_BUILD=1 >> make.log 2>&1
rc=$?
if [ $rc -ne 0 ]; then
tail -20 make.log
echo ""
echo "ERROR make CC=clang CXX=clang++ returned errors!"
echo "ERROR Fix the problem and use 'git commit' to update your changes."
echo "ERROR See `pwd`/make.log for more information."
echo ""
exit $rc
fi
echo "Running unittest.sh ..."
echo "./test/unit/unittest.sh" >> make.log
"./test/unit/unittest.sh" >> make.log 2>&1
rc=$?
if [ $rc -ne 0 ]; then
tail -20 make.log
echo ""
echo "ERROR unittest returned errors!"
echo "ERROR Fix the problem and use 'git commit' to update your changes."
echo "ERROR See `pwd`/make.log for more information."
echo ""
exit $rc
fi
${MAKE} clean CC=clang CXX=clang++ 2> /dev/null
echo "Pushing to $1 $2"
exit $rc

10
.github/mistaken-pull-closer.yml vendored Normal file
View File

@ -0,0 +1,10 @@
filters:
- true
commentBody: |
Thanks for your contribution! Unfortunately, we don't use GitHub pull
requests to manage code contributions to this repository. Instead, please
see https://spdk.io/development which provides instructions on how to
submit patches to the SPDK Gerrit instance.
addLabel: false

7
.gitignore vendored
View File

@ -2,17 +2,23 @@
*.a
*.cmd
*.d
*.dll
*.exe
*.gcda
*.gcno
*.kdev4
*.ko
*.lib
*.log
*.o
*.obj
*.pdb
*.pyc
*.so
*.so.*
*.swp
*.DS_Store
build/
ut_coverage/
tags
cscope.out
@ -25,6 +31,7 @@ CONFIG.local
.project
.cproject
.settings
.gitreview
mk/cc.mk
mk/config.mk
mk/cc.flags.mk

5
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "dpdk"]
path = dpdk
url = https://github.com/spdk/dpdk.git
url = https://git.quacker.org/d/numam-dpdk.git
[submodule "intel-ipsec-mb"]
path = intel-ipsec-mb
url = https://github.com/spdk/intel-ipsec-mb.git
@ -10,3 +10,6 @@
[submodule "ocf"]
path = ocf
url = https://github.com/Open-CAS/ocf.git
[submodule "libvfio-user"]
path = libvfio-user
url = https://github.com/nutanix/libvfio-user.git

File diff suppressed because it is too large Load Diff

22
CONFIG
View File

@ -43,9 +43,6 @@ CONFIG_CROSS_PREFIX=
# Build with debug logging. Turn off for performance testing and normal usage
CONFIG_DEBUG=n
# Build with support of backtrace printing in log messages. Requires libunwind.
CONFIG_LOG_BACKTRACE=n
# Treat warnings as errors (fail the build on any warning).
CONFIG_WERROR=n
@ -79,6 +76,9 @@ CONFIG_UNIT_TESTS=y
# Build examples
CONFIG_EXAMPLES=y
# Build with Control-flow Enforcement Technology (CET)
CONFIG_CET=n
# Directory that contains the desired SPDK environment library.
# By default, this is implemented using DPDK.
CONFIG_ENV=
@ -87,6 +87,9 @@ CONFIG_ENV=
# installation.
CONFIG_DPDK_DIR=
# This directory should contain 'include' and 'lib' directories for WPDK.
CONFIG_WPDK_DIR=
# Build SPDK FIO plugin. Requires CONFIG_FIO_SOURCE_DIR set to a valid
# fio source code directory.
CONFIG_FIO_PLUGIN=n
@ -100,6 +103,7 @@ CONFIG_FIO_SOURCE_DIR=/usr/src/fio
CONFIG_RDMA=n
CONFIG_RDMA_SEND_WITH_INVAL=n
CONFIG_RDMA_SET_ACK_TIMEOUT=n
CONFIG_RDMA_PROV=verbs
# Enable NVMe Character Devices.
CONFIG_NVME_CUSE=n
@ -115,11 +119,14 @@ CONFIG_RBD=n
# Build vhost library.
CONFIG_VHOST=y
CONFIG_VHOST_INTERNAL_LIB=n
# Build vhost initiator (Virtio) driver.
CONFIG_VIRTIO=y
# Build custom vfio-user transport for NVMf target and NVMe initiator.
CONFIG_VFIO_USER=n
CONFIG_VFIO_USER_DIR=
# Build with PMDK backends
CONFIG_PMDK=n
CONFIG_PMDK_DIR=
@ -127,10 +134,6 @@ CONFIG_PMDK_DIR=
# Enable the dependencies for building the compress vbdev
CONFIG_REDUCE=n
# Build with VPP
CONFIG_VPP=n
CONFIG_VPP_DIR=
# Requires libiscsi development libraries.
CONFIG_ISCSI_INITIATOR=n
@ -144,9 +147,6 @@ CONFIG_SHARED=n
CONFIG_VTUNE=n
CONFIG_VTUNE_DIR=
# Build the dpdk igb_uio driver
CONFIG_IGB_UIO_DRIVER=n
# Build Intel IPSEC_MB library
CONFIG_IPSEC_MB=n

13
LICENSE
View File

@ -1,3 +1,16 @@
The SPDK repo contains multiple git submodules each with its own
license info. Unless otherwise noted all other code in this repo
is BSD as stated below.
Submodule license info:
dpdk: see dpdk/license
intel-ipsec-mb: see intel-ipsec-mb/LICENSE
isa-l: see isa-l/LICENSE
libvfio-user: see libvfio-user/LICENSE
ocf: see ocf/LICENSE
The rest of the SPDK repo:
BSD LICENSE
Copyright (c) Intel Corporation.

View File

@ -2,6 +2,7 @@
# BSD LICENSE
#
# Copyright (c) Intel Corporation.
# Copyright (c) 2020, Mellanox Corporation.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -44,11 +45,15 @@ DIRS-$(CONFIG_EXAMPLES) += examples
DIRS-y += test
DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild
DIRS-$(CONFIG_ISAL) += isalbuild
DIRS-$(CONFIG_VFIO_USER) += vfiouserbuild
.PHONY: all clean $(DIRS-y) include/spdk/config.h mk/config.mk \
cc_version cxx_version .libs_only_other .ldflags ldflags install \
uninstall
# Workaround for ninja. See dpdkbuild/Makefile
export MAKE_PID := $(shell echo $$PPID)
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
ifeq ($(CURDIR)/dpdk/build,$(CONFIG_DPDK_DIR))
ifneq ($(SKIP_DPDK_BUILD),1)
@ -58,6 +63,13 @@ endif
endif
endif
ifeq ($(OS),Windows)
ifeq ($(CURDIR)/wpdk/build,$(CONFIG_WPDK_DIR))
WPDK = wpdk
DIRS-y += wpdk
endif
endif
ifeq ($(CONFIG_SHARED),y)
LIB = shared_lib
else
@ -74,9 +86,20 @@ LIB += isalbuild
DPDK_DEPS += isalbuild
endif
ifeq ($(CONFIG_VFIO_USER),y)
VFIOUSERBUILD = vfiouserbuild
LIB += vfiouserbuild
endif
all: mk/cc.mk $(DIRS-y)
clean: $(DIRS-y)
$(Q)rm -f include/spdk/config.h
$(Q)rm -rf build/bin
$(Q)rm -rf build/fio
$(Q)rm -rf build/examples
$(Q)rm -rf build/include
$(Q)rm -rf build/lib/pkgconfig
$(Q)find build/lib ! -name .gitignore -type f -delete
install: all
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
@ -85,10 +108,11 @@ uninstall: $(DIRS-y)
$(Q)echo "Uninstalled spdk"
ifneq ($(SKIP_DPDK_BUILD),1)
dpdkbuild: $(DPDK_DEPS)
dpdkdeps $(DPDK_DEPS): $(WPDK)
dpdkbuild: $(WPDK) $(DPDK_DEPS)
endif
lib: $(DPDKBUILD)
lib: $(WPDK) $(DPDKBUILD) $(VFIOUSERBUILD)
module: lib
shared_lib: module
app: $(LIB)
@ -97,12 +121,19 @@ examples: $(LIB)
pkgdep:
sh ./scripts/pkgdep.sh
$(DIRS-y): include/spdk/config.h
$(DIRS-y): mk/cc.mk build_dir include/spdk/config.h
mk/cc.mk:
$(Q)echo "Please run configure prior to make"
false
build_dir: mk/cc.mk
$(Q)mkdir -p build/lib/pkgconfig/tmp
$(Q)mkdir -p build/bin
$(Q)mkdir -p build/fio
$(Q)mkdir -p build/examples
$(Q)mkdir -p build/include/spdk
include/spdk/config.h: mk/config.mk scripts/genconfig.py
$(Q)echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
echo "#define SPDK_CONFIG_H" >> $@.tmp; \

View File

@ -190,13 +190,16 @@ to do the following steps:
- run ldconfig specifying the directory containing SPDK shared libraries
- provide proper `LD_LIBRARY_PATH`
If DPDK shared libraries are used, you may also need to add DPDK shared
libraries to `LD_LIBRARY_PATH`
Linux:
~~~{.sh}
./configure --with-shared
make
ldconfig -v -n ./build/lib
LD_LIBRARY_PATH=./build/lib/ ./app/spdk_tgt/spdk_tgt
LD_LIBRARY_PATH=./build/lib/:./dpdk/build/lib/ ./build/bin/spdk_tgt
~~~
<a id="huge"></a>

View File

@ -41,9 +41,13 @@ DIRS-y += iscsi_top
DIRS-y += iscsi_tgt
DIRS-y += spdk_tgt
DIRS-y += spdk_lspci
ifneq ($(OS),Windows)
# TODO - currently disabled on Windows due to lack of support for curses
DIRS-y += spdk_top
endif
ifeq ($(OS),Linux)
DIRS-$(CONFIG_VHOST) += vhost
DIRS-y += spdk_dd
endif
.PHONY: all clean $(DIRS-y)

View File

@ -43,18 +43,14 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/lib
C_SRCS := iscsi_tgt.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_accel event_iscsi event_net event_scsi event_vmd event
SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev iscsi scsi accel trace conf
SPDK_LIB_LIST += thread util log log_rpc app_rpc net sock notify
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_iscsi event_net
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
SPDK_LIB_LIST += env_dpdk_rpc
endif
ifeq ($(OS),Linux)
SPDK_LIB_LIST += event_nbd nbd
SPDK_LIB_LIST += event_nbd
endif
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -41,21 +41,6 @@
static int g_daemon_mode = 0;
static void
spdk_sigusr1(int signo __attribute__((__unused__)))
{
char *config_str = NULL;
if (spdk_app_get_running_config(&config_str, "iscsi.conf") < 0) {
fprintf(stderr, "Error getting config\n");
} else {
fprintf(stdout, "============================\n");
fprintf(stdout, " iSCSI target running config\n");
fprintf(stdout, "=============================\n");
fprintf(stdout, "%s", config_str);
}
free(config_str);
}
static void
iscsi_usage(void)
{
@ -90,7 +75,7 @@ main(int argc, char **argv)
int rc;
struct spdk_app_opts opts = {};
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "iscsi";
if ((rc = spdk_app_parse_args(argc, argv, &opts, "b", NULL,
iscsi_parse_arg, iscsi_usage)) !=
@ -106,7 +91,6 @@ main(int argc, char **argv)
}
opts.shutdown_cb = NULL;
opts.usr1_handler = spdk_sigusr1;
/* Blocks until the application is exiting */
rc = spdk_app_start(&opts, spdk_startup, NULL);

View File

@ -33,21 +33,14 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app_cxx.mk
CXXFLAGS += $(ENV_CXXFLAGS)
CXXFLAGS += -I$(SPDK_ROOT_DIR)/lib
CXX_SRCS = iscsi_top.cpp
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
APP = iscsi_top
all: $(APP)
@:
SPDK_LIB_LIST = rpc
$(APP) : $(OBJS)
$(LINK_CXX)
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
clean:
$(CLEAN_C) $(APP)
C_SRCS := iscsi_top.c
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -33,93 +33,106 @@
#include "spdk/stdinc.h"
#include <algorithm>
#include <map>
#include <vector>
extern "C" {
#include "spdk/event.h"
#include "spdk/jsonrpc.h"
#include "spdk/rpc.h"
#include "spdk/string.h"
#include "spdk/trace.h"
#include "spdk/util.h"
#include "iscsi/conn.h"
}
static char *exe_name;
static int g_shm_id = 0;
struct spdk_jsonrpc_client *g_rpc_client;
static void usage(void)
{
fprintf(stderr, "usage:\n");
fprintf(stderr, " %s <option>\n", exe_name);
fprintf(stderr, " option = '-i' to specify the shared memory ID,"
" (required)\n");
fprintf(stderr, " -r <path> RPC listen address (default: /var/tmp/spdk.sock\n");
}
/* Group by poll group */
static bool
conns_compare(struct spdk_iscsi_conn *first, struct spdk_iscsi_conn *second)
struct rpc_conn_info {
uint32_t id;
uint32_t cid;
uint32_t tsih;
uint32_t lcore_id;
char *initiator_addr;
char *target_addr;
char *target_node_name;
};
static struct rpc_conn_info g_conn_info[1024];
static const struct spdk_json_object_decoder rpc_conn_info_decoders[] = {
{"id", offsetof(struct rpc_conn_info, id), spdk_json_decode_uint32},
{"cid", offsetof(struct rpc_conn_info, cid), spdk_json_decode_uint32},
{"tsih", offsetof(struct rpc_conn_info, tsih), spdk_json_decode_uint32},
{"lcore_id", offsetof(struct rpc_conn_info, lcore_id), spdk_json_decode_uint32},
{"initiator_addr", offsetof(struct rpc_conn_info, initiator_addr), spdk_json_decode_string},
{"target_addr", offsetof(struct rpc_conn_info, target_addr), spdk_json_decode_string},
{"target_node_name", offsetof(struct rpc_conn_info, target_node_name), spdk_json_decode_string},
};
static int
rpc_decode_conn_object(const struct spdk_json_val *val, void *out)
{
if ((uintptr_t)first->pg < (uintptr_t)second->pg) {
return true;
}
struct rpc_conn_info *info = (struct rpc_conn_info *)out;
if ((uintptr_t)first->pg > (uintptr_t)second->pg) {
return false;
}
if (first->id < second->id) {
return true;
}
return false;
return spdk_json_decode_object(val, rpc_conn_info_decoders,
SPDK_COUNTOF(rpc_conn_info_decoders), info);
}
static void
print_connections(void)
{
std::vector<struct spdk_iscsi_conn *> v;
std::vector<struct spdk_iscsi_conn *>::iterator iter;
size_t conns_size;
struct spdk_iscsi_conn *conns, *conn;
void *conns_ptr;
int fd, i;
char shm_name[64];
struct spdk_jsonrpc_client_response *json_resp = NULL;
struct spdk_json_write_ctx *w;
struct spdk_jsonrpc_client_request *request;
int rc;
size_t conn_count, i;
struct rpc_conn_info *conn;
snprintf(shm_name, sizeof(shm_name), "/spdk_iscsi_conns.%d", g_shm_id);
fd = shm_open(shm_name, O_RDONLY, 0600);
if (fd < 0) {
fprintf(stderr, "Cannot open shared memory: %s\n", shm_name);
usage();
exit(1);
request = spdk_jsonrpc_client_create_request();
if (request == NULL) {
return;
}
conns_size = sizeof(*conns) * MAX_ISCSI_CONNECTIONS;
w = spdk_jsonrpc_begin_request(request, 1, "iscsi_get_connections");
spdk_jsonrpc_end_request(request, w);
spdk_jsonrpc_client_send_request(g_rpc_client, request);
conns_ptr = mmap(NULL, conns_size, PROT_READ, MAP_SHARED, fd, 0);
if (conns_ptr == MAP_FAILED) {
fprintf(stderr, "Cannot mmap shared memory (%d)\n", errno);
exit(1);
do {
rc = spdk_jsonrpc_client_poll(g_rpc_client, 1);
} while (rc == 0 || rc == -ENOTCONN);
if (rc <= 0) {
goto end;
}
conns = (struct spdk_iscsi_conn *)conns_ptr;
for (i = 0; i < MAX_ISCSI_CONNECTIONS; i++) {
if (!conns[i].is_valid) {
continue;
}
v.push_back(&conns[i]);
json_resp = spdk_jsonrpc_client_get_response(g_rpc_client);
if (json_resp == NULL) {
goto end;
}
stable_sort(v.begin(), v.end(), conns_compare);
for (iter = v.begin(); iter != v.end(); iter++) {
conn = *iter;
printf("pg %p conn %3d T:%-8s I:%s (%s)\n",
conn->pg, conn->id,
conn->target_short_name, conn->initiator_name,
conn->initiator_addr);
if (spdk_json_decode_array(json_resp->result, rpc_decode_conn_object, g_conn_info,
SPDK_COUNTOF(g_conn_info), &conn_count, sizeof(struct rpc_conn_info))) {
goto end;
}
printf("\n");
munmap(conns, conns_size);
close(fd);
for (i = 0; i < conn_count; i++) {
conn = &g_conn_info[i];
printf("Connection: %u CID: %u TSIH: %u Initiator Address: %s Target Address: %s Target Node Name: %s\n",
conn->id, conn->cid, conn->tsih, conn->initiator_addr, conn->target_addr, conn->target_node_name);
}
end:
spdk_jsonrpc_client_free_request(request);
}
int main(int argc, char **argv)
@ -127,6 +140,7 @@ int main(int argc, char **argv)
void *history_ptr;
struct spdk_trace_histories *histories;
struct spdk_trace_history *history;
const char *rpc_socket_path = SPDK_DEFAULT_RPC_ADDR;
uint64_t tasks_done, last_tasks_done[SPDK_TRACE_MAX_LCORE];
int delay, old_delay, history_fd, i, quit, rc;
@ -140,10 +154,13 @@ int main(int argc, char **argv)
int op;
exe_name = argv[0];
while ((op = getopt(argc, argv, "i:")) != -1) {
while ((op = getopt(argc, argv, "i:r:")) != -1) {
switch (op) {
case 'i':
g_shm_id = atoi(optarg);
g_shm_id = spdk_strtol(optarg, 10);
break;
case 'r':
rpc_socket_path = optarg;
break;
default:
usage();
@ -151,6 +168,12 @@ int main(int argc, char **argv)
}
}
g_rpc_client = spdk_jsonrpc_client_connect(rpc_socket_path, AF_UNIX);
if (!g_rpc_client) {
fprintf(stderr, "spdk_jsonrpc_client_connect() failed: %d\n", errno);
return 1;
}
snprintf(spdk_trace_shm_name, sizeof(spdk_trace_shm_name), "/iscsi_trace.%d", g_shm_id);
history_fd = shm_open(spdk_trace_shm_name, O_RDONLY, 0600);
if (history_fd < 0) {
@ -248,5 +271,7 @@ cleanup:
munmap(history_ptr, sizeof(*histories));
close(history_fd);
spdk_jsonrpc_client_close(g_rpc_client);
return (0);
}

View File

@ -39,24 +39,14 @@ APP = nvmf_tgt
C_SRCS := nvmf_main.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_accel event_nvmf event_net event_vmd
SPDK_LIB_LIST += nvmf event log trace conf thread util bdev accel rpc jsonrpc json net sock
SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc notify
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_nvmf
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
SPDK_LIB_LIST += env_dpdk_rpc
endif
ifeq ($(OS),Linux)
SPDK_LIB_LIST += event_nbd nbd
endif
ifeq ($(CONFIG_FC),y)
ifneq ($(strip $(CONFIG_FC_PATH)),)
SYS_LIBS += -L$(CONFIG_FC_PATH)
endif
SYS_LIBS += -lufc
SPDK_LIB_LIST += event_nbd
endif
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -63,7 +63,7 @@ main(int argc, char **argv)
struct spdk_app_opts opts = {};
/* default value in opts */
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "nvmf";
if ((rc = spdk_app_parse_args(argc, argv, &opts, "", NULL,
nvmf_parse_arg, nvmf_usage)) !=

1
app/spdk_dd/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
spdk_dd

44
app/spdk_dd/Makefile Normal file
View File

@ -0,0 +1,44 @@
#
# BSD LICENSE
#
# Copyright (c) Intel Corporation.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
APP = spdk_dd
C_SRCS := spdk_dd.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

1178
app/spdk_dd/spdk_dd.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -33,11 +33,12 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
APP = spdk_lspci
C_SRCS := spdk_lspci.c
SPDK_LIB_LIST = vmd log
SPDK_LIB_LIST = $(SOCK_MODULES_LIST) nvme vmd
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -41,32 +41,17 @@ C_SRCS := spdk_tgt.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
ifeq ($(OS),Linux)
ifeq ($(CONFIG_VHOST),y)
SPDK_LIB_LIST += vhost event_vhost
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
SPDK_LIB_LIST += rte_vhost
endif
endif
endif
SPDK_LIB_LIST += event_bdev event_accel event_iscsi event_net event_scsi event_nvmf event_vmd event
SPDK_LIB_LIST += nvmf trace log conf thread util bdev iscsi scsi accel rpc jsonrpc json
SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc net sock notify
SPDK_LIB_LIST += event_iscsi event_nvmf
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
SPDK_LIB_LIST += env_dpdk_rpc
endif
ifeq ($(OS),Linux)
SPDK_LIB_LIST += event_nbd nbd
SPDK_LIB_LIST += event_nbd
ifeq ($(CONFIG_VHOST),y)
SPDK_LIB_LIST += event_vhost
endif
ifeq ($(CONFIG_FC),y)
ifneq ($(strip $(CONFIG_FC_PATH)),)
SYS_LIBS += -L$(CONFIG_FC_PATH)
endif
SYS_LIBS += -lufc
endif
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -109,7 +109,7 @@ main(int argc, char **argv)
struct spdk_app_opts opts = {};
int rc;
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "spdk_tgt";
if ((rc = spdk_app_parse_args(argc, argv, &opts, g_spdk_tgt_get_opts_string,
NULL, spdk_tgt_parse_arg, spdk_tgt_usage)) !=

View File

@ -38,7 +38,7 @@ APP = spdk_top
C_SRCS := spdk_top.c
SPDK_LIB_LIST = jsonrpc json rpc log util
SPDK_LIB_LIST = rpc
LIBS=-lncurses -lpanel -lmenu
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

File diff suppressed because it is too large Load Diff

View File

@ -33,19 +33,11 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app_cxx.mk
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
APP = spdk_trace
SPDK_NO_LINK_ENV = 1
CXX_SRCS := trace.cpp
APP = spdk_trace
all: $(APP)
@:
$(APP): $(OBJS) $(SPDK_LIBS)
$(LINK_CXX)
clean:
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app_cxx.mk

View File

@ -613,6 +613,8 @@ int main(int argc, char **argv)
file_name = optarg;
break;
case 'h':
usage();
exit(EXIT_SUCCESS);
default:
usage();
exit(1);

View File

@ -39,17 +39,7 @@ APP = vhost
C_SRCS := vhost.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += vhost event_vhost
ifeq ($(CONFIG_VHOST_INTERNAL_LIB),y)
SPDK_LIB_LIST += rte_vhost
endif
SPDK_LIB_LIST += event_bdev event_accel event_net event_scsi event_vmd event
SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev scsi accel trace conf
SPDK_LIB_LIST += thread util log log_rpc app_rpc
SPDK_LIB_LIST += event_nbd nbd net sock notify
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_vhost event_nbd
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
SPDK_LIB_LIST += env_dpdk_rpc

View File

@ -33,7 +33,6 @@
#include "spdk/stdinc.h"
#include "spdk/conf.h"
#include "spdk/event.h"
#include "spdk/vhost.h"
@ -89,7 +88,7 @@ main(int argc, char *argv[])
struct spdk_app_opts opts = {};
int rc;
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "vhost";
if ((rc = spdk_app_parse_args(argc, argv, &opts, "f:S:", NULL,

View File

@ -12,27 +12,30 @@ rootdir=$(readlink -f $(dirname $0))
source "$1"
source "$rootdir/test/common/autotest_common.sh"
source "$rootdir/scripts/common.sh"
out=$output_dir
scanbuild="scan-build -o $output_dir/scan-build-tmp --status-bugs"
if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
scanbuild_exclude=" --exclude $(dirname $SPDK_RUN_EXTERNAL_DPDK)"
else
scanbuild_exclude="--exclude $rootdir/dpdk/"
fi
scanbuild="scan-build -o $output_dir/scan-build-tmp $scanbuild_exclude --status-bugs"
config_params=$(get_config_params)
rm -rf /tmp/spdk
mkdir /tmp/spdk
trap '[[ -d $SPDK_WORKSPACE ]] && rm -rf "$SPDK_WORKSPACE"' 0
SPDK_WORKSPACE=$(mktemp -dt "spdk_$(date +%s).XXXXXX")
export SPDK_WORKSPACE
umask 022
cd $rootdir
# Print some test system info out for the log
date -u
git describe --tags
./configure $config_params
echo "** START ** Info for Hostname: $HOSTNAME"
uname -a
$MAKE cc_version
$MAKE cxx_version
echo "** END ** Info for Hostname: $HOSTNAME"
function ocf_precompile {
function ocf_precompile() {
# We compile OCF sources ourselves
# They don't need to be checked with scanbuild and code coverage is not applicable
# So we precompile OCF now for further use as standalone static library
@ -45,7 +48,105 @@ function ocf_precompile {
./configure $config_params
}
function make_fail_cleanup {
function build_native_dpdk() {
local external_dpdk_dir
local external_dpdk_base_dir
external_dpdk_dir="$SPDK_RUN_EXTERNAL_DPDK"
external_dpdk_base_dir="$(dirname $external_dpdk_dir)"
if [[ ! -d "$external_dpdk_base_dir" ]]; then
sudo mkdir -p "$external_dpdk_base_dir"
sudo chown -R $(whoami) "$external_dpdk_base_dir"/..
fi
orgdir=$PWD
rm -rf "$external_dpdk_base_dir"
git clone --branch $SPDK_TEST_NATIVE_DPDK --depth 1 http://dpdk.org/git/dpdk "$external_dpdk_base_dir"
git -C "$external_dpdk_base_dir" log --oneline -n 5
dpdk_cflags="-fPIC -g -Werror -fcommon"
dpdk_ldflags=""
# the drivers we use
# net/i40e driver is not really needed by us, but it's built as a workaround
# for DPDK issue: https://bugs.dpdk.org/show_bug.cgi?id=576
DPDK_DRIVERS=("bus" "bus/pci" "bus/vdev" "mempool/ring" "net/i40e" "net/i40e/base")
# all possible DPDK drivers
DPDK_ALL_DRIVERS=($(find "$external_dpdk_base_dir/drivers" -mindepth 1 -type d | sed -n "s#^$external_dpdk_base_dir/drivers/##p"))
if [[ "$SPDK_TEST_CRYPTO" -eq 1 ]]; then
git clone --branch v0.54 --depth 1 https://github.com/intel/intel-ipsec-mb.git "$external_dpdk_base_dir/intel-ipsec-mb"
cd "$external_dpdk_base_dir/intel-ipsec-mb"
$MAKE $MAKEFLAGS all SHARED=y EXTRA_CFLAGS=-fPIC
DPDK_DRIVERS+=("crypto")
DPDK_DRIVERS+=("crypto/aesni_mb")
DPDK_DRIVERS+=("crypto/qat")
DPDK_DRIVERS+=("compress/qat")
DPDK_DRIVERS+=("common/qat")
dpdk_cflags+=" -I$external_dpdk_base_dir/intel-ipsec-mb"
dpdk_ldflags+=" -L$external_dpdk_base_dir/intel-ipsec-mb"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$external_dpdk_base_dir/intel-ipsec-mb
fi
if [[ "$SPDK_TEST_REDUCE" -eq 1 ]]; then
isal_dir="$external_dpdk_base_dir/isa-l"
git clone --branch v2.29.0 --depth 1 https://github.com/intel/isa-l.git "$isal_dir"
cd $isal_dir
./autogen.sh
./configure CFLAGS="-fPIC -g -O2" --enable-shared=yes --prefix="$isal_dir/build"
ln -s $PWD/include $PWD/isa-l
$MAKE $MAKEFLAGS all
$MAKE install
DPDK_DRIVERS+=("compress")
DPDK_DRIVERS+=("compress/isal")
DPDK_DRIVERS+=("compress/qat")
DPDK_DRIVERS+=("common/qat")
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$isal_dir/build/lib/pkgconfig"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$isal_dir/build/lib"
fi
# Use difference between DPDK_ALL_DRIVERS and DPDK_DRIVERS as a set of DPDK drivers we don't want or
# don't need to build.
DPDK_DISABLED_DRIVERS=($(sort <(printf "%s\n" "${DPDK_DRIVERS[@]}") <(printf "%s\n" "${DPDK_ALL_DRIVERS[@]}") | uniq -u))
cd $external_dpdk_base_dir
if [ "$(uname -s)" = "Linux" ]; then
dpdk_cflags+=" -Wno-stringop-overflow"
# Fix for freeing device if not kernel driver configured.
# TODO: Remove once this is merged in upstream DPDK
if grep "20.08.0" $external_dpdk_base_dir/VERSION; then
wget https://github.com/spdk/dpdk/commit/64f1ced13f974e8b3d46b87c361a09eca68126f9.patch -O dpdk-pci.patch
wget https://github.com/spdk/dpdk/commit/c2c273d5c8fbf673623b427f8f4ab5af5ddf0e08.patch -O dpdk-qat.patch
elif grep "20.11\|21.02" $external_dpdk_base_dir/VERSION; then
wget https://github.com/karlatec/dpdk/commit/3219c0cfc38803aec10c809dde16e013b370bda9.patch -O dpdk-pci.patch
wget https://github.com/karlatec/dpdk/commit/adf8f7638de29bc4bf9ba3faf12bbdae73acda0c.patch -O dpdk-qat.patch
else
wget https://github.com/karlatec/dpdk/commit/f95e331be3a1f856b816948990dd2afc67ea4020.patch -O dpdk-pci.patch
wget https://github.com/karlatec/dpdk/commit/6fd2fa906ffdcee04e6ce5da40e61cb841be9827.patch -O dpdk-qat.patch
fi
git config --local user.name "spdk"
git config --local user.email "nomail@all.com"
git am dpdk-pci.patch
git am dpdk-qat.patch
fi
meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \
-Denable_docs=false -Denable_kmods=false -Dtests=false \
-Dc_link_args="$dpdk_ldflags" -Dc_args="$dpdk_cflags" \
-Dmachine=native -Ddisable_drivers=$(printf "%s," "${DPDK_DISABLED_DRIVERS[@]}")
ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS
ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS install
# Save this path. In tests are run using autorun.sh then autotest.sh
# script will be unaware of LD_LIBRARY_PATH and will fail tests.
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" > /tmp/spdk-ld-path
cd "$orgdir"
}
function make_fail_cleanup() {
if [ -d $out/scan-build-tmp ]; then
scanoutput=$(ls -1 $out/scan-build-tmp/)
mv $out/scan-build-tmp/$scanoutput $out/scan-build
@ -55,7 +156,7 @@ function make_fail_cleanup {
false
}
function scanbuild_make {
function scanbuild_make() {
pass=true
$scanbuild $MAKE $MAKEFLAGS > $out/build_output.txt && rm -rf $out/scan-build-tmp || make_fail_cleanup
xtrace_disable
@ -89,7 +190,7 @@ function scanbuild_make {
$pass
}
function porcelain_check {
function porcelain_check() {
if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
echo "Generated files missing from .gitignore:"
git status --porcelain --ignore-submodules
@ -100,12 +201,12 @@ function porcelain_check {
# Check that header file dependencies are working correctly by
# capturing a binary's stat data before and after touching a
# header file and re-making.
function header_dependency_check {
STAT1=$(stat app/spdk_tgt/spdk_tgt)
function header_dependency_check() {
STAT1=$(stat $SPDK_BIN_DIR/spdk_tgt)
sleep 1
touch lib/nvme/nvme_internal.h
$MAKE $MAKEFLAGS
STAT2=$(stat app/spdk_tgt/spdk_tgt)
STAT2=$(stat $SPDK_BIN_DIR/spdk_tgt)
if [ "$STAT1" == "$STAT2" ]; then
echo "Header dependency check failed"
@ -113,28 +214,29 @@ function header_dependency_check {
fi
}
function test_make_uninstall {
function test_make_uninstall() {
# Create empty file to check if it is not deleted by target uninstall
touch /tmp/spdk/usr/lib/sample_xyz.a
$MAKE $MAKEFLAGS uninstall DESTDIR=/tmp/spdk prefix=/usr
if [[ $(find /tmp/spdk/usr -maxdepth 1 -mindepth 1 | wc -l) -ne 2 ]] || [[ $(find /tmp/spdk/usr/lib/ -maxdepth 1 -mindepth 1 | wc -l) -ne 1 ]]; then
ls -lR /tmp/spdk
rm -rf /tmp/spdk
touch "$SPDK_WORKSPACE/usr/lib/sample_xyz.a"
$MAKE $MAKEFLAGS uninstall DESTDIR="$SPDK_WORKSPACE" prefix=/usr
if [[ $(find "$SPDK_WORKSPACE/usr" -maxdepth 1 -mindepth 1 | wc -l) -ne 2 ]] || [[ $(find "$SPDK_WORKSPACE/usr/lib/" -maxdepth 1 -mindepth 1 | wc -l) -ne 1 ]]; then
ls -lR "$SPDK_WORKSPACE"
echo "Make uninstall failed"
exit 1
else
rm -rf /tmp/spdk
fi
}
function build_doc {
function build_doc() {
local doxygenv
doxygenv=$(doxygen --version)
$MAKE -C "$rootdir"/doc --no-print-directory $MAKEFLAGS &> "$out"/doxygen.log
if [ -s "$out"/doxygen.log ]; then
cat "$out"/doxygen.log
echo "Doxygen errors found!"
exit 1
eq "$doxygenv" 1.8.20 || exit 1
echo "Doxygen $doxygenv detected, all warnings are potentially false positives, continuing the test"
fi
if hash pdflatex 2>/dev/null; then
if hash pdflatex 2> /dev/null; then
$MAKE -C "$rootdir"/doc/output/latex --no-print-directory $MAKEFLAGS &>> "$out"/doxygen.log
fi
mkdir -p "$out"/doc
@ -144,22 +246,24 @@ function build_doc {
fi
$MAKE -C "$rootdir"/doc --no-print-directory $MAKEFLAGS clean &>> "$out"/doxygen.log
if [ -s "$out"/doxygen.log ]; then
rm "$out"/doxygen.log
# Save the log as an artifact in case we are working with potentially broken version
eq "$doxygenv" 1.8.20 || rm "$out"/doxygen.log
fi
rm -rf "$rootdir"/doc/output
}
function autobuild_test_suite {
function autobuild_test_suite() {
run_test "autobuild_check_format" ./scripts/check_format.sh
run_test "autobuild_external_code" sudo -E $rootdir/test/external_code/test_make.sh $rootdir
run_test "autobuild_external_code" sudo -E --preserve-env=PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH $rootdir/test/external_code/test_make.sh $rootdir
if [ "$SPDK_TEST_OCF" -eq 1 ]; then
run_test "autobuild_ocf_precompile" ocf_precompile
fi
run_test "autobuild_check_so_deps" $rootdir/test/make/check_so_deps.sh
run_test "autobuild_check_so_deps" $rootdir/test/make/check_so_deps.sh $1
./configure $config_params --without-shared
run_test "scanbuild_make" scanbuild_make
run_test "autobuild_generated_files_check" porcelain_check
run_test "autobuild_header_dependency_check" header_dependency_check
run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR=/tmp/spdk prefix=/usr
run_test "autobuild_make_install" $MAKE $MAKEFLAGS install DESTDIR="$SPDK_WORKSPACE" prefix=/usr
run_test "autobuild_make_uninstall" test_make_uninstall
run_test "autobuild_build_doc" build_doc
}
@ -176,11 +280,24 @@ if [ $SPDK_RUN_UBSAN -eq 1 ]; then
run_test "ubsan" echo "using ubsan"
fi
if [ -n "$SPDK_TEST_NATIVE_DPDK" ]; then
run_test "build_native_dpdk" build_native_dpdk
fi
./configure $config_params
echo "** START ** Info for Hostname: $HOSTNAME"
uname -a
$MAKE cc_version
$MAKE cxx_version
echo "** END ** Info for Hostname: $HOSTNAME"
if [ "$SPDK_TEST_AUTOBUILD" -eq 1 ]; then
run_test "autobuild" autobuild_test_suite
run_test "autobuild" autobuild_test_suite $1
else
if [ "$SPDK_TEST_OCF" -eq 1 ]; then
run_test "autobuild_ocf_precompile" ocf_precompile
fi
# if we aren't testing the unittests, build with shared objects.
./configure $config_params --with-shared
run_test "make" $MAKE $MAKEFLAGS
fi

View File

@ -13,6 +13,37 @@ source "$1"
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/test/common/autotest_common.sh"
function build_rpms() (
local version rpms
# Make sure linker will not attempt to look under DPDK's repo dir to get the libs
unset -v LD_LIBRARY_PATH
install_uninstall_rpms() {
rpms=("$HOME/rpmbuild/RPMS/x86_64/"spdk{,-devel,{,-dpdk}-libs}-$version-1.x86_64.rpm)
sudo rpm -i "${rpms[@]}"
rpms=("${rpms[@]##*/}") rpms=("${rpms[@]%.rpm}")
# Check if we can find one of the apps in the PATH now and verify if it doesn't miss
# any libs.
LIST_LIBS=yes "$rootdir/rpmbuild/rpm-deps.sh" "${SPDK_APP[@]##*/}"
sudo rpm -e "${rpms[@]}"
}
build_rpm() {
MAKEFLAGS="$MAKEFLAGS" SPDK_VERSION="$version" DEPS=no "$rootdir/rpmbuild/rpm.sh" "$@"
install_uninstall_rpms
}
version="test_shared"
run_test "build_shared_rpm" build_rpm --with-shared
if [[ -n $SPDK_TEST_NATIVE_DPDK ]]; then
version="test_shared_native_dpdk"
run_test "build_shared_native_dpdk_rpm" build_rpm --with-shared --with-dpdk="$SPDK_RUN_EXTERNAL_DPDK"
fi
)
out=$PWD
MAKEFLAGS=${MAKEFLAGS:--j16}
@ -28,6 +59,11 @@ if [ $(git status --porcelain --ignore-submodules | wc -l) -ne 0 ]; then
fi
timing_exit porcelain_check
if [[ $SPDK_TEST_RELEASE_BUILD -eq 1 ]]; then
run_test "build_rpms" build_rpms
$MAKE clean
fi
if [[ $RUN_NIGHTLY -eq 0 ]]; then
timing_finish
exit 0
@ -35,7 +71,13 @@ fi
timing_enter build_release
./configure $(get_config_params) --disable-debug --enable-lto
config_params="$(get_config_params | sed 's/--enable-debug//g')"
if [ $(uname -s) = Linux ]; then
./configure $config_params --enable-lto
else
# LTO needs a special compiler to work on BSD.
./configure $config_params
fi
$MAKE ${MAKEFLAGS}
$MAKE ${MAKEFLAGS} clean

View File

@ -4,7 +4,8 @@ set -e
rootdir=$(readlink -f $(dirname $0))
conf=~/autorun-spdk.conf
default_conf=~/autorun-spdk.conf
conf=${1:-${default_conf}}
# If the configuration of tests is not provided, no tests will be carried out.
if [[ ! -f $conf ]]; then
@ -17,5 +18,5 @@ cat "$conf"
# Runs agent scripts
$rootdir/autobuild.sh "$conf"
sudo -E WITH_DPDK_DIR="$WITH_DPDK_DIR" $rootdir/autotest.sh "$conf"
sudo -E $rootdir/autotest.sh "$conf"
$rootdir/autopackage.sh "$conf"

View File

@ -176,6 +176,7 @@ def aggregateCompletedTests(output_dir, repo_dir, skip_confirm=False):
def main(output_dir, repo_dir, skip_confirm=False):
print("-----Begin Post Process Script------")
generateCoverageReport(output_dir, repo_dir)
collectOne(output_dir, 'doc')
collectOne(output_dir, 'ut_coverage')

View File

@ -9,6 +9,16 @@ if [[ ! -f $1 ]]; then
exit 1
fi
# always test with SPDK shared objects.
export SPDK_LIB_DIR="$rootdir/build/lib"
# Autotest.sh, as part of autorun.sh, runs in a different
# shell process than autobuild.sh. Use helper file to pass
# over env variable containing libraries paths.
if [[ -e /tmp/spdk-ld-path ]]; then
source /tmp/spdk-ld-path
fi
source "$1"
source "$rootdir/test/common/autotest_common.sh"
source "$rootdir/test/nvmf/common.sh"
@ -19,12 +29,25 @@ if [ $EUID -ne 0 ]; then
fi
if [ $(uname -s) = Linux ]; then
old_core_pattern=$(< /proc/sys/kernel/core_pattern)
mkdir -p "$output_dir/coredumps"
# set core_pattern to a known value to avoid ABRT, systemd-coredump, etc.
echo "core" > /proc/sys/kernel/core_pattern
echo "|$rootdir/scripts/core-collector.sh %P %s %t $output_dir/coredumps" > /proc/sys/kernel/core_pattern
echo 2 > /proc/sys/kernel/core_pipe_limit
# Make sure that the hugepage state for our VM is fresh so we don't fail
# hugepage allocation. Allow time for this action to complete.
echo 1 > /proc/sys/vm/drop_caches
sleep 3
# make sure nbd (network block device) driver is loaded if it is available
# this ensures that when tests need to use nbd, it will be fully initialized
modprobe nbd || true
if udevadm=$(type -P udevadm); then
"$udevadm" monitor --property &> "$output_dir/udev.log" &
udevadm_pid=$!
fi
fi
trap "process_core; autotest_cleanup; exit 1" SIGINT SIGTERM EXIT
@ -37,11 +60,13 @@ src=$(readlink -f $(dirname $0))
out=$output_dir
cd $src
./scripts/setup.sh status
freebsd_update_contigmem_mod
if hash lcov; then
# lcov takes considerable time to process clang coverage.
# Disabling lcov allow us to do this.
# More information: https://github.com/spdk/spdk/issues/1693
CC_TYPE=$(grep CC_TYPE mk/cc.mk)
if hash lcov && ! [[ "$CC_TYPE" == *"clang"* ]]; then
# setup output dir for unittest.sh
export UT_COVERAGE=$out/ut_coverage
export LCOV_OPTS="
@ -67,44 +92,47 @@ rm -f /var/tmp/spdk*.sock
# Load the kernel driver
./scripts/setup.sh reset
# Let the kernel discover any filesystems or partitions
sleep 10
if [ $(uname -s) = Linux ]; then
# OCSSD devices drivers don't support IO issues by kernel so
# detect OCSSD devices and blacklist them (unbind from any driver).
# detect OCSSD devices and block them (unbind from any driver).
# If test scripts want to use this device it needs to do this explicitly.
#
# If some OCSSD device is bound to other driver than nvme we won't be able to
# discover if it is OCSSD or not so load the kernel driver first.
while IFS= read -r -d '' dev
do
while IFS= read -r -d '' dev; do
# Send Open Channel 2.0 Geometry opcode "0xe2" - not supported by NVMe device.
if nvme admin-passthru $dev --namespace-id=1 --data-len=4096 --opcode=0xe2 --read >/dev/null; then
if nvme admin-passthru $dev --namespace-id=1 --data-len=4096 --opcode=0xe2 --read > /dev/null; then
bdf="$(basename $(readlink -e /sys/class/nvme/${dev#/dev/}/device))"
echo "INFO: blacklisting OCSSD device: $dev ($bdf)"
PCI_BLACKLIST+=" $bdf"
echo "INFO: blocking OCSSD device: $dev ($bdf)"
PCI_BLOCKED+=" $bdf"
OCSSD_PCI_DEVICES+=" $bdf"
fi
done < <(find /dev -maxdepth 1 -regex '/dev/nvme[0-9]+' -print0)
done < <(find /dev -maxdepth 1 -regex '/dev/nvme[0-9]+' -print0)
export OCSSD_PCI_DEVICES
# Now, bind blacklisted devices to pci-stub module. This will prevent
# Now, bind blocked devices to pci-stub module. This will prevent
# automatic grabbing these devices when we add device/vendor ID to
# proper driver.
if [[ -n "$PCI_BLACKLIST" ]]; then
if [[ -n "$PCI_BLOCKED" ]]; then
# shellcheck disable=SC2097,SC2098
PCI_WHITELIST="$PCI_BLACKLIST" \
PCI_BLACKLIST="" \
DRIVER_OVERRIDE="pci-stub" \
PCI_ALLOWED="$PCI_BLOCKED" \
PCI_BLOCKED="" \
DRIVER_OVERRIDE="pci-stub" \
./scripts/setup.sh
# Export our blacklist so it will take effect during next setup.sh
export PCI_BLACKLIST
# Export our blocked list so it will take effect during next setup.sh
export PCI_BLOCKED
fi
run_test "setup.sh" "$rootdir/test/setup/test-setup.sh"
fi
./scripts/setup.sh status
if [[ $(uname -s) == Linux ]]; then
# Revert NVMe namespaces to default state
nvme_namespace_revert
fi
# Delete all leftover lvols and gpt partitions
@ -123,12 +151,13 @@ timing_enter afterboot
./scripts/setup.sh
timing_exit afterboot
timing_enter nvmf_setup
rdma_device_init
timing_exit nvmf_setup
if [[ $SPDK_TEST_CRYPTO -eq 1 || $SPDK_TEST_REDUCE -eq 1 ]]; then
if grep -q '#define SPDK_CONFIG_IGB_UIO_DRIVER 1' $rootdir/include/spdk/config.h; then
# Make sure that memory is distributed across all NUMA nodes - by default, all goes to
# node0, but if QAT devices are attached to a different node, all of their VFs will end
# up under that node too and memory needs to be available there for the tests.
CLEAR_HUGE=yes HUGE_EVEN_ALLOC=yes ./scripts/setup.sh
./scripts/setup.sh status
if [[ $SPDK_TEST_USE_IGB_UIO -eq 1 ]]; then
./scripts/qat_setup.sh igb_uio
else
./scripts/qat_setup.sh
@ -137,8 +166,7 @@ fi
# Revert existing OPAL to factory settings that may have been left from earlier failed tests.
# This ensures we won't hit any unexpected failures due to NVMe SSDs being locked.
# Disable this for now as we don't have opal test running
# opal_revert_cleanup
opal_revert_cleanup
#####################
# Unit Tests
@ -146,23 +174,29 @@ fi
if [ $SPDK_TEST_UNITTEST -eq 1 ]; then
run_test "unittest" ./test/unit/unittest.sh
run_test "env" test/env/env.sh
fi
if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
timing_enter lib
run_test "env" test/env/env.sh
run_test "rpc" test/rpc/rpc.sh
run_test "rpc_client" test/rpc_client/rpc_client.sh
run_test "json_config" ./test/json_config/json_config.sh
run_test "alias_rpc" test/json_config/alias_rpc/alias_rpc.sh
run_test "spdkcli_tcp" test/spdkcli/tcp.sh
run_test "dpdk_mem_utility" test/dpdk_memory_utility/test_dpdk_mem_info.sh
run_test "dpdk_mem_utility" test/dpdk_memory_utility/test_dpdk_mem_info.sh
run_test "event" test/event/event.sh
run_test "accel_engine" test/accel_engine/accel_engine.sh
if [ $SPDK_TEST_BLOCKDEV -eq 1 ]; then
run_test "blockdev_general" test/bdev/blockdev.sh
run_test "bdev_raid" test/bdev/bdev_raid.sh
run_test "bdevperf_config" test/bdev/bdevperf/test_config.sh
if [[ $(uname -s) == Linux ]]; then
run_test "spdk_dd" test/dd/dd.sh
run_test "reactor_set_interrupt" test/interrupt/reactor_set_interrupt.sh
fi
fi
if [ $SPDK_TEST_JSON -eq 1 ]; then
@ -173,20 +207,18 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
run_test "blockdev_nvme" test/bdev/blockdev.sh "nvme"
run_test "blockdev_nvme_gpt" test/bdev/blockdev.sh "gpt"
run_test "nvme" test/nvme/nvme.sh
if [[ $SPDK_TEST_NVME_CLI -eq 1 ]]; then
run_test "nvme_cli" test/nvme/spdk_nvme_cli.sh
if [[ $SPDK_TEST_NVME_PMR -eq 1 ]]; then
run_test "nvme_pmr" test/nvme/nvme_pmr.sh
fi
if [[ $SPDK_TEST_NVME_CUSE -eq 1 ]]; then
run_test "nvme_cuse" test/nvme/cuse/nvme_cuse.sh
run_test "nvme_cli_cuse" test/nvme/spdk_nvme_cli_cuse.sh
run_test "nvme_smartctl_cuse" test/nvme/spdk_smartctl_cuse.sh
fi
run_test "nvme_rpc" test/nvme/nvme_rpc.sh
# Only test hotplug without ASAN enabled. Since if it is
# enabled, it catches SEGV earlier than our handler which
# breaks the hotplug logic.
if [ $SPDK_RUN_ASAN -eq 0 ]; then
run_test "nvme_hotplug" test/nvme/hotplug.sh intel
run_test "nvme_hotplug" test/nvme/hotplug.sh root
fi
fi
@ -197,38 +229,41 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
timing_exit lib
if [ $SPDK_TEST_ISCSI -eq 1 ]; then
run_test "iscsi_tgt_posix" ./test/iscsi_tgt/iscsi_tgt.sh posix
run_test "iscsi_tgt" ./test/iscsi_tgt/iscsi_tgt.sh
run_test "spdkcli_iscsi" ./test/spdkcli/iscsi.sh
# Run raid spdkcli test under iSCSI since blockdev tests run on systems that can't run spdkcli yet
run_test "spdkcli_raid" test/spdkcli/raid.sh
fi
if [ $SPDK_TEST_VPP -eq 1 ]; then
run_test "iscsi_tgt_vpp" ./test/iscsi_tgt/iscsi_tgt.sh vpp
fi
if [ $SPDK_TEST_BLOBFS -eq 1 ]; then
run_test "rocksdb" ./test/blobfs/rocksdb/rocksdb.sh
run_test "blobstore" ./test/blobstore/blobstore.sh
run_test "blobfs" ./test/blobfs/blobfs.sh
run_test "hello_blob" ./examples/blob/hello_world/hello_blob \
examples/blob/hello_world/hello_blob.conf
run_test "hello_blob" $SPDK_EXAMPLE_DIR/hello_blob \
examples/blob/hello_world/hello_blob.json
fi
if [ $SPDK_TEST_NVMF -eq 1 ]; then
# The NVMe-oF run test cases are split out like this so that the parser that compiles the
# list of all tests can properly differentiate them. Please do not merge them into one line.
if [ "$SPDK_TEST_NVMF_TRANSPORT" = "rdma" ]; then
timing_enter rdma_setup
rdma_device_init
timing_exit rdma_setup
run_test "nvmf_rdma" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "spdkcli_nvmf_rdma" ./test/spdkcli/nvmf.sh
run_test "spdkcli_nvmf_rdma" ./test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
elif [ "$SPDK_TEST_NVMF_TRANSPORT" = "tcp" ]; then
timing_enter tcp_setup
tcp_device_init
timing_exit tcp_setup
run_test "nvmf_tcp" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "spdkcli_nvmf_tcp" ./test/spdkcli/nvmf.sh
run_test "spdkcli_nvmf_tcp" ./test/spdkcli/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "nvmf_identify_passthru" test/nvmf/target/identify_passthru.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "nvmf_dif" test/nvmf/target/dif.sh
elif [ "$SPDK_TEST_NVMF_TRANSPORT" = "fc" ]; then
run_test "nvmf_fc" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "spdkcli_nvmf_fc" ./test/spdkcli/nvmf.sh
run_test "nvmf_fc" ./test/nvmf/nvmf.sh --transport=$SPDK_TEST_NVMF_TRANSPORT
run_test "spdkcli_nvmf_fc" ./test/spdkcli/nvmf.sh
else
echo "unknown NVMe transport, please specify rdma, tcp, or fc."
exit 1
@ -240,7 +275,7 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
fi
if [ $SPDK_TEST_LVOL -eq 1 ]; then
run_test "lvol2" ./test/lvol/lvol2.sh
run_test "lvol" ./test/lvol/lvol.sh
run_test "blob_io_wait" ./test/blobstore/blob_io_wait/blob_io_wait.sh
fi
@ -276,10 +311,10 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
run_test "vmd" ./test/vmd/vmd.sh
fi
if [ $SPDK_TEST_REDUCE -eq 1 ]; then
run_test "compress_qat" ./test/compress/compress.sh "qat"
run_test "compress_isal" ./test/compress/compress.sh "isal"
fi
if [ $SPDK_TEST_REDUCE -eq 1 ]; then
run_test "compress_qat" ./test/compress/compress.sh "qat"
run_test "compress_isal" ./test/compress/compress.sh "isal"
fi
if [ $SPDK_TEST_OPAL -eq 1 ]; then
run_test "nvme_opal" ./test/nvme/nvme_opal.sh
@ -292,6 +327,10 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then
run_test "blockdev_crypto_qat" ./test/bdev/blockdev.sh "crypto_qat"
fi
fi
if [[ $SPDK_TEST_SCHEDULER -eq 1 ]]; then
run_test "scheduler" ./test/scheduler/scheduler.sh
fi
fi
timing_enter cleanup
@ -306,7 +345,7 @@ trap - SIGINT SIGTERM EXIT
# catch any stray core files
process_core
if hash lcov; then
if hash lcov && ! [[ "$CC_TYPE" == *"clang"* ]]; then
# generate coverage data and combine with baseline
$LCOV -q -c -d $src -t "$(hostname)" -o $out/cov_test.info
$LCOV -q -a $out/cov_base.info -a $out/cov_test.info -o $out/cov_total.info

354
configure vendored
View File

@ -5,9 +5,9 @@ set -e
trap 'echo -e "\n\nConfiguration failed\n\n" >&2' ERR
rootdir=$(readlink -f $(dirname $0))
source "$rootdir/scripts/common.sh"
function usage()
{
function usage() {
echo "'configure' configures SPDK to compile on supported platforms."
echo ""
echo "Usage: ./configure [OPTION]..."
@ -24,7 +24,6 @@ function usage()
echo " example: aarch64-linux-gnu"
echo ""
echo " --enable-debug Configure for debug builds"
echo " --enable-log-bt Enable support of backtrace printing in SPDK logs (requires libunwind)."
echo " --enable-werror Treat compiler warnings as errors"
echo " --enable-asan Enable address sanitizer"
echo " --enable-ubsan Enable undefined behavior sanitizer"
@ -32,6 +31,7 @@ function usage()
echo " --enable-lto Enable link-time optimization"
echo " --enable-pgo-capture Enable generation of profile guided optimization data"
echo " --enable-pgo-use Use previously captured profile guided optimization data"
echo " --enable-cet Enable Intel Control-flow Enforcement Technology (CET)"
echo " --disable-tests Disable building of functional tests"
echo " --disable-unit-tests Disable building of unit tests"
echo " --disable-examples Disable building of examples"
@ -48,10 +48,6 @@ function usage()
echo " example: /usr/share/dpdk/x86_64-default-linuxapp-gcc"
echo " env Use an alternate environment implementation instead of DPDK."
echo " Implies --without-dpdk."
echo " igb-uio-driver Build DPDK's igb-uio driver."
echo " Required on some systems to use qat devices. This flag is"
echo " effective only with the default dpdk submodule."
echo " No path required"
echo " idxd Build the IDXD library and accel framework plug-in module."
echo " Disabled while experimental. Only built for x86 when enabled."
echo " crypto Build vbdev crypto module."
@ -60,21 +56,19 @@ function usage()
echo " default: /usr/src/fio"
echo " vhost Build vhost target. Enabled by default."
echo " No path required."
echo " internal-vhost-lib Use the internal copy of rte_vhost. By default, the upstream"
echo " rte_vhost from DPDK will be used."
echo " No path required."
echo " virtio Build vhost initiator and virtio-pci bdev modules."
echo " No path required."
echo " vfio-user Build custom vfio-user transport for NVMf target and NVMe initiator."
echo " example: /usr/src/libvfio-user"
echo " pmdk Build persistent memory bdev."
echo " example: /usr/share/pmdk"
echo " reduce Build vbdev compression module."
echo " No path required."
echo " vpp Build VPP net module."
echo " example: /vpp_repo/build-root/rpmbuild/vpp-18.01.1.0/build-root/install-vpp-native/vpp"
echo " rbd Build Ceph RBD bdev module."
echo " No path required."
echo " rdma Build RDMA transport for NVMf target and initiator."
echo " No path required."
echo " Accepts optional RDMA provider name. Can be \"verbs\" or \"mlx5_dv\"."
echo " If no provider specified, \"verbs\" provider is used by default."
echo " fc Build FC transport for NVMf target."
echo " If an argument is provided, it is considered a directory containing"
echo " libufc.a and fc_lld.h. Otherwise the regular system paths will"
@ -102,6 +96,8 @@ function usage()
echo " No path required."
echo " raid5 Build with bdev_raid module RAID5 support."
echo " No path required."
echo " wpdk Build using WPDK to provide support for Windows (experimental)."
echo " The argument must be a directory containing lib and include."
echo ""
echo "Environment variables:"
echo ""
@ -137,14 +133,18 @@ for i in "$@"; do
done
# Detect the compiler toolchain
$rootdir/scripts/detect_cc.sh --cc="$CC" --cxx="$CXX" --lto="${CONFIG[LTO]}" --ld="$LD" --cross-prefix="${CONFIG[CROSS_PREFIX]}" > $rootdir/mk/cc.mk
$rootdir/scripts/detect_cc.sh --cc="$CC" --cxx="$CXX" --lto="${CONFIG[LTO]}" --ld="$LD" --cross-prefix="${CONFIG[CROSS_PREFIX]}" > $rootdir/mk/cc.mk
CC=$(cat $rootdir/mk/cc.mk | grep "DEFAULT_CC=" | cut -d "=" -f 2)
CC_TYPE=$(cat $rootdir/mk/cc.mk | grep "CC_TYPE=" | cut -d "=" -f 2)
CC=$(grep "DEFAULT_CC=" "$rootdir/mk/cc.mk" | sed s/DEFAULT_CC=//)
CC_TYPE=$(grep "CC_TYPE=" "$rootdir/mk/cc.mk" | cut -d "=" -f 2)
arch=$($CC -dumpmachine)
sys_name=$(uname -s)
if [[ $arch == *mingw* ]] || [[ $arch == *windows* ]]; then
sys_name=Windows
fi
# Sanitize default configuration. All parameters set by user explicit should fail
# Force no ISA-L if non-x86 or non-aarch64 architecture
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
@ -154,25 +154,24 @@ if [[ "${CONFIG[ISAL]}" = "y" ]]; then
fi
fi
if [[ $sys_name == "FreeBSD" ]]; then
if [[ $sys_name != "Linux" ]]; then
# Vhost, rte_vhost library and virtio are only supported on Linux.
CONFIG[VHOST]="n"
CONFIG[VHOST_INTERNAL_LIB]="n"
CONFIG[VIRTIO]="n"
echo "Notice: Vhost, rte_vhost library and virtio are only supported on Linux. Turning off default feature."
fi
#check nasm only on x86
if [[ $arch == x86_64* ]]; then
ver=$(nasm -v 2>/dev/null | awk '{print $3}' | sed 's/[^0-9]*//g')
if [[ "${ver:0:1}" -le "2" ]] && [[ "${ver:0:3}" -le "213" ]] && [[ "${ver:0:5}" -lt "21303" ]]; then
# ISA-L, compression & crypto require NASM version 2.13.03 or newer.
ver=$(nasm -v 2> /dev/null | awk '{print $3}')
if lt "$ver" 2.14; then
# ISA-L, compression & crypto require NASM version 2.14 or newer.
CONFIG[ISAL]=n
CONFIG[CRYPTO]=n
CONFIG[IPSEC_MB]=n
CONFIG[REDUCE]=n
HAVE_NASM=n
echo "Notice: ISA-L, compression & crypto require NASM version 2.13.03 or newer. Turning off default ISA-L and crypto features."
echo "Notice: ISA-L, compression & crypto require NASM version 2.14 or newer. Turning off default ISA-L and crypto features."
else
HAVE_NASM=y
fi
@ -189,7 +188,7 @@ function check_dir() {
for i in "$@"; do
case "$i" in
-h|--help)
-h | --help)
usage
exit 0
;;
@ -210,12 +209,6 @@ for i in "$@"; do
--disable-debug)
CONFIG[DEBUG]=n
;;
--enable-log-bt)
CONFIG[LOG_BACKTRACE]=y
;;
--disable-log-bt)
CONFIG[LOG_BACKTRACE]=n
;;
--enable-asan)
CONFIG[ASAN]=y
;;
@ -276,6 +269,12 @@ for i in "$@"; do
--disable-werror)
CONFIG[WERROR]=n
;;
--enable-cet)
CONFIG[CET]=y
;;
--disable-cet)
CONFIG[CET]=n
;;
--with-dpdk=*)
check_dir "$i"
CONFIG[DPDK_DIR]=$(readlink -f ${i#*=})
@ -283,6 +282,10 @@ for i in "$@"; do
--without-dpdk)
CONFIG[DPDK_DIR]=
;;
--with-wpdk=*)
check_dir "$i"
CONFIG[WPDK_DIR]=$(readlink -f ${i#*=})
;;
--with-env=*)
CONFIG[ENV]="${i#*=}"
;;
@ -292,8 +295,13 @@ for i in "$@"; do
--without-rbd)
CONFIG[RBD]=n
;;
--with-rdma=*)
CONFIG[RDMA]=y
CONFIG[RDMA_PROV]=${i#*=}
;;
--with-rdma)
CONFIG[RDMA]=y
CONFIG[RDMA_PROV]="verbs"
;;
--without-rdma)
CONFIG[RDMA]=n
@ -334,18 +342,24 @@ for i in "$@"; do
--without-vhost)
CONFIG[VHOST]=n
;;
--with-internal-vhost-lib)
CONFIG[VHOST_INTERNAL_LIB]=y
;;
--without-internal-vhost-lib)
CONFIG[VHOST_INTERNAL_LIB]=n
;;
--with-virtio)
CONFIG[VIRTIO]=y
;;
--without-virtio)
CONFIG[VIRTIO]=n
;;
--with-vfio-user)
CONFIG[VFIO_USER]=y
CONFIG[VFIO_USER_DIR]=""
;;
--with-vfio-user=*)
CONFIG[VFIO_USER]=y
check_dir "$i"
CONFIG[VFIO_USER_DIR]=$(readlink -f ${i#*=})
;;
--without-vfio-user)
CONFIG[VFIO_USER]=n
;;
--with-pmdk)
CONFIG[PMDK]=y
CONFIG[PMDK_DIR]=""
@ -364,17 +378,6 @@ for i in "$@"; do
--without-reduce)
CONFIG[REDUCE]=n
;;
--with-vpp)
CONFIG[VPP]=y
;;
--with-vpp=*)
CONFIG[VPP]=y
check_dir "$i"
CONFIG[VPP_DIR]=$(readlink -f ${i#*=})
;;
--without-vpp)
CONFIG[VPP]=n
;;
--with-fio) ;&
--with-fio=*)
if [[ ${i#*=} != "$i" ]]; then
@ -395,12 +398,6 @@ for i in "$@"; do
CONFIG[VTUNE_DIR]=
CONFIG[VTUNE]=n
;;
--with-igb-uio-driver)
CONFIG[IGB_UIO_DRIVER]=y
;;
--without-igb-uio-driver)
CONFIG[IGB_UIO_DRIVER]=n
;;
--with-ocf)
CONFIG[OCF]=y
CONFIG[OCF_PATH]=$(readlink -f "./ocf")
@ -462,19 +459,45 @@ for i in "$@"; do
echo "Unrecognized option $i"
usage
exit 1
;;
esac
done
if [[ $arch == x86_64* ]]; then
BUILD_CMD=($CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS -march=native)
BUILD_CMD=("$CC" -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS "-march=native")
else
BUILD_CMD=($CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS)
BUILD_CMD=("$CC" -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS)
fi
BUILD_CMD+=(-I/usr/local/include -L/usr/local/lib)
if [[ "${CONFIG[VFIO_USER]}" = "y" ]]; then
if ! hash cmake; then
echo "ERROR: --with-vfio-user requires cmake"
echo "Please install then re-run this script"
exit 1
fi
if [[ ! -d /usr/include/json-c ]] && [[ ! -d /usr/local/include/json-c ]]; then
echo "ERROR: --with-vfio-user requires json-c-devel"
echo "Please install then re-run this script"
exit 1
fi
if [[ ! -e /usr/include/cmocka.h ]] && [[ ! -e /usr/local/include/cmocka.h ]]; then
echo "ERROR: --with-vfio-user requires libcmocka-devel"
echo "Please install then re-run this script"
exit 1
fi
fi
# IDXD uses Intel specific instructions.
if [[ "${CONFIG[IDXD]}" = "y" ]]; then
intel="GenuineIntel"
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
if [ $(uname -s) == "FreeBSD" ]; then
intel="hw.model: Intel"
cpu_vendor=$(sysctl -a | grep hw.model | cut -c 1-15)
else
intel="GenuineIntel"
cpu_vendor=$(grep -i 'vendor' /proc/cpuinfo --max-count=1)
fi
if [[ "$cpu_vendor" != *"$intel"* ]]; then
echo "ERROR: IDXD cannot be used due to CPU incompatiblity."
exit 1
@ -490,15 +513,15 @@ if [[ "${CONFIG[ISAL]}" = "y" ]]; then
fi
if [[ "${CONFIG[ISAL]}" = "n" ]] && [[ "${CONFIG[REDUCE]}" = "y" ]]; then
echo "ERROR Conflicting options: --with-reduce is not compatible with --without-isal."
exit 1
echo "ERROR Conflicting options: --with-reduce is not compatible with --without-isal."
exit 1
fi
if [ -z "${CONFIG[ENV]}" ]; then
CONFIG[ENV]=$rootdir/lib/env_dpdk
echo "Using default SPDK env in ${CONFIG[ENV]}"
if [ -z "${CONFIG[DPDK_DIR]}" ]; then
if [ ! -f "$rootdir"/dpdk/config/common_base ]; then
if [ ! -f "$rootdir"/dpdk/config/meson.build ]; then
echo "DPDK not found; please specify --with-dpdk=<path> or run:"
echo
echo " git submodule update --init"
@ -507,31 +530,6 @@ if [ -z "${CONFIG[ENV]}" ]; then
CONFIG[DPDK_DIR]="${rootdir}/dpdk/build"
echo "Using default DPDK in ${CONFIG[DPDK_DIR]}"
fi
if [[ "${CONFIG[VHOST]}" = "y" ]] && [[ "${CONFIG[VHOST_INTERNAL_LIB]}" = "n" ]]; then
# We lookup "common_linux" file to check if DPDK version is >= 19.05.
# "common_linux" is available since exactly DPDK 19.05 - it was renamed
# from "common_linuxapp".
if [ ! -f "$rootdir"/dpdk/config/common_linux ]; then
echo "Notice: Using internal, legacy rte_vhost library due to DPDK" \
"version < 19.05"
CONFIG[VHOST_INTERNAL_LIB]=y
fi
fi
else
if [[ "${CONFIG[VHOST]}" = "y" ]] && [[ "${CONFIG[VHOST_INTERNAL_LIB]}" = "n" ]]; then
# DPDK must be already built, so we can simply try to use the new rte_vhost.
# It has a number of internal dependencies though, so don't try to link the
# program, just compile it
if ! echo -e '#include <rte_vhost.h>\n' \
'int main(void) { return rte_vhost_extern_callback_register(0, NULL, NULL); }\n' \
| ${BUILD_CMD[@]} -c -Wno-deprecated-declarations -Werror \
-I"${CONFIG[DPDK_DIR]}/include" - &>/dev/null; then
echo "Notice: DPDK's rte_vhost not found or version < 19.05, using internal," \
"legacy rte_vhost library."
CONFIG[VHOST_INTERNAL_LIB]=y
fi
fi
fi
else
if [ -n "${CONFIG[DPDK_DIR]}" ]; then
@ -551,6 +549,23 @@ else
CONFIG[VIRTIO]="n"
fi
if [[ $sys_name == "Windows" ]]; then
if [ -z "${CONFIG[WPDK_DIR]}" ]; then
if [ ! -f "$rootdir"/wpdk/Makefile ]; then
echo "WPDK not found; please specify --with-wpdk=<path>. See https://wpdk.github.io."
exit 1
else
CONFIG[WPDK_DIR]="${rootdir}/wpdk/build"
echo "Using default WPDK in ${CONFIG[WPDK_DIR]}"
fi
fi
else
if [ -n "${CONFIG[WPDK_DIR]}" ]; then
echo "ERROR: --with-wpdk is only supported for Windows"
exit 1
fi
fi
if [ "${CONFIG[VTUNE]}" = "y" ]; then
if [ -z "${CONFIG[VTUNE_DIR]}" ]; then
echo "When VTune is enabled, you must specify the VTune directory using --with-vtune=path"
@ -558,7 +573,7 @@ if [ "${CONFIG[VTUNE]}" = "y" ]; then
fi
fi
if [ "${CONFIG[ASAN]}" = "y" -a "${CONFIG[TSAN]}" = "y" ]; then
if [[ "${CONFIG[ASAN]}" = "y" && "${CONFIG[TSAN]}" = "y" ]]; then
echo "ERROR: ASAN and TSAN cannot be enabled at the same time."
exit 1
fi
@ -571,15 +586,11 @@ if [[ $sys_name == "FreeBSD" ]]; then
fi
fi
if [[ $sys_name == "FreeBSD" ]]; then
if [[ $sys_name != "Linux" ]]; then
if [[ "${CONFIG[VHOST]}" == "y" ]]; then
echo "Vhost is only supported on Linux."
exit 1
fi
if [[ "${CONFIG[VHOST_INTERNAL_LIB]}" == "y" ]]; then
echo "Internal rte_vhost library is only supported on Linux."
exit 1
fi
if [[ "${CONFIG[VIRTIO]}" == "y" ]]; then
echo "Virtio is only supported on Linux."
exit 1
@ -587,17 +598,22 @@ if [[ $sys_name == "FreeBSD" ]]; then
fi
if [ "${CONFIG[RDMA]}" = "y" ]; then
if [[ ! "${CONFIG[RDMA_PROV]}" == "verbs" ]] && [[ ! "${CONFIG[RDMA_PROV]}" == "mlx5_dv" ]]; then
echo "Invalid RDMA provider specified, must be \"verbs\" or \"mlx5_dv\""
exit 1
fi
if ! echo -e '#include <infiniband/verbs.h>\n#include <rdma/rdma_verbs.h>\n' \
'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -libverbs -lrdmacm - 2>/dev/null; then
echo --with-rdma requires libverbs and librdmacm.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -libverbs -lrdmacm - 2> /dev/null; then
echo "--with-rdma requires libverbs and librdmacm."
echo "Please install then re-run this script."
exit 1
fi
if echo -e '#include <infiniband/verbs.h>\n' \
'int main(void) { return !!IBV_WR_SEND_WITH_INV; }\n' \
| ${BUILD_CMD[@]} -c - 2>/dev/null; then
| "${BUILD_CMD[@]}" -c - 2> /dev/null; then
CONFIG[RDMA_SEND_WITH_INVAL]="y"
else
CONFIG[RDMA_SEND_WITH_INVAL]="n"
@ -619,13 +635,26 @@ than or equal to 4.14 will see significantly reduced performance.
if echo -e '#include <rdma/rdma_cma.h>\n' \
'int main(void) { return !!RDMA_OPTION_ID_ACK_TIMEOUT; }\n' \
| ${BUILD_CMD[@]} -c - 2>/dev/null; then
| "${BUILD_CMD[@]}" -c - 2> /dev/null; then
CONFIG[RDMA_SET_ACK_TIMEOUT]="y"
else
CONFIG[RDMA_SET_ACK_TIMEOUT]="n"
echo "RDMA_OPTION_ID_ACK_TIMEOUT is not supported"
fi
if [ "${CONFIG[RDMA_PROV]}" == "mlx5_dv" ]; then
if ! echo -e '#include <spdk/stdinc.h>\n' \
'#include <infiniband/mlx5dv.h>\n' \
'#include <rdma/rdma_cma.h>\n' \
'int main(void) { return rdma_establish(NULL) || ' \
'!!IBV_QP_INIT_ATTR_SEND_OPS_FLAGS || !!MLX5_OPCODE_RDMA_WRITE; }\n' \
| "${BUILD_CMD[@]}" -lmlx5 -I${rootdir}/include -c - 2> /dev/null; then
echo "mlx5_dv provider is not supported"
exit 1
fi
fi
echo "Using '${CONFIG[RDMA_PROV]}' RDMA provider"
fi
if [[ "${CONFIG[FC]}" = "y" ]]; then
@ -639,7 +668,7 @@ fi
if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
if [[ "${HAVE_NASM}" = "n" ]] && [[ $arch == x86_64* ]]; then
echo "ERROR: ISA-L, compression & crypto require NASM version 2.13.03 or newer."
echo "ERROR: ISA-L, compression & crypto require NASM version 2.14 or newer."
echo "Please install or upgrade them re-run this script."
exit 1
else
@ -649,57 +678,29 @@ if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then
fi
fi
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then
echo "ISA-L was not found; To install ISA-L run:"
echo " git submodule update --init"
exit 1
fi
cd $rootdir/isa-l
ISAL_LOG=$rootdir/isa-l/spdk-isal.log
echo -n "Configuring ISA-L (logfile: $ISAL_LOG)..."
./autogen.sh &> $ISAL_LOG
./configure CFLAGS="-fPIC -g -O2" --enable-shared=no >> $ISAL_LOG 2>&1
echo "done."
cd $rootdir
fi
if [[ "${CONFIG[PMDK]}" = "y" ]]; then
if ! echo -e '#include <libpmemblk.h>\nint main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -lpmemblk - 2>/dev/null; then
echo --with-pmdk requires libpmemblk.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -lpmemblk - 2> /dev/null; then
echo "--with-pmdk requires libpmemblk."
echo "Please install then re-run this script."
exit 1
fi
fi
if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
if ! echo -e '#include <libpmem.h>\nint main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -lpmem - 2>/dev/null; then
echo --with-reduce requires libpmem.
echo Please install then re-run this script.
exit 1
fi
fi
if [[ "${CONFIG[VPP]}" = "y" ]]; then
if [ ! -z "${CONFIG[VPP_DIR]}" ]; then
VPP_CFLAGS="-L${CONFIG[VPP_DIR]}/lib -I${CONFIG[VPP_DIR]}/include"
fi
if ! echo -e '#include <vnet/session/application_interface.h>\nint main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} ${VPP_CFLAGS} -lvppinfra -lsvm -lvlibmemoryclient - 2>/dev/null; then
echo --with-vpp requires installed vpp.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -lpmem - 2> /dev/null; then
echo "--with-reduce requires libpmem."
echo "Please install then re-run this script."
exit 1
fi
fi
if [[ "${CONFIG[NVME_CUSE]}" = "y" ]]; then
if ! echo -e '#define FUSE_USE_VERSION 31\n#include <fuse3/cuse_lowlevel.h>\n#include <fuse3/fuse_lowlevel.h>\n#include <fuse3/fuse_opt.h>\nint main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -lfuse3 -D_FILE_OFFSET_BITS=64 - 2>/dev/null; then
echo --with-cuse requires libfuse3.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -lfuse3 -D_FILE_OFFSET_BITS=64 - 2> /dev/null; then
echo "--with-cuse requires libfuse3."
echo "Please install then re-run this script."
exit 1
fi
fi
@ -707,9 +708,9 @@ fi
if [[ "${CONFIG[RBD]}" = "y" ]]; then
if ! echo -e '#include <rbd/librbd.h>\n#include <rados/librados.h>\n' \
'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -lrados -lrbd - 2>/dev/null; then
echo --with-rbd requires librados and librbd.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -lrados -lrbd - 2> /dev/null; then
echo "--with-rbd requires librados and librbd."
echo "Please install then re-run this script."
exit 1
fi
fi
@ -721,46 +722,39 @@ if [[ "${CONFIG[ISCSI_INITIATOR]}" = "y" ]]; then
'#error\n' \
'#endif\n' \
'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -L/usr/lib64/iscsi -liscsi - 2>/dev/null; then
echo --with-iscsi-initiator requires libiscsi with
echo 'LIBISCSI_API_VERSION >= 20150621.'
echo Please install then re-run this script.
exit 1
fi
fi
if [[ "${CONFIG[LOG_BACKTRACE]}" = "y" ]]; then
if ! echo -e '#include <libunwind.h>\nint main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -lunwind - 2>/dev/null; then
echo --enable-log-bt requires libunwind.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -L/usr/lib64/iscsi -liscsi - 2> /dev/null; then
echo "--with-iscsi-initiator requires libiscsi with"
echo "LIBISCSI_API_VERSION >= 20150621."
echo "Please install then re-run this script."
exit 1
fi
fi
if [[ "${CONFIG[ASAN]}" = "y" ]]; then
if ! echo -e 'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -fsanitize=address - 2>/dev/null; then
echo --enable-asan requires libasan.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -fsanitize=address - 2> /dev/null; then
echo "--enable-asan requires libasan."
echo "Please install then re-run this script."
exit 1
fi
fi
if [[ "${CONFIG[UBSAN]}" = "y" ]]; then
if ! echo -e 'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -fsanitize=undefined - 2>/dev/null; then
echo --enable-ubsan requires libubsan.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -fsanitize=undefined - 2> /dev/null; then
echo "--enable-ubsan requires libubsan."
echo "Please install then re-run this script."
echo "If installed, please check that the GCC version is at least 6.4"
echo "and synchronize CC accordingly."
exit 1
fi
fi
if [[ "${CONFIG[TSAN]}" = "y" ]]; then
if ! echo -e 'int main(void) { return 0; }\n' \
| ${BUILD_CMD[@]} -fsanitize=thread - 2>/dev/null; then
echo --enable-tsan requires libtsan.
echo Please install then re-run this script.
| "${BUILD_CMD[@]}" -fsanitize=thread - 2> /dev/null; then
echo "--enable-tsan requires libtsan."
echo "Please install then re-run this script."
exit 1
fi
fi
@ -791,6 +785,11 @@ if [[ "${CONFIG[URING]}" = "y" ]]; then
echo "${CONFIG[URING_PATH]}: directory not found"
exit 1
fi
elif ! echo -e '#include <liburing.h>\nint main(void) { return 0; }\n' \
| "${BUILD_CMD[@]}" -luring - 2> /dev/null; then
echo "--with-uring requires liburing."
echo "Please build and install then re-run this script."
exit 1
fi
fi
@ -802,22 +801,51 @@ if [[ "${CONFIG[FUSE]}" = "y" ]]; then
fi
fi
if [ "${CONFIG[CET]}" = "y" ]; then
if ! echo -e 'int main(void) { return 0; }\n' | "${BUILD_CMD[@]}" -fcf-protection - 2> /dev/null; then
echo "--enable-cet requires compiler/linker that supports CET."
echo "Please install then re-run this script."
exit 1
fi
fi
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
if [ ! -f "$rootdir"/isa-l/autogen.sh ]; then
echo "ISA-L was not found; To install ISA-L run:"
echo " git submodule update --init"
exit 1
fi
cd $rootdir/isa-l
ISAL_LOG=$rootdir/isa-l/spdk-isal.log
if [[ -n "${CONFIG[CROSS_PREFIX]}" ]]; then
ISAL_OPTS=("--host=${CONFIG[CROSS_PREFIX]}")
else
ISAL_OPTS=()
fi
echo -n "Configuring ISA-L (logfile: $ISAL_LOG)..."
./autogen.sh &> $ISAL_LOG
./configure CFLAGS="-fPIC -g -O2" "${ISAL_OPTS[@]}" --enable-shared=no >> $ISAL_LOG 2>&1
echo "done."
cd $rootdir
fi
# We are now ready to generate final configuration. But first do sanity
# check to see if all keys in CONFIG array have its reflection in CONFIG file.
if [ $(egrep -c "^\s*CONFIG_[[:alnum:]_]+=" $rootdir/CONFIG) -ne ${#CONFIG[@]} ]; then
if (($(grep -cE "^\s*CONFIG_[[:alnum:]_]+=" "$rootdir/CONFIG") != ${#CONFIG[@]})); then
echo ""
echo "BUG: Some configuration options are not present in CONFIG file. Please update this file."
echo "Missing options in CONFIG (+) file and in current config (-): "
diff -u --label "CONFIG file" --label "CONFIG[@]" \
<(sed -r -e '/^\s*$/d; /^\s*#.*/d; s/(CONFIG_[[:alnum:]_]+)=.*/\1/g' CONFIG | sort) \
<(printf "CONFIG_%s\n" ${!CONFIG[@]} | sort)
<(printf "CONFIG_%s\n" "${!CONFIG[@]}" | sort)
exit 1
fi
echo -n "Creating mk/config.mk..."
cp -f $rootdir/CONFIG $rootdir/mk/config.mk
for key in ${!CONFIG[@]}; do
sed -i.bak -r "s#^\s*CONFIG_${key}=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" $rootdir/mk/config.mk
for key in "${!CONFIG[@]}"; do
sed -i.bak -r "s#[[:space:]]*CONFIG_${key}=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" $rootdir/mk/config.mk
done
# On FreeBSD sed -i 'SUFFIX' - SUFFIX is mandatory. So no way but to delete the backed file.
rm -f $rootdir/mk/config.mk.bak
@ -835,7 +863,7 @@ echo "done."
# Create .sh with build config for easy sourcing|lookup during the tests.
for conf in "${!CONFIG[@]}"; do
echo "CONFIG_$conf=${CONFIG[$conf]}"
done >"$rootdir/test/common/build_config.sh"
done > "$rootdir/test/common/build_config.sh"
if [[ $sys_name == "FreeBSD" ]]; then
echo "Type 'gmake' to build."

42
deprecation.md Normal file
View File

@ -0,0 +1,42 @@
# ABI and API Deprecation {#deprecation}
This document details the policy for maintaining stability of SPDK ABI and API.
Major ABI version can change at most once for each quarterly SPDK release.
ABI versions are managed separately for each library and follow [Semantic Versoning](https://semver.org/).
API and ABI deprecation notices shall be posted in the next section.
Each entry must describe what will be removed and can suggest the future use or alternative.
Specific future SPDK release for the removal must be provided.
ABI cannot be removed without providing deprecation notice for at least single SPDK release.
# Deprecation Notices {#deprecation-notices}
## net
The net library is deprecated and will be removed in the 21.07 release.
## nvmf
The following APIs have been deprecated and will be removed in SPDK 21.07:
- `spdk_nvmf_poll_group_get_stat` (function in `nvmf.h`),
- `spdk_nvmf_transport_poll_group_get_stat` (function in `nvmf.h`),
- `spdk_nvmf_transport_poll_group_free_stat`(function in `nvmf.h`),
- `spdk_nvmf_rdma_device_stat` (struct in `nvmf.h`),
- `spdk_nvmf_transport_poll_group_stat` (struct in `nvmf.h`),
- `poll_group_get_stat` (transport op in `nvmf_transport.h`),
- `poll_group_free_stat` (transport op in `nvmf_transport.h`).
Please use `spdk_nvmf_poll_group_dump_stat` and `poll_group_dump_stat` instead.
## rpc
Parameter `enable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `enable-zerocopy-send-server` or `enable-zerocopy-send-client` instead.
Parameter `disable-zerocopy-send` of RPC `sock_impl_set_options` is deprecated and will be removed in SPDK 21.07,
use `disable-zerocopy-send-server` or `disable-zerocopy-send-client` instead.
## rpm
`pkg/spdk.spec` is considered to be deprecated and scheduled for removal in SPDK 21.07.
Please use `rpmbuild/spdk.spec` instead and see
[RPM documentation](https://spdk.io/doc/rpm.html) for more details.

View File

@ -234,7 +234,7 @@ ALIASES =
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
TCL_SUBST =
# TCL_SUBST =
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
@ -795,13 +795,16 @@ INPUT += \
misc.md \
driver_modules.md \
tools.md \
ci_tools.md \
performance_reports.md \
# All remaining pages are listed here in alphabetical order by filename.
INPUT += \
about.md \
accel_fw.md \
applications.md \
bdev.md \
bdevperf.md \
bdev_module.md \
bdev_pg.md \
blob.md \
@ -810,6 +813,7 @@ INPUT += \
compression.md \
concurrency.md \
containers.md \
../deprecation.md \
event.md \
ftl.md \
gdb_macros.md \
@ -819,19 +823,24 @@ INPUT += \
iscsi.md \
jsonrpc.md \
jsonrpc_proxy.md \
libraries.md \
lvol.md \
memory.md \
notify.md \
nvme.md \
nvme-cli.md \
nvme_spec.md \
nvmf.md \
nvmf_tgt_pg.md \
nvmf_tracing.md \
overview.md \
peer_2_peer.md \
pkgconfig.md \
porting.md \
rpm.md \
scheduler.md \
shfmt.md \
spdkcli.md \
spdk_top.md \
ssd_internals.md \
system_configuration.md \
userspace.md \
@ -839,8 +848,7 @@ INPUT += \
vhost.md \
vhost_processing.md \
virtio.md \
vmd.md \
vpp_integration.md
vmd.md
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -1097,7 +1105,7 @@ ALPHABETICAL_INDEX = YES
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
COLS_IN_ALPHA_INDEX = 5
# COLS_IN_ALPHA_INDEX = 5
# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
@ -1658,7 +1666,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = YES
GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@ -2162,7 +2170,7 @@ EXTERNAL_PAGES = YES
# interpreter (i.e. the result of 'which perl').
# The default file (with absolute path) is: /usr/bin/perl.
PERL_PATH = /usr/bin/perl
# PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
@ -2184,7 +2192,7 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
MSCGEN_PATH =
# MSCGEN_PATH =
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The

107
doc/accel_fw.md Normal file
View File

@ -0,0 +1,107 @@
# Acceleration Framework {#accel_fw}
SPDK provides a framework for abstracting general acceleration capabilities
that can be implemented through plug-in modules and low-level libraries. These
plug-in modules include support for hardware acceleration engines such as
the Intel(R) I/O Acceleration Technology (IOAT) engine and the Intel(R) Data
Streaming Accelerator (DSA) engine. Additionally, a software plug-in module
exists to enable use of the framework in environments without hardware
acceleration capabilities. ISA/L is used for optimized CRC32C calculation within
the software module.
The framework includes an API for getting the current capabilities of the
selected module. See [`spdk_accel_get_capabilities`](https://spdk.io/doc/accel__engine_8h.html) for more details. For the software module, all capabilities will be reported as supported. For the hardware modules, only functions accelerated by hardware will be reported however any function can still be called, it will just be backed by software if it is not reported as a supported capability.
# Acceleration Framework Functions {#accel_functions}
Functions implemented via the framework can be found in the DoxyGen documentation of the
framework public header file here [accel_engine.h](https://spdk.io/doc/accel__engine_8h.html)
# Acceleration Framework Design Considerations {#accel_dc}
The general interface is defined by `/include/accel_engine.h` and implemented
in `/lib/accel`. These functions may be called by an SPDK application and in
most cases, except where otherwise documented, are asynchronous and follow the
standard SPDK model for callbacks with a callback argument.
If the acceleration framework is started without initializing a hardware module,
optimized software implementations of the functions will back the public API.
Additionally, if any hardware module does not support a specific function and that
hardware module is initialized, the specific function will fallback to a software
optimized implementation. For example, IOAT does not support the dualcast function
in hardware but if the IOAT module has been initialized and the public dualcast API
is called, it will actually be done via software behind the scenes.
# Acceleration Low Level Libraries {#accel_libs}
Low level libraries provide only the most basic functions that are specific to
the hardware. Low level libraries are located in the '/lib' directory with the
exception of the software implementation which is implemented as part of the
framework itself. The software low level library does not expose a public API.
Applications may choose to interact directly with a low level library if there are
specific needs/considerations not met via accessing the library through the
framework/module. Note that when using the low level libraries directly, the
framework abstracted interface is bypassed as the application will call the public
functions exposed by the individual low level libraries. Thus, code written this
way needs to be certain that the underlying hardware exists everywhere that it runs.
The low level library for IOAT is located in `/lib/ioat`. The low level library
for DSA is in `/liv/idxd` (IDXD stands for Intel(R) Data Acceleration Driver).
# Acceleration Plug-In Modules {#accel_modules}
Plug-in modules depend on low level libraries to interact with the hardware and
add additional functionality such as queueing during busy conditions or flow
control in some cases. The framework in turn depends on the modules to provide
the complete implementation of the acceleration component. A module must be
selected via startup RPC when the application is started. Otherwise, if no startup
RPC is provided, the framework is available and will use the software plug-in module.
## IOAT Module {#accel_ioat}
To use the IOAT engine, use the RPC [`ioat_scan_accel_engine`](https://spdk.io/doc/jsonrpc.html) before starting the application.
## IDXD Module {#accel_idxd}
To use the DSA engine, use the RPC [`idxd_scan_accel_engine`](https://spdk.io/doc/jsonrpc.html) with an optional parameter of `-c` and provide a configuration number of either 0 or 1. These pre-defined configurations determine how the DSA engine will be setup in terms
of work queues and engines. The DSA engine is very flexible allowing for various configurations of these elements to either account for different quality of service requirements or to isolate hardware paths where the back end media is of varying latency (i.e. persistent memory vs DRAM). The pre-defined configurations are as follows:
0: A single work queue backed with four DSA engines. This is a generic configuration
that enables the hardware to best determine which engine to use as it pulls in new
operations.
1: Two separate work queues each backed with two DSA engines. This is another
generic configuration that is documented in the specification and allows the
application to partition submissions across two work queues. This would be useful
when different priorities might be desired per group.
There are several other configurations that are possible that include quality
of service parameters on the work queues that are not currently utilized by
the module. Specialized use of DSA may require different configurations that
can be added to the module as needed.
## Software Module {#accel_sw}
The software module is enabled by default. If no hardware engine is explicitly
enabled via startup RPC as discussed earlier, the software module will use ISA-L
if available for functions such as CRC32C. Otherwise, standard glibc calls are
used to back the framework API.
## Batching {#batching}
Batching is exposed by the acceleration framework and provides an interface to
batch sets of commands up and then submit them with a single command. The public
API is consistent with the implementation however each plug-in module behaves
differently depending on its capabilities.
The DSA engine has complete support for batching all supported commands together
into one submission. This is advantageous as it reduces the overhead incurred in
the submission process to the hardware.
The software engine supports batching only to be consistent with the framework API.
In software there is no savings by batching sets of commands versus submitting them
individually.
The IOAT engine supports batching but it is only beneficial for `memmove` and `memfill`
as these are supported by the hardware. All other commands can be batched and the
framework will manage all other commands via software.

View File

@ -35,25 +35,22 @@ Param | Long Param | Type | Default | Descript
-i | --shm-id | integer | | @ref cmd_arg_multi_process
-m | --cpumask | CPU mask | 0x1 | application @ref cpu_mask
-n | --mem-channels | integer | all channels | number of memory channels used for DPDK
-p | --master-core | integer | first core in CPU mask | master (primary) core for DPDK
-p | --main-core | integer | first core in CPU mask | main (primary) core for DPDK
-r | --rpc-socket | string | /var/tmp/spdk.sock | RPC listen address
-s | --mem-size | integer | all hugepage memory | @ref cmd_arg_memory_size
| | --silence-noticelog | flag | | disable notice level logging to `stderr`
-u | --no-pci | flag | | @ref cmd_arg_disable_pci_access.
| | --wait-for-rpc | flag | | @ref cmd_arg_deferred_initialization
-B | --pci-blacklist | B:D:F | | @ref cmd_arg_pci_blacklist_whitelist.
-W | --pci-whitelist | B:D:F | | @ref cmd_arg_pci_blacklist_whitelist.
-B | --pci-blocked | B:D:F | | @ref cmd_arg_pci_blocked_allowed.
-A | --pci-allowed | B:D:F | | @ref cmd_arg_pci_blocked_allowed.
-R | --huge-unlink | flag | | @ref cmd_arg_huge_unlink
| | --huge-dir | string | the first discovered | allocate hugepages from a specific mount
-L | --logflag | string | | @ref cmd_arg_debug_log_flags
-L | --logflag | string | | @ref cmd_arg_log_flags
### Configuration file {#cmd_arg_config_file}
Historically, the SPDK applications were configured using a configuration file.
This is still supported, but is considered deprecated in favor of JSON RPC
configuration. See @ref jsonrpc for details.
Note that `--config` and `--wait-for-rpc` cannot be used at the same time.
SPDK applications are configured using a JSON RPC configuration file.
See @ref jsonrpc for details.
### Limit coredump {#cmd_arg_limit_coredump}
@ -124,12 +121,12 @@ If SPDK is run with PCI access disabled it won't detect any PCI devices. This
includes primarily NVMe and IOAT devices. Also, the VFIO and UIO kernel modules
are not required in this mode.
### PCI address blacklist and whitelist {#cmd_arg_pci_blacklist_whitelist}
### PCI address blocked and allowed lists {#cmd_arg_pci_blocked_allowed}
If blacklist is used, then all devices with the provided PCI address will be
ignored. If a whitelist is used, only whitelisted devices will be probed.
`-B` or `-W` can be used more than once, but cannot be mixed together. That is,
`-B` and `-W` cannot be used at the same time.
If blocked list is used, then all devices with the provided PCI address will be
ignored. If an allowed list is used, only allowed devices will be probed.
`-B` or `-A` can be used more than once, but cannot be mixed together. That is,
`-B` and `-A` cannot be used at the same time.
### Unlink hugepage files after initialization {#cmd_arg_huge_unlink}
@ -137,11 +134,11 @@ By default, each DPDK-based application tries to remove any orphaned hugetlbfs
files during its initialization. This option removes hugetlbfs files of the current
process as soon as they're created, but is not compatible with `--shm-id`.
### Debug log {#cmd_arg_debug_log_flags}
### Log flag {#cmd_arg_log_flags}
Enable a specific debug log type. This option can be used more than once. A list of
Enable a specific log type. This option can be used more than once. A list of
all available types is provided in the `--help` output, with `--logflag all`
enabling all of them. Debug logs are only available in debug builds of SPDK.
enabling all of them. Additionally enables debug print level in debug builds of SPDK.
## CPU mask {#cpu_mask}

View File

@ -1,5 +1,9 @@
# Block Device User Guide {#bdev}
# Target Audience {#bdev_ug_targetaudience}
This user guide is intended for software developers who have knowledge of block storage, storage drivers, issuing JSON-RPC commands and storage services such as RAID, compression, crypto, and others.
# Introduction {#bdev_ug_introduction}
The SPDK block device layer, often simply called *bdev*, is a C library
@ -35,72 +39,12 @@ directly from SPDK application by running `scripts/rpc.py rpc_get_methods`.
Detailed help for each command can be displayed by adding `-h` flag as a
command parameter.
# General Purpose RPCs {#bdev_ug_general_rpcs}
# Configuring Block Device Modules {#bdev_ug_general_rpcs}
## bdev_get_bdevs {#bdev_ug_get_bdevs}
Block devices can be configured using JSON RPCs. A complete list of available RPC commands
with detailed information can be found on the @ref jsonrpc_components_bdev page.
List of currently available block devices including detailed information about
them can be get by using `bdev_get_bdevs` RPC command. User can add optional
parameter `name` to get details about specified by that name bdev.
Example response
~~~
{
"num_blocks": 32768,
"assigned_rate_limits": {
"rw_ios_per_sec": 10000,
"rw_mbytes_per_sec": 20
},
"supported_io_types": {
"reset": true,
"nvme_admin": false,
"unmap": true,
"read": true,
"write_zeroes": true,
"write": true,
"flush": true,
"nvme_io": false
},
"driver_specific": {},
"claimed": false,
"block_size": 4096,
"product_name": "Malloc disk",
"name": "Malloc0"
}
~~~
## bdev_set_qos_limit {#bdev_set_qos_limit}
Users can use the `bdev_set_qos_limit` RPC command to enable, adjust, and disable
rate limits on an existing bdev. Two types of rate limits are supported:
IOPS and bandwidth. The rate limits can be enabled, adjusted, and disabled at any
time for the specified bdev. The bdev name is a required parameter for this
RPC command and at least one of `rw_ios_per_sec` and `rw_mbytes_per_sec` must be
specified. When both rate limits are enabled, the first met limit will
take effect. The value 0 may be specified to disable the corresponding rate
limit. Users can run this command with `-h` or `--help` for more information.
## Histograms {#rpc_bdev_histogram}
The `bdev_enable_histogram` RPC command allows to enable or disable gathering
latency data for specified bdev. Histogram can be downloaded by the user by
calling `bdev_get_histogram` and parsed using scripts/histogram.py script.
Example command
`rpc.py bdev_enable_histogram Nvme0n1 --enable`
The command will enable gathering data for histogram on Nvme0n1 device.
`rpc.py bdev_get_histogram Nvme0n1 | histogram.py`
The command will download gathered histogram data. The script will parse
the data and show table containing IO count for latency ranges.
`rpc.py bdev_enable_histogram Nvme0n1 --disable`
The command will disable histogram on Nvme0n1 device.
# Common Block Device Configuration Examples
# Ceph RBD {#bdev_config_rbd}
@ -261,7 +205,7 @@ possibly multiple virtual bdevs.
## SPDK GPT partition table {#bdev_ug_gpt}
The SPDK partition type GUID is `7c5222bd-8f5d-4087-9c00-bf9843c7b58c`. Existing SPDK bdevs
can be exposed as Linux block devices via NBD and then ca be partitioned with
can be exposed as Linux block devices via NBD and then can be partitioned with
standard partitioning tools. After partitioning, the bdevs will need to be deleted and
attached again for the GPT bdev module to see any changes. NBD kernel module must be
loaded first. To create NBD bdev user should use `nbd_start_disk` RPC command.
@ -336,9 +280,9 @@ Example commands
This command will create `aio0` device from /dev/sda.
`rpc.py bdev_aio_create /tmp/file file 8192`
`rpc.py bdev_aio_create /tmp/file file 4096`
This command will create `file` device with block size 8192 from /tmp/file.
This command will create `file` device with block size 4096 from /tmp/file.
To delete an aio bdev use the bdev_aio_delete command.
@ -368,16 +312,22 @@ To remove `Cache1`:
During removal OCF-cache will be stopped and all cached data will be written to the core device.
Note that OCF has a per-device RAM requirement
of about 56000 + _cache device size_ * 58 / _cache line size_ (in bytes).
To get more information on OCF
please visit [OCF documentation](https://open-cas.github.io/).
Note that OCF has a per-device RAM requirement. More details can be found in the
[OCF documentation](https://open-cas.github.io/guide_system_requirements.html).
# Malloc bdev {#bdev_config_malloc}
Malloc bdevs are ramdisks. Because of its nature they are volatile. They are created from hugepage memory given to SPDK
application.
Example command for creating malloc bdev:
`rpc.py bdev_malloc_create -b Malloc0 64 512`
Example command for removing malloc bdev:
`rpc.py bdev_malloc_delete Malloc0`
# Null {#bdev_config_null}
The SPDK null bdev driver is a dummy block I/O target that discards all writes and returns undefined
@ -419,15 +369,22 @@ This command will remove NVMe bdev named Nvme0.
## NVMe bdev character device {#bdev_config_nvme_cuse}
This feature is considered as experimental.
This feature is considered as experimental. You must configure with --with-nvme-cuse
option to enable this RPC.
Example commands
`rpc.py bdev_nvme_cuse_register -n Nvme0 -p spdk/nvme0`
`rpc.py bdev_nvme_cuse_register -n Nvme3
This command will register /dev/spdk/nvme0 character device associated with Nvme0
controller. If there are namespaces created on Nvme0 controller, for each namespace
device /dev/spdk/nvme0nX is created.
This command will register a character device under /dev/spdk associated with Nvme3
controller. If there are namespaces created on Nvme3 controller, a namespace
character device is also created for each namespace.
For example, the first controller registered will have a character device path of
/dev/spdk/nvmeX, where X is replaced with a unique integer to differentiate it from
other controllers. Note that this 'nvmeX' name here has no correlation to the name
associated with the controller in SPDK. Namespace character devices will have a path
of /dev/spdk/nvmeXnY, where Y is the namespace ID.
Cuse devices are removed from system, when NVMe controller is detached or unregistered
with command:
@ -460,7 +417,6 @@ User can get list of available lvol stores using `bdev_lvol_get_lvstores` RPC co
parameters available).
Example response
~~~
{
"uuid": "330a6ab2-f468-11e7-983e-001e67edf35d",
@ -492,26 +448,6 @@ Example commands
`rpc.py bdev_lvol_create lvol2 25 -u 330a6ab2-f468-11e7-983e-001e67edf35d`
# RAID {#bdev_ug_raid}
RAID virtual bdev module provides functionality to combine any SPDK bdevs into
one RAID bdev. Currently SPDK supports only RAID 0. RAID functionality does not
store on-disk metadata on the member disks, so user must recreate the RAID
volume when restarting application. User may specify member disks to create RAID
volume event if they do not exists yet - as the member disks are registered at
a later time, the RAID module will claim them and will surface the RAID volume
after all of the member disks are available. It is allowed to use disks of
different sizes - the smallest disk size will be the amount of space used on
each member disk.
Example commands
`rpc.py bdev_raid_create -n Raid0 -z 64 -r 0 -b "lvol0 lvol1 lvol2 lvol3"`
`rpc.py bdev_raid_get_bdevs`
`rpc.py bdev_raid_delete Raid0`
# Passthru {#bdev_config_passthru}
The SPDK Passthru virtual block device module serves as an example of how to write a
@ -561,6 +497,65 @@ To remove a block device representation use the bdev_pmem_delete command.
`rpc.py bdev_pmem_delete pmem`
# RAID {#bdev_ug_raid}
RAID virtual bdev module provides functionality to combine any SPDK bdevs into
one RAID bdev. Currently SPDK supports only RAID 0. RAID functionality does not
store on-disk metadata on the member disks, so user must recreate the RAID
volume when restarting application. User may specify member disks to create RAID
volume event if they do not exists yet - as the member disks are registered at
a later time, the RAID module will claim them and will surface the RAID volume
after all of the member disks are available. It is allowed to use disks of
different sizes - the smallest disk size will be the amount of space used on
each member disk.
Example commands
`rpc.py bdev_raid_create -n Raid0 -z 64 -r 0 -b "lvol0 lvol1 lvol2 lvol3"`
`rpc.py bdev_raid_get_bdevs`
`rpc.py bdev_raid_delete Raid0`
# Split {#bdev_ug_split}
The split block device module takes an underlying block device and splits it into
several smaller equal-sized virtual block devices. This serves as an example to create
more vbdevs on a given base bdev for user testing.
Example commands
To create four split bdevs with base bdev_b0 use the `bdev_split_create` command.
Each split bdev will be one fourth the size of the base bdev.
`rpc.py bdev_split_create bdev_b0 4`
The `split_size_mb`(-s) parameter restricts the size of each split bdev.
The total size of all split bdevs must not exceed the base bdev size.
`rpc.py bdev_split_create bdev_b0 4 -s 128`
To remove the split bdevs, use the `bdev_split_delete` command with the base bdev name.
`rpc.py bdev_split_delete bdev_b0`
# Uring {#bdev_ug_uring}
The uring bdev module issues I/O to kernel block devices using the io_uring Linux kernel API. This module requires liburing.
For more information on io_uring refer to kernel [IO_uring] (https://kernel.dk/io_uring.pdf)
The user needs to configure SPDK to include io_uring support:
`configure --with-uring`
To create a uring bdev with given filename, bdev name and block size use the `bdev_uring_create` RPC.
`rpc.py bdev_uring_create /path/to/device bdev_u0 512`
To remove a uring bdev use the `bdev_uring_delete` RPC.
`rpc.py bdev_uring_delete bdev_u0`
# Virtio Block {#bdev_config_virtio_blk}
The Virtio-Block driver allows creating SPDK bdevs from Virtio-Block devices.

View File

@ -18,7 +18,7 @@ how to write a module.
## Creating A New Module
Block device modules are located in subdirectories under lib/bdev today. It is not
Block device modules are located in subdirectories under module/bdev today. It is not
currently possible to place the code for a bdev module elsewhere, but updates
to the build system could be made to enable this in the future. To create a
module, add a new directory with a single C file and a Makefile. A great
@ -137,6 +137,15 @@ block device. Once the I/O request is completed, the module must call
spdk_bdev_io_complete(). The I/O does not have to finish within the calling
context of `submit_request`.
Integrating a new bdev module into the build system requires updates to various
files in the /mk directory.
## Creating Bdevs in an External Repository
A User can build their own bdev module and application on top of existing SPDK libraries. The example in
test/external_code serves as a template for creating, building and linking an external
bdev module. Refer to test/external_code/README.md and @ref so_linking for further information.
## Creating Virtual Bdevs
Block devices are considered virtual if they handle I/O requests by routing
@ -144,7 +153,7 @@ the I/O to other block devices. The canonical example would be a bdev module
that implements RAID. Virtual bdevs are created in the same way as regular
bdevs, but take one additional step. The module can look up the underlying
bdevs it wishes to route I/O to using spdk_bdev_get_by_name(), where the string
name is provided by the user in a configuration file or via an RPC. The module
name is provided by the user via an RPC. The module
then may proceed is normal by opening the bdev to obtain a descriptor, and
creating I/O channels for the bdev (probably in response to the
`get_io_channel` callback). The final step is to have the module use its open

86
doc/bdevperf.md Normal file
View File

@ -0,0 +1,86 @@
# Using bdevperf application {#bdevperf}
## Introduction
bdevperf is an SPDK application that is used for performance testing
of block devices (bdevs) exposed by the SPDK bdev layer. It is an
alternative to the SPDK bdev fio plugin for benchmarking SPDK bdevs.
In some cases, bdevperf can provide much lower overhead than the fio
plugin, resulting in much better performance for tests using a limited
number of CPU cores.
bdevperf exposes command line interface that allows to specify
SPDK framework options as well as testing options.
Since SPDK 20.07, bdevperf supports configuration file that is similar
to FIO. It allows user to create jobs parameterized by
filename, cpumask, blocksize, queuesize, etc.
## Config file
Bdevperf's config file is similar to FIO's config file format.
Below is an example config file that uses all available parameters:
~~~{.ini}
[global]
filename=Malloc0:Malloc1
bs=1024
iosize=256
rw=randrw
rwmixread=90
[A]
cpumask=0xff
[B]
cpumask=[0-128]
filename=Malloc1
[global]
filename=Malloc0
rw=write
[C]
bs=4096
iosize=128
offset=1000000
length=1000000
~~~
Jobs `[A]` `[B]` or `[C]`, inherit default values from `[global]`
section residing above them. So in the example, job `[A]` inherits
`filename` value and uses both `Malloc0` and `Malloc1` bdevs as targets,
job `[B]` overrides its `filename` value and uses `Malloc1` and
job `[C]` inherits value `Malloc0` for its `filename`.
Interaction with CLI arguments is not the same as in FIO however.
If bdevperf receives CLI argument, it overrides values
of corresponding parameter for all `[global]` sections of config file.
So if example config is used, specifying `-q` argument
will make jobs `[A]` and `[B]` use its value.
Below is a full list of supported parameters with descriptions.
Param | Default | Description
--------- | ----------------- | -----------
filename | | Bdevs to use, separated by ":"
cpumask | Maximum available | CPU mask. Format is defined at @ref cpu_mask
bs | | Block size (io size)
iodepth | | Queue depth
rwmixread | `50` | Percentage of a mixed workload that should be reads
offset | `0` | Start I/O at the provided offset on the bdev
length | 100% of bdev size | End I/O at `offset`+`length` on the bdev
rw | | Type of I/O pattern
Available rw types:
- read
- randread
- write
- randwrite
- verify
- reset
- unmap
- write_zeroes
- flush
- rw
- randrw

View File

@ -225,7 +225,7 @@ with SPDK API.
### Error Handling
Asynchronous Blobstore callbacks all include an error number that should be checked; non-zero values
indicate and error. Synchronous calls will typically return an error value if applicable.
indicate an error. Synchronous calls will typically return an error value if applicable.
### Asynchronous API

View File

@ -14,30 +14,30 @@ make
~~~
Clone the RocksDB repository from the SPDK GitHub fork into a separate directory.
Make sure you check out the `spdk-v5.14.3` branch.
Make sure you check out the `6.15.fb` branch.
~~~{.sh}
cd ..
git clone -b spdk-v5.14.3 https://github.com/spdk/rocksdb.git
git clone -b 6.15.fb https://github.com/spdk/rocksdb.git
~~~
Build RocksDB. Only the `db_bench` benchmarking tool is integrated with BlobFS.
~~~{.sh}
cd rocksdb
make db_bench SPDK_DIR=path/to/spdk
make db_bench SPDK_DIR=relative_path/to/spdk
~~~
Or you can also add `DEBUG_LEVEL=0` for a release build (need to turn on `USE_RTTI`).
~~~{.sh}
export USE_RTTI=1 && make db_bench DEBUG_LEVEL=0 SPDK_DIR=path/to/spdk
export USE_RTTI=1 && make db_bench DEBUG_LEVEL=0 SPDK_DIR=relative_path/to/spdk
~~~
Create an NVMe section in the configuration file using SPDK's `gen_nvme.sh` script.
~~~{.sh}
scripts/gen_nvme.sh > /usr/local/etc/spdk/rocksdb.conf
scripts/gen_nvme.sh --json-with-subsystems > /usr/local/etc/spdk/rocksdb.json
~~~
Verify the configuration file has specified the correct NVMe SSD.
@ -54,7 +54,7 @@ HUGEMEM=5120 scripts/setup.sh
Create an empty SPDK blobfs for testing.
~~~{.sh}
test/blobfs/mkfs/mkfs /usr/local/etc/spdk/rocksdb.conf Nvme0n1
test/blobfs/mkfs/mkfs /usr/local/etc/spdk/rocksdb.json Nvme0n1
~~~
At this point, RocksDB is ready for testing with SPDK. Three `db_bench` parameters are used to configure SPDK:
@ -74,7 +74,7 @@ BlobFS provides a FUSE plug-in to mount an SPDK BlobFS as a kernel filesystem fo
The FUSE plug-in requires fuse3 and will be built automatically when fuse3 is detected on the system.
~~~{.sh}
test/blobfs/fuse/fuse /usr/local/etc/spdk/rocksdb.conf Nvme0n1 /mnt/fuse
test/blobfs/fuse/fuse /usr/local/etc/spdk/rocksdb.json Nvme0n1 /mnt/fuse
~~~
Note that the FUSE plug-in has some limitations - see the list below.

6
doc/ci_tools.md Normal file
View File

@ -0,0 +1,6 @@
# CI Tools {#ci_tools}
Section describing tools used by CI to verify integrity of the submitted
patches ([status](https://ci.spdk.io)).
- @subpage shfmt

View File

@ -117,14 +117,10 @@ framework for all of the example applications it shipped with, in the interest
of supporting the widest variety of frameworks possible. But the applications do
of course require something that implements an asynchronous event loop in order
to run, so enter the `event` framework located in `lib/event`. This framework
includes things like spawning one thread per core, pinning each thread to a
unique core, polling and scheduling the lightweight threads, installing signal
handlers to cleanly shutdown, and basic command line option parsing. When
started through spdk_app_start(), the library automatically spawns all of the
threads requested, pins them, and is ready for lightweight threads to be
created. This makes it much easier to implement a brand new SPDK application and
is the recommended method for those starting out. Only established applications
should consider directly integrating the lower level libraries.
includes things like polling and scheduling the lightweight threads, installing
signal handlers to cleanly shutdown, and basic command line option parsing.
Only established applications should consider directly integrating the lower
level libraries.
# Limitations of the C Language

View File

@ -16,7 +16,7 @@ runtime with lightweight virtual machines that feel and perform like
containers, but provide stronger workload isolation using hardware
virtualization technology as a second layer of defense.
From Kata Containers [1.11.0-alpha1](https://github.com/kata-containers/runtime/releases/tag/1.11.0-alpha1),
From Kata Containers [1.11.0](https://github.com/kata-containers/runtime/releases/tag/1.11.0),
vhost-user-blk support is enabled in `kata-containers/runtime`. That is to say
SPDK vhost target can be used to provide volume service to Kata Containers directly.
In addition, a container manager like Docker, can be configured easily to launch

View File

@ -213,7 +213,7 @@ To verify that the drive is emulated correctly, one can check the output of the
device):
```
$ examples/nvme/identify/identify
$ build/examples/identify
=====================================================
NVMe Controller at 0000:00:0a.0 [1d1d:1f1f]
=====================================================

View File

@ -1,5 +1,6 @@
# General Information {#general}
- @subpage event
- @subpage scheduler
- @subpage logical_volumes
- @subpage vpp_integration
- @subpage accel_fw

View File

@ -110,7 +110,7 @@ with no arguments to see the help output. If your system has its IOMMU
enabled you can run the examples as your regular user. If it doesn't, you'll
need to run as a privileged user (root).
A good example to start with is `examples/nvme/identify/identify`, which prints
A good example to start with is `build/examples/identify`, which prints
out information about all of the NVMe devices on your system.
Larger, more fully functional applications are available in the `app`

View File

@ -9,7 +9,14 @@
Function | Description
--------------------------------------- | -----------
spdk_idxd_probe() | @copybrief spdk_idxd_probe()
spdk_idxd_batch_get_max() | @copybrief spdk_idxd_batch_get_max()
spdk_idxd_batch_create() | @copybrief spdk_idxd_batch_create()
spdk_idxd_batch_prep_copy() | @copybrief spdk_idxd_batch_prep_copy()
spdk_idxd_batch_submit() | @copybrief spdk_idxd_batch_submit()
spdk_idxd_submit_copy() | @copybrief spdk_idxd_submit_copy()
spdk_idxd_submit_compare() | @copybrief spdk_idxd_submit_compare()
spdk_idxd_submit_crc32c() | @copybrief spdk_idxd_submit_crc32c()
spdk_idxd_submit_dualcast | @copybrief spdk_idxd_submit_dualcast()
spdk_idxd_submit_fill() | @copybrief spdk_idxd_submit_fill()
# Pre-defined configurations {#idxd_configs}

View File

@ -1,4 +1,4 @@
# Storage Performance Development Kit {#index}
# Storage Performance Development Kit {#mainpage}
# Introduction
@ -32,6 +32,10 @@
@copydoc tools
# CI Tools
@copydoc ci_tools
# Performance Reports
@copydoc performance_reports

View File

@ -4,4 +4,5 @@
- @subpage getting_started
- @subpage vagrant
- @subpage changelog
- @subpage deprecation
- [Source Code (GitHub)](https://github.com/spdk/spdk)

View File

@ -10,7 +10,7 @@ This following section describes how to run iscsi from your cloned package.
This guide starts by assuming that you can already build the standard SPDK distribution on your
platform.
Once built, the binary will be in `app/iscsi_tgt`.
Once built, the binary will be in `build/bin`.
If you want to kill the application by using signal, make sure use the SIGTERM, then the application
will release all the shared memory resource before exit, the SIGKILL will make the shared memory
@ -23,24 +23,6 @@ document.
![iSCSI structure](iscsi.svg)
## Configuring iSCSI Target via config file {#iscsi_config}
A `iscsi_tgt` specific configuration file is used to configure the iSCSI target. A fully documented
example configuration file is located at `etc/spdk/iscsi.conf.in`.
The configuration file is used to configure the SPDK iSCSI target. This file defines the following:
TCP ports to use as iSCSI portals; general iSCSI parameters; initiator names and addresses to allow
access to iSCSI target nodes; number and types of storage backends to export over iSCSI LUNs; iSCSI
target node mappings between portal groups, initiator groups, and LUNs.
You should make a copy of the example configuration file, modify it to suit your environment, and
then run the iscsi_tgt application and pass it the configuration file using the -c option. Right now,
the target requires elevated privileges (root) to run.
~~~
app/iscsi_tgt/iscsi_tgt -c /path/to/iscsi.conf
~~~
### Assigning CPU Cores to the iSCSI Target {#iscsi_config_lcore}
SPDK uses the [DPDK Environment Abstraction Layer](http://dpdk.org/doc/guides/prog_guide/env_abstraction_layer.html)
@ -57,26 +39,9 @@ command line option is used to configure the SPDK iSCSI target:
This is a hexadecimal bit mask of the CPU cores where the iSCSI target will start polling threads.
In this example, CPU cores 24, 25, 26 and 27 would be used.
### Configuring a LUN in the iSCSI Target {#iscsi_lun}
Each LUN in an iSCSI target node is associated with an SPDK block device. See @ref bdev
for details on configuring SPDK block devices. The block device to LUN mappings are specified in the
configuration file as:
~~~~
[TargetNodeX]
LUN0 Malloc0
LUN1 Nvme0n1
~~~~
This exports a malloc'd target. The disk is a RAM disk that is a chunk of memory allocated by iscsi in
user space. It will use offload engine to do the copy job instead of memcpy if the system has enough DMA
channels.
## Configuring iSCSI Target via RPC method {#iscsi_rpc}
In addition to the configuration file, the iSCSI target may also be configured via JSON-RPC calls. See
@ref jsonrpc for details.
The iSCSI target is configured via JSON-RPC calls. See @ref jsonrpc for details.
### Portal groups
@ -218,7 +183,7 @@ echo "1024" > /sys/block/sdc/queue/nr_requests
### Example: Configure simple iSCSI Target with one portal and two LUNs
Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs (Malloc0 and Malloc),
Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs (Malloc0 and Malloc1),
and accepting initiators on 10.0.0.2/32, like on diagram below:
![Sample iSCSI configuration](iscsi_example.svg)
@ -227,7 +192,7 @@ Assuming we have one iSCSI Target server with portal at 10.0.0.1:3200, two LUNs
Start iscsi_tgt application:
```
./app/iscsi_tgt/iscsi_tgt
./build/bin/iscsi_tgt
```
Construct two 64MB Malloc block devices with 512B sector size "Malloc0" and "Malloc1":
@ -324,11 +289,39 @@ At the iSCSI level, we provide the following support for Hotplug:
wait for all the commands which have already been submitted to block device to
return back; after all the commands return back, the LUN will be deleted.
## Known bugs and limitations {#iscsi_hotplug_bugs}
For write command, if you want to test hotplug with write command which will
cause r2t, for example 1M size IO, it will crash the iscsi tgt.
For read command, if you want to test hotplug with large read IO, for example 1M
size IO, it will probably crash the iscsi tgt.
@sa spdk_nvme_probe
# iSCSI Login Redirection {#iscsi_login_redirection}
The SPDK iSCSI target application supports iSCSI login redirection feature.
A portal refers to an IP address and TCP port number pair, and a portal group
contains a set of portals. Users for the SPDK iSCSI target application configure
portals through portal groups.
To support login redirection feature, we utilize two types of portal groups,
public portal group and private portal group.
The SPDK iSCSI target application usually has a discovery portal. The discovery
portal is connected by an initiator to get a list of targets, as well as the list
of portals on which these target may be accessed, by a discovery session.
Public portal groups have their portals returned by a discovery session. Private
portal groups do not have their portals returned by a discovery session. A public
portal group may optionally have a redirect portal for non-discovery logins for
each associated target. This redirect portal must be from a private portal group.
Initiators configure portals in public portal groups as target portals. When an
initator logs in to a target through a portal in an associated public portal group,
the target sends a temporary redirection response with a redirect portal. Then the
initiator logs in to the target again through the redirect portal.
Users set a portal group to public or private at creation using the
`iscsi_create_portal_group` RPC, associate portal groups with a target using the
`iscsi_create_target_node` RPC or the `iscsi_target_node_add_pg_ig_maps` RPC,
specify a up-to-date redirect portal in a public portal group for a target using
the `iscsi_target_node_set_redirect` RPC, and terminate the corresponding connections
by asynchronous logout request using the `iscsi_target_node_request_logout` RPC.
Typically users will use the login redirection feature in scale out iSCSI target
system, which runs multiple SPDK iSCSI target applications.

File diff suppressed because it is too large Load Diff

213
doc/libraries.md Normal file
View File

@ -0,0 +1,213 @@
# SPDK Libraries {#libraries}
The SPDK repository is, first and foremost, a collection of high-performance
storage-centric software libraries. With this in mind, much care has been taken
to ensure that these libraries have consistent and robust naming and versioning
conventions. The libraries themselves are also divided across two directories
(`lib` and `module`) inside of the SPDK repository in a deliberate way to prevent
mixing of SPDK event framework dependent code and lower level libraries. This document
is aimed at explaining the structure, naming conventions, versioning scheme, and use cases
of the libraries contained in these two directories.
# Directory Structure {#structure}
The SPDK libraries are divided into two directories. The `lib` directory contains the base libraries that
compose SPDK. Some of these base libraries define plug-in systems. Instances of those plug-ins are called
modules and are located in the `module` directory. For example, the `spdk_sock` library is contained in the
`lib` directory while the implementations of socket abstractions, `sock_posix` and `sock_uring`
are contained in the `module` directory.
## lib {#lib}
The libraries in the `lib` directory can be readily divided into four categories:
- Utility Libraries: These libraries contain basic, commonly used functions that make more complex
libraries easier to implement. For example, `spdk_log` contains macro definitions that provide a
consistent logging paradigm and `spdk_json` is a general purpose JSON parsing library.
- Protocol Libraries: These libraries contain the building blocks for a specific service. For example,
`spdk_nvmf` and `spdk_vhost` each define the storage protocols after which they are named.
- Storage Service Libraries: These libraries provide a specific abstraction that can be mapped to somewhere
between the physical drive and the filesystem level of your typical storage stack. For example `spdk_bdev`
provides a general block device abstraction layer, `spdk_lvol` provides a logical volume abstraction,
`spdk_blobfs` provides a filesystem abstraction, and `spdk_ftl` provides a flash translation layer
abstraction.
- System Libraries: These libraries provide system level services such as a JSON based RPC service
(see `spdk_jsonrpc`) and thread abstractions (see `spdk_thread`). The most notable library in this category
is the `spdk_env_dpdk` library which provides a shim for the underlying Data Plane Development Kit (DPDK)
environment and provides services like memory management.
The one library in the `lib` directory that doesn't fit into the above classification is the `spdk_event` library.
This library defines a framework used by the applications contained in the `app` and `example` directories. Much
care has been taken to keep the SPDK libraries independent from this framework. The libraries in `lib` are engineered
to allow plugging directly into independent application frameworks such as Seastar or libuv with minimal effort.
Currently there are two exceptions in the `lib` directory which still rely on `spdk_event`, `spdk_vhost` and `spdk_iscsi`.
There are efforts underway to remove all remaining dependencies these libraries have on the `spdk_event` library.
Much like the `spdk_event` library, the `spdk_env_dpdk` library has been architected in such a way that it
can be readily replaced by an alternate environment shim. More information on replacing the `spdk_env_dpdk`
module and the underlying `dpdk` environment can be found in the [environment](#env_replacement) section.
## module {#module}
The component libraries in the `module` directory represent specific implementations of the base libraries in
the `lib` directory. As with the `lib` directory, much care has been taken to avoid dependencies on the
`spdk_event` framework except for those libraries which directly implement the `spdk_event` module plugin system.
There are seven sub-directories in the `module` directory which each hold a different class of libraries. These
sub-directories can be divided into two types.
- plug-in libraries: These libraries are explicitly tied to one of the libraries in the `lib` directory and
are registered with that library at runtime by way of a specific constructor function. The parent library in
the `lib` directory then manages the module directly. These types of libraries each implement a function table
defined by their parent library. The following table shows these directories and their corresponding parent
libraries:
<center>
| module directory | parent library | dependent on event library |
|------------------|----------------|----------------------------|
| module/accel | spdk_accel | no |
| module/bdev | spdk_bdev | no |
| module/event | spdk_event | yes |
| module/sock | spdk_sock | no |
</center>
- Free libraries: These libraries are highly dependent upon a library in the `lib` directory but are not
explicitly registered to that library via a constructor. The libraries in the `blob`, `blobfs`, and `env_dpdk`
directories fall into this category. None of the libraries in this category depend explicitly on the
`spdk_event` library.
# Library Conventions {#conventions}
The SPDK libraries follow strict conventions for naming functions, logging, versioning, and header files.
## Headers {#headers}
All public SPDK header files exist in the `include` directory of the SPDK repository. These headers
are divided into two sub-directories.
`include/spdk` contains headers intended to be used by consumers of the SPDK libraries. All of the
functions, variables, and types in these functions are intended for public consumption. Multiple headers
in this directory may depend upon the same underlying library and work together to expose different facets
of the library. The `spdk_bdev` library, for example, is exposed in three different headers. `bdev_module.h`
defines the interfaces a bdev module library would need to implement, `bdev.h` contains general block device
functions that would be used by an application consuming block devices exposed by SPDK, and `bdev_zone.h`
exposes zoned bdev specific functions. Many of the other libraries exhibit a similar behavior of splitting
headers between consumers of the library and those wishing to register a module with that library.
`include/spdk_internal`, as its name suggests contains header files intended to be consumed only by other
libraries inside of the SPDK repository. These headers are typically used for sharing lower level functions
between two libraries that both require similar functions. For example `spdk_internal/nvme_tcp.h` contains
low level tcp functions used by both the `spdk_nvme` and `spdk_nvmf` libraries. These headers are *NOT*
intended for general consumption.
Other header files contained directly in the `lib` and `module` directories are intended to be consumed *only*
by source files of their corresponding library. Any symbols intended to be used across libraries need to be
included in a header in the `include/spdk_internal` directory.
## Naming Conventions {#naming}
All public types and functions in SPDK libraries begin with the prefix `spdk_`. They are also typically
further namespaced using the spdk library name. The rest of the function or type name describes its purpose.
There are no internal library functions that begin with the `spdk_` prefix. This naming convention is
enforced by the SPDK continuous Integration testing. Functions not intended for use outside of their home
library should be namespaced with the name of the library only.
## Map Files {#map}
SPDK libraries can be built as both static and shared object files. To facilitate building libraries as shared
objects, each one has a corresponding map file (e.g. `spdk_nvmf` relies on `spdk_nvmf.map`). SPDK libraries
not exporting any symbols rely on a blank map file located at `mk/spdk_blank.map`.
# SPDK Shared Objects {#shared_objects}
## Shared Object Versioning {#versioning}
SPDK shared objects follow a semantic versioning pattern with a major and minor version. Any changes which
break backwards compatibility (symbol removal or change) will cause a shared object major increment and
backwards compatible changes will cause a minor version increment; i.e. an application that relies on
`libspdk_nvmf.so.3.0` will be compatible with `libspdk_nvmf.so.3.1` but not with `libspdk_nvmf.so.4.0`.
Shared object versions are incremented only once between each release cycle. This means that at most, the
major version of each SPDK shared library will increment only once between each SPDK release.
There are currently no guarantees in SPDK of ABI compatibility between two major SPDK releases.
The point releases of an LTS release will be ABI compatible with the corresponding LTS major release.
Shared objects are versioned independently of one another. This means that `libspdk_nvme.so.3.0` and
`libspdk_bdev.so.3.0` do not necessarily belong to the same release. This also means that shared objects
with the same suffix are not necessarily compatible with each other. It is important to source all of your
SPDK libraries from the same repository and version to ensure inter-library compatibility.
## Linking to Shared Objects {#so_linking}
Shared objects in SPDK are created on a per-library basis. There is a top level `libspdk.so` object
which is a linker script. It simply contains references to all of the other spdk shared objects.
There are essentially two ways of linking to SPDK libraries.
1. An application can link to the top level shared object library as follows:
~~~{.sh}
gcc -o my_app ./my_app.c -lspdk -lspdk_env_dpdk -ldpdk
~~~
2. An application can link to only a subset of libraries by linking directly to the ones it relies on:
~~~{.sh}
gcc -o my_app ./my_app.c -lpassthru_external -lspdk_event_bdev -lspdk_bdev -lspdk_bdev_malloc
-lspdk_log -lspdk_thread -lspdk_util -lspdk_event -lspdk_env_dpdk -ldpdk
~~~
In the second instance, please note that applications need only link to the libraries upon which they
directly depend. All SPDK libraries have their dependencies specified at object compile time. This means
that when linking to `spdk_net`, one does not also have to specify `spdk_log`, `spdk_util`, `spdk_json`,
`spdk_jsonrpc`, and `spdk_rpc`. However, this dependency inclusion does not extend to the application
itself; i.e. if an application directly uses symbols from both `spdk_bdev` and `spdk_log`, both libraries
will need to be supplied to the linker when linking the application even though `spdk_log` is a dependency
of `spdk_bdev`.
Please also note that when linking to SPDK libraries, both the spdk_env shim library and the env library
itself need to be supplied to the linker. In the examples above, these are `spdk_env_dpdk` and `dpdk`
respectively. This was intentional and allows one to easily swap out both the environment and the
environment shim.
## Replacing the env abstraction {#env_replacement}
SPDK depends on an environment abstraction that provides crucial pinned memory management and PCIe
bus management operations. The interface for this environment abstraction is defined in the
`include/env.h` header file. The default implementation of this environment is located in `spdk_env_dpdk`.
This abstraction in turn relies upon the DPDK libraries. This two part implementation was deliberate
and allows for easily swapping out the dpdk version upon which the spdk libraries rely without making
modifications to the spdk source directly.
Any environment can replace the `spdk_env_dpdk` environment by implementing the `include/env.h` header
file. The environment can either be implemented wholesale in a single library or as a two-part
shim/implementation library system.
~~~{.sh}
# single library
gcc -o my_app ./my_app.c -lspdk -lcustom_env_implementation
# two libraries
gcc -o my_app ./my_app.c -lspdk -lcustom_env_shim -lcustom_env_implementation
~~~
# SPDK Static Objects {#static_objects}
SPDK static objects are compiled by default even when no parameters are supplied to the build system.
Unlike SPDK shared objects, the filename does not contain any versioning semantics. Linking against
static objects is similar to shared objects but will always require the use of `-Wl,--whole-archive`
as argument. This is due to the use of constructor functions in SPDK such as those to register
NVMe transports.
Due to the lack of versioning semantics, it is not recommended to install static libraries system wide.
Instead the path to these static libraries should be added as argument at compile time using
`-L/path/to/static/libs`. The use of static objects instead of shared objects can also be forced
through `-Wl,-Bsatic`, otherwise some compilers might prefer to use the shared objects if both
are available.
~~~{.sh}
gcc -o my_app ./my_app.c -L/path/to/static/libs -Wl,--whole-archive -Wl,-Bstatic -lpassthru_external
-lspdk_event_bdev -lspdk_bdev -lspdk_bdev_malloc -lspdk_log -lspdk_thread -lspdk_util -lspdk_event
-lspdk_env_dpdk -Wl,--no-whole-archive -Wl,-Bdynamic -pthread -ldpdk
~~~

View File

@ -1,96 +0,0 @@
# nvme-cli {#nvme-cli}
# nvme-cli with SPDK Getting Started Guide
Now nvme-cli can support both kernel driver and SPDK user mode driver for most of its available commands and
Intel specific commands.
1. Clone the nvme-cli repository from the SPDK GitHub fork. Make sure you check out the spdk-1.6 branch.
~~~{.sh}
git clone -b spdk-1.6 https://github.com/spdk/nvme-cli.git
~~~
2. Clone the SPDK repository from https://github.com/spdk/spdk under the nvme-cli folder.
3. Refer to the "README.md" under SPDK folder to properly build SPDK.
4. Refer to the "README.md" under nvme-cli folder to properly build nvme-cli.
5. Execute "<spdk_folder>/scripts/setup.sh" with the "root" account.
6. Update the "spdk.conf" file under nvme-cli folder to properly configure the SPDK. Notes as following:
~~~{.sh}
spdk=1
Indicates whether or not to use spdk. Can be 0 (off) or 1 (on).
Defaults to 1 which assumes that you have run "<spdk_folder>/scripts/setup.sh", unbinding your drives from the kernel.
core_mask=0x1
A bitmask representing which core(s) to use for nvme-cli operations.
Defaults to core 0.
mem_size=512
The amount of reserved hugepage memory to use for nvme-cli (in MB).
Defaults to 512MB.
shm_id=0
Indicates the shared memory ID for the spdk application with which your NVMe drives are associated,
and should be adjusted accordingly.
Defaults to 0.
~~~
7. Run the "./nvme list" command to get the domain:bus:device.function for each found NVMe SSD.
8. Run the other nvme commands with domain:bus:device.function instead of "/dev/nvmeX" for the specified device.
~~~{.sh}
Example: ./nvme smart-log 0000:01:00.0
~~~
9. Run the "./nvme intel" commands for Intel specific commands against Intel NVMe SSD.
~~~{.sh}
Example: ./nvme intel internal-log 0000:08:00.0
~~~
10. Execute "<spdk_folder>/scripts/setup.sh reset" with the "root" account and update "spdk=0" in spdk.conf to
use the kernel driver if wanted.
## Use scenarios
### Run as the only SPDK application on the system
1. Modify the spdk to 1 in spdk.conf. If the system has fewer cores or less memory, update the spdk.conf accordingly.
### Run together with other running SPDK applications on shared NVMe SSDs
1. For the other running SPDK application, start with the parameter like "-i 1" to have the same "shm_id".
2. Use the default spdk.conf setting where "shm_id=1" to start the nvme-cli.
3. If other SPDK applications run with different shm_id parameter, update the "spdk.conf" accordingly.
### Run with other running SPDK applications on non-shared NVMe SSDs
1. Properly configure the other running SPDK applications.
~~~{.sh}
a. Only access the NVMe SSDs it wants.
b. Allocate a fixed number of memory instead of all available memory.
~~~
2. Properly configure the spdk.conf setting for nvme-cli.
~~~{.sh}
a. Not access the NVMe SSDs from other SPDK applications.
b. Change the mem_size to a proper size.
~~~
## Note
1. To run the newly built nvme-cli, either explicitly run as "./nvme" or added it into the $PATH to avoid
invoke other already installed version.
2. To run the newly built nvme-cli with SPDK support in arbitrary directory, copy "spdk.conf" to that
directory from the nvme cli folder and update the configuration as suggested.

View File

@ -304,6 +304,8 @@ At the NVMe driver level, we provide the following support for Hotplug:
This feature is considered as experimental.
## Design
![NVMe character devices processing diagram](nvme_cuse.svg)
For each controller as well as namespace, character devices are created in the
@ -317,35 +319,67 @@ Where X is unique SPDK NVMe controller index and Y is namespace id.
Requests from CUSE are handled by pthreads when controller and namespaces are created.
Those pass the I/O or admin commands via a ring to a thread that processes them using
spdk_nvme_io_msg_process().
nvme_io_msg_process().
Ioctls that request information attained when attaching NVMe controller receive an
immediate response, without passing them through the ring.
This interface reserves one qpair for sending down the I/O for each controller.
This interface reserves one additional qpair for sending down the I/O for each controller.
## Enabling cuse support for NVMe
## Usage
Cuse support is disabled by default. To enable support for NVMe devices SPDK
must be compiled with "./configure --with-nvme-cuse".
### Enabling cuse support for NVMe
## Limitations
Cuse support is disabled by default. To enable support for NVMe-CUSE devices first
install required dependencies
~~~{.sh}
sudo scripts/pkgdep.sh --fuse
~~~
Then compile SPDK with "./configure --with-nvme-cuse".
NVMe CUSE presents character device for controller and namespaces only at the time
the controller is being attached. Dynamic creation/deletion of namespaces is not
supported yet.
### Creating NVMe-CUSE device
NVMe namespaces are created as character devices and their use may be limited for
tools expecting block devices.
First make sure to prepare the environment (see @ref getting_started).
This includes loading CUSE kernel module.
Any NVMe controller attached to a running SPDK application can be
exposed via NVMe-CUSE interface. When closing SPDK application,
the NVMe-CUSE devices are unregistered.
Sysfs is not updated by SPDK.
~~~{.sh}
$ sudo scripts/setup.sh
$ sudo modprobe cuse
$ sudo build/bin/spdk_tgt
# Continue in another session
$ sudo scripts/rpc.py bdev_nvme_attach_controller -b Nvme0 -t PCIe -a 0000:82:00.0
Nvme0n1
$ sudo scripts/rpc.py bdev_nvme_get_controllers
[
{
"name": "Nvme0",
"trid": {
"trtype": "PCIe",
"traddr": "0000:82:00.0"
}
}
]
$ sudo scripts/rpc.py bdev_nvme_cuse_register -n Nvme0
$ ls /dev/spdk/
nvme0 nvme0n1
~~~
SPDK NVMe CUSE creates nodes in "/dev/spdk/" directory to explicitly differentiate
from other devices. Tools that only search in the "/dev" directory might not work
with SPDK NVMe CUSE.
### Example of using nvme-cli
SCSI to NVMe Translation Layer is not implemented. Tools that are using this layer to
identify, manage or operate device might not work properly or their use may be limited.
Most nvme-cli commands can point to specific controller or namespace by providing a path to it.
This can be leveraged to issue commands to the SPDK NVMe-CUSE devices.
~~~{.sh}
sudo nvme id-ctrl /dev/spdk/nvme0
sudo nvme smart-log /dev/spdk/nvme0
sudo nvme id-ns /dev/spdk/nvme0n1
~~~
Note: `nvme list` command does not display SPDK NVMe-CUSE devices,
see nvme-cli [PR #773](https://github.com/linux-nvme/nvme-cli/pull/773).
### Examples of using smartctl
@ -360,3 +394,17 @@ the NVMe device.
smartctl -d nvme -H /dev/spdk/nvme1
...
~~~
## Limitations
NVMe namespaces are created as character devices and their use may be limited for
tools expecting block devices.
Sysfs is not updated by SPDK.
SPDK NVMe CUSE creates nodes in "/dev/spdk/" directory to explicitly differentiate
from other devices. Tools that only search in the "/dev" directory might not work
with SPDK NVMe CUSE.
SCSI to NVMe Translation Layer is not implemented. Tools that are using this layer to
identify, manage or operate device might not work properly or their use may be limited.

View File

@ -20,8 +20,8 @@ registers involved that are called doorbells.
An I/O is submitted to an NVMe device by constructing a 64 byte command, placing
it into the submission queue at the current location of the submission queue
head index, and then writing the new index of the submission queue head to the
submission queue head doorbell register. It's actually valid to copy a whole set
tail index, and then writing the new index of the submission queue tail to the
submission queue tail doorbell register. It's actually valid to copy a whole set
of commands into open slots in the ring and then write the doorbell just one
time to submit the whole batch.

View File

@ -43,7 +43,7 @@ Then build SPDK with RDMA enabled:
make
~~~
Once built, the binary will be in `app/nvmf_tgt`.
Once built, the binary will be in `build/bin`.
### Prerequisites for InfiniBand/RDMA Verbs {#nvmf_prereqs_verbs}
@ -106,20 +106,14 @@ using 1GB hugepages or by pre-reserving memory at application startup with `--me
option. All pre-reserved memory will be registered as a single region, but won't be returned to the
system until the SPDK application is terminated.
Another known issue occurs when using the E810 NICs in RoCE mode. Specifically, the NVMe-oF target
sometimes cannot destroy a qpair, because its posted work requests don't get flushed. It can cause
the NVMe-oF target application unable to terminate cleanly.
## TCP transport support {#nvmf_tcp_transport}
The transport is built into the nvmf_tgt by default, and it does not need any special libraries.
## Configuring the SPDK NVMe over Fabrics Target {#nvmf_config}
An NVMe over Fabrics target can be configured using JSON RPCs.
The basic RPCs needed to configure the NVMe-oF subsystem are detailed below. More information about
working with NVMe over Fabrics specific RPCs can be found on the @ref jsonrpc_components_nvmf_tgt RPC page.
Using .ini style configuration files for configuration of the NVMe-oF target is deprecated and should
be replaced with JSON based RPCs. .ini style configuration files can be converted to json format by way
of the new script `scripts/config_converter.py`.
## FC transport support {#nvmf_fc_transport}
To build nvmf_tgt with the FC transport, there is an additional FC LLD (Low Level Driver) code dependency.
@ -147,6 +141,12 @@ cd ../spdk
make
~~~
## Configuring the SPDK NVMe over Fabrics Target {#nvmf_config}
An NVMe over Fabrics target can be configured using JSON RPCs.
The basic RPCs needed to configure the NVMe-oF subsystem are detailed below. More information about
working with NVMe over Fabrics specific RPCs can be found on the @ref jsonrpc_components_nvmf_tgt RPC page.
### Using RPCs {#nvmf_config_rpc}
Start the nvmf_tgt application with elevated privileges. Once the target is started,
@ -157,9 +157,9 @@ and an in capsule data size of 0 bytes. The TCP transport is configured with an
16384 bytes, 8 max qpairs per controller, and an in capsule data size of 8192 bytes.
~~~{.sh}
app/nvmf_tgt/nvmf_tgt
scripts/rpc.py nvmf_create_transport -t RDMA -u 8192 -p 4 -c 0
scripts/rpc.py nvmf_create_transport -t TCP -u 16384 -p 8 -c 8192
build/bin/nvmf_tgt
scripts/rpc.py nvmf_create_transport -t RDMA -u 8192 -m 4 -c 0
scripts/rpc.py nvmf_create_transport -t TCP -u 16384 -m 8 -c 8192
~~~
Below is an example of creating a malloc bdev and assigning it to a subsystem. Adjust the bdevs,
@ -231,7 +231,7 @@ The `-m` core mask option specifies a bit mask of the CPU cores that
SPDK is allowed to execute work items on.
For example, to allow SPDK to use cores 24, 25, 26 and 27:
~~~{.sh}
app/nvmf_tgt/nvmf_tgt -m 0xF000000
build/bin/nvmf_tgt -m 0xF000000
~~~
## Configuring the Linux NVMe over Fabrics Host {#nvmf_host}

View File

@ -68,7 +68,7 @@ system. This is used for access control.
A user of the NVMe-oF target library begins by creating a target using
spdk_nvmf_tgt_create(), setting up a set of addresses on which to accept
connections by calling spdk_nvmf_tgt_listen(), then creating a subsystem
connections by calling spdk_nvmf_tgt_listen_ext(), then creating a subsystem
using spdk_nvmf_subsystem_create().
Subsystems begin in an inactive state and must be activated by calling
@ -78,12 +78,13 @@ calling spdk_nvmf_subsystem_pause() and resumed by calling
spdk_nvmf_subsystem_resume().
Namespaces may be added to the subsystem by calling
spdk_nvmf_subsystem_add_ns() when the subsystem is inactive or paused.
spdk_nvmf_subsystem_add_ns_ext() when the subsystem is inactive or paused.
Namespaces are bdevs. See @ref bdev for more information about the SPDK bdev
layer. A bdev may be obtained by calling spdk_bdev_get_by_name().
Once a subsystem exists and the target is listening on an address, new
connections may be accepted by polling spdk_nvmf_tgt_accept().
connections will be automatically assigned to poll groups as they are
detected.
All I/O to a subsystem is driven by a poll group, which polls for incoming
network I/O. Poll groups may be created by calling
@ -91,14 +92,6 @@ spdk_nvmf_poll_group_create(). They automatically request to begin polling
upon creation on the thread from which they were created. Most importantly, *a
poll group may only be accessed from the thread on which it was created.*
When spdk_nvmf_tgt_accept() detects a new connection, it will construct a new
struct spdk_nvmf_qpair object and call the user provided `new_qpair_fn`
callback for each new qpair. In response to this callback, the user must
assign the qpair to a poll group by calling spdk_nvmf_poll_group_add().
Remember, a poll group may only be accessed from the thread on which it was created,
so making a call to spdk_nvmf_poll_group_add() may require passing a message
to the appropriate thread.
## Access Control
Access control is performed at the subsystem level by adding allowed listen
@ -111,9 +104,7 @@ and hosts may only be added to inactive or paused subsystems.
A discovery subsystem, as defined by the NVMe-oF specification, is
automatically created for each NVMe-oF target constructed. Connections to the
discovery subsystem are handled in the same way as any other subsystem - new
qpairs are created in response to spdk_nvmf_tgt_accept() and they must be
assigned to a poll group.
discovery subsystem are handled in the same way as any other subsystem.
## Transports
@ -132,15 +123,7 @@ fabrics simultaneously.
The SPDK NVMe-oF target library does not strictly dictate threading model, but
poll groups do all of their polling and I/O processing on the thread they are
created on. Given that, it almost always makes sense to create one poll group
per thread used in the application. New qpairs created in response to
spdk_nvmf_tgt_accept() can be handed out round-robin to the poll groups. This
is how the SPDK NVMe-oF target application currently functions.
More advanced algorithms for distributing qpairs to poll groups are possible.
For instance, a NUMA-aware algorithm would be an improvement over basic
round-robin, where NUMA-aware means assigning qpairs to poll groups running on
CPU cores that are on the same NUMA node as the network adapter and storage
device. Load-aware algorithms also may have benefits.
per thread used in the application.
## Scaling Across CPU Cores

View File

@ -16,14 +16,14 @@ the instrumentation of all the tracepoints group in an SPDK target application,
target with -e parameter set to 0xFFFF:
~~~
app/nvmf_tgt/nvmf_tgt -e 0xFFFF
build/bin/nvmf_tgt -e 0xFFFF
~~~
To enable the instrumentation of just the NVMe-oF RDMA tracepoints in an SPDK target
application, start the target with the -e parameter set to 0x10:
~~~
app/nvmf_tgt/nvmf_tgt -e 0x10
build/bin/nvmf_tgt -e 0x10
~~~
When the target starts, a message is logged with the information you need to view
@ -55,7 +55,7 @@ The spdk_trace program can be found in the app/trace directory. To analyze the
system running the NVMe-oF target, simply execute the command line shown in the log:
~~~{.sh}
app/trace/spdk_trace -s nvmf -p 24147
build/bin/spdk_trace -s nvmf -p 24147
~~~
To analyze the tracepoints on a different system, first prepare the tracepoint file for transfer. The
@ -70,7 +70,7 @@ After transferring the /tmp/trace.bz2 tracepoint file to a different system:
~~~{.sh}
bunzip2 /tmp/trace.bz2
app/trace/spdk_trace -f /tmp/trace
build/bin/spdk_trace -f /tmp/trace
~~~
The following is sample trace capture showing the cumulative time that each
@ -134,7 +134,7 @@ and store all entries into specified output file at its shutdown on SIGINT or SI
After SPDK nvmf target is launched, simply execute the command line shown in the log:
~~~{.sh}
app/trace_record/spdk_trace_record -q -s nvmf -p 24147 -f /tmp/spdk_nvmf_record.trace
build/bin/spdk_trace_record -q -s nvmf -p 24147 -f /tmp/spdk_nvmf_record.trace
~~~
Also send I/Os to the SPDK target application to generate events by previous perf example for 10 minutes.
@ -147,7 +147,7 @@ After the completion of perf example, shut down spdk_trace_record by signal SIGI
To analyze the tracepoints output file from spdk_trace_record, simply run spdk_trace program by:
~~~{.sh}
app/trace/spdk_trace -f /tmp/spdk_nvmf_record.trace
build/bin/spdk_trace -f /tmp/spdk_nvmf_record.trace
~~~
# Adding New Tracepoints {#add_tracepoints}
@ -202,4 +202,4 @@ record the current trace state of several tracepoints.
...
~~~
All the tracing functions are documented in the [Tracepoint library documentation](https://www.spdk.io/doc/trace_8h.html)
All the tracing functions are documented in the [Tracepoint library documentation](https://spdk.io/doc/trace_8h.html)

View File

@ -39,7 +39,7 @@ SPDK's identify example application displays whether a device has a controller
memory buffer and which operations it supports. Run it as follows:
~~~{.sh}
./examples/nvme/identify/identify -r traddr:<pci id of ssd>
./build/examples/identify -r traddr:<pci id of ssd>
~~~
# cmb_copy: An example P2P Application {#p2p_cmb_copy}
@ -47,7 +47,7 @@ memory buffer and which operations it supports. Run it as follows:
Run the cmb_copy example application.
~~~{.sh}
./examples/nvme/cmb_copy/cmb_copy -r <pci id of write ssd>-1-0-1 -w <pci id of write ssd>-1-0-1 -c <pci id of the ssd with cmb>
./build/examples/cmb_copy -r <pci id of write ssd>-1-0-1 -w <pci id of write ssd>-1-0-1 -c <pci id of the ssd with cmb>
~~~
This should copy a single LBA (LBA 0) from namespace 1 on the read
NVMe SSD to LBA 0 on namespace 1 on the write SSD using the CMB as the

View File

@ -1,8 +1,36 @@
# Performance Reports {#performance_reports}
## Release 21.01
- [SPDK 21.01 NVMe Bdev Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_nvme_bdev_perf_report_2101.pdf)
- [SPDK 21.01 NVMe-oF TCP Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_tcp_perf_report_2101.pdf)
- [SPDK 21.01 NVMe-oF RDMA Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_rdma_perf_report_2101.pdf)
- [SPDK 21.01 Vhost Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_vhost_perf_report_2101.pdf)
## Release 20.10
- [SPDK 20.10 NVMe Bdev Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_nvme_bdev_perf_report_2010.pdf)
- [SPDK 20.10 NVMe-oF TCP Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_tcp_perf_report_2010.pdf)
- [SPDK 20.10 NVMe-oF RDMA Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_rdma_perf_report_2010.pdf)
- [SPDK 20.10 Vhost Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_vhost_perf_report_2010.pdf)
## Release 20.07
- [SPDK 20.07 NVMe-oF TCP Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_tcp_perf_report_2007.pdf)
- [SPDK 20.07 NVMe-oF RDMA Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_rdma_perf_report_2007.pdf)
- [SPDK 20.07 Vhost Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_vhost_perf_report_2007.pdf)
## Release 20.04
- [SPDK 20.04 NVMe-oF TCP Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_tcp_perf_report_2004.pdf)
- [SPDK 20.04 NVMe-oF RDMA Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_rdma_perf_report_2004.pdf)
- [SPDK 20.04 Vhost Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_vhost_perf_report_2004.pdf)
## Release 20.01
- [SPDK 20.01 Vhost Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_vhost_perf_report_2001.pdf)
- [SPDK 20.01 NVMe-oF TCP Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_tcp_perf_report_2001.pdf)
- [SPDK 20.01 NVMe-oF RDMA Performance Report](https://ci.spdk.io/download/performance-reports/SPDK_rdma_perf_report_2001.pdf)
## Release 19.10

56
doc/pkgconfig.md Normal file
View File

@ -0,0 +1,56 @@
# Linking SPDK applications with pkg-config {#pkgconfig}
The SPDK build system generates pkg-config files to facilitate linking
applications with the correct set of SPDK and DPDK libraries. Using pkg-config
in your build system will ensure you do not need to make modifications
when SPDK adds or modifies library dependencies.
If your application is using the SPDK nvme library, you would use the following
to get the list of required SPDK libraries:
~~~
PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_nvme
~~~
To get the list of required SPDK and DPDK libraries to use the DPDK-based
environment layer:
~~~
PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_env_dpdk
~~~
When linking with static libraries, the dependent system libraries must also be
specified. To get the list of required system libraries:
~~~
PKG_CONFIG_PATH=/path/to/spdk/build/lib/pkgconfig pkg-config --libs spdk_syslibs
~~~
Note that SPDK libraries use constructor functions liberally, so you must surround
the library list with extra linker options to ensure these functions are not dropped
from the resulting application binary. With shared libraries this is achieved through
the `-Wl,--no-as-needed` parameters while with static libraries `-Wl,--whole-archive`
is used. Here is an example Makefile snippet that shows how to use pkg-config to link
an application that uses the SPDK nvme shared library:
~~~
PKG_CONFIG_PATH = $(SPDK_DIR)/build/lib/pkgconfig
SPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_nvme
DPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_env_dpdk
app:
$(CC) -o app app.o -pthread -Wl,--no-as-needed $(SPDK_LIB) $(DPDK_LIB) -Wl,--as-needed
~~~
If using the SPDK nvme static library:
~~~
PKG_CONFIG_PATH = $(SPDK_DIR)/build/lib/pkgconfig
SPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_nvme
DPDK_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs spdk_env_dpdk
SYS_LIB := $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs --static spdk_syslibs
app:
$(CC) -o app app.o -pthread -Wl,--whole-archive $(SPDK_LIB) $(DPDK_LIB) -Wl,--no-whole-archive \
$(SYS_LIB)
~~~

49
doc/rpm.md Normal file
View File

@ -0,0 +1,49 @@
# RPMs {#rpms}
# In this document {#rpms_toc}
* @ref building_rpms
# Building SPDK RPMs {#building_rpms}
To build basic set of RPM packages out of the SPDK repo simply run:
~~~{.sh}
# rpmbuild/rpm.sh
~~~
Additional configuration options can be passed directly as arguments:
~~~{.sh}
# rpmbuild/rpm.sh --with-shared --with-dpdk=/path/to/dpdk/build
~~~
There are several options that may be passed via environment as well:
- DEPS - Install all needed dependencies for building RPM packages.
Default: "yes"
- MAKEFLAGS - Flags passed to make
- RPM_RELEASE - Target release version of the RPM packages. Default: 1
- REQUIREMENTS - Extra set of RPM dependencies if deemed as needed
- SPDK_VERSION - SPDK version. Default: currently checked out tag
~~~{.sh}
# DEPS=no MAKEFLAGS="-d -j1" rpmbuild/rpm.sh --with-shared
~~~
By default, all RPM packages should be created under $HOME directory of the
target user:
~~~{.sh}
# printf '%s\n' /root/rpmbuild/RPMS/x86_64/*
/root/rpmbuild/RPMS/x86_64/spdk-devel-v21.01-1.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/spdk-dpdk-libs-v21.01-1.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/spdk-libs-v21.01-1.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/spdk-v21.01-1.x86_64.rpm
#
~~~
- spdk - provides all the binaries, common tooling, etc.
- spdk-devel - provides development files
- spdk-libs - provides target lib, .pc files (--with-shared)
- spdk-dpdk-libs - provides dpdk lib files (--with-shared|--with-dpdk)

82
doc/scheduler.md Normal file
View File

@ -0,0 +1,82 @@
# Scheduler {#scheduler}
SPDK's event/application framework (`lib/event`) now supports scheduling of
lightweight threads. Schedulers are provided as plugins, called
implementations. A default implementation is provided, but users may wish to
write their own scheduler to integrate into broader code frameworks or meet
their performance needs.
This feature should be considered experimental and is disabled by default. When
enabled, the scheduler framework gathers data for each spdk thread and reactor
and passes it to a scheduler implementation to perform one of the following
actions.
## Actions
### Move a thread
`spdk_thread`s can be moved to another reactor. Schedulers can examine the
suggested cpu_mask value for each lightweight thread to see if the user has
requested specific reactors, or choose a reactor using whatever algorithm they
deem fit.
### Switch reactor mode
Reactors by default run in a mode that constantly polls for new actions for the
most efficient processing. Schedulers can switch a reactor into a mode that
instead waits for an event on a file descriptor. On Linux, this is implemented
using epoll. This results in reduced CPU usage but may be less responsive when
events occur. A reactor cannot enter this mode if any `spdk_threads` are
currently scheduled to it. This limitation is expected to be lifted in the
future, allowing `spdk_threads` to enter interrupt mode.
### Set frequency of CPU core
The frequency of CPU cores can be modified by the scheduler in response to
load. Only CPU cores that match the application cpu_mask may be modified. The
mechanism for controlling CPU frequency is pluggable and the default provided
implementation is called `dpdk_governor`, based on the `rte_power` library from
DPDK.
#### Known limitation
When SMT (Hyperthreading) is enabled the two logical CPU cores sharing a single
physical CPU core must run at the same frequency. If one of two of such logical
CPU cores is outside the application cpu_mask, the policy and frequency on that
core has to be managed by the administrator.
## Scheduler implementations
The scheduler in use may be controlled by JSON-RPC. Please use the
[framework_set_scheduler](jsonrpc.md/#rpc_framework_set_scheduler) RPC to
switch between schedulers or change their options.
[spdk_top](spdk_top.md#spdk_top) is a useful tool to observe the behavior of
schedulers in different scenarios and workloads.
### static [default]
The `static` scheduler is the default scheduler and does no dynamic scheduling.
Lightweight threads are distributed round-robin among reactors, respecting
their requested cpu_mask, and then they are never moved. This is equivalent to
the previous behavior of the SPDK event/application framework.
### dynamic
The `dynamic` scheduler is designed for power saving and reduction of CPU
utilization, especially in cases where workloads show large variations over
time.
Active threads are distributed equally among reactors, taking cpu_mask into
account. All idle threads are moved to the main core. Once an idle thread becomes
active, it is redistributed again.
When a reactor has no scheduled `spdk_thread`s it is switched into interrupt
mode and stops actively polling. After enough threads become active, the
reactor is switched back into poll mode and threads are assigned to it again.
The main core can contain active threads only when their execution time does
not exceed the sum of all idle threads. When no active threads are present on
the main core, the frequency of that CPU core will decrease as the load
decreases. All CPU cores corresponding to the other reactors remain at maximum
frequency.

146
doc/shfmt.md Normal file
View File

@ -0,0 +1,146 @@
# shfmt {#shfmt}
# In this document {#shfmt_toc}
* @ref shfmt_overview
* @ref shfmt_usage
* @ref shfmt_installation
* @ref shfmt_examples
# Overview {#shfmt_overview}
The majority of tests (and scripts overall) in the SPDK repo are written
in Bash (with a quite significant emphasis on "Bashism"), thus a style
formatter, shfmt, was introduced to help keep the .sh code consistent
across the entire repo. For more details on the tool itself, please see
[shfmt](https://github.com/mvdan/sh).
# Usage {#shfmt_usage}
On the CI pool, the shfmt is run against all the updated .sh files that
have been committed but not merged yet. Additionally, shfmt will pick
all .sh present in the staging area when run locally from our pre-commit
hook (via check_format.sh). In case any style errors are detected, a
patch with needed changes is going to be generated and either build (CI)
or the commit will be aborted. Said patch can be then easily applied:
~~~{.sh}
# Run from the root of the SPDK repo
patch --merge -p0 <shfmt-3.1.0.patch
~~~
The name of the patch is derived from the version of shfmt that is
currently in use (3.1.0 is currently supported).
Please, see ./scripts/check_format.sh for all the arguments the shfmt
is run with. Additionally, @ref shfmt_examples has more details on how
each of the arguments behave.
# Installation {#shfmt_installation}
The shfmt can be easily installed via pkgdep.sh:
~~~{.sh}
./scripts/pkgdep.sh -d
~~~
This will install all the developers tools, including shfmt, on the
local system. The precompiled binary will be saved, by default, to
/opt/shfmt and then linked under /usr/bin. Both paths can be changed
by setting SHFMT_DIR and SHFMT_DIR_OUT in the environment. Example:
~~~{.sh}
SHFMT_DIR=/keep_the_binary_here \
SHFMT_DIR_OUT=/and_link_it_here \
./scripts/pkgdep.sh -d
~~~
# Examples {#shfmt_examples}
~~~{.sh}
#######################################
if foo=$(bar); then
echo "$foo"
fi
exec "$foo" \
--bar \
--foo
# indent_style = tab
if foo=$(bar); then
echo "$foo"
fi
exec foobar \
--bar \
--foo
######################################
if foo=$(bar); then
echo "$foo" && \
echo "$(bar)"
fi
# binary_next_line = true
if foo=$(bar); then
echo "$foo" \
&& echo "$(bar)"
fi
# Note that each break line is also being indented:
if [[ -v foo ]] \
&& [[ -v bar ]] \
&& [[ -v foobar ]]; then
echo "This is foo"
fi
# ->
if [[ -v foo ]] \
&& [[ -v bar ]] \
&& [[ -v foobar ]]; then
echo "This is foo"
fi
# Currently, newlines are being escaped even if syntax-wise
# they are not needed, thus watch for the following:
if [[ -v foo
&& -v bar
&& -v foobar ]]; then
echo "This is foo"
fi
#->
if [[ -v foo && -v \
bar && -v \
foobar ]]; then
echo "This is foo"
fi
# This, unfortunately, also breaks the -bn behavior.
# (see https://github.com/mvdan/sh/issues/565) for details.
######################################
case "$FOO" in
BAR)
echo "$FOO" ;;
esac
# switch_case_indent = true
case "$FOO" in
BAR)
echo "$FOO"
;;
esac
######################################
exec {foo}>bar
:>foo
exec {bar}<foo
# -sr
exec {foo}> bar
: > foo
exec {bar}< foo
######################################
# miscellaneous, enforced by shfmt
(( no_spacing_at_the_beginning & ~and_no_spacing_at_the_end ))
: $(( no_spacing_at_the_beginning & ~and_no_spacing_at_the_end ))
# ->
((no_spacing_at_the_beginning & ~and_no_spacing_at_the_end))
: $((no_spacing_at_the_beginning & ~and_no_spacing_at_the_end))
~~~

65
doc/spdk_top.md Normal file
View File

@ -0,0 +1,65 @@
# spdk_top {#spdk_top}
The spdk_top application is designed to resemble the standard top in that it provides a real-time insights into CPU cores usage by SPDK lightweight threads and pollers. Have you ever wondered which CPU core is used most by your SPDK instance? Are you building your own bdev or library and want to know if your code is running efficiently? Are your new pollers busy most of the time? The spdk_top application uses RPC calls to collect performance metrics and displays them in a report that you can analyze and determine if your code is running efficiently so that you can tune your implementation and get more from SPDK.
Why doesn't the classic top utility work for SPDK? SPDK uses a polled-mode design; a reactor thread running on each CPU core assigned to an SPDK application schedules SPDK lightweight threads and pollers to run on the CPU core. Therefore, the standard Linux top utility is not effective for analyzing the CPU usage for polled-mode applications like SPDK because it just reports that they are using 100% of the CPU resources assigned to them. The spdk_top utility was developed to analyze and report the CPU cycles used to do real work vs just polling for work. The utility relies on instrumentation added to pollers to track when they are doing work vs. polling for work. The spdk_top utility gets the fine grained metrics from the pollers, analyzes and report the metrics on a per poller, thread and core basis. This information enables users to identify CPU cores that are busy doing real work so that they can determine if the application needs more or less CPU resources.
# Run spdk_top
Before running spdk_top you need to run the SPDK application whose performance you want to analyze using spdk_top.
Run the spdk_top application
~~~{.sh}
./build/bin/spdk_top
~~~
# Bottom menu
Menu at the bottom of SPDK top window shows many options for changing displayed data. Each menu item has a key associated with it in square brackets.
* Quit - quits the SPDK top application.
* TAB selection - allows to select THREADS/POLLERS/CORES tabs.
* Previous page/Next page - scrolls up/down to the next set of rows displayed. Indicator in the bottom-left corner shows current page and number of all available pages.
* Columns - enables/disables chosen columns in a column pop-up window.
* Sorting - allows to sort displayed data by column in a sorting pop-up.
* Refresh rate - takes user input from 0 to 255 and changes refresh rate to that value in seconds.
* Item details - displays details pop-up window for highlighted data row. Selection is changed by pressing UP and DOWN arrow keys.
* Total/Interval - changes displayed values in all tabs to either Total time (measured since start of SPDK application) or Interval time (measured since last refresh).
# Threads Tab
The threads tab displays a line item for each spdk thread. The information displayed shows:
* Thread name - name of SPDK thread.
* Core - core on which the thread is currently running.
* Active/Timed/Paused pollers - number of pollers grouped by type on this thread.
* Idle/Busy - how many microseconds the thread was idle/busy.
\n
By pressing ENTER key a pop-up window appears, showing above and a list of pollers running on selected thread (with poller name, type, run count and period).
Pop-up then can be closed by pressing ESC key.
To learn more about spdk threads see @ref concurrency.
# Pollers Tab
The pollers tab displays a line item for each poller. The information displayed shows:
* Poller name - name of currently selected poller.
* Type - type of poller (Active/Paused/Timed).
* On thread - thread on which the poller is running.
* Run count - how many times poller was run.
* Period - poller period in microseconds. If period equals 0 then it is not displayed.
* Status - whether poller is currently Busy (red color) or Idle (blue color).
\n
Poller pop-up window can be displayed by pressing ENTER on a selected data row and displays above information.
Pop-up can be closed by pressing ESC key.
# Cores Tab
The cores tab provides insights into how the application is using the CPU cores assigned to it. The information displayed for each core shows:
* Core - core number.
* Thread count - number of threads currently running on core.
* Poller count - total number of pollers running on core.
* Idle/Busy - how many microseconds core was idle (including time when core ran pollers but did not find any work) or doing actual work.
\n
Pressing ENTER key makes a pop-up window appear, showing above information, along with a list of threads running on selected core. Cores details window allows to select a thread and display thread details pop-up on top of it. To close both pop-ups use ESC key.

View File

@ -18,7 +18,7 @@ Package dependencies at the moment include:
~~~{.sh}
./scripts/setup.sh
./app/vhost/vhost -c vhost.conf
./build/bin/vhost -c vhost.json
~~~
### Run SPDK CLI

View File

@ -18,7 +18,118 @@ x86_64 system, or add `iommu.passthrough=1` on arm64 systems.
There are also some instances where a user may not want to use `uio_pci_generic` or the kernel
version they are using has a bug where `uio_pci_generic` [fails to bind to NVMe drives](https://github.com/spdk/spdk/issues/399).
In these cases, users building with the DPDK submodule can build the `igb_uio` kernel module by
supplying `--with-igb-uio-driver` to `./configure`. Upon a successful make, the file will be
located at `dpdk/build/build/kmod/igb_uio.ko`. To ensure that the driver is properly bound, users
should specify `DRIVER_OVERRIDE=/path/to/igb_uio.ko`.
In these cases, users can build the `igb_uio` kernel module which can be found in dpdk-kmods repository.
To ensure that the driver is properly bound, users should specify `DRIVER_OVERRIDE=/path/to/igb_uio.ko`.
# Running SPDK as non-priviledged user {#system_configuration_nonroot}
One of the benefits of using the `VFIO` Linux kernel driver is the ability to
perform DMA operations with peripheral devices as unprivileged user. The
permissions to access particular devices still need to be granted by the system
administrator, but only on a one-time basis. Note that this functionality
is supported with DPDK starting from version 18.11.
## Hugetlbfs access
Make sure the target user has RW access to at least one hugepage mount.
A good idea is to create a new mount specifically for SPDK:
~~~{.sh}
# mkdir /mnt/spdk_hugetlbfs
# mount -t hugetlbfs -o uid=spdk,size=<value> none /mnt/spdk_hugetlbfs
~~~
Then start SPDK applications with an additional parameter `--huge-dir /mnt/spdk_hugetlbfs`
Full guide on configuring hugepage mounts is available in the
[Linux Hugetlbpage Documentation](https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt)
## Device access {#system_configuration_nonroot_device_access}
`VFIO` device access is protected with sysfs file permissions and can be
configured with chown/chmod.
Please note that the VFIO device isolation is based around IOMMU groups and it's
only possible to change permissions of the entire group, which might possibly
consist of more than one device. (You could also apply a custom kernel patch to
further isolate those devices in the kernel, but it comes with potential risks
as described on
[Alex Williamson's VFIO blog](https://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html),
with the patch in question available here:
[[PATCH] pci: Enable overrides for missing ACS capabilities](https://lkml.org/lkml/2013/5/30/513))
Let's assume we want to use PCI device `0000:04:00.0`. First of all, verify
that it has an IOMMU group assigned:
~~~{.sh}
$ readlink "/sys/bus/pci/devices/0000:00:04.0/iommu_group"
~~~
The output should be e.g.
`../../../kernel/iommu_groups/5`
Which means that the device is a part of the IOMMU group 5. We can check if
there are any other devices in that group.
~~~{.sh}
$ ls /sys/kernel/iommu_groups/5/devices/
0000:00:04.0 0000:00:04.1 0000:00:04.2 0000:00:04.3 0000:00:04.4 0000:00:04.5 0000:00:04.6 0000:00:04.7
~~~
In this case `0000:04:00.0` is an I/OAT channel which comes with 7 different
channels associated with the same IOMMU group.
To give the user `spdk` full access to the VFIO IOMMU group 5 and all its
devices, use the following:
~~~{.sh}
# chown spdk /dev/vfio/5
~~~
## Memory constraints {#system_configuration_nonroot_memory_constraints}
As soon as the first device is attached to SPDK, all of SPDK memory will be
mapped to the IOMMU through the VFIO APIs. VFIO will try to mlock that memory and
will likely exceed user ulimit on locked memory. Besides having various
SPDK errors and failures, this would also pollute the syslog with the following
entries:
`vfio_pin_pages: RLIMIT_MEMLOCK`
The limit can be checked by running the following command as target user:
(output in kilobytes)
~~~{.sh}
$ ulimit -l
~~~
On Ubuntu 18.04 this returns 16384 (16MB) by default, which is way below
what SPDK needs.
The limit can be increased with one of the methods below. Keep in mind SPDK will
try to map not only its reserved hugepages, but also all the memory that's
shared by its vhost clients as described in the
[Vhost processing guide](https://spdk.io/doc/vhost_processing.html#vhost_processing_init).
### Increasing the memlock limit permanently
Open the `/etc/security/limits.conf` file as root and append the following:
```
spdk hard memlock unlimited
spdk soft memlock unlimited
```
Then logout from the target user account. The changes will take effect after the next login.
### Increasing the memlock for a specific process
Linux offers a `prlimit` utility that can override limits of any given process.
On Ubuntu, it is a part of the `util-linux` package.
~~~{.sh}
# prlimit --pid <pid> --memlock=<soft>:<hard>
~~~
Note that the above needs to be executed before the first device is attached to
the SPDK application.

View File

@ -1,4 +1,5 @@
# Tools {#tools}
- @subpage spdkcli
- @subpage nvme-cli
- @subpage bdevperf
- @subpage spdk_top

View File

@ -1,6 +1,8 @@
# User Guides {#user_guides}
- @subpage system_configuration
- @subpage libraries
- @subpage pkgconfig
- @subpage app_overview
- @subpage iscsi
- @subpage nvmf

View File

@ -147,7 +147,7 @@ vagrant@vagrant:~/spdk_repo/spdk$ make
vagrant@vagrant:~/spdk_repo/spdk$ sudo ./scripts/setup.sh
0000:00:0e.0 (80ee 4e56): nvme -> uio_pci_generic
vagrant@vagrant:~/spdk_repo/spdk$ sudo examples/nvme/hello_world/hello_world
vagrant@vagrant:~/spdk_repo/spdk$ sudo build/examples/hello_world
Starting SPDK v18.10-pre / DPDK 18.05.0 initialization...
[ DPDK EAL parameters: hello_world -c 0x1 --legacy-mem --file-prefix=spdk0 --base-virtaddr=0x200000000000 --proc-type=auto ]
EAL: Detected 4 lcore(s)

View File

@ -91,13 +91,13 @@ be restricted to run on a subset of these CPU cores. See @ref vhost_vdev_create
details.
~~~{.sh}
app/vhost/vhost -S /var/tmp -m 0x3
build/bin/vhost -S /var/tmp -m 0x3
~~~
To list all available vhost options use the following command.
~~~{.sh}
app/vhost/vhost -h
build/bin/vhost -h
~~~
# SPDK Configuration {#vhost_config}
@ -105,7 +105,7 @@ app/vhost/vhost -h
## Create bdev (block device) {#vhost_bdev_create}
SPDK bdevs are block devices which will be exposed to the guest OS.
For vhost-scsi, bdevs are exposed as as SCSI LUNs on SCSI devices attached to the
For vhost-scsi, bdevs are exposed as SCSI LUNs on SCSI devices attached to the
vhost-scsi controller in the guest OS.
For vhost-blk, bdevs are exposed directly as block devices in the guest OS and are
not associated at all with SCSI.
@ -171,26 +171,6 @@ extra `-r` or `--readonly` parameter.
scripts/rpc.py vhost_create_blk_controller --cpumask 0x1 -r vhost.1 Malloc0
~~~
### Vhost-NVMe (experimental)
The following RPC will attach the Malloc0 bdev to the vhost.0 vhost-nvme
controller. Malloc0 will appear as Namespace 1 of vhost.0 controller. Users
can use `--cpumask` parameter to specify which cores should be used for this
controller. Users must specify the maximum I/O queues supported for the
controller, at least 1 Namespace is required for each controller.
~~~{.sh}
$rpc_py vhost_create_nvme_controller --cpumask 0x1 vhost.2 16
$rpc_py vhost_nvme_controller_add_ns vhost.2 Malloc0
~~~
Users can use the following command to remove the controller, all the block
devices attached to controller's Namespace will be removed automatically.
~~~{.sh}
$rpc_py vhost_delete_controller vhost.2
~~~
## QEMU {#vhost_qemu_config}
Now the virtual machine can be started with QEMU. The following command-line
@ -229,13 +209,6 @@ Finally, specify the SPDK vhost devices:
-device vhost-user-blk-pci,id=blk0,chardev=char1
~~~
### Vhost-NVMe (experimental)
~~~{.sh}
-chardev socket,id=char2,path=/var/tmp/vhost.2
-device vhost-user-nvme,id=nvme0,chardev=char2,num_io_queues=4
~~~
## Example output {#vhost_example}
This example uses an NVMe bdev alongside Mallocs. SPDK vhost application is started
@ -247,9 +220,9 @@ host:~# HUGEMEM=2048 ./scripts/setup.sh
~~~
~~~{.sh}
host:~# ./app/vhost/vhost -S /var/tmp -s 1024 -m 0x3 &
host:~# ./build/bin/vhost -S /var/tmp -s 1024 -m 0x3 &
Starting DPDK 17.11.0 initialization...
[ DPDK EAL parameters: vhost -c 3 -m 1024 --master-lcore=1 --file-prefix=spdk_pid156014 ]
[ DPDK EAL parameters: vhost -c 3 -m 1024 --main-lcore=1 --file-prefix=spdk_pid156014 ]
EAL: Detected 48 lcore(s)
EAL: Probing VFIO support...
EAL: VFIO support initialized
@ -373,7 +346,7 @@ be aborted - possibly flooding a VM with syslog warnings and errors.
### Hot-attach
Hot-attach is is done by simply attaching a bdev to a vhost controller with a QEMU VM
Hot-attach is done by simply attaching a bdev to a vhost controller with a QEMU VM
already started. No other extra action is necessary.
~~~{.sh}

View File

@ -47,18 +47,18 @@ $ 5d:05.5 RAID bus controller: Intel Corporation Device 201d (rev 04)
$ d7:05.5 RAID bus controller: Intel Corporation Device 201d (rev 04)
```
Run setup.sh script with VMD devices set in PCI_WHITELIST.
Run setup.sh script with VMD devices set in PCI_ALLOWED.
Example:
```
$ PCI_WHITELIST="0000:5d:05.5 0000:d7:05.5" scripts/setup.sh
$ PCI_ALLOWED="0000:5d:05.5 0000:d7:05.5" scripts/setup.sh
```
Check for available devices behind the VMD with spdk_lspci.
Example:
```
$ ./app/spdk_lspci/spdk_lspci
$ ./build/bin/spdk_lspci
5d0505:01:00.0 (8086 a54) (NVMe disk behind VMD)
5d0505:03:00.0 (8086 a54) (NVMe disk behind VMD)
@ -79,12 +79,6 @@ $ ./scripts/rpc.py bdev_nvme_attach_controller -b NVMe1 -t PCIe -a 5d0505:01:00.
When application framework is used, VMD section needs to be added to the configuration file:
Text config:
```
[VMD]
Enable True
```
JSON config:
```
{
@ -100,7 +94,7 @@ JSON config:
or use RPC call before framework starts e.g.
```
$ ./app/spdk_tgt/spdk_tgt --wait_for_rpc
$ ./build/bin/spdk_tgt --wait_for_rpc
$ ./scripts/rpc.py enable_vmd
$ ./scripts/rpc.py framework_start_init
```

View File

@ -1,237 +0,0 @@
# Vector Packet Processing {#vpp_integration}
VPP (part of [Fast Data - Input/Output](https://fd.io/) project) is an extensible
userspace framework providing networking functionality. It is built around the concept of
packet processing graph (see [What is VPP?](https://wiki.fd.io/view/VPP/What_is_VPP?)).
Detailed instructions for **simplified steps 1-3** below, can be found on
VPP [Quick Start Guide](https://wiki.fd.io/view/VPP).
*SPDK supports VPP version 19.04.2.*
# 1. Building VPP (optional) {#vpp_build}
*Please skip this step if using already built packages.*
Clone and checkout VPP
~~~
git clone https://gerrit.fd.io/r/vpp && cd vpp
git checkout v19.04.2
~~~
Install VPP build dependencies
~~~
make install-dep
~~~
Build and create .rpm packages
~~~
make pkg-rpm
~~~
Alternatively, build and create .deb packages
~~~
make bootstrap && make pkg-deb
~~~
Packages can be found in `vpp/build-root/` directory.
For more in depth instructions please see Building section in
[VPP documentation](https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Building)
# 2. Installing VPP {#vpp_install}
Packages can be installed from a distribution repository or built in previous step.
Minimal set of packages consists of `vpp`, `vpp-lib` and `vpp-devel`.
*Note: Please remove or modify /etc/sysctl.d/80-vpp.conf file with appropriate values
dependent on number of hugepages that will be used on system.*
# 3. Running VPP {#vpp_run}
VPP takes over any network interfaces that were bound to userspace driver,
for details please see DPDK guide on
[Binding and Unbinding Network Ports to/from the Kernel Modules](http://dpdk.org/doc/guides/linux_gsg/linux_drivers.html#binding-and-unbinding-network-ports-to-from-the-kernel-modules).
VPP is installed as service and disabled by default. To start VPP with default config:
~~~
sudo systemctl start vpp
~~~
Alternatively, use `vpp` binary directly
~~~
sudo vpp unix {cli-listen /run/vpp/cli.sock} session { evt_qs_memfd_seg } socksvr { socket-name /run/vpp-api.sock }
~~~
# 4. Configure VPP {#vpp_config}
VPP can be configured using a VPP startup file and the `vppctl` command; By default, the VPP startup file is `/etc/vpp/startup.conf`, however, you can pass any file with the `-c` vpp command argument.
## Startup configuration
Some key values from iSCSI point of view includes:
CPU section (`cpu`):
- `main-core <lcore>` -- logical CPU core used for main thread.
- `corelist-workers <lcore list>` -- logical CPU cores where worker threads are running.
DPDK section (`dpdk`):
- `num-rx-queues <num>` -- number of receive queues.
- `num-tx-queues <num>` -- number of transmit queues.
- `dev <PCI address>` -- whitelisted device.
Session section (`session`):
- `evt_qs_memfd_seg` -- uses a memfd segment for event queues. This is required for SPDK.
Socket server session (`socksvr`):
- `socket-name <path>` -- configure API socket filename (curently SPDK uses default path `/run/vpp-api.sock`).
Plugins section (`plugins`):
- `plugin <plugin name> { [enable|disable] }` -- enable or disable VPP plugin.
### Example
~~~
unix {
nodaemon
cli-listen /run/vpp/cli.sock
}
cpu {
main-core 1
}
session {
evt_qs_memfd_seg
}
socksvr {
socket-name /run/vpp-api.sock
}
plugins {
plugin default { disable }
plugin dpdk_plugin.so { enable }
}
~~~
## vppctl command tool
The `vppctl` command tool allows users to control VPP at runtime via a command prompt
~~~
sudo vppctl
~~~
Or, by sending single command directly. For example to display interfaces within VPP:
~~~
sudo vppctl show interface
~~~
Useful commands:
- `show interface` -- show interfaces settings, state and some basic statistics.
- `show interface address` -- show interfaces state and assigned addresses.
- `set interface ip address <VPP interface> <Address>` -- set interfaces IP address.
- `set interface state <VPP interface> [up|down]` -- bring interface up or down.
- `show errors` -- show error counts.
## Example: Configure two interfaces to be available via VPP
We want to configure two DPDK ports with PCI addresses 0000:09:00.1 and 0000:0b:00.1
to be used as portals 10.0.0.1/24 and 10.10.0.1/24.
In the VPP startup file (e.g. `/etc/vpp/startup.conf`), whitelist the interfaces
by specifying PCI addresses in section dpdk:
~~~
dev 0000:09:00.1
dev 0000:0b:00.1
~~~
Bind PCI NICs to UIO driver (`igb_uio` or `uio_pci_generic`).
Restart vpp and use vppctl tool to verify interfaces.
~~~
$ vppctl show interface
Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count
FortyGigabitEthernet9/0/1 1 down 9000/0/0/0
FortyGigabitEthernetb/0/1 2 down 9000/0/0/0
~~~
Set appropriate addresses and bring interfaces up:
~~~
$ vppctl set interface ip address FortyGigabitEthernet9/0/1 10.0.0.1/24
$ vppctl set interface state FortyGigabitEthernet9/0/1 up
$ vppctl set interface ip address FortyGigabitEthernetb/0/1 10.10.0.1/24
$ vppctl set interface state FortyGigabitEthernetb/0/1 up
~~~
Verify configuration:
~~~
$ vppctl show interface address
FortyGigabitEthernet9/0/1 (up):
L3 10.0.0.1/24
FortyGigabitEthernetb/0/1 (up):
L3 10.10.0.1/24
~~~
Now, both interfaces are ready to use. To verify conectivity you can ping
10.0.0.1 and 10.10.0.1 addresses from another machine.
## Example: Tap interfaces on single host
For functional test purposes a virtual tap interface can be created,
so no additional network hardware is required.
This will allow network communication between SPDK iSCSI target using VPP end of tap
and kernel iSCSI initiator using the kernel part of tap. A single host is used in this scenario.
Create tap interface via VPP
~~~
vppctl tap connect tap0
vppctl set interface state tapcli-0 up
vppctl set interface ip address tapcli-0 10.0.0.1/24
vppctl show int addr
~~~
Assign address on kernel interface
~~~
sudo ip addr add 10.0.0.2/24 dev tap0
sudo ip link set tap0 up
~~~
To verify connectivity
~~~
ping 10.0.0.1
~~~
# 5. Building SPDK with VPP {#vpp_built_into_spdk}
Support for VPP can be built into SPDK by using configuration option.
~~~
configure --with-vpp
~~~
Alternatively, directory with built libraries can be pointed at
and will be used for compilation instead of installed packages.
~~~
configure --with-vpp=/path/to/vpp/repo/build-root/install-vpp-native/vpp
~~~
# 6. Running SPDK with VPP {#vpp_running_with_spdk}
VPP application has to be started before SPDK application, in order to enable
usage of network interfaces. For example, if you use SPDK iSCSI target or
NVMe-oF target, after the initialization finishes, interfaces configured within
VPP will be available to be configured as portal addresses.
Moreover, you do not need to specifiy which TCP sock implementation (e.g., posix,
VPP) to be used through configuration file or RPC call. Since SPDK program
automatically determines the protocol according to the configured portal addresses
info. For example, you can specify a Listen address in NVMe-oF subsystem
configuration such as "Listen TCP 10.0.0.1:4420". SPDK programs automatically
uses different implemenation to listen this provided portal info via posix or
vpp implemenation(if compiled in SPDK program), and only one implementation can
successfully listen on the provided portal.

2
dpdk

@ -1 +1 @@
Subproject commit 76f9669b1f4cdd52bae2c3408ad129272bf99d1f
Subproject commit 4f93dbc0c0ab3804abaa20123030ad7fccf78709

View File

@ -36,101 +36,64 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
.PHONY: all clean install uninstall
DPDK_FRAMEWORK = n
DPDK_OPTS =
DPDK_OPTS = -Denable_docs=false
DPDK_CFLAGS =
DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_ETHER=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_CMDLINE=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_METER=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_HASH=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_VHOST=n
DPDK_OPTS += CONFIG_RTE_EAL_IGB_UIO=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=n
ifeq ($(CONFIG_SHARED),y)
DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=y
DPDK_LDFLAGS+= -rpath $(SPDK_ROOT_DIR)/dpdk/build/lib
DPDK_KMODS = false
ifeq ($(OS),FreeBSD)
DPDK_KMODS = true
endif
DPDK_OPTS += -Denable_kmods=$(DPDK_KMODS)
ifeq ($(CONFIG_DEBUG),y)
DPDK_OPTS += --buildtype=debug
endif
# the drivers we use
DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring
# common crypto/reduce drivers
ifeq ($(findstring y,$(CONFIG_CRYPTO)$(CONFIG_REDUCE)),y)
DPDK_DRIVERS += crypto/qat compress/qat common/qat
endif
ifeq ($(CONFIG_CRYPTO),y)
DPDK_FRAMEWORK = y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=y
# crypto/qat is just a stub, the compress/qat pmd is used instead
DPDK_DRIVERS += crypto crypto/aesni_mb
DPDK_CFLAGS += -I$(IPSEC_MB_DIR)
DPDK_LDFLAGS += -L$(IPSEC_MB_DIR)
endif
ifeq ($(CONFIG_REDUCE),y)
DPDK_FRAMEWORK = y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=y
DPDK_DRIVERS += compress compress/isal
DPDK_CFLAGS += -I$(ISAL_DIR)
DPDK_LDFLAGS += -L$(ISAL_DIR)/.libs
DPDK_LDFLAGS += -L$(ISAL_DIR)/.libs -lisal
endif
ifeq ($(CONFIG_VHOST),y)
DPDK_OPTS += CONFIG_RTE_LIBRTE_ETHER=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_CMDLINE=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_METER=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_HASH=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_VHOST=y
endif
ifeq ($(CONFIG_IGB_UIO_DRIVER),y)
DPDK_OPTS += CONFIG_RTE_EAL_IGB_UIO=y
endif
ifeq ($(CONFIG_RAID5),y)
DPDK_OPTS += CONFIG_RTE_LIBRTE_HASH=y
endif
ifeq ($(DPDK_FRAMEWORK),y)
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT=y
DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y
endif
ifeq ($(TARGET_MACHINE),aarch64)
DPDK_CONFIG := arm64-armv8a
else
DPDK_CONFIG := $(TARGET_MACHINE)-native
endif
DPDK_OPTS += -Dmachine=$(TARGET_ARCHITECTURE)
ifneq ($(CONFIG_CROSS_PREFIX),)
DPDK_OPTS += CROSS=$(CONFIG_CROSS_PREFIX)-
endif
ifeq ($(OS),Linux)
DPDK_CONFIG := $(DPDK_CONFIG)-linuxapp
NPROC := $(shell nproc)
ifeq ($(findstring mingw,$(CONFIG_CROSS_PREFIX)),mingw)
DPDK_OPTS += --cross-file $(SPDK_ROOT_DIR)/dpdk/config/x86/cross-mingw
else
ifeq ($(OS),FreeBSD)
DPDK_CONFIG := $(DPDK_CONFIG)-bsdapp
NPROC := $(shell sysctl hw.ncpu | awk '{print $$NF}')
$(error Automatic DPDK cross build is not supported. Please compile DPDK manually \
with e.g. `meson build --cross-file config/arm/arm64_armv8_linux_gcc`)
endif
endif
ifeq ($(CC_TYPE),clang)
DPDK_CONFIG := $(DPDK_CONFIG)-clang
else
DPDK_CONFIG := $(DPDK_CONFIG)-gcc
endif
DPDK_CFLAGS += -fPIC
ifeq ($(CONFIG_DEBUG),y)
DPDK_CFLAGS += -O0 -g
endif
ifeq ($(CONFIG_WERROR),y)
DPDK_CFLAGS += -Werror
else
DPDK_CFLAGS += -Wno-error
endif
ifeq ($(CONFIG_CET),y)
DPDK_CFLAGS += -fcf-protection
DPDK_LDFLAGS += -fcf-protection
endif
ifdef EXTRA_DPDK_CFLAGS
$(warning EXTRA_DPDK_CFLAGS defined, possibly to work around an unsupported compiler version)
$(shell sleep 1)
@ -139,20 +102,80 @@ endif
# Allow users to specify EXTRA_DPDK_CFLAGS if they want to build DPDK using unsupported compiler versions
DPDK_CFLAGS += $(EXTRA_DPDK_CFLAGS)
ifeq ($(CC_TYPE),gcc)
GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1)
ifeq ($(shell test $(GCC_MAJOR) -ge 10 && echo 1), 1)
#1. gcc 10 complains on operations with zero size arrays in rte_cryptodev.c, so
#disable this warning
#2. gcc 10 disables fcommon by default and complains on multiple definition of
#aesni_mb_logtype_driver symbol which is defined in header file and presented in sevral
#translation units
DPDK_CFLAGS += -Wno-stringop-overflow -fcommon
endif
endif
# Force-disable scan-build
SUB_CC = $(patsubst %ccc-analyzer,$(DEFAULT_CC),$(CC))
$(SPDK_ROOT_DIR)/dpdk/build: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/include/spdk/config.h
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk config T=$(DPDK_CONFIG) $(DPDK_OPTS)
DPDK_ALL_DRIVER_DIRS = $(shell find $(SPDK_ROOT_DIR)/dpdk/drivers -mindepth 1 -type d)
DPDK_ALL_DRIVERS = $(DPDK_ALL_DRIVER_DIRS:$(SPDK_ROOT_DIR)/dpdk/drivers/%=%)
DPDK_DISABLED_DRVERS = $(filter-out $(DPDK_DRIVERS),$(DPDK_ALL_DRIVERS))
all: $(SPDK_ROOT_DIR)/dpdk/build
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" EXTRA_LDFLAGS="$(DPDK_LDFLAGS)" CC=$(SUB_CC) T="$(DPDK_CONFIG)" $(DPDK_OPTS)
ifneq ($(OS),FreeBSD)
SED_INPLACE_FLAG = "-i"
MESON_PREFIX = $(SPDK_ROOT_DIR)/dpdk/build
else
SED_INPLACE_FLAG = "-i ''"
MESON_PREFIX = "/"
endif
# Some ninja versions come with a (broken?) jobserver which defaults to use
# only 1 thread for the build. We workaround this by specifying -j to ninja
# with the same value as top-makefile. This is OK as long as DPDK is not built
# in parralel with anything else, which is the case for now.
ifeq ($(MAKE_PID),)
MAKE_PID := $(shell echo $$PPID)
endif
MAKE_NUMJOBS := $(shell ps T | sed -nE 's/[[:space:]]*$(MAKE_PID)[[:space:]].* (-j|--jobs=)( *[0-9]+).*/\1\2/p')
all: $(SPDK_ROOT_DIR)/dpdk/build-tmp
$(Q)# DPDK doesn't handle nested make calls, so unset MAKEFLAGS
$(Q)env -u MAKEFLAGS ninja -C $(SPDK_ROOT_DIR)/dpdk/build-tmp $(MAKE_NUMJOBS)
$(Q) \
# Meson on FreeBSD sometimes appends --prefix value to the default DESTDIR (which is e.g. \
# /usr/local) instead of replacing it. --prefix needs to be an absolute path, so we set \
# it to / and then set DESTDIR directly, so libs and headers are copied to "DESTDIR//". \
# DPDK kernel modules are set to install in $DESTDIR/boot/modules, but we move them \
# to DESTDIR/kmod to be consistent with the makefile build. \
# \
# Also use meson install --only-changed instead of ninja install so that the shared \
# libraries don't get reinstalled when they haven't been rebuilt - this avoids all of \
# our applications getting relinked even when nothing has changed.
$(Q)if [ "$(OS)" = "FreeBSD" ]; then \
env -u MAKEFLAGS DESTDIR=$(SPDK_ROOT_DIR)/dpdk/build ninja -C $(SPDK_ROOT_DIR)/dpdk/build-tmp $(MAKE_NUMJOBS) install > /dev/null && \
mv $(SPDK_ROOT_DIR)/dpdk/build/boot/modules $(SPDK_ROOT_DIR)/dpdk/build/kmod; \
else \
env -u MAKEFLAGS meson install -C $(SPDK_ROOT_DIR)/dpdk/build-tmp --only-changed > /dev/null; \
fi
$(SPDK_ROOT_DIR)/dpdk/build-tmp: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/include/spdk/config.h
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build $(SPDK_ROOT_DIR)/dpdk/build-tmp
$(Q)cd "$(SPDK_ROOT_DIR)/dpdk"; CC="$(SUB_CC)" meson --prefix="$(MESON_PREFIX)" --libdir lib -Dc_args="$(DPDK_CFLAGS)" -Dc_link_args="$(DPDK_LDFLAGS)" $(DPDK_OPTS) -Ddisable_drivers="$(shell echo $(DPDK_DISABLED_DRVERS) | sed -E "s/ +/,/g")" build-tmp
$(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_EAL_PMD_PATH .*/#define RTE_EAL_PMD_PATH ""/g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h
$(Q) \
# TODO Meson build adds libbsd dependency when it's available. This means any app will be \
# forced to link with -lbsd, but only if it's available on the system. The clean way to \
# handle this would be to rely on DPDK's pkg-config file which will contain the -lbsd when \
# required. For now just remove the libbsd dependency. DPDK will fallback to its internal \
# functions.
$(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_USE_LIBBSD .*//g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h
clean:
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build $(SPDK_ROOT_DIR)/dpdk/build-tmp
install: all
install:
@:
uninstall:
@:

View File

@ -1,230 +0,0 @@
# iSCSI target configuration file
#
# Please write all parameters using ASCII.
# The parameter must be quoted if it includes whitespace.
#
# Configuration syntax:
# Leading whitespace is ignored.
# Lines starting with '#' are comments.
# Lines ending with '\' are concatenated with the next line.
# Bracketed ([]) names define sections
[Global]
# Shared Memory Group ID. SPDK applications with the same ID will share memory.
# Default: <the process PID>
#SharedMemoryID 0
# Disable PCI access. PCI is enabled by default. Setting this
# option will hide any PCI device from all SPDK modules, making
# SPDK act as if they don't exist.
#NoPci Yes
# Tracepoint group mask for spdk trace buffers
# Default: 0x0 (all tracepoint groups disabled)
# Set to 0xFFFF to enable all tracepoint groups.
#TpointGroupMask 0x0
# Users may activate entries in this section to override default values for
# global parameters in the block device (bdev) subsystem.
[Bdev]
# Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
#BdevIoPoolSize 65536
# Maximum number of spdk_bdev_io structures to cache per thread.
#BdevIoCacheSize 256
[iSCSI]
# node name (not include optional part)
# Users can optionally change this to fit their environment.
NodeBase "iqn.2016-06.io.spdk"
AuthFile /usr/local/etc/spdk/auth.conf
# Socket I/O timeout sec. (0 is infinite)
Timeout 30
# authentication information for discovery session
# Options:
# None, Auto, CHAP and Mutual. Note that Mutual infers CHAP.
DiscoveryAuthMethod Auto
#MaxSessions 128
#MaxConnectionsPerSession 2
# iSCSI initial parameters negotiate with initiators
# NOTE: incorrect values might crash
DefaultTime2Wait 2
DefaultTime2Retain 60
# Maximum amount in bytes of unsolicited data the iSCSI
# initiator may send to the target during the execution of
# a single SCSI command.
FirstBurstLength 8192
ImmediateData Yes
ErrorRecoveryLevel 0
# Users must change the PortalGroup section(s) to match the IP addresses
# for their environment.
# PortalGroup sections define which network portals the iSCSI target
# will use to listen for incoming connections. These are also used to
# determine which targets are accessible over each portal group.
# Up to 1024 portal directives are allowed. These define the network
# portals of the portal group. The user must specify a IP address
# for each network portal, and may optionally specify a port.
# If the port is omitted, 3260 will be used.
# Syntax:
# Portal <Name> <IP address>[:<port>]
[PortalGroup1]
Portal DA1 192.168.2.21:3260
Portal DA2 192.168.2.22:3260
# Users must change the InitiatorGroup section(s) to match the IP
# addresses and initiator configuration in their environment.
# Netmask can be used to specify a single IP address or a range of IP addresses
# Netmask 192.168.1.20 <== single IP address
# Netmask 192.168.1.0/24 <== IP range 192.168.1.*
[InitiatorGroup1]
InitiatorName ANY
Netmask 192.168.2.0/24
# NVMe configuration options
[Nvme]
# NVMe Device Whitelist
# Users may specify which NVMe devices to claim by their transport id.
# See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
# The second argument is the assigned name, which can be referenced from
# other sections in the configuration file. For NVMe devices, a namespace
# is automatically appended to each name in the format <YourName>nY, where
# Y is the NSID (starts at 1).
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
# The number of attempts per I/O when an I/O fails. Do not include
# this key to get the default behavior.
RetryCount 4
# Timeout for each command, in microseconds. If 0, don't track timeouts.
TimeoutUsec 0
# Action to take on command time out. Only valid when Timeout is greater
# than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
# the command, or 'None' to just print a message but do nothing.
# Admin command timeouts will always result in a reset.
ActionOnTimeout None
# Set how often the admin queue is polled for asynchronous events.
# Units in microseconds.
AdminPollRate 100000
# Set how often I/O queues are polled from completions.
# Units in microseconds.
IOPollRate 0
# Disable handling of hotplug (runtime insert and remove) events,
# users can set to Yes if want to enable it.
# Default: No
HotplugEnable No
# Set how often the hotplug is processed for insert and remove events.
# Units in microseconds.
HotplugPollRate 0
# Users may change this section to create a different number or size of
# malloc LUNs.
# If the system has hardware DMA engine, it can use an IOAT
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
# by specifying "Enable Yes" in [Ioat] section.
# Offload is disabled by default even it is available.
[Malloc]
# Number of Malloc targets
NumberOfLuns 5
# Malloc targets are 128M
LunSizeInMB 128
# Block size. Default is 512 bytes.
BlockSize 4096
# Users can use offload by specifying "Enable Yes" in this section
# if it is available.
# Users may use the whitelist to initialize specified devices, IDS
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
[Ioat]
Enable No
Whitelist 00:04.0
Whitelist 00:04.1
# Users must change this section to match the /dev/sdX devices to be
# exported as iSCSI LUNs. The devices are accessed using Linux AIO.
# The format is:
# AIO <file name> <bdev name> [<block size>]
# The file name is the backing device
# The bdev name can be referenced from elsewhere in the configuration file.
# Block size may be omitted to automatically detect the block size of a disk.
[AIO]
AIO /dev/sdb AIO0
AIO /dev/sdc AIO1
AIO /tmp/myfile AIO2 4096
# PMDK libpmemblk-based block device
[Pmem]
# Syntax:
# Blk <pmemblk pool file name> <bdev name>
Blk /path/to/pmem-pool Pmem0
# The Split virtual block device slices block devices into multiple smaller bdevs.
[Split]
# Syntax:
# Split <bdev> <count> [<size_in_megabytes>]
# Split Malloc1 into two equally-sized portions, Malloc1p0 and Malloc1p1
Split Malloc1 2
# Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
# leaving the rest of the device inaccessible
Split Malloc2 8 1
# The RAID virtual block device based on pre-configured block device.
[RAID1]
# Unique name of this RAID device.
Name Raid0
# RAID level, only raid level 0 is supported.
RaidLevel 0
# Strip size in KB.
StripSize 64
# Number of pre-configured bdevs.
NumDevices 2
# Pre-configured bdevs name with Nvme.
#Devices Nvme0n1 Nvme1n1
# Pre-configured bdevs name with Malloc.
Devices Malloc3 Malloc4
# Pre-configured bdevs name with AIO.
#Devices AIO0 AIO1
# Users should change the TargetNode section(s) below to match the
# desired iSCSI target node configuration.
# TargetName, Mapping, LUN0 are minimum required
[TargetNode1]
TargetName disk1
TargetAlias "Data Disk1"
Mapping PortalGroup1 InitiatorGroup1
AuthMethod Auto
AuthGroup AuthGroup1
# Enable header and data digest
# UseDigest Header Data
UseDigest Auto
# Use the first malloc target
LUN0 Malloc0
# Using the first AIO target
LUN1 AIO0
# Using the second storage target
LUN2 AIO1
# Using the third storage target
LUN3 AIO2
QueueDepth 128
[TargetNode2]
TargetName disk2
TargetAlias "Data Disk2"
Mapping PortalGroup1 InitiatorGroup1
AuthMethod Auto
AuthGroup AuthGroup1
UseDigest Auto
LUN0 Nvme0n1
LUN1 Raid0
QueueDepth 32

View File

@ -1,295 +0,0 @@
# NVMf Target Configuration File
#
# Please write all parameters using ASCII.
# The parameter must be quoted if it includes whitespace.
#
# Configuration syntax:
# Leading whitespace is ignored.
# Lines starting with '#' are comments.
# Lines ending with '\' are concatenated with the next line.
# Bracketed ([]) names define sections
[Global]
# Tracepoint group mask for spdk trace buffers
# Default: 0x0 (all tracepoint groups disabled)
# Set to 0xFFFF to enable all tracepoint groups.
#TpointGroupMask 0x0
# PciBlacklist and PciWhitelist cannot be used at the same time
#PciBlacklist 0000:01:00.0
#PciBlacklist 0000:02:00.0
#PciWhitelist 0000:03:00.0
#PciWhitelist 0000:04:00.0
# Users may activate entries in this section to override default values for
# global parameters in the block device (bdev) subsystem.
[Bdev]
# Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
#BdevIoPoolSize 65536
# Maximum number of spdk_bdev_io structures to cache per thread.
#BdevIoCacheSize 256
# Users may change this section to create a different number or size of
# malloc LUNs.
# This will generate 8 LUNs with a malloc-allocated backend.
# Each LUN will be size 64MB and these will be named
# Malloc0 through Malloc7. Not all LUNs defined here are necessarily
# used below.
[Malloc]
NumberOfLuns 8
LunSizeInMB 64
# Users must change this section to match the /dev/sdX devices to be
# exported as iSCSI LUNs. The devices are accessed using Linux AIO.
# The format is:
# AIO <file name> <bdev name>
# The file name is the backing device
# The bdev name can be referenced from elsewhere in the configuration file.
# Block size may be omitted to automatically detect the block size of a disk.
[AIO]
AIO /dev/sdb AIO0
AIO /dev/sdc AIO1
AIO /tmp/myfile AIO2 4096
# PMDK libpmemblk-based block device
[Pmem]
# Syntax:
# Blk <pmemblk pool file name> <bdev name>
Blk /path/to/pmem-pool Pmem0
# Define NVMf protocol global options
[Nvmf]
# Set how often the acceptor polls for incoming connections. The acceptor is also
# responsible for polling existing connections that have gone idle. 0 means continuously
# poll. Units in microseconds.
AcceptorPollRate 10000
# Set how the connection is scheduled among multiple threads, current supported string value are
# "RoundRobin", "Host", "Transport".
# RoundRobin: Schedule the connection with roundrobin manner.
# Host: Schedule the connection according to host IP.
# Transport: Schedule the connection according to the transport characteristics.
# For example, for TCP transport, we can schedule the connection according to socket NAPI_ID info.
# The connection which has the same socket NAPI_ID info will be grouped in the same polling group.
ConnectionScheduler RoundRobin
# One valid transport type must be set in each [Transport].
# The first is the case of RDMA transport and the second is the case of TCP transport.
[Transport]
# Set RDMA transport type.
Type RDMA
# Set the maximum number of outstanding I/O per queue.
#MaxQueueDepth 128
# Set the maximum number of submission and completion queues per session.
# Setting this to '8', for example, allows for 8 submission and 8 completion queues
# per session.
#MaxQueuesPerSession 4
# Set the maximum in-capsule data size. Must be a multiple of 16.
# 0 is a valid choice.
#InCapsuleDataSize 4096
# Set the maximum I/O size. Must be a multiple of 4096.
#MaxIOSize 131072
# Set the I/O unit size, and this value should not be larger than MaxIOSize
#IOUnitSize 131072
# Set the maximum number of IO for admin queue
#MaxAQDepth 32
# Set the number of pooled data buffers available to the transport
# It is used to provide the read/write data buffers for the qpairs on this transport.
#NumSharedBuffers 512
# Set the number of shared buffers to be cached per poll group
#BufCacheSize 32
# Set the maximum number outstanding I/O per shared receive queue. Relevant only for RDMA transport
#MaxSRQDepth 4096
[Transport]
# Set TCP transport type.
Type TCP
# Set the maximum number of outstanding I/O per queue.
#MaxQueueDepth 128
# Set the maximum number of submission and completion queues per session.
# Setting this to '8', for example, allows for 8 submission and 8 completion queues
# per session.
#MaxQueuesPerSession 4
# Set the maximum in-capsule data size. Must be a multiple of 16.
# 0 is a valid choice.
#InCapsuleDataSize 4096
# Set the maximum I/O size. Must be a multiple of 4096.
#MaxIOSize 131072
# Set the I/O unit size, and this value should not be larger than MaxIOSize
#IOUnitSize 131072
# Set the maximum number of IO for admin queue
#MaxAQDepth 32
# Set the number of pooled data buffers available to the transport
# It is used to provide the read/write data buffers for the qpairs on this transport.
#NumSharedBuffers 512
# Set the number of shared buffers to be cached per poll group
#BufCacheSize 32
# Set whether to use the C2H Success optimization, only used for TCP transport.
# C2HSuccess true
# Set whether to use different priority for socket, only used for TCP transport.
# SockPriority 0
# Define FC transport
#[Transport]
# Set FC transport type.
#Type FC
# Set the maximum number of submission and completion queues per session.
# Setting this to '8', for example, allows for 8 submission and 8 completion queues
# per session.
#MaxQueuesPerSession 5
# Set the maximum number of outstanding I/O per queue.
#MaxQueueDepth 128
# Set the maximum I/O size. Must be a multiple of 4096.
#MaxIOSize 65536
[Nvme]
# NVMe Device Whitelist
# Users may specify which NVMe devices to claim by their transport id.
# See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
# The second argument is the assigned name, which can be referenced from
# other sections in the configuration file. For NVMe devices, a namespace
# is automatically appended to each name in the format <YourName>nY, where
# Y is the NSID (starts at 1).
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
TransportID "trtype:PCIe traddr:0000:02:00.0" Nvme2
TransportID "trtype:PCIe traddr:0000:03:00.0" Nvme3
TransportID "trtype:RDMA adrfam:IPv4 traddr:192.168.100.8 trsvcid:4420 hostaddr:192.168.100.9 subnqn:nqn.2016-06.io.spdk:cnode1" Nvme4
TransportID "trtype:TCP adrfam:IPv4 traddr:192.168.100.3 trsvcid:4420 hostaddr:192.168.100.4 subnqn:nqn.2016-06.io.spdk:cnode2" Nvme5
# The number of attempts per I/O when an I/O fails. Do not include
# this key to get the default behavior.
RetryCount 4
# Timeout for each command, in microseconds. If 0, don't track timeouts.
TimeoutUsec 0
# Action to take on command time out. Only valid when Timeout is greater
# than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
# the command, or 'None' to just print a message but do nothing.
# Admin command timeouts will always result in a reset.
ActionOnTimeout None
# Set how often the admin queue is polled for asynchronous events.
# Units in microseconds.
AdminPollRate 100000
# Set how often I/O queues are polled from completions.
# Units in microseconds.
IOPollRate 0
# Disable handling of hotplug (runtime insert and remove) events,
# users can set to Yes if want to enable it.
# Default: No
HotplugEnable No
# Enable/disable delayed NVMe command submission.
# Default: True.
DelayCmdSubmit True
# The Split virtual block device slices block devices into multiple smaller bdevs.
[Split]
# Syntax:
# Split <bdev> <count> [<size_in_megabytes>]
# Split Malloc2 into two equally-sized portions, Malloc2p0 and Malloc2p1
Split Malloc2 2
# Split Malloc3 into eight 1-megabyte portions, Malloc3p0 ... Malloc3p7,
# leaving the rest of the device inaccessible
Split Malloc3 8 1
# The RAID virtual block device based on pre-configured block device.
[RAID1]
# Unique name of this RAID device.
Name Raid0
# RAID level, only raid level 0 is supported.
RaidLevel 0
# Strip size in KB.
StripSize 64
# Number of pre-configured bdevs.
NumDevices 2
# Pre-configured bdevs name with Nvme.
Devices Nvme2n1 Nvme3n1
# Pre-configured bdevs name with Malloc.
#Devices Malloc0 Malloc1
# Pre-configured bdevs name with AIO.
#Devices AIO0 AIO1
# Define an NVMf Subsystem.
# - NQN is required and must be unique.
# - Between 1 and 255 Listen directives are allowed. This defines
# the addresses on which new connections may be accepted. The format
# is Listen <type> <address> where type can be RDMA, TCP or FC.
# - Between 0 and 255 Host directives are allowed. This defines the
# NQNs of allowed hosts. If no Host directive is specified, all hosts
# are allowed to connect.
# - Between 0 and 255 Namespace directives are allowed. These define the
# namespaces accessible from this subsystem.
# The user must specify MaxNamespaces to allow for adding namespaces
# during active connection. By default it is 0
# The user must specify a bdev name for each namespace, and may optionally
# specify a namespace ID. If nsid is omitted, the namespace will be
# assigned the next available NSID. The NSID must be unique within the
# subsystem. An optional namespace UUID may also be specified.
# Syntax:
# Namespace <bdev_name> [<nsid> [<uuid>]]
# Namespaces backed by physical NVMe devices
[Subsystem1]
NQN nqn.2016-06.io.spdk:cnode1
Listen TCP 15.15.15.2:4420
AllowAnyHost No
Host nqn.2016-06.io.spdk:init
SN SPDK00000000000001
MN SPDK_Controller1
MaxNamespaces 20
Namespace Nvme0n1 1
Namespace Nvme1n1 2
Namespace Raid0
# Multiple subsystems are allowed.
# Namespaces backed by non-NVMe devices
[Subsystem2]
NQN nqn.2016-06.io.spdk:cnode2
Listen RDMA 192.168.2.21:4420
AllowAnyHost No
Host nqn.2016-06.io.spdk:init
SN SPDK00000000000002
MN SPDK_Controller2
Namespace Malloc0
Namespace Malloc1
Namespace AIO0
Namespace AIO1
# Subsystem with FC listen address directive
# - Listen option allows subsystem access on specific FC ports identified
# by WWNN-WWPN. Each subsystem allows 0 - 255 listen directives.
# If no listen directive is provided, subsystem can be accessed on all
# avialable FC links permitted by FC zoning rules.
#
# [Subsystem3]
#NQN nqn.2016-06.io.spdk:cnode3
#Listen FC "nn-0x20000090fac7ca5c:pn-0x10000090fac7ca5c"
#AllowAnyHost Yes
#SN SPDK00000000000003
#Namespace Malloc4

View File

@ -1,187 +0,0 @@
# SPDK vhost configuration file
#
# Please write all parameters using ASCII.
# The parameter must be quoted if it includes whitespace.
# Configuration syntax:
# Leading whitespace is ignored.
# Lines starting with '#' are comments.
# Lines ending with '\' are concatenated with the next line.
# Bracketed ([]) names define sections
[Global]
# Instance ID for multi-process support
# Default: 0
#InstanceID 0
# Disable PCI access. PCI is enabled by default. Setting this
# option will hide any PCI device from all SPDK modules, making
# SPDK act as if they don't exist.
#NoPci Yes
# Tracepoint group mask for spdk trace buffers
# Default: 0x0 (all tracepoint groups disabled)
# Set to 0xFFFF to enable all tracepoint groups.
#TpointGroupMask 0x0
# Users may activate entries in this section to override default values for
# global parameters in the block device (bdev) subsystem.
[Bdev]
# Number of spdk_bdev_io structures allocated in the global bdev subsystem pool.
#BdevIoPoolSize 65536
# Maximum number of spdk_bdev_io structures to cache per thread.
#BdevIoCacheSize 256
# Users may not want to use offload even it is available.
# Users can use offload by specifying "Enable Yes" in this section
# if it is available.
# Users may use the whitelist to initialize specified devices, IDS
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
[Ioat]
Enable No
#Whitelist 00:04.0
#Whitelist 00:04.1
# Users must change this section to match the /dev/sdX devices to be
# exported as vhost scsi drives. The devices are accessed using Linux AIO.
[AIO]
#AIO /dev/sdb AIO0
#AIO /dev/sdc AIO1
# PMDK libpmemblk-based block device
[Pmem]
# Syntax:
# Blk <pmemblk pool file name> <bdev name>
Blk /path/to/pmem-pool Pmem0
# Users may change this section to create a different number or size of
# malloc LUNs.
# If the system has hardware DMA engine, it can use an IOAT
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
# by specifying "Enable Yes" in [Ioat] section.
# Offload is disabled by default even it is available.
[Malloc]
# Number of Malloc targets
NumberOfLuns 3
# Malloc targets are 128M
LunSizeInMB 128
# Block size. Default is 512 bytes.
BlockSize 4096
# NVMe configuration options
[Nvme]
# NVMe Device Whitelist
# Users may specify which NVMe devices to claim by their transport id.
# See spdk_nvme_transport_id_parse() in spdk/nvme.h for the correct format.
# The second argument is the assigned name, which can be referenced from
# other sections in the configuration file. For NVMe devices, a namespace
# is automatically appended to each name in the format <YourName>nY, where
# Y is the NSID (starts at 1).
TransportID "trtype:PCIe traddr:0000:00:00.0" Nvme0
TransportID "trtype:PCIe traddr:0000:01:00.0" Nvme1
# The number of attempts per I/O when an I/O fails. Do not include
# this key to get the default behavior.
RetryCount 4
# Timeout for each command, in microseconds. If 0, don't track timeouts.
TimeoutUsec 0
# Action to take on command time out. Only valid when Timeout is greater
# than 0. This may be 'Reset' to reset the controller, 'Abort' to abort
# the command, or 'None' to just print a message but do nothing.
# Admin command timeouts will always result in a reset.
ActionOnTimeout None
# Set how often the admin queue is polled for asynchronous events.
# Units in microseconds.
AdminPollRate 100000
# Set how often I/O queues are polled from completions.
# Units in microseconds.
IOPollRate 0
# The Split virtual block device slices block devices into multiple smaller bdevs.
[Split]
# Syntax:
# Split <bdev> <count> [<size_in_megabytes>]
#
# Split Nvme1n1 into two equally-sized portions, Nvme1n1p0 and Nvme1n1p1
#Split Nvme1n1 2
# Split Malloc2 into eight 1-megabyte portions, Malloc2p0 ... Malloc2p7,
# leaving the rest of the device inaccessible
#Split Malloc2 8 1
# The RAID virtual block device based on pre-configured block device.
[RAID1]
# Unique name of this RAID device.
Name Raid0
# RAID level, only raid level 0 is supported.
RaidLevel 0
# Strip size in KB.
StripSize 64
# Number of pre-configured bdevs.
NumDevices 2
# Pre-configured bdevs name with Nvme.
#Devices Nvme0n1 Nvme1n1
# Pre-configured bdevs name with Malloc.
Devices Malloc1 Malloc2
# Pre-configured bdevs name with AIO.
#Devices AIO0 AIO1
# Vhost scsi controller configuration
# Users should change the VhostScsi section(s) below to match the desired
# vhost configuration.
# Name is minimum required
[VhostScsi0]
# Define name for controller
Name vhost.0
# Assign devices from backend
# Use the first malloc device
Target 0 Malloc0
# Use the first AIO device
#Target 1 AIO0
# Use the frist Nvme device
#Target 2 Nvme0n1
# Use the third partition from second Nvme device
#Target 3 Nvme1n1p2
# Start the poller for this vhost controller on one of the cores in
# this cpumask. By default, it not specified, will use any core in the
# SPDK process.
#Cpumask 0x1
#[VhostScsi1]
# Name vhost.1
# Target 0 AIO1
# Cpumask 0x1
#[VhostBlk0]
# Define name for controller
#Name vhost.2
# Use first partition from the second Malloc device
#Dev Malloc2p0
# Put controller in read-only mode
#ReadOnly no
# Start the poller for this vhost controller on one of the cores in
# this cpumask. By default, it not specified, will use any core in the
# SPDK process.
#Cpumask 0x1
#[VhostBlk1]
# Define name for controller
#Name vhost.2
# Use device which named Raid0
#Dev Raid0
#[VhostNvme0]
# Define name for controller
#Name vhost.0
#NumberOfQueues 2
# Use first partition from the first NVMe device
#Namespace Nvme0n1p0
# Use first partition from the first NVMe device
#Namespace Nvme0n1p1
# Start the poller for this vhost controller on one of the cores in
# this cpumask. By default, it not specified, will use any core in the
# SPDK process.
#Cpumask 0x1

View File

@ -36,6 +36,10 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
DIRS-y += accel bdev blob ioat nvme sock vmd nvmf
ifeq ($(OS),Linux)
DIRS-$(CONFIG_VHOST) += interrupt_tgt
endif
.PHONY: all clean $(DIRS-y)
all: $(DIRS-y)

View File

@ -39,9 +39,6 @@ APP = accel_perf
C_SRCS := accel_perf.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_accel event_vmd
SPDK_LIB_LIST += bdev accel event thread util conf trace \
log jsonrpc json rpc sock notify
SPDK_LIB_LIST = $(ACCEL_MODULES_LIST) event_accel
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

File diff suppressed because it is too large Load Diff

View File

@ -36,15 +36,10 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
APP := fio_plugin
FIO_PLUGIN := spdk_bdev
C_SRCS = fio_plugin.c
CFLAGS += -I$(CONFIG_FIO_SOURCE_DIR)
LDFLAGS += -shared -rdynamic -Wl,-z,nodelete
# Unable to combine the FIO plugin and the VPP socket abstraction (license incompatibility)
SPDK_LIB_LIST = $(filter-out sock_vpp,$(ALL_MODULES_LIST))
SPDK_LIB_LIST += thread util bdev bdev_rpc conf accel rpc jsonrpc json log sock trace notify
SPDK_LIB_LIST += event event_bdev event_accel event_vmd
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk

View File

@ -45,14 +45,11 @@ To use the SPDK fio plugin with fio, specify the plugin binary using LD_PRELOAD
fio and set ioengine=spdk_bdev in the fio configuration file (see example_config.fio in the same
directory as this README).
LD_PRELOAD=<path to spdk repo>/examples/bdev/fio_plugin/fio_plugin fio
LD_PRELOAD=<path to spdk repo>/build/fio/spdk_bdev fio
The fio configuration file must contain one new parameter:
spdk_conf=./examples/bdev/fio_plugin/bdev.conf
This must point at an SPDK configuration file. There are a number of example configuration
files in the SPDK repository under etc/spdk.
spdk_json_conf=./examples/bdev/fio_plugin/bdev.json
You can specify which block device to run against by setting the filename parameter
to the block device name:
@ -63,8 +60,10 @@ Or for NVMe devices:
filename=Nvme0n1
Currently the SPDK fio plugin is limited to the thread usage model, so fio jobs must also specify thread=1
when using the SPDK fio plugin.
fio by default forks a separate process for every job. It also supports just spawning a separate
thread in the same process for every job. The SPDK fio plugin is limited to this latter thread
usage model, so fio jobs must also specify thread=1 when using the SPDK fio plugin. The SPDK fio
plugin supports multiple threads - in this case, the "1" just means "use thread mode".
fio also currently has a race condition on shutdown if dynamically loading the ioengine by specifying the
engine's full path via the ioengine parameter - LD_PRELOAD is recommended to avoid this race condition.

View File

@ -1,3 +0,0 @@
[Malloc]
NumberOfLuns 1
LunSizeInMB 128

View File

@ -0,0 +1,17 @@
{
"subsystems": [
{
"subsystem": "bdev",
"config": [
{
"params": {
"block_size": 512,
"num_blocks": 262144,
"name": "Malloc0"
},
"method": "bdev_malloc_create"
}
]
}
]
}

View File

@ -1,6 +1,6 @@
[global]
ioengine=spdk_bdev
spdk_conf=./examples/bdev/fio_plugin/bdev.conf.in
spdk_json_conf=./examples/bdev/fio_plugin/bdev.json
thread=1
group_reporting=1
direct=1
@ -13,4 +13,5 @@ rw=randrw
bs=4k
[test]
filename=Malloc0
numjobs=1

View File

@ -35,7 +35,6 @@
#include "spdk/bdev.h"
#include "spdk/accel_engine.h"
#include "spdk/conf.h"
#include "spdk/env.h"
#include "spdk/thread.h"
#include "spdk/log.h"
@ -43,7 +42,6 @@
#include "spdk/queue.h"
#include "spdk/util.h"
#include "spdk_internal/thread.h"
#include "spdk_internal/event.h"
#include "config-host.h"
@ -61,7 +59,7 @@ struct spdk_fio_options {
char *conf;
char *json_conf;
unsigned mem_mb;
bool mem_single_seg;
int mem_single_seg;
};
struct spdk_fio_request {
@ -87,6 +85,8 @@ struct spdk_fio_thread {
struct io_u **iocq; /* io completion queue */
unsigned int iocq_count; /* number of iocq entries filled by last getevents */
unsigned int iocq_size; /* number of iocq entries allocated */
TAILQ_ENTRY(spdk_fio_thread) link;
};
static bool g_spdk_env_initialized = false;
@ -96,6 +96,12 @@ static int spdk_fio_init(struct thread_data *td);
static void spdk_fio_cleanup(struct thread_data *td);
static size_t spdk_fio_poll_thread(struct spdk_fio_thread *fio_thread);
static pthread_t g_init_thread_id = 0;
static pthread_mutex_t g_init_mtx = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t g_init_cond;
static bool g_poll_loop = true;
static TAILQ_HEAD(, spdk_fio_thread) g_threads = TAILQ_HEAD_INITIALIZER(g_threads);
/* Default polling timeout (ns) */
#define SPDK_FIO_POLLING_TIMEOUT 1000000000ULL
@ -149,19 +155,9 @@ spdk_fio_cleanup_thread(struct spdk_fio_thread *fio_thread)
{
spdk_thread_send_msg(fio_thread->thread, spdk_fio_bdev_close_targets, fio_thread);
while (!spdk_thread_is_idle(fio_thread->thread)) {
spdk_fio_poll_thread(fio_thread);
}
spdk_set_thread(fio_thread->thread);
spdk_thread_exit(fio_thread->thread);
while (!spdk_thread_is_exited(fio_thread->thread)) {
spdk_thread_poll(fio_thread->thread, 0, 0);
}
spdk_thread_destroy(fio_thread->thread);
free(fio_thread->iocq);
free(fio_thread);
pthread_mutex_lock(&g_init_mtx);
TAILQ_INSERT_TAIL(&g_threads, fio_thread, link);
pthread_mutex_unlock(&g_init_mtx);
}
static void
@ -189,11 +185,6 @@ spdk_fio_calc_timeout(struct spdk_fio_thread *fio_thread, struct timespec *ts)
}
}
static pthread_t g_init_thread_id = 0;
static pthread_mutex_t g_init_mtx = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t g_init_cond;
static bool g_poll_loop = true;
static void
spdk_fio_bdev_init_done(int rc, void *cb_arg)
{
@ -205,12 +196,8 @@ spdk_fio_bdev_init_start(void *arg)
{
bool *done = arg;
if (g_json_config_file != NULL) {
spdk_app_json_config_load(g_json_config_file, SPDK_DEFAULT_RPC_ADDR,
spdk_fio_bdev_init_done, done, true);
} else {
spdk_subsystem_init(spdk_fio_bdev_init_done, done);
}
spdk_app_json_config_load(g_json_config_file, SPDK_DEFAULT_RPC_ADDR,
spdk_fio_bdev_init_done, done, true);
}
static void
@ -232,7 +219,7 @@ spdk_init_thread_poll(void *arg)
{
struct spdk_fio_options *eo = arg;
struct spdk_fio_thread *fio_thread;
struct spdk_conf *config = NULL;
struct spdk_fio_thread *thread, *tmp;
struct spdk_env_opts opts;
bool done;
int rc;
@ -251,26 +238,7 @@ spdk_init_thread_poll(void *arg)
rc = EINVAL;
goto err_exit;
} else if (eo->conf && strlen(eo->conf)) {
config = spdk_conf_allocate();
if (!config) {
SPDK_ERRLOG("Unable to allocate configuration file\n");
rc = ENOMEM;
goto err_exit;
}
rc = spdk_conf_read(config, eo->conf);
if (rc != 0) {
SPDK_ERRLOG("Invalid configuration file format\n");
spdk_conf_free(config);
goto err_exit;
}
if (spdk_conf_first_section(config) == NULL) {
SPDK_ERRLOG("Invalid configuration file format\n");
spdk_conf_free(config);
rc = EINVAL;
goto err_exit;
}
spdk_conf_set_as_default(config);
g_json_config_file = eo->conf;
} else if (eo->json_conf && strlen(eo->json_conf)) {
g_json_config_file = eo->json_conf;
} else {
@ -290,7 +258,6 @@ spdk_init_thread_poll(void *arg)
if (spdk_env_init(&opts) < 0) {
SPDK_ERRLOG("Unable to initialize SPDK env\n");
spdk_conf_free(config);
rc = EINVAL;
goto err_exit;
}
@ -325,19 +292,37 @@ spdk_init_thread_poll(void *arg)
pthread_mutex_lock(&g_init_mtx);
pthread_cond_signal(&g_init_cond);
pthread_mutex_unlock(&g_init_mtx);
while (g_poll_loop) {
spdk_fio_poll_thread(fio_thread);
pthread_mutex_lock(&g_init_mtx);
if (!TAILQ_EMPTY(&g_threads)) {
TAILQ_FOREACH_SAFE(thread, &g_threads, link, tmp) {
spdk_fio_poll_thread(thread);
}
/* If there are exiting threads to poll, don't sleep. */
pthread_mutex_unlock(&g_init_mtx);
continue;
}
/* Figure out how long to sleep. */
clock_gettime(CLOCK_MONOTONIC, &ts);
spdk_fio_calc_timeout(fio_thread, &ts);
rc = pthread_cond_timedwait(&g_init_cond, &g_init_mtx, &ts);
pthread_mutex_unlock(&g_init_mtx);
if (rc != ETIMEDOUT) {
break;
}
}
pthread_mutex_unlock(&g_init_mtx);
spdk_fio_cleanup_thread(fio_thread);
/* Finalize the bdev layer */
done = false;
@ -345,9 +330,32 @@ spdk_init_thread_poll(void *arg)
do {
spdk_fio_poll_thread(fio_thread);
} while (!done && !spdk_thread_is_idle(fio_thread->thread));
spdk_fio_cleanup_thread(fio_thread);
TAILQ_FOREACH_SAFE(thread, &g_threads, link, tmp) {
spdk_fio_poll_thread(thread);
}
} while (!done);
/* Now exit all the threads */
TAILQ_FOREACH(thread, &g_threads, link) {
spdk_set_thread(thread->thread);
spdk_thread_exit(thread->thread);
spdk_set_thread(NULL);
}
/* And wait for them to gracefully exit */
while (!TAILQ_EMPTY(&g_threads)) {
TAILQ_FOREACH_SAFE(thread, &g_threads, link, tmp) {
if (spdk_thread_is_exited(thread->thread)) {
TAILQ_REMOVE(&g_threads, thread, link);
spdk_thread_destroy(thread->thread);
free(thread->iocq);
free(thread);
} else {
spdk_thread_poll(thread->thread, 0, 0);
}
}
}
pthread_exit(NULL);
@ -466,6 +474,13 @@ spdk_fio_setup(struct thread_data *td)
return 0;
}
static void
fio_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
void *event_ctx)
{
SPDK_WARNLOG("Unsupported bdev event: type %d\n", type);
}
static void
spdk_fio_bdev_open(void *arg)
{
@ -491,15 +506,8 @@ spdk_fio_bdev_open(void *arg)
return;
}
target->bdev = spdk_bdev_get_by_name(f->file_name);
if (!target->bdev) {
SPDK_ERRLOG("Unable to find bdev with name %s\n", f->file_name);
free(target);
fio_thread->failed = true;
return;
}
rc = spdk_bdev_open(target->bdev, true, NULL, NULL, &target->desc);
rc = spdk_bdev_open_ext(f->file_name, true, fio_bdev_event_cb, NULL,
&target->desc);
if (rc) {
SPDK_ERRLOG("Unable to open bdev %s\n", f->file_name);
free(target);
@ -507,6 +515,8 @@ spdk_fio_bdev_open(void *arg)
return;
}
target->bdev = spdk_bdev_desc_get_bdev(target->desc);
target->ch = spdk_bdev_get_io_channel(target->desc);
if (!target->ch) {
SPDK_ERRLOG("Unable to get I/O channel for bdev.\n");
@ -665,6 +675,11 @@ spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
io_u->offset, io_u->xfer_buflen,
spdk_fio_completion_cb, fio_req);
break;
case DDIR_SYNC:
rc = spdk_bdev_flush(target->desc, target->ch,
io_u->offset, io_u->xfer_buflen,
spdk_fio_completion_cb, fio_req);
break;
default:
assert(false);
break;
@ -746,7 +761,7 @@ static struct fio_option options[] = {
.lname = "SPDK configuration file",
.type = FIO_OPT_STR_STORE,
.off1 = offsetof(struct spdk_fio_options, conf),
.help = "A SPDK configuration file",
.help = "A SPDK JSON configuration file",
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
@ -774,6 +789,7 @@ static struct fio_option options[] = {
.type = FIO_OPT_BOOL,
.off1 = offsetof(struct spdk_fio_options, mem_single_seg),
.help = "If set to 1, SPDK will use just a single hugetlbfs file",
.def = "0",
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},

View File

@ -1,6 +1,6 @@
[global]
ioengine=spdk_bdev
spdk_conf=./examples/bdev/fio_plugin/bdev.conf.in
spdk_conf=./examples/bdev/fio_plugin/bdev.json
thread=1
group_reporting=1
direct=1

View File

@ -37,8 +37,6 @@ APP = hello_bdev
C_SRCS := hello_bdev.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_accel event_vmd
SPDK_LIB_LIST += bdev_rpc bdev accel event thread util conf trace log jsonrpc json rpc sock notify
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -1,3 +0,0 @@
[Malloc]
NumberOfLuns 1
LunSizeInMB 32

View File

@ -0,0 +1,17 @@
{
"subsystems": [
{
"subsystem": "bdev",
"config": [
{
"method": "bdev_malloc_create",
"params": {
"name": "Malloc0",
"num_blocks": 32768,
"block_size": 512
}
}
]
}
]
}

View File

@ -38,7 +38,7 @@
#include "spdk/event.h"
#include "spdk/log.h"
#include "spdk/string.h"
#include "spdk/bdev_module.h"
#include "spdk/bdev_zone.h"
static char *g_bdev_name = "Malloc0";
@ -184,6 +184,57 @@ hello_write(void *arg)
}
}
static void
hello_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
void *event_ctx)
{
SPDK_NOTICELOG("Unsupported bdev event: type %d\n", type);
}
static void
reset_zone_complete(struct spdk_bdev_io *bdev_io, bool success, void *cb_arg)
{
struct hello_context_t *hello_context = cb_arg;
/* Complete the I/O */
spdk_bdev_free_io(bdev_io);
if (!success) {
SPDK_ERRLOG("bdev io reset zone error: %d\n", EIO);
spdk_put_io_channel(hello_context->bdev_io_channel);
spdk_bdev_close(hello_context->bdev_desc);
spdk_app_stop(-1);
return;
}
hello_write(hello_context);
}
static void
hello_reset_zone(void *arg)
{
struct hello_context_t *hello_context = arg;
int rc = 0;
rc = spdk_bdev_zone_management(hello_context->bdev_desc, hello_context->bdev_io_channel,
0, SPDK_BDEV_ZONE_RESET, reset_zone_complete, hello_context);
if (rc == -ENOMEM) {
SPDK_NOTICELOG("Queueing io\n");
/* In case we cannot perform I/O now, queue I/O */
hello_context->bdev_io_wait.bdev = hello_context->bdev;
hello_context->bdev_io_wait.cb_fn = hello_reset_zone;
hello_context->bdev_io_wait.cb_arg = hello_context;
spdk_bdev_queue_io_wait(hello_context->bdev, hello_context->bdev_io_channel,
&hello_context->bdev_io_wait);
} else if (rc) {
SPDK_ERRLOG("%s error while resetting zone: %d\n", spdk_strerror(-rc), rc);
spdk_put_io_channel(hello_context->bdev_io_channel);
spdk_bdev_close(hello_context->bdev_desc);
spdk_app_stop(-1);
}
}
/*
* Our initial event that kicks off everything from main().
*/
@ -199,29 +250,25 @@ hello_start(void *arg1)
SPDK_NOTICELOG("Successfully started the application\n");
/*
* Get the bdev. There can be many bdevs configured, but this
* application will only use the one input by the user at runtime so
* we get it via its name.
*/
hello_context->bdev = spdk_bdev_get_by_name(hello_context->bdev_name);
if (hello_context->bdev == NULL) {
SPDK_ERRLOG("Could not find the bdev: %s\n", hello_context->bdev_name);
spdk_app_stop(-1);
return;
}
/*
* Open the bdev by calling spdk_bdev_open()
* There can be many bdevs configured, but this application will only use
* the one input by the user at runtime.
*
* Open the bdev by calling spdk_bdev_open_ext() with its name.
* The function will return a descriptor
*/
SPDK_NOTICELOG("Opening the bdev %s\n", hello_context->bdev_name);
rc = spdk_bdev_open(hello_context->bdev, true, NULL, NULL, &hello_context->bdev_desc);
rc = spdk_bdev_open_ext(hello_context->bdev_name, true, hello_bdev_event_cb, NULL,
&hello_context->bdev_desc);
if (rc) {
SPDK_ERRLOG("Could not open bdev: %s\n", hello_context->bdev_name);
spdk_app_stop(-1);
return;
}
/* A bdev pointer is valid while the bdev is opened. */
hello_context->bdev = spdk_bdev_desc_get_bdev(hello_context->bdev_desc);
SPDK_NOTICELOG("Opening io channel\n");
/* Open I/O channel */
hello_context->bdev_io_channel = spdk_bdev_get_io_channel(hello_context->bdev_desc);
@ -247,6 +294,12 @@ hello_start(void *arg1)
}
snprintf(hello_context->buff, blk_size, "%s", "Hello World!\n");
if (spdk_bdev_is_zoned(hello_context->bdev)) {
hello_reset_zone(hello_context);
/* If bdev is zoned, the callback, reset_zone_complete, will call hello_write() */
return;
}
hello_write(hello_context);
}
@ -258,7 +311,7 @@ main(int argc, char **argv)
struct hello_context_t hello_context = {};
/* Set default values in opts structure. */
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "hello_bdev";
/*

View File

@ -38,9 +38,6 @@ APP = blobcli
C_SRCS := blobcli.c
# Don't link bdev_lvol in blobcli - otherwise this utility cannot operate on an lvolstore
SPDK_LIB_LIST = $(filter-out bdev_lvol,$(ALL_MODULES_LIST))
SPDK_LIB_LIST += event_bdev event_accel event_vmd
SPDK_LIB_LIST += bdev accel event thread util conf trace \
log jsonrpc json rpc sock notify
SPDK_LIB_LIST = $(filter-out bdev_lvol,$(ALL_MODULES_LIST)) event_bdev
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -52,8 +52,8 @@
static void cli_start(void *arg1);
static const char *program_name = "blobcli";
/* default name for .conf file, any name can be used however with -c switch */
static const char *program_conf = "blobcli.conf";
/* default name for .json file, any name can be used however with -j switch */
static const char *program_conf = "blobcli.json";
/*
* CMD mode runs one command at a time which can be annoying as the init takes
@ -179,7 +179,7 @@ usage(struct cli_context_t *cli_context, char *msg)
if (!cli_context || cli_context->cli_mode == CLI_MODE_CMD) {
printf("Version %s\n", SPDK_VERSION_STRING);
printf("Usage: %s [-c SPDK config_file] Command\n", program_name);
printf("Usage: %s [-j SPDK josn_config_file] Command\n", program_name);
printf("\n%s is a command line tool for interacting with blobstore\n",
program_name);
printf("on the underlying device specified in the conf file passed\n");
@ -857,25 +857,26 @@ load_bs_cb(void *arg1, struct spdk_blob_store *bs, int bserrno)
}
}
static void
base_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
void *event_ctx)
{
printf("Unsupported bdev event: type %d\n", type);
}
/*
* Load the blobstore.
*/
static void
load_bs(struct cli_context_t *cli_context)
{
struct spdk_bdev *bdev = NULL;
struct spdk_bs_dev *bs_dev = NULL;
int rc;
bdev = spdk_bdev_get_by_name(cli_context->bdev_name);
if (bdev == NULL) {
printf("Could not find a bdev\n");
spdk_app_stop(-1);
return;
}
bs_dev = spdk_bdev_create_bs_dev(bdev, NULL, NULL);
if (bs_dev == NULL) {
printf("Could not create blob bdev!!\n");
rc = spdk_bdev_create_bs_dev_ext(cli_context->bdev_name, base_bdev_event_cb,
NULL, &bs_dev);
if (rc != 0) {
printf("Could not create blob bdev, %s!!\n", spdk_strerror(-rc));
spdk_app_stop(-1);
return;
}
@ -939,20 +940,14 @@ bs_init_cb(void *cb_arg, struct spdk_blob_store *bs,
static void
init_bs(struct cli_context_t *cli_context)
{
struct spdk_bdev *bdev = NULL;
int rc;
bdev = spdk_bdev_get_by_name(cli_context->bdev_name);
if (bdev == NULL) {
printf("Could not find a bdev\n");
spdk_app_stop(-1);
return;
}
printf("Init blobstore using bdev Product Name: %s\n",
spdk_bdev_get_product_name(bdev));
printf("Init blobstore using bdev Name: %s\n", cli_context->bdev_name);
cli_context->bs_dev = spdk_bdev_create_bs_dev(bdev, NULL, NULL);
if (cli_context->bs_dev == NULL) {
printf("Could not create blob bdev!!\n");
rc = spdk_bdev_create_bs_dev_ext(cli_context->bdev_name, base_bdev_event_cb, NULL,
&cli_context->bs_dev);
if (rc != 0) {
printf("Could not create blob bdev, %s!!\n", spdk_strerror(-rc));
spdk_app_stop(-1);
return;
}
@ -1011,20 +1006,14 @@ bsdump_print_xattr(FILE *fp, const char *bstype, const char *name, const void *v
static void
dump_bs(struct cli_context_t *cli_context)
{
struct spdk_bdev *bdev = NULL;
int rc;
bdev = spdk_bdev_get_by_name(cli_context->bdev_name);
if (bdev == NULL) {
printf("Could not find a bdev\n");
spdk_app_stop(-1);
return;
}
printf("Init blobstore using bdev Product Name: %s\n",
spdk_bdev_get_product_name(bdev));
printf("Init blobstore using bdev Name: %s\n", cli_context->bdev_name);
cli_context->bs_dev = spdk_bdev_create_bs_dev(bdev, NULL, NULL);
if (cli_context->bs_dev == NULL) {
printf("Could not create blob bdev!!\n");
rc = spdk_bdev_create_bs_dev_ext(cli_context->bdev_name, base_bdev_event_cb, NULL,
&cli_context->bs_dev);
if (rc != 0) {
printf("Could not create blob bdev, %s!!\n", spdk_strerror(-rc));
spdk_app_stop(-1);
return;
}
@ -1042,7 +1031,7 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context)
int cmd_chosen = 0;
char resp;
while ((op = getopt(argc, argv, "b:c:d:f:hil:m:n:p:r:s:DST:Xx:")) != -1) {
while ((op = getopt(argc, argv, "b:d:f:hij:l:m:n:p:r:s:DST:Xx:")) != -1) {
switch (op) {
case 'b':
if (strcmp(cli_context->bdev_name, "") == 0) {
@ -1052,13 +1041,6 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context)
usage(cli_context, "ERROR: -b option can only be set once.\n");
}
break;
case 'c':
if (cli_context->app_started == false) {
cli_context->config_file = optarg;
} else {
usage(cli_context, "ERROR: -c option not valid during shell mode.\n");
}
break;
case 'D':
cmd_chosen++;
cli_context->action = CLI_DUMP_BS;
@ -1106,6 +1088,13 @@ cmd_parser(int argc, char **argv, struct cli_context_t *cli_context)
cli_context->action = CLI_INIT_BS;
}
break;
case 'j':
if (cli_context->app_started == false) {
cli_context->config_file = optarg;
} else {
usage(cli_context, "ERROR: -j option not valid during shell mode.\n");
}
break;
case 'r':
if (argv[optind] != NULL) {
cmd_chosen++;
@ -1533,8 +1522,8 @@ main(int argc, char **argv)
/* if the config file doesn't exist, tell them how to make one */
if (access(cli_context->config_file, F_OK) == -1) {
printf("Error: No config file found.\n");
printf("To create a config file named 'blobcli.conf' for your NVMe device:\n");
printf(" <path to spdk>/scripts/gen_nvme.sh > blobcli.conf\n");
printf("To create a config file named 'blobcli.json' for your NVMe device:\n");
printf(" <path to spdk>/scripts/gen_nvme.sh --json-with-subsystems > blobcli.json\n");
printf("and then re-run the cli tool.\n");
exit(-1);
}
@ -1553,9 +1542,9 @@ main(int argc, char **argv)
}
/* Set default values in opts struct along with name and conf file. */
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
opts.name = "blobcli";
opts.config_file = cli_context->config_file;
opts.json_config_file = cli_context->config_file;
cli_context->app_started = true;
rc = spdk_app_start(&opts, cli_start, cli_context);

View File

@ -37,9 +37,6 @@ APP = hello_blob
C_SRCS := hello_blob.c
SPDK_LIB_LIST = $(ALL_MODULES_LIST)
SPDK_LIB_LIST += event_bdev event_accel event_vmd
SPDK_LIB_LIST += bdev accel event thread util conf trace \
log jsonrpc json rpc sock notify
SPDK_LIB_LIST = $(ALL_MODULES_LIST) event_bdev
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk

View File

@ -39,6 +39,7 @@
#include "spdk/blob_bdev.h"
#include "spdk/blob.h"
#include "spdk/log.h"
#include "spdk/string.h"
/*
* We'll use this struct to gather housekeeping hello_context to pass between
@ -393,6 +394,13 @@ bs_init_complete(void *cb_arg, struct spdk_blob_store *bs,
create_blob(hello_context);
}
static void
base_bdev_event_cb(enum spdk_bdev_event_type type, struct spdk_bdev *bdev,
void *event_ctx)
{
SPDK_WARNLOG("Unsupported bdev event: type %d\n", type);
}
/*
* Our initial event that kicks off everything from main().
*/
@ -400,24 +408,16 @@ static void
hello_start(void *arg1)
{
struct hello_context_t *hello_context = arg1;
struct spdk_bdev *bdev = NULL;
struct spdk_bs_dev *bs_dev = NULL;
int rc;
SPDK_NOTICELOG("entry\n");
/*
* Get the bdev. For this example it is our malloc (RAM)
* disk configured via hello_blob.conf that was passed
* in when we started the SPDK app framework so we can
* get it via its name.
*/
bdev = spdk_bdev_get_by_name("Malloc0");
if (bdev == NULL) {
SPDK_ERRLOG("Could not find a bdev\n");
spdk_app_stop(-1);
return;
}
/*
* In this example, use our malloc (RAM) disk configured via
* hello_blob.conf that was passed in when we started the
* SPDK app framework.
*
* spdk_bs_init() requires us to fill out the structure
* spdk_bs_dev with a set of callbacks. These callbacks
* implement read, write, and other operations on the
@ -430,9 +430,10 @@ hello_start(void *arg1)
* However blobstore can be more tightly integrated into
* any lower layer, such as NVMe for example.
*/
bs_dev = spdk_bdev_create_bs_dev(bdev, NULL, NULL);
if (bs_dev == NULL) {
SPDK_ERRLOG("Could not create blob bdev!!\n");
rc = spdk_bdev_create_bs_dev_ext("Malloc0", base_bdev_event_cb, NULL, &bs_dev);
if (rc != 0) {
SPDK_ERRLOG("Could not create blob bdev, %s!!\n",
spdk_strerror(-rc));
spdk_app_stop(-1);
return;
}
@ -450,7 +451,7 @@ main(int argc, char **argv)
SPDK_NOTICELOG("entry\n");
/* Set default values in opts structure. */
spdk_app_opts_init(&opts);
spdk_app_opts_init(&opts, sizeof(opts));
/*
* Setup a few specifics before we init, for most SPDK cmd line
@ -459,7 +460,7 @@ main(int argc, char **argv)
* specify a name for the app.
*/
opts.name = "hello_blob";
opts.config_file = argv[1];
opts.json_config_file = argv[1];
/*

View File

@ -1,3 +0,0 @@
[Malloc]
NumberOfLuns 1
LunSizeInMB 16

Some files were not shown because too many files have changed in this diff Show More