Commit Graph

615 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Seth Howell
4dc4d5cd3c reactor: add an assert for thread context.
Fixes kw warning #13674

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I65b8aac045849a8245c6b3e14d853043afdf43a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1986
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: Jim Harris <james.r.harris@intel.com>
2020-04-24 07:07:43 +00:00
Seth Howell
2e69975fab lib/event: add asserts that reactors aren't NULL.
In practice, the reactor pointers will never be NULL
in these cases, but some static analysis tools don't
realize that.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0657959e5572df2741398b179907f2bbf0b02b3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2020-04-24 07:07:43 +00:00
Seth Howell
844e460277 lib/event: add subsystem iterator functions.
This allows us to hide the implementations of
g_subsystems and s_subsystems_deps within the
libraries themselves.

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

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3c2c04933859c6c484a903e666df10f810b26709
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1785
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-22 09:21:55 +00:00
Seth Howell
749c917fc1 lib/event: add map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I50b64e93114d7979aec809e8fb224b24b79e6317
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1710
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-22 09:21:55 +00:00
Shuhei Matsumoto
ab0bc5c254 lib/thread: Use function name as poller name by using macro SPDK_POLLER_REGISTER
We will be create fine name for each poller but it will need large
effort. Replacing spdk_poller_register by the macro SPDK_POLLER_REGISTER
will provide better name than function address with minimum effort.

Following patches may improve function name for clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If862a274c5879065c3f7cb04dcb5ca7844523e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1781
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Community-CI: Broadcom CI
2020-04-15 07:23:09 +00:00
Shuhei Matsumoto
e9aec6746a lib/thread: thread_poll() polls until the exiting thread is exited
Extract _spdk_thread_exit() from spdk_thread_exit() and
_spdk_thread_poll() calls _spdk_thread_exit() if the thread is in
the exiting state. spdk_thread_exit() changes to move the state to
the exiting state. The spdk_thread_poll() loop will end after the
thread moves to the exited state because the caller of
spdk_thread_poll() will check if the thread is in the exited state,
and break the loop if true.

If the user does not call spdk_thread_exit() explicitly, the reactor
has to terminate all existing threads at its shutdown. In this case,
multiple threads may have some dependency to release I/O channels or
unregister pollers. So the reactor has the large two loops, the first
loop calls spdk_thread_exit() on all threads, the second loop calls
spdk_thread_destroy() if exited or spdk_thread_poll() otherwise for
each thread until all threads are destroyed.

Besides, change the return value of spdk_thread_exit() to return
always 0. Keep it for ABI compatibility. Change ERRLOG to INFOLOG
for _spdk_thread_exit() because it is called repeatedly now. Remove
the check of I/O reference count from _spdk_thread_exit() because
_free_thread() cannot free I/O channel. Refine the unit test
accordingly.

Fixes issue #1288.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee5fb984a96bfac53110fe991dd994ded31dffa4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1423
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-09 13:44:14 +00:00
Shuhei Matsumoto
e7ead00b53 lib/thread: Wait until thread_is_exited() is true by thread_poll() after thread_exit()
Following patches will require thread termination so that thread_exit()
will move thread to exiting, thread_poll() will move thread from
exiting to exited, thread_is_exited() will detect the threadis exited,
and then call thread_destroy().

So change all places as a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2e8aee5ed7cd160a88b4c9aaed7d90bd9dac07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1640
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-08 06:43:05 +00:00
Shuhei Matsumoto
c9da0aecdc lib/thread: Ignore spdk_thread_exit() call after moving exited
Previously the caller had to check if thread is not exited when
it calls spdk_thread_exit().

Subsequent patches will change return type of spdk_thread_exit()
to void, and so include the check int spdk_thread_exit() in this
patch.

If spdk_thread_exit() is called when the thread is already exited,
collect INFOLOG and return normally.

This will make the next patch a little easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8b94261575e770485b33c0b37e76e770b77b417c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-08 06:43:05 +00:00
Shuhei Matsumoto
78accbf4e5 lib/event: Count reactor CPU stats (idle/busy tsc)
Following the idea of thread CPU stats, add reactor CPU stats.

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

Add necessary unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1a1391e79d74387c68f1651a61c8900e4c6faf66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1501
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-08 06:43:05 +00:00
Darek Stojaczyk
df9660df7b lib/event: fix printing non-null-terminated strings
%*s prints at least * characters and may add padding to the string.
%.*s prints at most * characters.

In a few places we used the first instead of the second and
printed some garbage to screen (in the best case...).

Change-Id: I97a862be61a5e43aa61e8230044dbd64a9db33bd
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1569
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-04-06 07:48:37 +00:00
Shuhei Matsumoto
f7e9e764be lib/event: Add elapsed time of thread to output of framework_get_reactors RPC
Collect elapsed time of each SPDK thread and add it to output of
framework_get_reactors RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e2f0487de81720327428cda5738284a4ce2c557
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1278
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: Paul Luse <paul.e.luse@intel.com>
2020-03-25 07:52:53 +00:00
Shuhei Matsumoto
80323e2066 lib/event: Count thread run time correctly on multiple threads per core
This patch updates reactor to count thread run time correctly
on multiple SPDK threads per CPU core configuration by using
the refined spdk_thread_poll().

Add tsc_last to struct spdk_reactor to use the end time of the
last thread as the start time of the next thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I21042867885d289ff0c23bf2a9ba6a8076a59673
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1256
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>
2020-03-25 07:52:53 +00:00
Seth Howell
193927830d make: rev SO versions individually for libraries.
This will allow us to keep track of compatibility issues on a
per-library basis.

Change-Id: Ib0c796adb1efe1570212a503ed660bef6f142b6e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1067
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-03-18 08:02:30 +00:00
Shuhei Matsumoto
ea863bb0b3 lib/event: Count number of threads per reactor
Add thread_count to struct spdk_reactor to count number of threads
per reactor. This number will be used in the next patch to know
if all threads are idle or not for each reactor to support CPU
power saving.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4f7cc5a6b78d85e9f8d0b539c60058c13e282759
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1169
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-03-12 09:04:02 +00:00
Shuhei Matsumoto
fbb77a56c8 lib/event: Factor out the main polling loop from _spdk_reactor_run()
It was too difficult for us to add unit test for _spdk_reactor_run()
because the main polling loop in _spdk_reactor_run() was infinite
if g_reactor_state is SPDK_REACTOR_STATE_RUNNING.

Factor out the main polling loop and rusage update in _spdk_reactor_run()
into a helper function reactor_run().

This improves the code readability as well.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia26db14f44026fefd696443227c16d2be4166832
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1186
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-03-12 09:04:02 +00:00
Shuhei Matsumoto
68161ffc00 lib/event: Put period for getrusage() into struct spdk_reactor
This is a preparation to the next patch which factors out the main
polling loop of _spdk_reactor_run() into a helper function reactor_run().

One of the subsequent patches will support CPU power saving by
adding sleep into reactor_run(). We should not insert sleep between
the main polling loop and getrusage() because now is got before
entering the main polling loop.

To put getrusage() into reactor_run(), we need to maintain last_rusage
in struct spdk_reactor and maintain g_rusage_period as a global
variable. This patch does these changes.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61bf50de6a170ac73c8fe17e85077b90171dd9c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1185
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-03-12 09:04:02 +00:00
Shuhei Matsumoto
a4335feb6d lib/event: Support SPDK_THREAD_OP_RESCHED operation in reactor
Add a flag resched to check if reschedule operation is requested
to struct spdk_lw_thread. Add _reactor_resquest_thread_reschedule()
to set the resched flag, and add it to the case SPDK_THREAD_OP_RESCHED
in spdk_reactor_thread_op(), and return true in the case
SPDK_THREAD_OP_RESCHED in spdk_reactor_thread_op_supported().

Then _spdk_reactor_run() checks if the resched flag is true for each
thread. If true, set the resched flag to false, and remove the
thread and call _reactor_schedule_thread(). Add continue to avoid
use-after-free issue for both reschedule and terminate cases.

This idea follows voluntary thread termination and will remove our
worries for all complicated rare cases.

Add unit test case to verify this update.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I656872d32dbb469ae70f771cd0419a77236bfe18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/500
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-02-28 14:37:53 +00:00
Shuhei Matsumoto
1368aec870 lib/event: Use spdk_thread_lib_init_ext() to initialize thread library
Remove the prefix "spdk" from spdk_reactor_schedule_thread(), add
spdk_reactor_thread_op() and spdk_reactor_thread_op_supported().

For SPDK_THREAD_OP_NEW, spdk_reactor_thread_op() calls
_reactor_schedule_thread() and spdk_reactor_thread_op_supported()
returns true.

Then replace spdk_thread_lib_init() by spdk_thread_lib_init_ext()
with spdk_reactor_thread_op() and spdk_reactor_thread_op_supported().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I232a3b2c6bcaf4d86b0dd3cefacd3e47eadda6d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/968
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-02-27 10:14:23 +00:00
Darek Stojaczyk
8e7d6e1b0c app: added --json-ignore-init-errors
If set, SPDK will continue loading the JSON config even if
some commands caused an error. This can be useful when loading
RPC config from spdk_tgt into e.g. bdevperf, which supports
only a subset of RPC commands and would usually fail with
"Method not found" message.

Resolves #840

Change-Id: I070fea862fd99e5882d870e11e6a28dc9d0c8ba6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/620
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: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:53:02 +00:00
Shuhei Matsumoto
abb942bda1 lib/event: Voluntary thread termination by spdk_thread_exit()
In the reactor main loop, _spdk_reactor_run(), check if both
spdk_thread_is_exited() and spdk_thread_is_idle() return true,
and if they are true, then remove it from the queue and call
spdk_thread_destroy() to delete it.

By previous patches, the exited thread does not accept any
new message or poller, all pending messages are processed, and
all unregistering pollers are completed. Hence we only need to
have very simple check in the reactor main loop.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib678245de98a5c050843e6435026bdcf8b6c75c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/507
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-02-13 09:51:15 +00:00
Shuhei Matsumoto
70ec72871e lib/thread: Fail spdk_thread_exit() if thread is already exiting
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EINVAL if the thread is already
marked as exited.  This will be helpful to detect wrong call sequence
of voluntary thread termination.

Besides, update reactor shutdown and unit test framework shutdown
to incorporate this change accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2296c61e273bf4d9580656dcbc2da0e8a8f3bcf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/671
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-02-13 09:51:15 +00:00
Kozlowski Mateusz
db126b3ee1 lib/app: Change signal handler to use spdk_thread_send_critical_msg
Fixes deadlock when closing application with SIGTERM during call of
spdk_thread_send_msg.

Fixes #1105

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: If191550f9681a30674fc9c0704289fcdb70b33cb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478291
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-01-13 12:42:49 +00:00
Shuhei Matsumoto
25c5e3f59d lib/event: Rename context switch monitoring APIs to be concise
spdk_reactor_enable_framework_monitor_context_switch and
spdk_reactor_framework_monitor_context_switch_enabled had been
a little long and not easy to get the meaning.

spdk_framework_enable_context_switch_monitor and
spdk_framework_context_switch_monitor_enabled will be a little
more concise, and hence change the names accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f1d50e8b62846cbd0f91b94f94cbaf16fefa39b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-01-03 08:33:25 +00:00
Shuhei Matsumoto
abbd6ed864 lib/event: Make spdk_reactor_get public in SPDK internal
Following the last patch, this is also a preparation to add
reactor_get_stats RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I18c260bb10bdf1c7aa5e00aa81a171f2ff50c7d5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478026
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-01-03 08:33:25 +00:00
Shuhei Matsumoto
653dbcb185 lib/event: Make reactor structure public in SPDK internal
Following the last patch, this is also a preparation to add
reactor_get_stats RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia6dc29f591f7112512be8a67b180b056150f467b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
60eb6da8b7 lib/event: Add spdk_for_each_reactor to process event for each reactor
This API will be used in the upcoming reactor_get_stats RPC first.
This API is not public but internal in SPDK. Add necessary unit test
together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I761ffe3c8d6d8da4594c0d728b479f9f40275fc9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
16ea979d71 lib/event: Check if reactor scheduled thread to the correct core
Add check if reactor scheduled the thread to one of the allowed
cores correctly to _schedule_thread().

This check will be useful in the next patch and may be helpful
when we schedule SPDK thread dynamically.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibea8e8315187ae8a3a421007d8865bbee2d7e037
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478156
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-03 08:33:25 +00:00
Shuhei Matsumoto
040339550c lib/event: Use local cpuset instance in spdk_app_start()
Following the recent effort, use local instance of cpuset instead
of using cpuset pointer and allocating dynamically to it in
spdk_app_start().  This change will avoid potential out of memory
failure for application startup too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I22b529da13e893db16296167f2d8d4c296dec31f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478580
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: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-03 08:32:38 +00:00
Shuhei Matsumoto
ae4360f050 lib/event: Allocate cpumask statically for reactor
struct spdk_cpuset has been declared in the header file and
so we can allocate struct spdk_cpuset statically.  This change will
avoid potential out of memory failure for reactor too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic5f4fdb493d73b4ae11cddd2638eeb84ebbb792e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478150
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-20 10:05:38 +00:00
Shuhei Matsumoto
2597480328 lib/event: Remove checking return code of spdk_thread_poll in _spdk_reactor_run
spdk_thread_poll returns only non-negative value now, and the return
code check is not reasonable now.  For just in case we may want to add
assert(rc >= 0) but compiler gives warning because rc is not used anywhere.
So just remove checking return code check here.

We noticed first that spdk_thread_destroy was called without spdk_thread
exit but this change removes spdk_thread_destroy.  So the issue is also
fixed together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e7f5c09faf5eda68ea8d42320dbefdca88bbd21
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478237
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>
2019-12-20 10:05:38 +00:00
Changpeng Liu
65506d5116 util: add SPDK_CACHE_LINE_SIZE macro definition
For now we don't provide #ifdef to users, SPDK_CACHE_LINE_SIZE is defined with 64 bytes.

Change-Id: I8ddb01a382008a3e333967650200c5aa8b93e09e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Paul Luse <paul.e.luse@intel.com>
2019-12-17 09:30:03 +00:00
suhua
25baf7148d reactor: Change the context_switch period to microseconds
Signed-off-by: suhua <suhua1@kingsoft.com>
Change-Id: I95a4cc3cb5bef37e31a630171a47e28f14331494
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475333
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>
2019-12-11 11:06:10 +00:00
Alexey Marchuk
4c42b933c9 app: Add cli options to print SPDK version
Change verbose mode parameter of fuzz test app from -v to -V to avoid
collisions with app framework parameters

Change-Id: Ibe562fa82408366aa487a19fad9a99e1e692b48c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474005
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-15 18:25:31 +00:00
Jim Harris
296e7fba03 rpc: add spdk_rpc_verify_methods()
This returns true if all registered methods and aliases
are correct.  False means that an error like one of the
following occurred:

- duplicate method with same name
- alias specified for non-existant method
- alias specified for another alias

Also plumb this so that incorrect RPCs cause an SPDK
application to exit.

Note: there are cases where this would have been helpful
during the recent RPC renaming.

Fixes issue #940.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472441
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>
2019-11-06 15:19:48 +00:00
Darek Stojaczyk
f7ddfcf743 reactor: allow spdk_reactors_fini() to be called without prior init
spdk_reactors_fini() is unconditionally called in spdk_app_fini()
at the end of every application and it currently throws a ton
of warning messages if the reactors weren't initialized yet [1].

Let's silence those warnings.

[1] $ spdk_tgt -c invalid.conf
[...]
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!

(Apparently SPDK_ENV_FOREACH_CORE iterates through 128 cores
if the dpdk env framework wasn't initialized. SPDK calls
spdk_reactor_get() on each core and that's what generates the
warnings)

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: Ic3a2355ef6d2e0d0e1cc125ba21cc6a802b355bc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470736
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>
2019-10-09 14:29:22 +00:00
Darek Stojaczyk
c4ecc8b876 app: simplify app start error handling
In SPDK applications, spdk_app_start() is always followed
by spdk_app_fini(), so remove all global-state cleanup from
app_start() and let it be done by app_fini().

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: Id9fda9fda92f16cc59565691489d4a5ab4c577a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470735
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>
2019-10-09 14:29:22 +00:00
Darek Stojaczyk
0cf0ee283b app: free config object on failed app start
Set g_spdk_app.config early in the app init function,
so that the subsequently called spdk_app_fini() will
free it. So far the dynamicaly allocated config object
would be just leaked.

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I19ffc8bc80858d954166649f825e573f83b4bf53
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470734
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>
2019-10-09 14:29:22 +00:00
Maciej Wawryk
a10d0ce79c RPC: rename context_switch_monitor to framework_monitor_context_switch
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6de7bf824b5f57e535168afaafca55f4c758fc94
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468667
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>
2019-09-30 21:13:41 +00:00
Maciej Wawryk
fb3918a0ca RPC: rename wait_subsystem_init to framework_wait_init
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib9bb2de327a3461081f5f0dfc359b53f61019e28
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468133
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>
2019-09-30 21:13:41 +00:00
Maciej Wawryk
e85d47123c RPC: rename start_subsystem_init to framework_start_init
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I44a96f87f5565b3984f0a6919bf7f276207637a3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468130
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-30 21:13:41 +00:00
Ben Walker
7f9c41bee0 event: Repack struct spdk_reactor
Get all of the important stuff into the first cache line.

Change-Id: I5bbfb031bb1d693019abb9e5145579d0b867eaf5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465994
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: Paul Luse <paul.e.luse@intel.com>
2019-09-18 16:45:05 +00:00
Tomasz Zawadzki
1428692e1a lib/event: remove app.c dependency from loading json_config
Originally loading json_config using spdk_app_json_config_load_subsystem()
implied issuing start_subsystem_init RPC. This required a workaround
in the callback of RPC spdk_rpc_start_subsystem_init_cpl(), in order
to skip starting the app in json_config load path.

This made it difficult to load json_config without implicitly using
rest of the event framework. It will be usefull for example in
fio_plugin, which does not use the app.c API.

With change in this patch json_config load path directly calls
spdk_subsystem_init() C call.
Meanwhile start_subsystem_init RPC no longer needs a workaround
for json_config load path.

Change-Id: I535e079339cedaf0950767a8204002ab5885d8a5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463978
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>
2019-08-28 15:26:12 +00:00
Tomasz Zawadzki
b85881ec7c lib/event: remove app.c dependency from subsystem initialization
This change adds return code to spdk_subsystem_init().
Making it's caller responsible for handling application
state - such as calling spdk_app_stop().

This change implies that start_subsystem_init RPC does not
stop the application on failure, only reports back the error.

Renamed g_app_start/stop variables to now more relevant
g_subsystem_start/stop.

Change-Id: I66a7da6ecfb234a569c65279cc4b210ddac53d2a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464412
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>
2019-08-28 15:26:12 +00:00
Ben Walker
6aff44ccbb event: Move spdk_reactors_fini higher up in file
Change-Id: I07a96c0a4eaabd762da684a577381ec95410d32d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465992
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>
2019-08-23 17:51:26 +00:00
Ben Walker
2139bfa91f event: Move spdk_reactors_init up in file
Begin organizing file so setup operations appear
at the top.

Change-Id: I7411b4bf20480c8aeb40bc21b521e5d359f8da1f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465991
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>
2019-08-23 17:51:26 +00:00
Ben Walker
fd0f036480 event: Relax restriction on g_reactors not being NULL
There is a case in vhost where this occurs. Until that is
sorted out, just make this a warning.

Change-Id: Id021791e8cbddf3023e0cb1b8c52a733b3578a7d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466075
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-22 21:14:11 +00:00
Seth Howell
f34fa35a52 lib/event: move rpc and subsystems dirs to module
These directories fit in with the module concept we are forming inside
of SPDK. Essentially modules are derivative or specialized libraries that
rely on a general or core library.

Change-Id: Ib40f05422f144ff8fd579f47a3867ef4412b3372
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465455
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-22 16:29:49 +00:00
Ben Walker
085ade57fc event: Add additional checking around valid reactors
Try to catch mistakes when using invalid cores.

Change-Id: I3caef9d3898ab76f80a45799cb4305601fb02f2a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465990
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>
2019-08-22 14:55:42 +00:00
Ben Walker
e30e1596b2 event: Remove rusage_poller
This was unused. The rusage polling is done in another way.

Change-Id: I478ddb2d664647e922f3049a64199fdc61f25ce1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465989
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>
2019-08-22 14:55:42 +00:00
Tomasz Zawadzki
c8dfae7b8f lib/event: expose spdk_app_json_config_load() in internal header
Expose spdk_app_json_config_load() in internal to SPDK header.
In future patches it will be possible to use this function
without depending on rest of event framework (such as app.c).

Applications that do not use SPDK reactors (have their own threading
model) or no need to initialize using spdk_app_start(), will be
able to utilize subsystems and their json configuration loading.

Change-Id: I093181977d121e39ddbf212f8dff3182a4102fd6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464178
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>
2019-08-22 14:53:28 +00:00
Seth Howell
a54a6a266c lib/nvmf: extract RPCs from the subsystem directory
There are one or two RPCs that deal with application specific
configuration. We can leave these there for now.

Change-Id: I9c40aa3403d32d3e2214c8c904fb1c414ad99967
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-21 17:20:28 +00:00
Seth Howell
c795aa70cf nvmf_rpc: remove references to g_spdk_nvmf_tgt
The global nvmf target is really an example application specific
feature. This should be separated from the generic RPC functions as much
as possible.

Change-Id: I7671aa88c20a39129aa13d1a7100b537bf34b00d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465364
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>
2019-08-21 17:20:28 +00:00
Seth Howell
8d6d26bd29 nvmf: add a name entry to the spdk_nvmf_tgt struct
This will provide a unique identifier which can be used to provide get
and set methods within the RPCs.

Change-Id: Idd144e99e49b8d26530f60530d2e908b18fa251b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465330
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>
2019-08-20 19:15:04 +00:00
Seth Howell
7d6d95db3c nvmf: change the function signature of spdk_nvmf_tgt_create
This is necessary to allow the spdk_nvmf_tgt structure to evolve over
time without having to further change the target API.

Change-Id: Ib0f0f9b1f190913feff0229c96df4e84b1bf35f7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465363
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-08-20 19:15:04 +00:00
Seth Howell
ff69b368b8 lib: combine event/iscsi_rpc with lib/iscsi/iscsi_rpc.c
Part of a larger series simplifying the library directory.

Change-Id: Ib9c9dc9a0c92ac35a9f0260451f97fc126d10031
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465212
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: Jim Harris <james.r.harris@intel.com>
2019-08-19 06:10:30 +00:00
Seth Howell
edc8c91a90 lib: move bdev_rpc under lib/bdev
Part of a larger series unifying and simplifying the library directory
structure.

Change-Id: I2782165aabbea9a31cc466fc7e3bb2b9263142dc
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465211
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: Jim Harris <james.r.harris@intel.com>
2019-08-19 06:10:30 +00:00
Seth Howell
ef6108a7eb lib: move notify_rpc under lib/notify
This is part of a larger series aimed at simplifying/flattening the
directory structure of the SPDK lib directory. The ultimate goal of this
series is to properly create dynamic linker dependencies between all
spdk shared objects.

Change-Id: I6beb7103404ae2c24a3d25dd93a1061680c7176c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465209
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: Jim Harris <james.r.harris@intel.com>
2019-08-19 06:10:30 +00:00
Darek Stojaczyk
3d23defba4 Remove remaining spdk_jsonrpc_begin_result() NULL checks
After recent changes, that function can not return
NULL anymore, so remove all redundant checks from
various SPDK libraries.

Change-Id: If80344b6fa81ad5f87a7086804dba221522cd7e2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-08-09 16:35:00 +00:00
Seth Howell
4640f32482 Make: conditionally build the event_vhost library
This library was being consistently built, even when the CONFIG_VHOST
directory was set to false. On the shared object build, this leads to a
few undefined references from the event_vhost.so library when trying to
link against an SPDK application.

This library should be built based on the same conditions as the vhost
library. This assumption is already baked into other aspects of the
build system. See for example the makefile under app/spdk_tgt.

Change-Id: I1c6e651b29785b48455a3a0ce7faaed4319148d9
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463941
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-07 12:28:48 +00:00
Evgeniy Kochetov
fbe8f8040c nvmf/rdma: Add request latency statistics
This patch adds measurement of time request spends from the moment it
was polled till completion.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I1fcda68735f2210c5365dd06f26c10162e4ddf33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445291
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>
2019-07-26 20:30:00 +00:00
Evgeniy Kochetov
251db8144f nvmf/rdma: Add NVMf RDMA transport pending statistics
This patch adds statistics for pending state in NVMf RDMA subsytem
which may help to detect lack of resources and adjust configuration
correctly.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I9560d931c0dfb469659be42e13b8302c52912420
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452300
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>
2019-07-26 20:30:00 +00:00
Evgeniy Kochetov
38ab383a8f nvmf/rdma: Add RDMA polling statistics
RDMA polling statistics: number of polls and number of completion
entries returned.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Iabcf2cb6f6a35f595b89b58cdfcd177a637dda13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445289
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>
2019-07-26 20:30:00 +00:00
Evgeniy Kochetov
43bb4e6b1f rpc: Add NVMf transport statistics to nvmf_get_stats RPC method
This patch adds transport part to nvmf_get_stats RPC method and basic
infrastructure to report NVMf transport specific statistics.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ie83b34f4ed932dd5f6d6e37897cf45228114bd88
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452299
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>
2019-07-26 20:30:00 +00:00
Wojciech Malikowski
825ae66bd0 event/subsystem/vmd: RPC support
Added enable_vmd RPC call.

Change-Id: Ib0bea12f097a46a8be537a1db8aace6cb3b9b699
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459949
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>
2019-07-26 18:27:40 +00:00
Pawel Kaminski
de1d0f8fe9 jsonrpc: don't check returned value from spdk_jsonrpc_begin_result()
As spdk_jsonrpc_begin_result() is not allowed to return NULL we can
remove these checks. We didn't have any tests cases that goes this path
anyway.

Change-Id: I0894e76c0162591e550e70b172566b9060a6dd5f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459199
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-22 05:13:30 +00:00
Ziye Yang
6ad6a1131b nvmf/tcp: Add a feature to allow set the sock priority of the connection.
This priority is used to differentiate the sock priority on the TCP connections
between  NVMe-oF TCP target and other TCP based applications.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6ee294e647420b56d1d91a07c2e37bf34ce24e03
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461801
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>
2019-07-19 06:30:19 +00:00
Ziye Yang
4739f62365 nvmf: enable transport based scheduler decode in RPC.
Purpose: To eanble the transport based scheduler in RPC.
Previously, we only support it with configuration file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I02ae9b1b316d4fec8b28b550e70dcdc78ce78722
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461645
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>
2019-07-17 15:01:20 +00:00
Evgeniy Kochetov
9d5037275d nvmf: Add BDEV IO pending statistics
This patch adds statistics for BDEV IO pending state in NVMf subsytem
which may help to detect lack of resources and configure pool size
correctly.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I6c60c27efe3efed194b2d2c46a707af7c2808fe9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445290
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-12 12:46:29 +00:00
Evgeniy Kochetov
da999b69b8 nvmf: Add queue pair counts statistics
This patch adds number of admin and IO queue pairs per poll group in
NVMf statistics. It can be useful to troubleshoot load sharing issues.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2a9c0fc99cf5d0729eb130d30540ae52b5207fc9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445288
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-12 12:46:29 +00:00
Evgeniy Kochetov
fca6ff8f75 rpc: Add nvmf_get_stats RPC method
This patch adds nvmf_get_stats RPC method and basic infrastructure to
report NVMf global and per poll group statistics in JSON format.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I13b83e28b75a02bc1dcb7b95cbce52ae10ff0f7b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452298
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-12 12:46:29 +00:00
Ben Walker
88da8a91f9 nvmf: spdk_nvmf_subsystem_remove_ns is no longer asynchronous
Now that the resume path can correctly handle the case where a namespace
was removed and a new one added with the same nsid, this no longer needs
to be asynchronous.

Change-Id: I693045e66a7d4e75255b526d8f5ca5ef8695533e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459606
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-11 11:19:53 +00:00
Evgeniy Kochetov
7535cdbd62 rpc: Add thread_get_stats RPC method
SPDK threads collect busy and idle time statistics. This commit adds
thread_get_stats RPC method to retrieve these values.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I8ed8041c6164eb0c0a9336f4e50b5f26a3f20190
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-07-10 04:28:14 +00:00
Ziye Yang
750a4213ef nvmf: add spdk_nvmf_get_optimal_poll_group
This patch is used to do the following work:

1 It is optimized for NVMe/TCP transport. If the qpair's
socket has same NAPI_ID, then the qpair will be handled
by the same polling group.

2. We add a new connection scheduling strategy, named as
ConnectionScheduler in the configuration file. It will be
used to input different scheduler according to the customers'
input.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ifc9246eece0da69bdd39fd63bfdefff18be64132
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454550
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: Changpeng Liu <changpeng.liu@intel.com>
2019-07-10 02:30:41 +00:00
Changpeng Liu
5317a9f795 rpc/nvmf: add RPC support to add the persistent configuration file for one NS
Change-Id: Ic4963d3e55cffceca35d18ba8d406658e51a189a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455913
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>
2019-07-10 01:40:26 +00:00
Shuhei Matsumoto
390cffb64e rpc: Add dif_insert_or_strip parameter to nvmf_create_transport RPC
Add an new optional parameter dif_insert_or_strip to
nvmf_create_transport RPC.

.INI config file will be deprecated and dif_insert_or_strip is not
supported in .INI config file.

Change-Id: Ibf38b599cff75eeb0056dd2125d6ec10d444f339
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458927
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>
2019-07-10 00:43:02 +00:00
Jeffry Molanus
9bba21c969 app.c: --huge-dir has not effect
`struct option` is set incorrectly for long_opt --huge-dir causing the value
to be ignored.

Change-Id: I5bb84f391e1ac551b2a91c43fe8da658ae54f115
Signed-off-by: Jeffry Molanus <jeffry.molanus@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460581
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-09 05:33:03 +00:00
Wojciech Malikowski
091bc429d7 lib/event/subsystems: Added VMD dependency to bdev subsystem
Bdev initialization need to be done after VMD.

Change-Id: Ia680ccbdb8fc6db1d3c09cf9d917105e183a3845
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459768
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-01 03:54:45 +00:00
Anil Veerabhadrappa
9d1e666798 conf: parse "C2HSuccess" parameter for TCP transport only
"C2HSuccess" is only valid for TCP transport. So this parameter
should be looked up only for TCP transport. Without the change,
spdk_nvmf_parse_transport() would bailout early for RDMA and
other transports without every creating them.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I34bdff2f4ab930516743cd5dbf022d75e60fd85c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459571
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.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>
2019-06-28 07:03:45 +00:00
Or Gerlitz
6629202cbd nvmf/tcp: Use the success optimization by default
By now (5.1 is released), the Linux kernel initiator supports the
success optimization and further, the version that doesn't support
it (5.0) was EOL-ed. As such, lets open it up @ spdk by default.

Doing so provides a notable performance improvement: running perf with
iodepth of 64, randread, two threads and block size of 512 bytes for 60s
("-q 64 -w randread -o 512 -c 0x5000 -t 60") over the VMA socket acceleration
library and null backing store, we got 730K IOPS with the success
optimization vs 550K without it.

IOPS           MiB/s    Average       min      max
549274.10     268.20     232.99      93.23 3256354.96
728117.57     355.53     175.76      85.93   14632.16

To allow for interop with older kernel initiators, we added
a config knob under which the success optimization can be
enabled or disabled.

Change-Id: Ia4c79f607f82c3563523ae3e07a67eac95b56dbb
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457644
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-06-26 06:24:03 +00:00
Darek Stojaczyk
29093c7f01 event/app: don't call start_fn twice when json config is used
When JSON config was used, app layer was calling the
app start callback twice - once from internally-sent
"start_subsystem_init" RPC, and once from the app layer
itself.

In case of JSON configs, the callback from within the
RPC was actually called prematurely, as the real RPC
server was still starting in the background at that
point. We still need to start the app from that RPC in
case of `--wait-for-listen` option, but for JSON configs
it doesn't make sense. Just ignore it now and rely on
json config load completion callback to start the app.

Fixes #816

Change-Id: Ib54d624f3167137216c910b2d947bbd1dc5023b1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458351
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: Ben Walker <benjamin.walker@intel.com>
2019-06-24 15:54:49 +00:00
Darek Stojaczyk
a7d9fc4a4d event: fix segv on json config read failure
If reading the JSON config file has failed, we entered
spdk_app_json_config_load_done(-ERRNO) and tried to
close a client connection that was never initiated,
which resulted in NULL dereference.

To fix it, just check if client_conn != NULL before
attempting to close it.

Change-Id: I7340567c45e795f77110c2914e94ba83fa8d1bff
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458350
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: Ben Walker <benjamin.walker@intel.com>
2019-06-24 15:54:49 +00:00
Wojciech Malikowski
8233a5a8e1 event/subsystems/vmd: Added VMD subsystem
Added new VMD subsystem to enumerate
devices behind VMD when event framewrok
is used.

To enable VMD, user need to provide Enable
flag via config file.

Change-Id: I89bfe22b127c00d358dac7336ffb44b0c0f426ea
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458443
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-24 09:59:00 +00:00
paul luse
46523f33e0 log: passing user-defined log
Change-Id: I993e15a6e75029b0717960d5da31325e7f3522c1
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456407
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:56:50 +00:00
Changpeng Liu
3ec061800f nvmf: add a persist through power loss configuration file when constructing NS
For reservation feature in NVMoF, we can't support the persist through
power loss feature, now we will add the configuration file parameter
with Namespace, after users set the configuration file parameter with
one NS, then the PTPL feature can be enabled.

Change-Id: Id72699093f7e68318b9529f7bacc5c9804f7f86b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455905
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-12 00:30:03 +00:00
Shuhei Matsumoto
1554a344c9 env: Add free_space parameter to spdk_ring_enqueue
DPDK rte_ring_enqueue_bulk() has free_space parameter to return
the amount of space in the ring after enqueue operation has finished.
This parameter can be used to wait when the ring is almost full and
wake up when there is enough space available in the ring.

Hence we add free_space to spdk_ring_enqueue() and spdk_ring_enqueue()
passes it to rte_ring_enqueue_bulk() simply.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b9d6a5a097cf6dc4b97dfda7442f2c4b0aed4d3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456734
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>
2019-06-05 05:23:58 +00:00
Ben Walker
e036215fe9 thread: Add a mechanism to exit a lightweight thread
Lightweight threads may now be exited by calling
spdk_thread_exit() within the thread. The framework
polling the thread can release the resources associated
with that lightweight thread by calling
spdk_thread_destroy().

Change-Id: I6586b9d22556b3874fb113ce5402c6b1f371786e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 04:23:17 +00:00
Changpeng Liu
ad8bd8e313 util: add a new file operation API
The new added API can load file content into a data buffer, which
can be used to read configuration file as well as JSON file, and
we can add WRITE API in future which can be used to implement the
persistent reservation feature.

Change-Id: I9aaca7571648e1ab6dbfdd7cfd6ca34083cbeec2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453498
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>
2019-05-15 18:54:27 +00:00
Ben Walker
266dd568e6 nvmf: Remove use of events from nvmf application
This is all based on SPDK threads instead.

Change-Id: Idfd23d6541a548179be24b16540d62e5d7ea2a5c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451760
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-09 04:35:10 +00:00
Ben Walker
e13da83e4a nvmf: nvmf_tgt_host_trid stores a pg instead of a core
Change-Id: I53bb89f6999ab9bbc4bd8e960970454d60beebee
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452473
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-08 21:56:59 +00:00
Ben Walker
534240380b nvmf: Rename spdk_nvmf_get_next_core_rr to spdk_nvmf_get_next_pg
Make this return the next poll group instead of the next core.

Change-Id: Ie62dcbe0b3d869cc1a9b8f8b4ccce8f068ed4dfd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452472
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-08 21:56:59 +00:00
Ben Walker
97d35377c5 nvmf: Don't assume the first core is core 0 when scheduling poll groups
Change-Id: I883ffacca26be0d4fc0a3cfdac5a9c0391b7585e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-08 21:56:59 +00:00
Ben Walker
3555e24505 nvmf: Rename nvmf_tgt_get_qpair_core nvmf_tgt_get_pg
Begin shifting away from being core-centric to instead
be thread-centric.

Change-Id: I0664cdef6766c158f793dd25cc47f6bbd7d928ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452471
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>
2019-05-08 21:56:59 +00:00
Ben Walker
d34635f04c nvmf: Move nvmf_tgt_poll_group_add lower in file
This is only called from one spot, so move it near there.

Change-Id: I7e98ea9f95ba86e663566f6a1cbbc4f88d89a1d4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452470
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: Seth Howell <seth.howell5141@gmail.com>
2019-05-08 21:56:59 +00:00
Ben Walker
67234b6ad4 event: Attempt to respect cpumask when scheduling threads
Individual threads can have their own CPU mask. Attempt to
respect that in the scheduler.

Change-Id: I2bd08d4249bdae32a459ed8770b88090346be5dc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452258
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>
2019-05-08 21:56:59 +00:00
Ben Walker
835d21a2d0 thread: Allow thread schedule callback to fail
Change-Id: Id391c2c03804dda0ad354d98dfe0a75fb4d3d324
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453012
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-05-08 21:56:59 +00:00
wuzhouhui
ab3f35b226 lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event
And change type name of callback as well. The new name is more accurate.

Change-Id: I13b63f7d33f60ecea7fdf6e50f57aa6a391a4562
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453151
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>
2019-05-07 06:11:27 +00:00
wuzhouhui
87201f17d6 lib/notify: rename spdk_notify_get_types to spdk_notify_foreach_type
And change type name of callback as well. The new name is more accurate.

Change-Id: I3c9cef591faa077a5a034c6f31c44c6f7aefc1fa
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453150
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>
2019-05-07 06:11:27 +00:00
wuzhouhui
0acc20ab10 misc/rpc: rename some C functions of rpc methods
Traditionally, The C function name of rpc method "method_name" will be
"spdk_rpc_method_name", so make these function names consistent with
others. No behaviours changed.

Change-Id: Iac5396d4860bdbd78cba9031b4b6358161ec779b
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453197
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-07 05:30:16 +00:00
Seth Howell
cbf74b20b3 nvmf: add srq opts to get_nvmf_transports method.
Print these out for the RDMA transport.

Change-Id: I44ab01088fcab180540a93e024855322036241db
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452272
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>
2019-05-06 18:11:13 +00:00
Seth Howell
350e429a57 rdma: add a flag for disabling srq.
There are cases where srq can be a detriment. Add a flag to allow users
to disable srq even if they have a piece of hardware that supports it.

Change-Id: Ia3be8e8c8e8463964e6ff1c02b07afbf4c3cc8f7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452271
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-06 18:11:13 +00:00
Darek Stojaczyk
a5599094da vhost: add completion callback to lib init
Prepare vhost lib init to be asynchronous. We'll need
it for setting up the upcoming poll groups.

Change-Id: I3c66b3f17f8635d4b705dd988393431193938971
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452205
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>
2019-05-02 17:06:34 +00:00
Darek Stojaczyk
f50d3d7759 reactor: pin spdk threads to their cores
We're about to drop legacy event messages from SPDK libs
and for that we'll replace various lcore numbers with
spdk_thread objects. For now SPDK libs can't spawn their
own threads, so they must use spdk_for_each_thread() and
spdk_get_thread() to retrieve different thread pointers.

The vhost library offers API to construct a vhost device
to be polled on specified cores, and in order to keep that
functionality we'll need to know which core each thread
is polling on. We would like to achieve that with
spdk_thread_get_cpumask(), but right now it always returns
all cores, so this patch changes it to return just
a single cpu on which the thread is actually pinned. It's
only a stop gap, eventually the vhost library will spawn
its own threads with custom cpumasks.

Change-Id: I15947727123c51b23f63727d52079770bfb2e07b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-02 17:06:34 +00:00
yidong0635
45f0c800bb subsystem/nvmf: remove this redundant assert.
Here g_num_poll_groups is not less than 1 now, so this assert is
redundant.

Change-Id: I4fc539480e2b63c8302af57b18d2164b5161b094
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.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>
2019-05-02 15:12:46 +00:00
Shuhei Matsumoto
38527b0786 lib/thread: Fix wrong posix thread name by SPDK thread scheduler
Before enabling SPDK thread scheduler,
each POSIX thread name was reactor_% (% was the core number).

After enabling SPDK thread scheduler, the name of the master POSIX
thread is reactor_% (% is the max core number), and the name of the
slave posix threads are lcore-slave-% (% is the current core number).

SPDK threads are light-weight threads - sometimes also called
green threads or fibers, and so are independent from posix
threads.

But reactor is tied to the POSIX thread in the SPDK event library.

So SPDK thread doesn't rename the POSIX thread at its creation
but reactor renames the POSIX thread at start instead.

This change makes POSIX thread name compatible between before and
after enabling SPDK thread scheduler.

Change-Id: I26e8dabc73e163c9f74e18b3640cf54954603b1f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451712
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 07:40:30 +00:00
Ben Walker
5d0b5e2ce9 thread: Add cpumask parameter to spdk_thread_create
Allow users to optionally specify an affinity mask when
creating a thread. This isn't currently used, but we want
the API to be in its final form for the next release.

Change-Id: I7bd05e921ece6d8d5f61775bd14286f6a58f267f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451683
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>
2019-04-23 20:22:55 +00:00
Gregory Shapiro
14032a984c NVMF: Add model number as parameter to construct_nvmf_subsystem (-d option).
Change-Id: Ia1a458a0ac1c5a17d2955a3f31c6dfe77538eb17
Signed-off-by: Gregory Shapiro <gregory.shapiro@kaminario.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/438562
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-23 16:51:16 +00:00
Pawel Wodkowski
2cccea55ed rpc/notifications: add notification support to RPC client and SPDK host.
Two new RPC calls get_notification_types and get_notifications added.

Change-Id: Ia5288d83cc5e9f18ef1622d3f15b9fe3bbf640ed
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436530
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@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>
2019-04-09 23:01:52 +00:00
Darek Stojaczyk
1c297d7e30 thread: fix crash on non-contiguous cpu range in cpumask
Limit the thread scheduler to put spdk_threads on
lcores < last_lcore instead of lcores < lcore_count,
which was probably the original intent.

When the cpumask was not a contiguous cpu range, the
thread scheduler failed to schedule any spdk_threads on
the last cores. There was one hardcoded thread created
for each reactor, but the scheduler could squash some
of those into a single reactor. This broke the legacy
lcore-based messages as those expect there to be at least
one spdk_thread per lcore. Any spdk_poller_register()
or spdk_get_io_channel() called from such a legacy
message would fail an assertion, as spdk_get_thread()
returned NULL.

Fixes #743

Change-Id: I81a3f76d9c4788596c697df6ff51b264b99ce10b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450353
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-08 15:04:30 +00:00
Ben Walker
a0760b9554 nvmf: Use threads instead of events for shutdown handling
Change-Id: Ib22dcb95810f4ed16beb76769e407d48713d85ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447117
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>
2019-04-04 05:54:42 +00:00
Ben Walker
9603e344ae event: Use threads for shutdown handling instead of events
Change-Id: I841ebf29ddcb46038a07d5b0b7781aac938c5869
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447116
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-04 05:54:42 +00:00
Darek Stojaczyk
728af01741 event/nvmf: allow running without [Transport] in the legacy cfg file
While useful in NVMf target, this is really annoying
in the consolidated spdk target, where NVMe-oF doesn't
even have to be used. OCF tests currently use iscsi_tgt
just because spdk_tgt requires the additional [Transport]
section in the cfg file. Let's remove that requirement.

Change-Id: I418b47d62dcc06b9513f9f0496dc1e39b9d5a554
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450056
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-04 03:58:22 +00:00
Ben Walker
032920f250 thread: Implement a thread scheduler
Change-Id: Ie1cad80a071f9de066fe18093a4c4c8e726e5a77
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446998
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>
2019-04-02 23:24:30 +00:00
Jim Harris
11b38a585a app, log: clarify how to enable log flags
Let's point users to use --enable-debug now instead of
CONFIG_DEBUG=y.  Also to be completely pedantic, use
"configure" instead of "build" to make it more clear
this flag needs to be passed to the configure script,
not make.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449339
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-29 02:35:48 +00:00
Darek Stojaczyk
8b61834dd0 event: passing env_context from app
Change-Id: Id6b60b16c77ddd0818b6bdd412096b0285cb44b9
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443649
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>
2019-03-21 17:42:29 +00:00
Darek Stojaczyk
f373369a9c env: add spdk_env_fini()
The function now has to be called before application
exit. At the moment it only frees the dynamically
allocated DPDK command line option strings - something
that was previously done from an atexit() callback -
but there's more to free there.

Note: the function descriptions were partially copied
from equivalent DPDK functions.

Change-Id: I5f4a6607fdfadff9325917259f58fcbc2cedba1a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447676
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>
2019-03-20 21:05:33 +00:00
Ben Walker
880b8b8af3 event: spdk_subsystem_config_json is no longer asynchronous
Nothing needed this to be asynchronous.

Change-Id: Ic67167d5c1214e832b77ab7fa44aa693026d868a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447115
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>
2019-03-19 15:54:34 +00:00
Ben Walker
eefe8806a2 event: Subsystem level write_config_json callback no longer asynchronous
Nothing actually needs this to be asynchronous. If something
comes up, we can make it asynchronous again.

Change-Id: Icde3af3f8f9efebe75b08471b4afcce3a70da541
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447114
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-19 15:54:34 +00:00
Ben Walker
2d0aa1ad8f event: Always process events on each reactor loop
Events are the mechanism by which threads are scheduled,
so events need to be processed even if there are no
threads.

Change-Id: I2e908e6a948709f2122b1c7385b6fd771827b9aa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447111
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: Jim Harris <james.r.harris@intel.com>
2019-03-19 15:54:34 +00:00
Ben Walker
deb8ee5c33 event: spdk_app_start now takes spdk_msg_fn
This callback type takes 1 argument instead of 2.

Change-Id: Ic3710fafb2828f08fc064f7658849b3d20521092
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446997
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>
2019-03-19 15:54:34 +00:00
Evgeniy Kochetov
ed0b611fc5 nvmf/rdma: Add shared receive queue support
This is a new feature for NVMEoF RDMA target, that is intended to save
resource allocation (by sharing them) and utilize the
locality (completions and memory) to get the best performance with
Shared Receive Queues (SRQs). We'll create a SRQ per core (poll
group), per device and associate each created QP/CQ with an
appropriate SRQ.

Our testing environment has 2 hosts.
Host 1:
  CPU: Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz dual socket (8 cores total)
  Network: ConnectX-5, ConnectX-5 VPI , 100GbE, single-port QSFP28, PCIe3.0 x16
  Disk: Intel Optane SSD 900P Series
  OS: Fedora 27 x86_64
Host 2:
  CPU: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz dual-socket (24 cores total)
  Network: ConnectX-4 VPI , 100GbE, dual-port QSFP28
  Disk: Intel Optane SSD 900P Series
  OS : CentOS 7.5.1804 x86_64
Hosts are connected via Spectrum switch.
Host 1 is running SPDK NVMeoF target.
Host 2 is used as initiator running fio with SPDK plugin.

Configuration:
- SPDK NVMeoF target: cpu mask 0x0F (4 cores), max queue depth 128,
  max SRQ depth 1024, max QPs per controller 1024
- Single NVMf subsystem with single namespace backed by physical SSD disk
- fio with SPDK plugin: randread pattern, 1-256 jobs, block size 4k,
  IO depth 16, cpu_mask 0xFFF0, IO rate 10k, rate process “poisson”

Here is a full fio command line:
fio  --name=Job --stats=1 --group_reporting=1 --idle-prof=percpu \
--loops=1 --numjobs=1 --thread=1 --time_based=1 --runtime=30s \
--ramp_time=5s --bs=4k --size=4G --iodepth=16 --readwrite=randread \
--rwmixread=75 --randrepeat=1 --ioengine=spdk --direct=1 \
--gtod_reduce=0 --cpumask=0xFFF0 --rate_iops=10k \
--rate_process=poisson \
--filename='trtype=RDMA adrfam=IPv4 traddr=1.1.79.1 trsvcid=4420 ns=1'

SPDK allocates the following entities for every work request in
receive queue (shared or not): reqs (1024 bytes), recvs (96 bytes),
cmds (64 bytes), cpls (16 bytes), in_capsule_buffer. All except the
last one are fixed size. In capsule data size is configured to 4096.
Memory consumption calculation (target):
- Multiple SRQ: core_num * ib_devs_num * SRQ_depth * (1200 +
  in_capsule_data_size)
- Multiple RQ: queue_num * RQ_depth * (1200 + in_capsule_data_size)
We ignore admin queues in calculations for simplicity.

Cases:
1. Multiple SRQ with 1024 entries:
   - Mem = 4 * 1 * 1024 * (1200 + 4096) = 20.7 MiB
     (Constant number – does not depend on initiators number)
2. RQ with 128 entries for 64 initiators:
   - Mem = 64 * 128 * (1200 + 4096) = 41.4 MiB

Results:
FIO_JOBS   kIOPS     Bandwidth,MiB/s  AvgLatency,us  MaxResidentSize,kiB
       RQ       SRQ     RQ      SRQ    RQ       SRQ      RQ       SRQ
1      8.623    8.623   33.7    33.7   13.89    14.03    144376   155624
2      17.3     17.3    67.4    67.4   14.03    14.1     145776   155700
4      34.5     34.5    135     135    14.15    14.23    146540   156184
8      69.1     69.1    270     270    14.64    14.49    148116   156960
16     138      138     540     540    14.84    15.38    151216   158668
32     276      276     1079    1079   16.5     16.61    157560   161936
64     513      502     2005    1960   1673     1612     170408   168440
128    535      526     2092    2054   3329     3344     195796   181524
256    571      571     2232    2233   6854     6873     246484   207856

We can see the benefit in memory consumption.

Change-Id: I40c70f6ccbad7754918bcc6cb397e955b09d1033
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/428458
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>
2019-03-15 19:19:17 +00:00
Ben Walker
50c48ee92d event: Eliminate extra event in spdk_subsystem_init
This isn't required anymore because spdk_subsystem_init
is now always called after an event has been executed, so it
always runs after the framework has initialized.

Change-Id: I05e1a4dd605f27247b6d43f5234173e07d9b9dd2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446996
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 03:21:45 +00:00
Ben Walker
4d6a89044f event: No longer require event in spdk_subsystem_fini
Just use a function pointer and a context.

Change-Id: I2d41ed2572d892f3328aadf7f22d8696816bf4d1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446995
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 03:21:45 +00:00
Ben Walker
f90c3be49e event: Don't use an event to initialize RPC
Now that the boot strap event exists, this is not
necessary.

Change-Id: I277179fbc15ebe140fd22be1b67847cf23c6153e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446994
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 03:21:45 +00:00
Ben Walker
f155c98084 event: spdk_subsystem_init no longer requires an event
It just takes a function pointer and a context instead.

Change-Id: Id8cdc968ddbc3776f60ad73e9aa09983ca03fa3f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446993
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-08 03:21:45 +00:00
Ben Walker
d92a1fb4ac event: spdk_app_json_config_load no longer requires an event
Take a callback and an argument instead.

Change-Id: I9edda1a9bd506e12f309e52e520e97c0d705d6a2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446992
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-06 08:26:04 +00:00
Ben Walker
46777dd8b9 event: Eliminate extra event when loading JSON config
Now that there is always one event to bootstrap,
we don't need an event here.

Change-Id: Ic87501461a608f5b15745a50b6e15f0f28aa55c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.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>
2019-03-06 08:26:04 +00:00
Ben Walker
744857a79a event: Eliminate g_app_start_event
Change-Id: Ied9c6ebe5e15ee66d6d9695e55b04b33200dd33b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446990
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-06 08:26:04 +00:00
Ben Walker
e2104c3339 event: Don't construct rpc and json events until bootstrapped
These can now be delayed. Next they'll be converted to thread
operations instead of events.

Change-Id: Id8c183621fb88594a9fd508eff064b4a1557a5b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446989
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.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>
2019-03-06 08:26:04 +00:00
Ben Walker
f96b8293e6 event: Don't rely on events capturing arguments during bootstrap
This will make it easier to convert these operations to
spdk_thread_send_msg.

Change-Id: I4c975c22f3967a7197e69ccd230a14bdb97ba332
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446988
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-05 08:43:12 +00:00
Ben Walker
c3ab46a14c event: Funnel the start up actions through a single event
The rest of the stuff is going to be converted to using threads,
but there must be one event at the beginning of time for
now.

Change-Id: Id4689d73e006ccf7bbe001732798e0ae78c603ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446987
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Ziye Yang
4e331534f1 event/subsystem: solve the subsystem init and destroy conflict
We have conflict to handle the NVMf subsystem shut
down. The situation is that:

If there is shutdown request (e.g., ctrlr+c),
we may have subsystem finalization and subsystem
initialization conflict (e.g., have NVMf subsystem fini and
intialization together), we will have coredump
issue like #682.

If we interrupt the initialization of the subsystem,
following works should do:

1  Do not initilize the next subsystem.
2  Recycle the resources in each subsystem via the
spdk_subsystem_fini related function. And this patch will
do the general thing, but will not consider the detailed
interrupt policy in each subsystem.

Change-Id: I2438b4a2462acb05d8c8e06dfff3da3d388d4b70
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446189
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-03-01 04:36:41 +00:00
Ziye Yang
7ae5b8649e event/nvmf: remove the unnecessary check in spdk_nvmf_subsystem_fini
Since we already checked the core info in _spdk_subsystem_fini_next
function.

Change-Id: I6ab28d8fb11a7a07ae8c14c27357db236bf51b3e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/446190
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: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: qun wan <qun.wan@intel.com>
2019-02-27 08:17:52 +00:00
Ziye Yang
8bbf0391f6 event: Change the base to 0 when calling strtol
Previously, we can -p + hex value(e.g., 0x1) to assign the master core
and start the NVMe-oF or iSCSI target app.

However now it is not supported and prints error. I checked
the code, it only supports transformation with Decimal format,
so chaning the base to 0 to make it supporting other formats.

Change-Id: I82510ba0cef47b5593484b4fd3490f85c93cf6a5
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/444830
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-18 07:55:36 +00:00
Ben Walker
12759ab569 event: The reactor now contains a list of threads
It iterates over the list and polls each one. However,
in practice the list still contains just one thread for
now.

Change-Id: I9bac7eb5ebf9b4edc6409caaf26747470b65e336
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440763
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>
2019-02-14 14:58:56 +00:00
Ben Walker
9810431431 thread: Allow for an extra region of memory allocated on each thread
Schedulers can use this region to store required information.

Change-Id: I93efb44f1a534596f6285bbe014579311fe011e7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444454
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>
2019-02-14 14:58:56 +00:00
Ben Walker
86a21aee4e event: Implement context switch monitor without a poller
This is much simpler and avoids the problems with requiring
it to run on a thread.

Change-Id: I811444c5a15d292356703beccc17e505d55d7678
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443645
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>
2019-02-14 14:58:56 +00:00
Ben Walker
3569ea154a event: Remove max_delay_us parameter
The thread scheduling mechanism is being rewritten and this
won't be used in the new system.

Change-Id: I829e8118ed0a10480bd86934b45e68fcb810931a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444453
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>
2019-02-14 14:58:56 +00:00
Ben Walker
514358e5d3 event: Move thread lib init/fini into reactor.c
Keep all of the thread library interactions in one file.

Change-Id: Iecb20d3767190b5da105a29670ead9e192d03257
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440761
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-13 09:55:17 +00:00
Seth Howell
c1e0bded59 nvmf_tgt: read ret from spdk_nvmf_poll_group_add.
It is possible for spdk_nvmf_poll_group_add to fail. In this case we
need to tear down the qpair in the same way that we do in the new_qpair
function.

Change-Id: I17abdec2646d2b7f9ed07c9b9b3e74d3d0991903
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443472
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>
2019-02-12 20:39:44 +00:00
Ben Walker
8abfb06e31 thread: Optionally allow the current time to be passed to
spdk_thread_poll()

This is an optimization if the calling function already knows the
current time.

Change-Id: I1645e08e7475ba6345a44e0f9d4b297a79f6c3c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443634
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-11 22:58:45 +00:00
Ben Walker
15d3631064 thread: Move stats to thread
Change-Id: I351626355c45d0a3e66fec2688191429781e5952
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.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>
2019-02-11 22:58:45 +00:00
Shuhei Matsumoto
7aeaa880b1 event: Use spdk_json_write_named_* APIs throughout
Change-Id: I1997a6653d4f27ff4c140657f91d5bcfe12e34b4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/442949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-02-04 07:08:04 +00:00
Liu Xiaodong
a206234d09 lib/trace: add trace_record tool
trace_record is used to poll the spdk trace shm file
and store new entries from it to another specified trace file.
This could help retain the trace_entires from the overlay of
trace circular buffer

Note:
* trace_record reads the input tracefile into a process-local
memory and writes trace entries to the output file only at shutdown.
* trace_record can be shut down on SIGINT or SIGTERM signal.

A usage sample is:
./spdk_trace_record -s bdev_svc -p <spdk app pid> -f trace.tmp -q

Change-Id: If073a05022ec9c1b45923c38ba407a873be8741b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/433385
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>
2019-01-30 06:36:25 +00:00
Jim Harris
51725c486c nvmf: remove deprecated construct_nvmf_subsystem RPC
This was marked deprecated in the v18.10 release, so
remove it now before v19.01 is tagged.

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

Reviewed-on: https://review.gerrithub.io/c/442412
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>
2019-01-30 00:48:23 +00:00
Shuhei Matsumoto
f69235bf3a event/app: Improve error check of input parsing by spdk_strtol
For the number of trace entries, change strtoull to spdk_strtoll
because no issue will occur by the change.

Besides, getopt guarantees that if an argument is followed by a
semicolon, optstring of it is not NULL. spdk_app_parse_args()
had unnecessary NULL pointer check related with this. Hence
remove those NULL pointer checks too.

Change-Id: I33d0328205d1765f70f70fc734d0d8b4165fef5e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441641
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-01-29 17:39:18 +00:00
Shuhei Matsumoto
26e6b505a5 event/rpc: Use spdk_strtol to clarify if signal is specified by name
Change-Id: I550802d70f415d24284a1afc43bdc83d43582355
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-01-29 17:39:18 +00:00
Ben Walker
d1f943239e nvmf: Remove deprecated set_nvmf_target_options rpc
Marked as deprecated in 18.10.

Change-Id: I40d0e6103623aee6e6a0b9fa6e82f7b826ca1fe6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442420
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-01-29 01:30:30 +00:00
Tomasz Zawadzki
01455bb15b json_config: dont dereference when no next config entry
Change-Id: I83576452d9ece2445a52cb37524eab80bcb56d52
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441570
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@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>
2019-01-22 19:21:46 +00:00
Tomasz Zawadzki
a96748a782 json_config: verify jsonrpc client request allocation
Change-Id: I9f2c95881a7ee36630d9b7d3e2347cf5b8bfb847
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441568
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-22 19:20:51 +00:00
Seth Howell
3709db7383 nvmf: add buf_cache_size to conf and rpc functions
Change-Id: I11514dc5981e9750d693202ff86af22b2064ae72
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-18 16:57:37 +00:00
Seth Howell
2740f26841 nvmf_rpc: add control for rdma buffer cache size
Change-Id: I63e433a7e0aa5374b12ca6c12a4855900cf2d2c6
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-18 16:57:37 +00:00
Arshad Hussain
aff99b6f4d app: Improve error message from spdk_reactors_init()
In an event where spdk_reactors_init() fails the
error message which was getting printed was not
useful. This patch improves error message printed.

Change-Id: If1e8dea20d187d68414782fa59943f0f7963a471
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/441145
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>
2019-01-18 15:24:01 +00:00
Chunyang Hui
01e5610da8 parse: add return value to app_parse callback
Need to check user input and return status of parsing
to prevent app or target from crashing.
Input checking function will be added in the future.

Change-Id: I8167ac13306ae4f81e2cacb80edd9dcf9382c374
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439479
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: GangCao <gang.cao@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-01-18 10:08:09 +00:00
Ben Walker
9cba82b955 thread: Rename spdk_free_thread to spdk_thread_exit
This name more closely resembles pthread_exit, which is a
closer analogy to how the new threading library works.

Change-Id: I68b04509f3ff8e94b8688804a7e5661155a3ecd1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440597
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-17 11:24:38 +00:00
Ben Walker
b1c79d722b thread: Rename spdk_allocate_thread to spdk_thread_create
This mirrors pthread_create, which works more closely
to the new style where SPDK libraries can spawn their
own threads.

Change-Id: Ic524c4c35bcf7c1611e4f261ebb64b98ac5a5a1b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440596
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>
2019-01-17 11:24:38 +00:00
Ben Walker
1068e22da5 thread: spdk_free_thread now takes a thread parameter
Instead of implicitly grabbing the thread from the thread
local variable, make it explicit.

Change-Id: I733fad06181439e12b1e71a4829b84e7b64e2468
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440595
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2019-01-17 11:24:38 +00:00
Ben Walker
aaa9a27851 thread: Add a notification callback when threads are created
Nothing implements the callback just yet, but it will be used for
dynamic thread creation.

Change-Id: I088f2bc40e1405cd5b9973b9110608f49c8abd68
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.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>
2019-01-17 11:24:38 +00:00
Ben Walker
6728c4f4c0 thread: Eliminate function pointers in spdk_allocate_thread
These are no longer used by anything.

Change-Id: I0db6bc88e4dc945ff4f64df2ac410e1d00a669c1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/437601
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.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>
2019-01-17 11:24:38 +00:00
Pawel Wodkowski
8687128696 app: add option to read json configuration files during startup
New '--json' long option is added to load JSON configuration file during
startup.

Change-Id: I2a89b7b98b3957e53758dd06686307caf7ec6090
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/430356
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-01-14 04:48:18 +00:00
Ziye Yang
58f1624497 nvmf: add the transport shared buffer num configuration option.
Previously, we allocate the buffer size according
to the MaxQueueDepth info, however this is not exactly
a good way for customers to configure, we should provided
a shared buffer number configuration for the transport.

Change-Id: Ic6ff83076a65e77ec7376688ffb3737fd899057c
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/437450
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-12-20 19:55:57 +00:00
Wojciech Malikowski
d1a6901c61 event: reactor loop delay configurable from cmdline
Change-Id: I38ab7b60d528fa9e0161ddba48c723601d8a6b78
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/437142
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-12-19 17:22:33 +00:00
Ben Walker
605e530a4e thread: Use TLS to accelerate thread look up
Change-Id: I8136db265c9cb8d61de4845ce6eaff2351b5b597
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/435939
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-12-14 18:54:03 +00:00
Darek Stojaczyk
ec79b4c8e4 app: fixup error handling in wait_subsystem_init RPC
We could call spdk_jsonrpc_end_result with a NULL
result parameter, which will hit an assert.

While here, also remove the "no memory" error message
if the result object can't be obtained. Getting no result
is not necessarily caused by memory allocation failure
and everywhere throughout the SPDK we don't print any
message if that happens.

Change-Id: I4618b211192aa1c1d47fd850d17497d3ff9888ea
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/435112
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-12-10 15:55:32 +00:00
Seth Howell
1500792f52 test: modify coredump maximums to 5G
Having unlimited size core dumps is not a good idea on a lot of
machines. Modify it to 5GB.

Change-Id: I1d52bfa9f2450e2d8f824c3b86aa2ad5fe4579c3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/436412
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-12-10 10:03:04 +00:00
Jim Harris
80e2c1f6ff nvmf: fail nvmf_create_transport if user specifies pcie
Fixes #522.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib054080e3d85859cbe487d588e1d74d5cde2e371
Reviewed-on: https://review.gerrithub.io/435560
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>
2018-12-06 18:15:05 +00:00
Jim Harris
799aa686aa app: rename traceflag cmdline option to logflag
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2cc4e486f110bb860affc3ee4c66264813c72719

Reviewed-on: https://review.gerrithub.io/435346
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-03 19:50:15 +00:00
Jim Harris
b4b7d5d3ff log: remove "trace" from public API
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I90e7d698cae7577736319e38f089e3b759c9beef

Reviewed-on: https://review.gerrithub.io/435343
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-03 19:50:15 +00:00
Liu Xiaodong
0e7ca66922 lib/trace: show specific usage of trace mask
Previously, if want to know which mask bit is used for specific
trace group, the only way is to check source code. Now list
each trace group with its trace tpoint group mask bit in
usage message

Change-Id: I7a85fe9c0885f1919f6ffbdc97dab81f1986fb07
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/435448
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-30 14:52:28 +00:00
Liu Xiaodong
fd4c75721e lib/trace: set num-trace-entries by app param
Number of trace entries in circular buffer per lcore can be
assigned by the boot parameter of SPDK app with
"--num-trace-entries <NUM>"

Change-Id: I855ce6b4f14a716dcdd9078913da5ea8e577af3a
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/433099
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-11-26 18:34:18 +00:00
Tomasz Zawadzki
63bafd40a7 reactor: handle failure when getting reactor in spdk_reactor_get_tsc_stats()
Change-Id: I465bb4a20ccc6c67fb2bb68b6c3600094eafff7d
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/433833
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-11-20 15:04:38 +00:00
Ben Walker
e1ec5c60ca event: Use a single event pool instead of one per socket
Previously, a pool of events per socket was created for NUMA
locality. However, when passing a message between threads,
the event would be taken from one pool and put back into another,
resulting in imbalances.

At this time, I do not see an efficient way to allocate the events
so that they remain NUMA local. We'll work on that over time.
However, for correctness right now, go down to a single global
pool of events.

Change-Id: I09f8b0c5c928777e8274c53c6dce21b9c346e2a5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/433519
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-20 10:39:38 +00:00
Ben Walker
d761ddbf57 thread: Message passing now handled internally within a thread
Move the message ring and the polling into the thread
itself.

Change-Id: I5bc53c68bb1314fd69ed80cc98c5b86ce8be880f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/423768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-15 18:17:34 +00:00
Ziye Yang
6134d778d4 conf: Transport should be explictly configured in conf file
According to the currrent logic, it should be explictly defined
in the configuration file if the NVMe-oF target is started by
configuration file without using rpc calls. If no transport is
defined, we do not need to parse the following subsystems
but should terminate the NVMe-oF target .

Change-Id: I2e2db8406a30a9bf7e54d38f8d08a8d92ef158c9
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/432376
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-15 04:49:08 +00:00
Ben Walker
08d36a55f9 thread: Make the thread internally manage pollers
The user of the thread library is now only responsible for
periodically calling spdk_thread_poll. Pollers are handled
internally.

In order to avoid changing all of the unit tests, the ability
to provide function pointers to change the behavior of
the  poller registration is still in the code. This should
only be used from tests until they are all converted.

Change-Id: Ie2c00ce1d57ca3710ed2c469cd711924768e23ef
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/417784
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-13 14:26:37 +00:00
Seth Howell
b7f54bd66e app: RPC to wait for app subsystem initialization.
Change-Id: I66a9f9c1a92c8b9185a0c4c882e61b028e1da261
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432491
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-12 22:21:33 +00:00
Darek Stojaczyk
3e75e90a8e env: add --huge-dir option
Allow specifying a custom hugetlbfs directory.
This can be useful e.g. when trying to use hugepages
with fixed size, different size limit, or different
access permissions.

Change-Id: I418cbab99ed183383300b3c3d9945095a03478db
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432105
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-08 23:09:34 +00:00
Seth Howell
962ba4e89a nvmf: remove tgt_opts from nvmf_tgt
This option is deprecated. Also, rename the rpc and configuration
options for setting the opts to reflect that they now only set the max
number of subsystems

Change-Id: Iaabcbf33dd0a0dc489d81233fda74e9e7f3e0d2e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/430161
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:08:26 +00:00
Darek Stojaczyk
70ef3d917f app: fixup default values in the usage text
In the usage output, the default config could be printed
as "(null)" and mem_size as "-1MB".

Change-Id: Ib6adc1ab86c43a40096d392bdfc64d3d508a86bc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432422
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>
2018-11-08 23:07:32 +00:00
Darek Stojaczyk
6f5840d225 env: remove default pre-reserved memory size
Now that we utilize DPDK dynamic memory allocation, we
no longer need to set the default pre-reserved memory size.
It'll now be 0, which implies all memory will be allocated
at runtime.

The option to pre-reserve all hugepages on the system is
now only available on BSD, so also clarify that bit in the
app usage text.

Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432204
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:07:32 +00:00
Tomasz Zawadzki
9b91f9c47c net: add asynchronous initialization and finish
Change-Id: Ic67818adf28ffc58a029cb8a551c74e51abde381
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/426829
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-07 17:08:27 +00:00
Seth Howell
c89b7bac82 nvmf: add rpc for getting transport information
Change-Id: I8c3cbc1b08a219844c9b25f8c8494efd09e347f6
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/430623
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
2018-11-02 18:04:06 +00:00
GangCao
98e119f7a9 lib/nvmf: add the nvmf qpair to the available poll group
In the case that the subsystem in the related poll group has
NULL IO channel assigned due to some problem like out of resource,
for example, the NVMe SSD hardware itself has limited number
of IO qpairs. The subsystems in the particular poll group
could have zero valid channels. In this case, the creation of
assoicated poll group will fail and when adding the new qpair
to the specified poll group, needs to have a check and pick the
available poll group.

Change-Id: Iedee2a6375e48eb7bf899cfb0542c565c7ebd231
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/423646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-16 12:54:02 +00:00