idxd: Remove idxd_wq

It is not used for anything.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1d967b2d0e404756f7ceda98ddc4ee9017ec83f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11489
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
Ben Walker 2022-02-03 14:37:03 -07:00 committed by Tomasz Zawadzki
parent 225cf4b6ed
commit 9de35e7fc8
4 changed files with 0 additions and 37 deletions

View File

@ -149,11 +149,6 @@ struct idxd_ops {
};
SPDK_STATIC_ASSERT(sizeof(struct idxd_ops) == 96, "size mismatch");
struct idxd_wq {
struct spdk_idxd_device *idxd;
struct idxd_group *group;
};
struct spdk_idxd_impl {
const char *name;
int (*probe)(void *cb_ctx, spdk_idxd_attach_cb attach_cb);
@ -174,7 +169,6 @@ struct spdk_idxd_device {
pthread_mutex_t num_channels_lock;
struct idxd_group *groups;
struct idxd_wq *queues;
};
void idxd_impl_register(struct spdk_idxd_impl *impl);

View File

@ -250,7 +250,6 @@ static int
kernel_idxd_wq_config(struct spdk_kernel_idxd_device *kernel_idxd)
{
uint32_t i;
struct idxd_wq *queue;
struct spdk_idxd_device *idxd = &kernel_idxd->idxd;
/* initialize the group */
@ -265,20 +264,6 @@ kernel_idxd_wq_config(struct spdk_kernel_idxd_device *kernel_idxd)
idxd->groups[i].id = i;
}
idxd->queues = calloc(g_kernel_dev_cfg.total_wqs, sizeof(struct idxd_wq));
if (idxd->queues == NULL) {
SPDK_ERRLOG("Failed to allocate queue memory\n");
return -ENOMEM;
}
for (i = 0; i < g_kernel_dev_cfg.total_wqs; i++) {
queue = &idxd->queues[i];
/* Not part of the config struct */
queue->idxd = idxd;
queue->group = &idxd->groups[i % g_kernel_dev_cfg.num_groups];
}
return 0;
}

View File

@ -251,7 +251,6 @@ static int
idxd_wq_config(struct spdk_user_idxd_device *user_idxd)
{
uint32_t j;
struct idxd_wq *queue;
struct spdk_idxd_device *idxd = &user_idxd->idxd;
uint32_t wq_size;
union idxd_wqcap_register wqcap;
@ -273,16 +272,10 @@ idxd_wq_config(struct spdk_user_idxd_device *user_idxd)
* and achieve optimal performance for common cases.
*/
idxd->chan_per_device = (idxd->total_wq_size >= 128) ? 8 : 4;
idxd->queues = calloc(1, sizeof(struct idxd_wq));
if (idxd->queues == NULL) {
SPDK_ERRLOG("Failed to allocate queue memory\n");
return -ENOMEM;
}
table_offsets.raw[0] = spdk_mmio_read_8(&user_idxd->registers->offsets.raw[0]);
table_offsets.raw[1] = spdk_mmio_read_8(&user_idxd->registers->offsets.raw[1]);
queue = idxd->queues;
wqtbl = (struct idxd_wqtbl *)((uint8_t *)user_idxd->registers + (table_offsets.wqcfg *
IDXD_TABLE_OFFSET_MULT));
@ -300,10 +293,6 @@ idxd_wq_config(struct spdk_user_idxd_device *user_idxd)
wqcfg.wq_state = WQ_ENABLED;
wqcfg.priority = WQ_PRIORITY_1;
/* Not part of the config struct */
queue->idxd = idxd;
queue->group = idxd->groups;
/*
* Now write the work queue config to the device for configured queues
*/
@ -388,7 +377,6 @@ idxd_device_configure(struct spdk_user_idxd_device *user_idxd)
return rc;
err_wq_enable:
err_device_enable:
free(idxd->queues);
err_wq_cfg:
free(idxd->groups);
err_group_cfg:
@ -409,7 +397,6 @@ user_idxd_device_destruct(struct spdk_idxd_device *idxd)
idxd_unmap_pci_bar(idxd, IDXD_MMIO_BAR);
idxd_unmap_pci_bar(idxd, IDXD_WQ_BAR);
free(idxd->groups);
free(idxd->queues);
spdk_pci_device_detach(user_idxd->device);
free(user_idxd);

View File

@ -134,8 +134,6 @@ test_idxd_wq_config(void)
CU_ASSERT(wqtbl->wq[0].max_xfer_shift == LOG2_WQ_MAX_XFER);
CU_ASSERT(wqtbl->wq[0].wq_state == WQ_ENABLED);
CU_ASSERT(wqtbl->wq[0].priority == WQ_PRIORITY_1);
CU_ASSERT(idxd->queues->idxd == idxd);
CU_ASSERT(idxd->queues->group == idxd->groups);
for (i = 1 ; i < user_idxd.registers->wqcap.num_wqs; i++) {
for (j = 0 ; j < (sizeof(union idxd_wqcfg) / sizeof(uint32_t)); j++) {
@ -143,7 +141,6 @@ test_idxd_wq_config(void)
}
}
free(idxd->queues);
free(user_idxd.registers);
free(idxd->groups);