Commit Graph

18 Commits

Author SHA1 Message Date
Yanbo Zhou
9a9bef0a9a include/copy_engine.h: add comments for callback functions
Change-Id: Id731686e21df1bc2b077f729ab395719b437e4de
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/407689
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-05-28 01:45:03 +00:00
Shuhei Matsumoto
0fed4e0704 copy_engine: Support dump config text for IOAT config
IOAT module of copy engine requires config information in the .INI
config file. However dump config text is not supported yet.

Dump config text is legacy feature but this becomes a preparation
for the upcoming JSON config file.

Change-Id: I9b7349cac9c00ca3ce1d944a84cbc445a6f1aec4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/405845
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-04-04 12:18:31 -04:00
Yanbo Zhou
ca91d671e3 include/copy_engine.h: add comments for public APIs
Change-Id: I838fc6a280d0df3516f432ae02d239290fa9809a
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/402649
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-13 00:50:12 -04:00
Dave Boutcher
f58bc31505 include: wrap header files in extern "C" for c++
Update all the header files in include/spdk to include
extern "C" declarations.

Change-Id: I43299f68e962d0df18c1b23fbbaa19bc924fcb96
Signed-off-by: Dave Boutcher <dboutcher@ocient.com>
Reviewed-on: https://review.gerrithub.io/390896
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-12-07 19:13:47 -05:00
Tomasz Zawadzki
6c54c13cd4 event/subsystem/bdev: asynchronous SPDK finish
First this change moves spdk_subsystem_fini() to trigger on
spdk_app_stop(). This ensures that spdk_subsystem_fini() is called
before reactors are stopped in spdk_reactors_stop().

Finish paths for subsystems, bdevs and copy engine is now
asynchronous.
Each of those three mentioned have to make sure they are
asynchronous as well.

Only bdev that currently has requirement for asynchronous finish
are logical volume.
Thus the change in vbdev_lvol.c making it move to next bdev module
only after all lvol stores were unloaded.

Fio_plugin finish of bdev and copy_engine was removed for now.
Next patch in series adds it back with async support.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I80ee2d084f3d82c50bf1329e08996604ae61b1b3
Reviewed-on: https://review.gerrithub.io/381536
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:03:55 -04:00
Tomasz Zawadzki
b1ccfaca01 subsystem: remove fini return code
Closing the framework has to go through all subsystems
without failure, so return codes are unnecessary.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I53c9b4df12d2357e641130869f398b18637e6ff7
Reviewed-on: https://review.gerrithub.io/381681
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-10 10:56:34 -04:00
Jim Harris
a0d7056f11 copy: return 0 on success and appropriate errno on failure
This code was still using an old paradigm of returning the
number of bytes associated with a successful submission.
Just return 0 on success instead - if caller needs the
number of bytes for some reason they have the information
to get it.

While here, return an appropriate negated errno where possible -
we especially want ENOMEM returned when an ioat channel runs out
of descriptors.

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

Reviewed-on: https://review.gerrithub.io/378858
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-25 13:56:29 -04:00
Ben Walker
4d8c07901f copy: Move asynchronous module init to event_copy
This removes the last use of the event framework from
the copy_engine library.

Change-Id: I9b8788430249766e0b3bbec591822e2c1bb77792
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365724
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-20 13:46:37 -04:00
Ben Walker
4808ff7957 copy: Create a separate copy subsystem library
This removes the strict dependency on the SPDK
event framework.

Change-Id: Ie6b6f9585d09ab1df0f25bf33d53e7cdecd83faa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365281
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-16 13:10:26 -04:00
Ben Walker
d969ac445a io_channel: Remove per-channel priority
This wasn't used anywhere and we currently believe there
are superior software-only techniques for controlling
quality of service.

Change-Id: Icdadd5870ed0629b338c307d2619bbc242c3e7a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362065
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-26 13:42:19 -04:00
Daniel Verkamp
45cab335bc include: move standard includes into spdk/stdinc.h
This is the first step toward isolating standard C and POSIX headers
into a single replaceable header file.

Change-Id: I527297f5e7260b01103018ad3429922962ee9add
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-08 10:11:01 -07:00
Daniel Verkamp
5b63b8a448 copy_engine: rename spdk_copy_module_get_max_ctx_size() to spdk_copy_task_size()
Make the public API clearer - if the user wants to allocate a
spdk_copy_task directly, they need to allocate spdk_copy_task_size()
bytes.

Also change the return type to size_t for consistency.

Change-Id: I0f3757056757c510421d680c5b4532edd9bc2561
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-16 15:04:40 -07:00
Daniel Verkamp
945217d2b2 copy_engine: split internals into spdk_internal
Change-Id: I3102e9761888c5afdc20d1a1abc9abf50484233d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-16 14:44:35 -07:00
Daniel Verkamp
ee64969a7b copy_engine: add spdk_ prefix to types
Change-Id: I060718887950ee7f890e76d7e041e70db39974a2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-16 14:14:50 -07:00
Jim Harris
0babf8ce81 bdev, copy: move all I/O paths to use I/O channels
bdev and copy modules no longer have check_io functions
now - all polling is done via pollers registered when
I/O channels are created.

Other default resources are also removed - for example,
a qpair is no longer allocated and assigned per bdev
exposed by the nvme driver - the qpairs are only allocated
via I/O channels.  Similar principle also applies to the
aio driver.

ioat channels are no longer allocated and assigned to
lcores - they are dynamically allocated and assigned
to I/O channels when needed.  If no ioat channel is
available for an I/O channel, the copy engine framework
will revert to using memcpy/memset instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I99435a75fe792a2b91ab08f25962dfd407d6402f
2016-09-26 14:02:07 -07:00
Jim Harris
eb605a8203 copy_engine, ioat: add spdk_io_channel support
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I40db1b39882b68147aee4520cbd056f99901cfe4
2016-09-26 14:02:07 -07:00
Daniel Verkamp
78b83fd7b2 copy_engine: add fill (memset) function
Change-Id: I626edcdaef8bd7a700fce5853fc2f85fc5b93ef7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-02 09:24:47 -07:00
Daniel Verkamp
746dc47d62 copy_engine: add memory copy offload engine layer
Change-Id: I1aee004d6e0938972ece16eba6317d02ba3b0042
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-20 09:57:22 -07:00