Commit Graph

15 Commits

Author SHA1 Message Date
Shuhei Matsumoto
2fa51eeb46 lib/nvmf: Make spdk_nvmf_poll_group_destroy() asynchronous
The next patch will create poll group threads dynamically for
NVMe-oF target, and will need to wait for completion of poll group and
I/O channel destroy. This is a preparation for the next patch.

Add callback function and its argument to spdk_nvmf_poll_group_destroy(),
and to struct spdk_nvmf_poll_group, respectively.

The callback has not only cb_arg but also status as its parameters even
if the next patch always sets the status to zero. The reason is to follow
spdk_nvmf_tgt_destroy's callback and to process any case that the status
is nonzero in future.

spdk_nvmf_poll_group_destroy() sets the passed callback to the passed
poll group.

Then spdk_nvmf_tgt_destroy_poll_group() calls the held callback in the
end.

This change will ensure all pollers are being unregistered and
all I/O channels are being released.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb854066a5259a6029d55b88de358e3346c63f18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-17 08:49:00 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
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-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
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-02-17 10:07:21 +00:00
Karol Latecki
c344dac9cc Fix Markdown MD003 linter warnings - header style
MD003 - Header style
Triggered when inconsistent header styles are used accros file.

Also adjust other headers in file to fix
MD022 - Headers should be surrounded by blank lines
MD025 - Multiple top level headers in the same document

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1937abc0d29dc8a21a8eac54d0af2427ebf95bdc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/653
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-02-17 10:07:21 +00:00
Seth Howell
241d04467d example/nvmf: always return after spdk_subsystem_init
When the call to spdk_subsystem_init returns synchronously, calling the
callback results in double iterating over states in the state machine.
Returning after calling spdk_subsystem_init allows us to reliably begin
executing after the callback function is executed with no double
execution.

Change-Id: Ieb9003acece7483c956f19be4f131c8d4f64fbaa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/480007
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-13 01:47:30 +00:00
JinYu
ada795302a nvmf_example: add the acceptor poller
Add acceptor poller to handle all the connections.

Change-Id: I3228547d63a5812b90fe4394641cf124d9e64d12
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468660
Community-CI: SPDK CI Jenkins <sys_sgci@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>
2020-01-07 12:16:05 +00:00
JinYu
095fef2f45 nvmf_example: start subsystems
Change-Id: Ic1aa1ad9c2cbd637fd1b6d5609a36a63f5f8a698
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468659
Community-CI: SPDK CI Jenkins <sys_sgci@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>
2020-01-07 12:16:05 +00:00
JinYu
8d601b077f nvmf_example: create the poll groups
Create the poll groups of the nvmf target.

Change-Id: I56a7add994927245ef5984574fa6230821276b7f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468658
Community-CI: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: GangCao <gang.cao@intel.com>
2020-01-07 12:16:05 +00:00
JinYu
b63e47f237 nvmf_example: construct the nvmf target
Construct nvmf target.

Change-Id: I126d2f6b9f96840975fbc8fb833d0d7bc03b35fd
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468657
Community-CI: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: GangCao <gang.cao@intel.com>
2020-01-07 12:16:05 +00:00
JinYu
c871ee40e6 nvmf_example: add the signal handler
Add the same handler for SIGINT and SIGTERM so that
the working thread can exit.

Change-Id: If1ce617ddd778e92bed6f95089c48caf841e256f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468661
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00
Anil Veerabhadrappa
3022d2f83b example/nvmf: fix nvmf example compilation with fc transport
Add fc library path if FC transport is configured.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ifca51aed9cfde6fda347bbe9e331026bd7246a97
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478771
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>
2019-12-30 11:45:24 +00:00
Jin Yu
1c53379bdf nvmf_example: initlize the bdev layer
Change-Id: I92f6c03f944ef51b2a325b64055861d8376e5134
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475414
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:03:34 +00:00
JinYu
ebad2567ac nvmf_example: initlize the thread layer
Change-Id: Ic00e7f5b557b657f18b0b510987c682363be1da8
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468656
Reviewed-by: GangCao <gang.cao@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-12-20 10:03:34 +00:00
JinYu
b9793e6809 nvmf_example: add an nvmf example
use the nvmf lib to add an nvmf example which
doesn't use the spdk app framework. It can show
how to use the nvmf lib to build your own nvmf target.

We encouage you to use the RPC cmds so this example will
not supply the configuration file. You can read the
README.md to get the steps how to build your nvmf target
and test the IO status.

Change-Id: I8d175934f7364d40fb44d36e85c31d8ea5063654
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468457
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2019-12-20 10:03:34 +00:00