idxd: Do not allow calls to spdk_idxd_set_config after devices have been
probed This can cause a mismatch of kernel vs user driver and isn't allowed. Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: I9c572ea1fa1da89d7b41e31ab4719eec719fb50a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10588 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: John Kariuki <John.K.Kariuki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
85580d47e1
commit
7f75e1081a
@ -265,6 +265,12 @@ idxd_get_impl_by_name(const char *impl_name)
|
||||
void
|
||||
spdk_idxd_set_config(bool kernel_mode)
|
||||
{
|
||||
if (g_idxd_impl != NULL) {
|
||||
SPDK_ERRLOG("Cannot change idxd implementation after devices are initialized\n");
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (kernel_mode) {
|
||||
g_idxd_impl = idxd_get_impl_by_name(KERNEL_DRIVER_NAME);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user