lib/idxd: use physical address for IAA aecs table
Per specification. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Ic93349c7d3ed50fa6e502e39db0347141804d4c4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15673 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
6580f654fc
commit
0b7138e97f
@ -1187,7 +1187,7 @@ _idxd_submit_compress_single(struct spdk_idxd_io_channel *chan, void *dst, const
|
|||||||
desc->src1_size = nbytes_src;
|
desc->src1_size = nbytes_src;
|
||||||
desc->iaa.max_dst_size = nbytes_dst;
|
desc->iaa.max_dst_size = nbytes_dst;
|
||||||
desc->iaa.src2_size = sizeof(struct iaa_aecs);
|
desc->iaa.src2_size = sizeof(struct iaa_aecs);
|
||||||
desc->iaa.src2_addr = (uint64_t)chan->idxd->aecs;
|
desc->iaa.src2_addr = chan->idxd->aecs_addr;
|
||||||
desc->flags |= IAA_FLAG_RD_SRC2_AECS;
|
desc->flags |= IAA_FLAG_RD_SRC2_AECS;
|
||||||
desc->compr_flags = IAA_COMP_FLAGS;
|
desc->compr_flags = IAA_COMP_FLAGS;
|
||||||
op->output_size = output_size;
|
op->output_size = output_size;
|
||||||
|
@ -143,6 +143,7 @@ struct spdk_idxd_device {
|
|||||||
bool pasid_enabled;
|
bool pasid_enabled;
|
||||||
enum idxd_dev type;
|
enum idxd_dev type;
|
||||||
struct iaa_aecs *aecs;
|
struct iaa_aecs *aecs;
|
||||||
|
uint64_t aecs_addr;
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -505,6 +505,7 @@ idxd_attach(struct spdk_pci_device *device)
|
|||||||
struct spdk_idxd_device *idxd;
|
struct spdk_idxd_device *idxd;
|
||||||
uint16_t did = device->id.device_id;
|
uint16_t did = device->id.device_id;
|
||||||
uint32_t cmd_reg;
|
uint32_t cmd_reg;
|
||||||
|
uint64_t updated = sizeof(struct iaa_aecs);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
user_idxd = calloc(1, sizeof(struct spdk_user_idxd_device));
|
user_idxd = calloc(1, sizeof(struct spdk_user_idxd_device));
|
||||||
@ -525,6 +526,14 @@ idxd_attach(struct spdk_pci_device *device)
|
|||||||
SPDK_ERRLOG("Failed to allocate iaa aecs\n");
|
SPDK_ERRLOG("Failed to allocate iaa aecs\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idxd->aecs_addr = spdk_vtophys((void *)idxd->aecs, &updated);
|
||||||
|
if (idxd->aecs_addr == SPDK_VTOPHYS_ERROR || updated < sizeof(struct iaa_aecs)) {
|
||||||
|
SPDK_ERRLOG("Failed to translate iaa aecs\n");
|
||||||
|
spdk_free(idxd->aecs);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
/* Configure aecs table using fixed Huffman table */
|
/* Configure aecs table using fixed Huffman table */
|
||||||
idxd->aecs->output_accum[0] = DYNAMIC_HDR | 1;
|
idxd->aecs->output_accum[0] = DYNAMIC_HDR | 1;
|
||||||
idxd->aecs->num_output_accum_bits = DYNAMIC_HDR_SIZE;
|
idxd->aecs->num_output_accum_bits = DYNAMIC_HDR_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user