Commit 61631dad authored by paul luse's avatar paul luse Committed by Ben Walker
Browse files

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: default avatarpaul 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 5f6ce57f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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.
	 */