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

examples/accel_perf: use local task element for CRC destination



For all CRC related functions.  Does not need to be DMA'able memory
as DSA returns the CRC to it's completion record and the lib
copies it to this address.  Done for consistency as this element
was added as part of adding the copy+CRC API.

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: Iefedcbc0a1c4e211eeb8aaf5c52f2881e9173bad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8230


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 96d4c7a3
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ _submit_single(struct worker_thread *worker, struct ap_task *task)
					    g_xfer_size_bytes, accel_done, task);
		break;
	case ACCEL_CRC32C:
		rc = spdk_accel_submit_crc32cv(worker->ch, (uint32_t *)task->dst,
		rc = spdk_accel_submit_crc32cv(worker->ch, &task->crc_dst,
					       task->iovs, task->iov_cnt, g_crc32c_seed,
					       accel_done, task);
		break;
@@ -458,7 +458,7 @@ _batch_prep_cmd(struct worker_thread *worker, struct ap_task *task,
						       g_crc32c_seed, g_xfer_size_bytes, accel_done, task);
		break;
	case ACCEL_CRC32C:
		rc = spdk_accel_batch_prep_crc32cv(worker->ch, batch, (uint32_t *)task->dst,
		rc = spdk_accel_batch_prep_crc32cv(worker->ch, batch, &task->crc_dst,
						   task->iovs, task->iov_cnt, g_crc32c_seed, accel_done, task);
		break;
	default:
@@ -661,7 +661,7 @@ _accel_done(void *arg1)
			break;
		case ACCEL_CRC32C:
			sw_crc32c = spdk_crc32c_iov_update(task->iovs, task->iov_cnt, ~g_crc32c_seed);
			if (*(uint32_t *)task->dst != sw_crc32c) {
			if (task->crc_dst != sw_crc32c) {
				SPDK_NOTICELOG("CRC-32C miscompare\n");
				worker->xfer_failed++;
			}