From 7d63e716eb8e84a37953eaec9d372b783a8a2ba9 Mon Sep 17 00:00:00 2001 From: paul luse Date: Wed, 8 Sep 2021 11:32:07 -0400 Subject: [PATCH] idxd: Add flags parameter to all low level API for prep/submission Previously required flags were hardcoded in the low level library. By having the user pass them in there is more flexbility and control. This was driven by the need to add a new flag for pmem durability, coming in a future patch in this series. There is no change in functionality with this patch, just movement of where flags are set and by whom and the plumbing of 'flags'.. Also note that some flags in scenarios that we know are required are still set by the library. Signed-off-by: paul luse Change-Id: I194278f9e3cec0886628585cf84bcc2eae635e0a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9449 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: GangCao Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- CHANGELOG.md | 5 ++ examples/idxd/perf/perf.c | 11 ++-- include/spdk/idxd.h | 18 ++++--- lib/idxd/idxd.c | 76 +++++++++++++++------------ module/accel/idxd/accel_engine_idxd.c | 13 ++--- 5 files changed, 71 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ce176e5a..cfe7505d25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ Removed deprecated spdk_bdev_module_finish_done(). Use spdk_bdev_module_fini_done() instead. +### idxd + +A new parameter `flags` was added to all low level submission and preparation +APIs to enable the caller to pass operation flags per the DSA specification. + ### bdev_nvme Added `bdev_nvme_add_error_injection` and `bdev_nvme_remove_error_injection` RPCs to add and diff --git a/examples/idxd/perf/perf.c b/examples/idxd/perf/perf.c index 73292e505f..5c185e151e 100644 --- a/examples/idxd/perf/perf.c +++ b/examples/idxd/perf/perf.c @@ -520,6 +520,7 @@ _submit_single(struct idxd_chan_entry *t, struct idxd_task *task) int rc = 0; struct iovec siov = {}; struct iovec diov = {}; + int flags = 0; assert(t); @@ -536,7 +537,7 @@ _submit_single(struct idxd_chan_entry *t, struct idxd_task *task) siov.iov_len = g_xfer_size_bytes; diov.iov_base = task->dst; diov.iov_len = g_xfer_size_bytes; - rc = spdk_idxd_submit_copy(t->ch, &diov, 1, &siov, 1, + rc = spdk_idxd_submit_copy(t->ch, &diov, 1, &siov, 1, flags, idxd_done, task); break; case IDXD_FILL: @@ -544,14 +545,14 @@ _submit_single(struct idxd_chan_entry *t, struct idxd_task *task) diov.iov_base = task->dst; diov.iov_len = g_xfer_size_bytes; rc = spdk_idxd_submit_fill(t->ch, &diov, 1, *(uint8_t *)task->src, - idxd_done, task); + flags, idxd_done, task); break; case IDXD_CRC32C: assert(task->iovs != NULL); assert(task->iov_cnt > 0); rc = spdk_idxd_submit_crc32c(t->ch, task->iovs, task->iov_cnt, g_crc32c_seed, &task->crc_dst, - idxd_done, task); + flags, idxd_done, task); break; case IDXD_COMPARE: random_num = rand() % 100; @@ -567,11 +568,11 @@ _submit_single(struct idxd_chan_entry *t, struct idxd_task *task) siov.iov_len = g_xfer_size_bytes; diov.iov_base = task->dst; diov.iov_len = g_xfer_size_bytes; - rc = spdk_idxd_submit_compare(t->ch, &siov, 1, &diov, 1, idxd_done, task); + rc = spdk_idxd_submit_compare(t->ch, &siov, 1, &diov, 1, flags, idxd_done, task); break; case IDXD_DUALCAST: rc = spdk_idxd_submit_dualcast(t->ch, task->dst, task->dst2, - task->src, g_xfer_size_bytes, idxd_done, task); + task->src, g_xfer_size_bytes, flags, idxd_done, task); break; default: assert(false); diff --git a/include/spdk/idxd.h b/include/spdk/idxd.h index 54c3d4f341..f167894c63 100644 --- a/include/spdk/idxd.h +++ b/include/spdk/idxd.h @@ -127,6 +127,7 @@ void spdk_idxd_set_config(uint32_t config_number, bool kernel_mode); * \param diovcnt Number of elements in diov * \param siov Source iovec * \param siovcnt Number of elements in siov + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the arg parameter in * the completion callback. @@ -136,7 +137,7 @@ void spdk_idxd_set_config(uint32_t config_number, bool kernel_mode); int spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, struct iovec *diov, uint32_t diovcnt, struct iovec *siov, uint32_t siovcnt, - spdk_idxd_req_cb cb_fn, void *cb_arg); + int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** * Build and submit an idxd dualcast request. @@ -149,6 +150,7 @@ int spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, * \param dst2 Second destination virtual address (must be 4K aligned). * \param src Source virtual address. * \param nbytes Number of bytes to copy. + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the arg parameter in * the completion callback. @@ -156,7 +158,7 @@ int spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, * \return 0 on success, negative errno on failure. */ int spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, - void *dst1, void *dst2, const void *src, uint64_t nbytes, + void *dst1, void *dst2, const void *src, uint64_t nbytes, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** @@ -170,6 +172,7 @@ int spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, * \param siov1cnt Number of elements in siov1 * \param siov2 Second source iovec * \param siov2cnt Number of elements in siov2 + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the arg parameter in * the completion callback. @@ -179,7 +182,7 @@ int spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, int spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, struct iovec *siov1, size_t siov1cnt, struct iovec *siov2, size_t siov2cnt, - spdk_idxd_req_cb cb_fn, void *cb_arg); + int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** * Build and submit a idxd memory fill request. @@ -191,6 +194,7 @@ int spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, * \param diov Destination iovec * \param diovcnt Number of elements in diov * \param fill_pattern Repeating eight-byte pattern to use for memory fill. + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the cb_arg parameter * in the completion callback. @@ -199,7 +203,7 @@ int spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, */ int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, struct iovec *diov, size_t diovcnt, - uint64_t fill_pattern, spdk_idxd_req_cb cb_fn, void *cb_arg); + uint64_t fill_pattern, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** * Build and submit a memory CRC32-C request. @@ -212,6 +216,7 @@ int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, * \param siovcnt Number of elements in siov * \param seed Four byte CRC-32C seed value. * \param crc_dst Resulting calculation. + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the cb_arg parameter * in the completion callback. @@ -220,7 +225,7 @@ int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, */ int spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, struct iovec *siov, size_t siovcnt, - uint32_t seed, uint32_t *crc_dst, + uint32_t seed, uint32_t *crc_dst, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** @@ -236,6 +241,7 @@ int spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, * \param siovcnt Number of elements in siov * \param seed Four byte CRC-32C seed value. * \param crc_dst Resulting calculation. + * \param flags Flags, optional flags that can vary per operation. * \param cb_fn Callback function which will be called when the request is complete. * \param cb_arg Opaque value which will be passed back as the cb_arg parameter * in the completion callback. @@ -245,7 +251,7 @@ int spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, int spdk_idxd_submit_copy_crc32c(struct spdk_idxd_io_channel *chan, struct iovec *diov, size_t diovcnt, struct iovec *siov, size_t siovcnt, - uint32_t seed, uint32_t *crc_dst, + uint32_t seed, uint32_t *crc_dst, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg); /** diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 2cdff97771..ccbecb8fff 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -354,8 +354,8 @@ spdk_idxd_detach(struct spdk_idxd_device *idxd) } static int -_idxd_prep_command(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn, - void *cb_arg, struct idxd_hw_desc **_desc, struct idxd_ops **_op) +_idxd_prep_command(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn, void *cb_arg, + int flags, struct idxd_hw_desc **_desc, struct idxd_ops **_op) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -373,7 +373,10 @@ _idxd_prep_command(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn, return -EBUSY; } - desc->flags = IDXD_FLAG_COMPLETION_ADDR_VALID | IDXD_FLAG_REQUEST_COMPLETION; + flags |= IDXD_FLAG_COMPLETION_ADDR_VALID; + flags |= IDXD_FLAG_REQUEST_COMPLETION; + + desc->flags = flags; op->cb_arg = cb_arg; op->cb_fn = cb_fn; op->batch = NULL; @@ -389,7 +392,7 @@ _is_batch_valid(struct idxd_batch *batch, struct spdk_idxd_io_channel *chan) static int _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn, - void *cb_arg, struct idxd_batch *batch, + void *cb_arg, struct idxd_batch *batch, int flags, struct idxd_hw_desc **_desc, struct idxd_ops **_op) { struct idxd_hw_desc *desc; @@ -417,8 +420,9 @@ _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn, comp_addr = desc->completion_addr; memset(desc, 0, sizeof(*desc)); desc->completion_addr = comp_addr; - - desc->flags = IDXD_FLAG_COMPLETION_ADDR_VALID | IDXD_FLAG_REQUEST_COMPLETION; + flags |= IDXD_FLAG_COMPLETION_ADDR_VALID; + flags |= IDXD_FLAG_REQUEST_COMPLETION; + desc->flags = flags; op->cb_arg = cb_arg; op->cb_fn = cb_fn; op->batch = batch; @@ -501,7 +505,7 @@ idxd_batch_submit(struct spdk_idxd_io_channel *chan, struct idxd_batch *batch, { struct idxd_hw_desc *desc; struct idxd_ops *op; - int i, rc; + int i, rc, flags = 0; assert(chan != NULL); assert(batch != NULL); @@ -516,7 +520,7 @@ idxd_batch_submit(struct spdk_idxd_io_channel *chan, struct idxd_batch *batch, } /* Common prep. */ - rc = _idxd_prep_command(chan, cb_fn, cb_arg, &desc, &op); + rc = _idxd_prep_command(chan, cb_fn, cb_arg, flags, &desc, &op); if (rc) { return rc; } @@ -600,7 +604,7 @@ _idxd_flush_batch(struct spdk_idxd_io_channel *chan) static inline int _idxd_submit_copy_single(struct spdk_idxd_io_channel *chan, void *dst, const void *src, - uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg) + uint64_t nbytes, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -617,7 +621,7 @@ _idxd_submit_copy_single(struct spdk_idxd_io_channel *chan, void *dst, const voi } /* Common prep. */ - rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, flags, &desc, &op); if (rc) { return rc; } @@ -650,7 +654,7 @@ int spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, struct iovec *diov, uint32_t diovcnt, struct iovec *siov, uint32_t siovcnt, - spdk_idxd_req_cb cb_fn, void *cb_arg) + int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -673,7 +677,7 @@ spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, return _idxd_submit_copy_single(chan, diov[0].iov_base, siov[0].iov_base, siov[0].iov_len, - cb_fn, cb_arg); + flags, cb_fn, cb_arg); } if (chan->batch) { @@ -696,7 +700,7 @@ spdk_idxd_submit_copy(struct spdk_idxd_io_channel *chan, for (len = spdk_ioviter_first(&iter, siov, siovcnt, diov, diovcnt, &src, &dst); len > 0; len = spdk_ioviter_next(&iter, &src, &dst)) { - rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, flags, &desc, &op); if (rc) { goto err; } @@ -732,7 +736,8 @@ err: /* Dual-cast copies the same source to two separate destination buffers. */ int spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, void *dst1, void *dst2, - const void *src, uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg) + const void *src, uint64_t nbytes, int flags, + spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -750,7 +755,7 @@ spdk_idxd_submit_dualcast(struct spdk_idxd_io_channel *chan, void *dst1, void *d } /* Common prep. */ - rc = _idxd_prep_command(chan, cb_fn, cb_arg, &desc, &op); + rc = _idxd_prep_command(chan, cb_fn, cb_arg, flags, &desc, &op); if (rc) { return rc; } @@ -789,7 +794,7 @@ error: static inline int _idxd_submit_compare_single(struct spdk_idxd_io_channel *chan, void *src1, const void *src2, - uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg) + uint64_t nbytes, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -806,7 +811,7 @@ _idxd_submit_compare_single(struct spdk_idxd_io_channel *chan, void *src1, const } /* Common prep. */ - rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, flags, &desc, &op); if (rc) { return rc; } @@ -838,7 +843,7 @@ int spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, struct iovec *siov1, size_t siov1cnt, struct iovec *siov2, size_t siov2cnt, - spdk_idxd_req_cb cb_fn, void *cb_arg) + int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -856,7 +861,7 @@ spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, } return _idxd_submit_compare_single(chan, siov1[0].iov_base, siov2[0].iov_base, siov1[0].iov_len, - cb_fn, cb_arg); + flags, cb_fn, cb_arg); } if (chan->batch) { @@ -879,7 +884,7 @@ spdk_idxd_submit_compare(struct spdk_idxd_io_channel *chan, for (len = spdk_ioviter_first(&iter, siov1, siov1cnt, siov2, siov2cnt, &src1, &src2); len > 0; len = spdk_ioviter_next(&iter, &src1, &src2)) { - rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, flags, &desc, &op); if (rc) { goto err; } @@ -914,7 +919,7 @@ err: static inline int _idxd_submit_fill_single(struct spdk_idxd_io_channel *chan, void *dst, uint64_t fill_pattern, - uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg) + uint64_t nbytes, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -930,7 +935,7 @@ _idxd_submit_fill_single(struct spdk_idxd_io_channel *chan, void *dst, uint64_t } /* Common prep. */ - rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, flags, &desc, &op); if (rc) { return rc; } @@ -957,7 +962,8 @@ error: int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, struct iovec *diov, size_t diovcnt, - uint64_t fill_pattern, spdk_idxd_req_cb cb_fn, void *cb_arg) + uint64_t fill_pattern, int flags, + spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -969,7 +975,7 @@ spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, if (diovcnt == 1) { /* Simple case - filling one buffer */ return _idxd_submit_fill_single(chan, diov[0].iov_base, fill_pattern, - diov[0].iov_len, cb_fn, cb_arg); + diov[0].iov_len, flags, cb_fn, cb_arg); } if (chan->batch) { @@ -990,7 +996,7 @@ spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, } for (i = 0; i < diovcnt; i++) { - rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, flags, &desc, &op); if (rc) { goto err; } @@ -1021,7 +1027,7 @@ err: static inline int _idxd_submit_crc32c_single(struct spdk_idxd_io_channel *chan, uint32_t *crc_dst, void *src, - uint32_t seed, uint64_t nbytes, + uint32_t seed, uint64_t nbytes, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; @@ -1039,7 +1045,7 @@ _idxd_submit_crc32c_single(struct spdk_idxd_io_channel *chan, uint32_t *crc_dst, } /* Common prep. */ - rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, flags, &desc, &op); if (rc) { return rc; } @@ -1067,7 +1073,7 @@ error: int spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, struct iovec *siov, size_t siovcnt, - uint32_t seed, uint32_t *crc_dst, + uint32_t seed, uint32_t *crc_dst, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; @@ -1081,7 +1087,7 @@ spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, if (siovcnt == 1) { /* Simple case - crc on one buffer */ return _idxd_submit_crc32c_single(chan, crc_dst, siov[0].iov_base, - seed, siov[0].iov_len, cb_fn, cb_arg); + seed, siov[0].iov_len, flags, cb_fn, cb_arg); } if (chan->batch) { @@ -1103,7 +1109,7 @@ spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, prev_crc = NULL; for (i = 0; i < siovcnt; i++) { - rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, flags, &desc, &op); if (rc) { goto err; } @@ -1146,7 +1152,7 @@ err: static inline int _idxd_submit_copy_crc32c_single(struct spdk_idxd_io_channel *chan, void *dst, void *src, uint32_t *crc_dst, uint32_t seed, uint64_t nbytes, - spdk_idxd_req_cb cb_fn, void *cb_arg) + int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_ops *op; @@ -1164,7 +1170,7 @@ _idxd_submit_copy_crc32c_single(struct spdk_idxd_io_channel *chan, void *dst, vo } /* Common prep. */ - rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, cb_fn, cb_arg, chan->batch, flags, &desc, &op); if (rc) { return rc; } @@ -1199,7 +1205,7 @@ int spdk_idxd_submit_copy_crc32c(struct spdk_idxd_io_channel *chan, struct iovec *diov, size_t diovcnt, struct iovec *siov, size_t siovcnt, - uint32_t seed, uint32_t *crc_dst, + uint32_t seed, uint32_t *crc_dst, int flags, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; @@ -1219,7 +1225,7 @@ spdk_idxd_submit_copy_crc32c(struct spdk_idxd_io_channel *chan, if (siovcnt == 1 && diovcnt == 1) { /* Simple case - crc on one buffer */ return _idxd_submit_copy_crc32c_single(chan, diov[0].iov_base, siov[0].iov_base, - crc_dst, seed, siov[0].iov_len, cb_fn, cb_arg); + crc_dst, seed, siov[0].iov_len, flags, cb_fn, cb_arg); } if (chan->batch) { @@ -1243,7 +1249,7 @@ spdk_idxd_submit_copy_crc32c(struct spdk_idxd_io_channel *chan, for (len = spdk_ioviter_first(&iter, siov, siovcnt, diov, diovcnt, &src, &dst); len > 0; len = spdk_ioviter_next(&iter, &src, &dst)) { - rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); + rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, flags, &desc, &op); if (rc) { goto err; } diff --git a/module/accel/idxd/accel_engine_idxd.c b/module/accel/idxd/accel_engine_idxd.c index b711f1fa17..66939498de 100644 --- a/module/accel/idxd/accel_engine_idxd.c +++ b/module/accel/idxd/accel_engine_idxd.c @@ -150,6 +150,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) uint32_t iovcnt; struct iovec siov = {}; struct iovec diov = {}; + int flags = 0; switch (task->op_code) { case ACCEL_OPCODE_MEMMOVE: @@ -157,24 +158,24 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) siov.iov_len = task->nbytes; diov.iov_base = task->dst; diov.iov_len = task->nbytes; - rc = spdk_idxd_submit_copy(chan->chan, &diov, 1, &siov, 1, idxd_done, task); + rc = spdk_idxd_submit_copy(chan->chan, &diov, 1, &siov, 1, flags, idxd_done, task); break; case ACCEL_OPCODE_DUALCAST: rc = spdk_idxd_submit_dualcast(chan->chan, task->dst, task->dst2, task->src, task->nbytes, - idxd_done, task); + flags, idxd_done, task); break; case ACCEL_OPCODE_COMPARE: siov.iov_base = task->src; siov.iov_len = task->nbytes; diov.iov_base = task->dst; diov.iov_len = task->nbytes; - rc = spdk_idxd_submit_compare(chan->chan, &siov, 1, &diov, 1, idxd_done, task); + rc = spdk_idxd_submit_compare(chan->chan, &siov, 1, &diov, 1, flags, idxd_done, task); break; case ACCEL_OPCODE_MEMFILL: memset(&task->fill_pattern, fill_pattern, sizeof(uint64_t)); diov.iov_base = task->dst; diov.iov_len = task->nbytes; - rc = spdk_idxd_submit_fill(chan->chan, &diov, 1, task->fill_pattern, idxd_done, + rc = spdk_idxd_submit_fill(chan->chan, &diov, 1, task->fill_pattern, flags, idxd_done, task); break; case ACCEL_OPCODE_CRC32C: @@ -188,7 +189,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) iovcnt = task->v.iovcnt; } rc = spdk_idxd_submit_crc32c(chan->chan, iov, iovcnt, task->seed, task->crc_dst, - idxd_done, task); + flags, idxd_done, task); break; case ACCEL_OPCODE_COPY_CRC32C: if (task->v.iovcnt == 0) { @@ -203,7 +204,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) diov.iov_base = task->dst; diov.iov_len = task->nbytes; rc = spdk_idxd_submit_copy_crc32c(chan->chan, &diov, 1, iov, iovcnt, - task->seed, task->crc_dst, + task->seed, task->crc_dst, flags, idxd_done, task); break; default: