lib/accel: have accel and idxd engine use task->crc_dst

For clarity, this element was added when crc+copy API was
added so might as well have all the CRC related functions use
it instead of `dst` to avoid confusion.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic43adbd0df51c1a349847701ef318f452306d0b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8229
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
paul luse 2021-06-09 15:15:47 -04:00 committed by Jim Harris
parent 2f3f5ec556
commit 96d4c7a36d
2 changed files with 10 additions and 9 deletions

View File

@ -312,7 +312,7 @@ spdk_accel_submit_crc32c(struct spdk_io_channel *ch, uint32_t *crc_dst, void *sr
return -ENOMEM;
}
accel_task->dst = (void *)crc_dst;
accel_task->crc_dst = crc_dst;
accel_task->src = src;
accel_task->v.iovcnt = 0;
accel_task->seed = seed;
@ -345,8 +345,8 @@ crc32cv_done(void *cb_arg, int status)
~(*((uint32_t *)accel_task->crc_dst)),
accel_task->chained.cb_fn, accel_task->chained.cb_arg);
} else {
status = spdk_accel_submit_crc32cv(ch, accel_task->dst, ++accel_task->v.iovs,
accel_task->v.iovcnt - 1, ~(*((uint32_t *)accel_task->dst)),
status = spdk_accel_submit_crc32cv(ch, accel_task->crc_dst, ++accel_task->v.iovs,
accel_task->v.iovcnt - 1, ~(*((uint32_t *)accel_task->crc_dst)),
accel_task->chained.cb_fn, accel_task->chained.cb_arg);
}
@ -390,7 +390,7 @@ spdk_accel_submit_crc32cv(struct spdk_io_channel *ch, uint32_t *crc_dst, struct
accel_task->v.iovs = iov;
accel_task->v.iovcnt = iov_cnt;
accel_task->dst = (void *)crc_dst;
accel_task->crc_dst = crc_dst;
accel_task->seed = seed;
accel_task->op_code = ACCEL_OPCODE_CRC32C;
@ -635,7 +635,7 @@ spdk_accel_batch_prep_crc32c(struct spdk_io_channel *ch, struct spdk_accel_batch
return -ENOMEM;
}
accel_task->dst = crc_dst;
accel_task->crc_dst = crc_dst;
accel_task->src = src;
accel_task->v.iovcnt = 0;
accel_task->seed = seed;
@ -664,8 +664,9 @@ batched_crc32cv_done(void *cb_arg, int status)
assert(accel_task->chained.cb_arg != NULL);
if (spdk_likely(!status)) {
status = spdk_accel_batch_prep_crc32cv(ch, batch, accel_task->dst,
++accel_task->v.iovs, accel_task->v.iovcnt - 1, ~(*((uint32_t *)accel_task->dst)),
status = spdk_accel_batch_prep_crc32cv(ch, batch, accel_task->crc_dst,
++accel_task->v.iovs, accel_task->v.iovcnt - 1,
~(*((uint32_t *)accel_task->crc_dst)),
accel_task->chained.cb_fn, accel_task->chained.cb_arg);
if (spdk_likely(!status)) {
return;
@ -707,7 +708,7 @@ spdk_accel_batch_prep_crc32cv(struct spdk_io_channel *ch, struct spdk_accel_batc
accel_task->v.iovs = iovs;
accel_task->v.iovcnt = iov_cnt;
accel_task->dst = crc_dst;
accel_task->crc_dst = crc_dst;
accel_task->seed = seed;
accel_task->op_code = ACCEL_OPCODE_CRC32C;

View File

@ -164,7 +164,7 @@ _process_single_task(struct spdk_io_channel *ch, struct spdk_accel_task *task)
break;
case ACCEL_OPCODE_CRC32C:
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,
rc = spdk_idxd_submit_crc32c(chan->chan, task->crc_dst, src, task->seed, task->nbytes, idxd_done,
task);
break;
case ACCEL_OPCODE_COPY_CRC32C: