Commit 6a9e923d authored by paul luse's avatar paul luse Committed by Jim Harris
Browse files

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: default avatarpaul 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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 3759b870
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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
+9 −0
Original line number Diff line number Diff line
@@ -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.
 *
+1 −1
Original line number Diff line number Diff line
@@ -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
+6 −0
Original line number Diff line number Diff line
@@ -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)
{
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
	spdk_ioat_flush;
	spdk_ioat_process_events;
	spdk_ioat_get_dma_capabilities;
	spdk_ioat_get_max_descriptors;

	local: *;
};