diff --git a/include/spdk/idxd.h b/include/spdk/idxd.h index b622aad93..4a84f6539 100644 --- a/include/spdk/idxd.h +++ b/include/spdk/idxd.h @@ -339,7 +339,7 @@ int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, * * \param chan IDXD channel to submit request. * \param batch Handle provided when the batch was started with spdk_idxd_batch_create(). - * \param dst Resulting calculation. + * \param crc_dst Resulting calculation. * \param src Source virtual address. * \param seed Four byte CRC-32C seed value. * \param nbytes Number of bytes to calculate on. @@ -350,7 +350,7 @@ int spdk_idxd_submit_fill(struct spdk_idxd_io_channel *chan, * \return 0 on success, negative errno on failure. */ int spdk_idxd_batch_prep_crc32c(struct spdk_idxd_io_channel *chan, struct idxd_batch *batch, - uint32_t *dst, void *src, uint32_t seed, uint64_t nbytes, + uint32_t *crc_dst, void *src, uint32_t seed, uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg); /** diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 72da96ea6..c27091664 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -972,12 +972,12 @@ spdk_idxd_batch_prep_dualcast(struct spdk_idxd_io_channel *chan, struct idxd_bat int spdk_idxd_batch_prep_crc32c(struct spdk_idxd_io_channel *chan, struct idxd_batch *batch, - uint32_t *dst, void *src, uint32_t seed, uint64_t nbytes, + uint32_t *crc_dst, void *src, uint32_t seed, uint64_t nbytes, spdk_idxd_req_cb cb_fn, void *cb_arg) { struct idxd_hw_desc *desc; struct idxd_comp *comp; - uint64_t src_addr, dst_addr; + uint64_t src_addr; int rc; /* Common prep. */ @@ -991,18 +991,14 @@ spdk_idxd_batch_prep_crc32c(struct spdk_idxd_io_channel *chan, struct idxd_batch return rc; } - rc = _vtophys(dst, &dst_addr, nbytes); - if (rc) { - return rc; - } - /* Command specific. */ desc->opcode = IDXD_OPCODE_CRC32C_GEN; - desc->dst_addr = dst_addr; + desc->dst_addr = 0; /* per specification */ desc->src_addr = src_addr; desc->flags &= IDXD_CLEAR_CRC_FLAGS; desc->crc32c.seed = seed; desc->xfer_size = nbytes; + comp->crc_dst = crc_dst; return 0; }