diff --git a/CHANGELOG.md b/CHANGELOG.md index e9d5a07950..5b53fdef41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/include/spdk/ioat.h b/include/spdk/ioat.h index 9d32eaf0e1..c4e66be3b9 100644 --- a/include/spdk/ioat.h +++ b/include/spdk/ioat.h @@ -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. * diff --git a/lib/ioat/Makefile b/lib/ioat/Makefile index a0da25b86b..933ad5ef73 100644 --- a/lib/ioat/Makefile +++ b/lib/ioat/Makefile @@ -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 diff --git a/lib/ioat/ioat.c b/lib/ioat/ioat.c index bde3290cb5..516fa545cf 100644 --- a/lib/ioat/ioat.c +++ b/lib/ioat/ioat.c @@ -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) { diff --git a/lib/ioat/spdk_ioat.map b/lib/ioat/spdk_ioat.map index a74768c9ee..f467da8172 100644 --- a/lib/ioat/spdk_ioat.map +++ b/lib/ioat/spdk_ioat.map @@ -11,6 +11,7 @@ spdk_ioat_flush; spdk_ioat_process_events; spdk_ioat_get_dma_capabilities; + spdk_ioat_get_max_descriptors; local: *; };