From 097ccf06a9ef9b77b72cdc582364ffa3096dd33a Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Fri, 21 Jan 2022 12:57:49 -0700 Subject: [PATCH] idxd: Correctly propagate the callback when converting a 1 sized batch to a single command Change-Id: Ic0ca65b7399f3cbc4153327d83de7db69de48709 Signed-off-by: Ben Walker Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11209 Reviewed-by: Jim Harris Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- lib/idxd/idxd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index cc18ad1562..01035d0298 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -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;