lib/vhost: check memory table earlier
Before starting a device, the memory table is already there, so we can check it earlier. Change-Id: I4996705501577cfa78c89621f7081eb0c3d4dd78 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14923 Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
d941d138ad
commit
835490b1d5
@ -1036,6 +1036,11 @@ start_device(int vid)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!vsession->mem) {
|
||||
SPDK_ERRLOG("Session %s doesn't set memory table yet\n", vsession->name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (vhost_get_negotiated_features(vid, &vsession->negotiated_features) != 0) {
|
||||
SPDK_ERRLOG("vhost device %d: Failed to get negotiated driver features\n", vid);
|
||||
goto out;
|
||||
@ -1120,11 +1125,6 @@ start_device(int vid)
|
||||
vsession->max_queues = i + 1;
|
||||
}
|
||||
|
||||
if (!vsession->mem) {
|
||||
SPDK_ERRLOG("Session %s doesn't set memory table yet\n", vsession->name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
vhost_user_session_set_coalescing(vdev, vsession, NULL);
|
||||
vsession->initialized = true;
|
||||
rc = vhost_user_session_start(vdev, vsession);
|
||||
|
Loading…
Reference in New Issue
Block a user