lib/idxd: Save device version during kernel and user initialization
We'll likely need this eventually to address silicon version specific workarounds. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Ie6957674113cf0c7b7d695b468c694668ebbf2bd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13571 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
5f6ce57fb2
commit
61631dadb3
@ -140,6 +140,7 @@ struct spdk_idxd_device {
|
||||
pthread_mutex_t num_channels_lock;
|
||||
enum idxd_dev type;
|
||||
struct iaa_aecs *aecs;
|
||||
uint32_t version;
|
||||
};
|
||||
|
||||
void idxd_impl_register(struct spdk_idxd_impl *impl);
|
||||
|
@ -90,6 +90,7 @@ kernel_idxd_probe(void *cb_ctx, spdk_idxd_attach_cb attach_cb, spdk_idxd_probe_c
|
||||
kernel_idxd->idxd.socket_id = accfg_device_get_numa_node(device);
|
||||
kernel_idxd->idxd.impl = &g_kernel_idxd_impl;
|
||||
kernel_idxd->fd = -1;
|
||||
kernel_idxd->idxd.version = accfg_device_get_version(device);
|
||||
|
||||
accfg_wq_foreach(device, wq) {
|
||||
enum accfg_wq_state wstate;
|
||||
|
@ -256,6 +256,11 @@ idxd_device_configure(struct spdk_user_idxd_device *user_idxd)
|
||||
goto err_reset;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save the device version for use in the common library code.
|
||||
*/
|
||||
user_idxd->idxd.version = user_idxd->registers->version;
|
||||
|
||||
/*
|
||||
* Configure groups and work queues.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user