idxd: Correctly propagate the callback when converting a 1 sized batch

to a single command

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11209 (master)

(cherry picked from commit 097ccf06a9)
Change-Id: Ic0ca65b7399f3cbc4153327d83de7db69de48709
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Ben Walker 2022-01-21 12:57:49 -07:00 committed by Keith Lucas
parent 02c669d135
commit bdc2b48623

View File

@ -500,6 +500,10 @@ idxd_batch_submit(struct spdk_idxd_io_channel *chan, struct idxd_batch *batch,
completion_addr = desc->completion_addr;
memcpy(desc, &batch->user_desc[0], sizeof(*desc));
desc->completion_addr = completion_addr;
op->cb_fn = batch->user_ops[0].cb_fn;
op->cb_arg = batch->user_ops[0].cb_arg;
op->crc_dst = batch->user_ops[0].crc_dst;
_free_batch(batch, chan);
} else {
/* Command specific. */
desc->opcode = IDXD_OPCODE_BATCH;