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

to a single command

Change-Id: Ic0ca65b7399f3cbc4153327d83de7db69de48709
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11209
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2022-01-21 12:57:49 -07:00 committed by Tomasz Zawadzki
parent 0267f8a977
commit 097ccf06a9

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;