accel: Correctly set nbytes for copy_crc32cv tasks
If nbytes is not set, then the desination iovec sent to the underlying driver has a length of 0. Change-Id: Ia55f5ece942bd70f32bfdb3bcf02134ba98fca96 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12612 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
11a5716da3
commit
14757fe8fb
@ -377,6 +377,8 @@ spdk_accel_submit_copy_crc32cv(struct spdk_io_channel *ch, void *dst,
|
||||
struct spdk_accel_task *accel_task;
|
||||
struct spdk_accel_engine *engine = g_engines_opc[ACCEL_OPC_COPY_CRC32C];
|
||||
struct spdk_io_channel *engine_ch = accel_ch->engine_ch[ACCEL_OPC_COPY_CRC32C];
|
||||
uint64_t nbytes;
|
||||
uint32_t i;
|
||||
|
||||
if (src_iovs == NULL) {
|
||||
SPDK_ERRLOG("iov should not be NULL");
|
||||
@ -395,11 +397,17 @@ spdk_accel_submit_copy_crc32cv(struct spdk_io_channel *ch, void *dst,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
nbytes = 0;
|
||||
for (i = 0; i < iov_cnt; i++) {
|
||||
nbytes += src_iovs[i].iov_len;
|
||||
}
|
||||
|
||||
accel_task->v.iovs = src_iovs;
|
||||
accel_task->v.iovcnt = iov_cnt;
|
||||
accel_task->dst = (void *)dst;
|
||||
accel_task->crc_dst = crc_dst;
|
||||
accel_task->seed = seed;
|
||||
accel_task->nbytes = nbytes;
|
||||
accel_task->flags = flags;
|
||||
accel_task->op_code = ACCEL_OPC_COPY_CRC32C;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user