Commit bc393d84 authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

lib/idxd: translate the completion address for batched commands



Was simply missing.

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


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 5bfcd5b3
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -782,6 +782,8 @@ _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn,
{
	struct idxd_hw_desc *desc;
	struct idxd_ops *op;
	uint64_t op_hw_addr;
	int rc;

	if (_is_batch_valid(batch, chan) == false) {
		SPDK_ERRLOG("Attempt to add to an invalid batch.\n");
@@ -796,6 +798,12 @@ _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn,

	desc = *_desc = &batch->user_desc[batch->index];
	op = *_op = &batch->user_ops[batch->index];

	rc = _vtophys(&op->hw, &op_hw_addr, sizeof(struct idxd_hw_comp_record));
	if (rc) {
		return rc;
	}

	op->desc = desc;
	op->batch_op = true;
	SPDK_DEBUGLOG(idxd, "Prep batch %p index %u\n", batch, batch->index);
@@ -803,7 +811,7 @@ _idxd_prep_batch_cmd(struct spdk_idxd_io_channel *chan, spdk_idxd_req_cb cb_fn,
	batch->index++;

	desc->flags = IDXD_FLAG_COMPLETION_ADDR_VALID | IDXD_FLAG_REQUEST_COMPLETION;
	desc->completion_addr = (uintptr_t)&op->hw;
	desc->completion_addr = op_hw_addr;
	op->cb_arg = cb_arg;
	op->cb_fn = cb_fn;
	op->batch = batch;