diff --git a/lib/accel/accel_engine.c b/lib/accel/accel_engine.c index acb043895c..4505951206 100644 --- a/lib/accel/accel_engine.c +++ b/lib/accel/accel_engine.c @@ -390,7 +390,6 @@ spdk_accel_submit_crc32cv(struct spdk_io_channel *ch, uint32_t *dst, struct iove accel_task->chained.cb_fn = cb_fn; accel_task->chained.cb_arg = cb_arg; - accel_task->src = iov[0].iov_base; accel_task->nbytes = iov[0].iov_len; return accel_ch->engine->submit_tasks(accel_ch->engine_ch, accel_task); @@ -619,7 +618,6 @@ spdk_accel_batch_prep_crc32cv(struct spdk_io_channel *ch, struct spdk_accel_batc accel_task->chained.cb_fn = cb_fn; accel_task->chained.cb_arg = cb_arg; - accel_task->src = iovs[0].iov_base; accel_task->nbytes = iovs[0].iov_len; TAILQ_INSERT_TAIL(&batch->hw_tasks, accel_task, link); diff --git a/module/accel/idxd/accel_engine_idxd.c b/module/accel/idxd/accel_engine_idxd.c index 0ea88bbc21..44a2f742dc 100644 --- a/module/accel/idxd/accel_engine_idxd.c +++ b/module/accel/idxd/accel_engine_idxd.c @@ -110,6 +110,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) struct idxd_io_channel *chan = spdk_io_channel_get_ctx(ch); int rc = 0; uint8_t fill_pattern = (uint8_t)task->fill_pattern; + void *src; switch (task->op_code) { case ACCEL_OPCODE_MEMMOVE: @@ -128,7 +129,8 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task) task); break; case ACCEL_OPCODE_CRC32C: - rc = spdk_idxd_submit_crc32c(chan->chan, task->dst, task->src, task->seed, task->nbytes, idxd_done, + src = (task->v.iovcnt == 0) ? task->src : task->v.iovs[0].iov_base; + rc = spdk_idxd_submit_crc32c(chan->chan, task->dst, src, task->seed, task->nbytes, idxd_done, task); break; default: