examples/accel_perf: fix small bugs with copy + crc
Wrong opcode was used when deciding whether a dst buffer is needed or not. Also on freeing we were freeing src instead of the vector parts of the task. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I33eb9408ee20eca6c44911b4567d0367528347de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9189 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: Monica Kenguva <monica.kenguva@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
df42f3582b
commit
5bdad0c1af
@ -324,7 +324,7 @@ _get_task_data_bufs(struct ap_task *task)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_workload_selection != ACCEL_COPY_CRC32C) {
|
||||
if (g_workload_selection != ACCEL_CRC32C) {
|
||||
task->dst = spdk_dma_zmalloc(dst_buff_len, align, NULL);
|
||||
if (task->dst == NULL) {
|
||||
fprintf(stderr, "Unable to alloc dst buffer\n");
|
||||
@ -471,7 +471,7 @@ _free_task_buffers(struct ap_task *task)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
if (g_workload_selection == ACCEL_CRC32C) {
|
||||
if (g_workload_selection == ACCEL_CRC32C || g_workload_selection == ACCEL_COPY_CRC32C) {
|
||||
if (task->iovs) {
|
||||
for (i = 0; i < task->iov_cnt; i++) {
|
||||
if (task->iovs[i].iov_base) {
|
||||
|
Loading…
Reference in New Issue
Block a user