+7
−0
Loading
Context created by accfg_new() needs to be kept during the configuration and usage of the DSA device. The creation of the context increments the reference count, which can be further managed by accfg_ref() and accfg_unref(). Before this patch, the context was created correctly but was not assigned to kernel_idxd->ctx, which is used in kernel_idxd_device_destruct(). This issue is now resolved. This patch ensures that the system can handle any number of devices, or no device at all. To accommodate this, an additional reference is taken for each attached device. Once the configuration is complete, the context reference used for configuration is released. Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I5e44867bfe3ed64f98ead61551568c0d90d185a0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22762 Community-CI: Mellanox Build Bot Reviewed-by:
Jim Harris <jim.harris@samsung.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>