lib/ioat: add mew API to get the max # of descriptors supported

Needed by follow-on patches to aupport accel_fw batching in IOAT
module.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie39718f42756c10af131ff7893874d19ea390ecc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3154
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
paul luse 2020-07-01 15:00:10 -04:00 committed by Jim Harris
parent 3759b87082
commit 6a9e923da2
5 changed files with 21 additions and 1 deletions

View File

@ -2,6 +2,10 @@
## v20.07: (Upcoming Release)
### ioat
A new API `spdk_ioat_get_max_descriptors` was added.
### nvmf
The NVMe-oF target no longer supports connecting scheduling configuration and instead

View File

@ -107,6 +107,15 @@ int spdk_ioat_probe(void *cb_ctx, spdk_ioat_probe_cb probe_cb, spdk_ioat_attach_
*/
void spdk_ioat_detach(struct spdk_ioat_chan *ioat);
/**
* Get the maximum number of descriptors supported by the library.
*
* \param chan I/OAT channel
*
* \return maximum number of descriptors.
*/
uint32_t spdk_ioat_get_max_descriptors(struct spdk_ioat_chan *chan);
/**
* Build a DMA engine memory copy request.
*

View File

@ -35,7 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
SO_VER := 2
SO_MINOR := 0
SO_MINOR := 1
C_SRCS = ioat.c
LIBNAME = ioat

View File

@ -374,6 +374,12 @@ ioat_channel_destruct(struct spdk_ioat_chan *ioat)
}
}
uint32_t
spdk_ioat_get_max_descriptors(struct spdk_ioat_chan *ioat)
{
return 1 << ioat->ring_size_order;
}
static int
ioat_channel_start(struct spdk_ioat_chan *ioat)
{

View File

@ -11,6 +11,7 @@
spdk_ioat_flush;
spdk_ioat_process_events;
spdk_ioat_get_dma_capabilities;
spdk_ioat_get_max_descriptors;
local: *;
};