Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Verkamp
b4572d452b ioat: print PCI addresses in hex for consistency
Change-Id: I0cc81e0b44f75268b1171c4ab5a23f97d9f8c8e2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-14 10:27:47 -07:00
Daniel Verkamp
2931a3efef event: remove 'complete' parameter from poller_register
The spdk_poller_register() function provides a way to pass an event to
call once the poller is registered, but it is always NULL in the current
code base.

Change-Id: I459bf40ae4d050589577d113b7984f1563aaa9cc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-05 11:57:18 -07:00
Daniel Verkamp
7b01af8fd2 event.h: split non-public API into spdk_internal
Change-Id: Ie783df6cf387286ab882107fb9d4ce12358602e2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-05 11:57:18 -07:00
Daniel Verkamp
fb08791096 copy_engine: only calculate task size once
Track the maximum copy task size as modules are registered rather than
recalculating it every time spdk_copy_task_size() is called.

Change-Id: I141aca61e7075402dac41915080d1b43faee32ce
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-16 15:04:45 -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
Daniel Verkamp
dca887b7d8 env: remove spdk_pci_device_get_device_name()
It always returns NULL in the current DPDK env implementation and was
not used outside of a few ioat examples where it is not particularly
informational.

Change-Id: I14b237c33bc25ddebc6b36bfbd6a4edf6762e3ca
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 15:58:03 -07:00
Daniel Verkamp
bbd7e1c4da env: add spdk_pci_addr_parse()
Add a helper function that converts a PCI address from a string into a
struct spdk_pci_addr and use it in place of the various sscanf()
invocations throughout SPDK.

Change-Id: Id2749723f76db741567e01b4bcb0fffb0e425fcd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 14:15:02 -07:00
Daniel Verkamp
80f63aad73 copy_engine/ioat: use spdk_pci_addr for whitelist
Change-Id: Ie8f9f4923fcc571ef7d976157ce60e196d01e54d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-01 10:07:30 -07:00
Daniel Verkamp
e912a90f77 env: pass PCI address when claiming devices
The PCI device claim function does not need the whole spdk_pci_device
structure, just the address.

Change-Id: If59df512043ee062cf9f759bdc104fc522625ba8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-01 10:07:30 -07:00
Ben Walker
18a2cc11c1 env: Remove unused DPDK headers.
Remove #includes for all DPDK headers that weren't
necessary.

Change-Id: Ib02522e0f04e64a1c98afceb7508cc0e8d931a9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ben Walker
2224ff2162 env: Replace rte_malloc with spdk_zmalloc
Use the env library to perform all memory allocations
that previously called DPDK directly.

Change-Id: I6d33e85bde99796e0c85277d6d4880521c34f10d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-11 13:34:09 -07:00
Ben Walker
0dd80395f3 env: Move pci.c from util to env
This allows users to swap their PCI library from
libpciaccess/dpdk to another mechanism using the standard
method for swapping out the env library.

Change-Id: Ib2248f8b43754a540de2ec01897e571f0302b667
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 11:53:24 -07:00
Ben Walker
a4747c6048 env: Make the environment library configurable.
This allows users to swap out SPDK's third party
libraries for an implementation based on their own
framework.

Change-Id: Ia0b7384ce5e31acba5ad0d7002dec9e95b759c52
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 11:51:37 -07:00
Ben Walker
a30b5532cb memory: Rename to env
The new env library will wrap all third-party library
calls and be easily swappable with alternate implementations
at build time. For now, it's just the memory library
renamed.

Change-Id: I26a70933289f8137107208ba75f7520fd7a33da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 09:49:35 -07:00
Ben Walker
6b1e4e732d Drop libpciaccess and switch to DPDK PCI
This patch also drops support for automatically unbinding
devices from the kernel - run scripts/setup.sh first.

Our generic pci interface is now hidden behind include/spdk/pci.h
and implemented in lib/util/pci.c. We no longer wrap the calls
in nvme_impl.h or ioat_impl.h. The implementation now only uses
DPDK and the libpciaccess dependency has been removed. If using
a version of DPDK earlier than 16.07, enumerating devices
by class code isn't available and only Intel SSDs will be
discovered. DPDK 16.07 adds enumeration by class code and all
NVMe devices will be correctly discovered.

Change-Id: I0e8bac36b5ca57df604a2b310c47342c67dc9f3c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-04 15:59:00 -07:00
Ben Walker
a17ad921e2 Replace RTE_VERIFY with assert
We already require the assert header from the C standard library,
so use that instead of RTE_VERIFY to further isolate DPDK
dependencies.

Change-Id: I4a718af858c88aff6080e33e6c3dd533c077b8f4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-09-28 10:15:56 -07:00
Jim Harris
32aa4fa0a3 util: add context parameter for unique I/O channels
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I296992b2e03b9b516cfd26726405e49616ad08a5
2016-09-28 07:53:47 -07:00
Jim Harris
c1e3a87bf7 util: add 'unique' parameter to spdk_get_io_channel
Some subsystems may wish to create unique I/O channels
which are not shared across all users of the same I/O
device on the same thread.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3ade3675d57338cf85b6a301285e6f392bd6cd2e
2016-09-28 07:53:47 -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
Jim Harris
d85dce3b4f ioat: provide helper functions for allocating available channels
While here, also break out a new ioat_poll() function which
takes the ioat_channel as a parameter.  This will be reused
for some future refactoring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9c03577e8d90d9bbd4d7adb9c186f21f54b85e82
2016-09-22 09:12:36 -07:00
Jim Harris
8ef67a4176 malloc: remove mem_request list
This list was originally intended to ensure blockdev I/O operations
with a malloc backend would not be completed until after the blockdev
I/O submission routine completed.  This is no longer necessary, since
blockdev I/O completion operations are now handled by events.  Removing
this simplifies the memcpy copy engine implementation significantly.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4d318bed996694e49946d67baa3c2403d4bbef7a
2016-09-22 09:12:35 -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
fc07014a54 copy_engine: add I/OAT copy engine module
Change-Id: I670ab7c32aa7571def22c06dde091972808f215b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-20 09:57:22 -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