net/virtio-user: fix device init in legacy-mem mode
In legacy-mem mode, memory event callback registering is not supported,
we should not return error in dev_init on this case.
Fixes: 12ecb2f63b
("net/virtio-user: support memory hotplug")
Suggested-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
0230e058e9
commit
88e5469ff8
@ -447,8 +447,11 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
|
||||
|
||||
if (rte_mem_event_callback_register(VIRTIO_USER_MEM_EVENT_CLB_NAME,
|
||||
virtio_user_mem_event_cb, dev)) {
|
||||
PMD_INIT_LOG(ERR, "Failed to register mem event callback\n");
|
||||
return -1;
|
||||
if (rte_errno != ENOTSUP) {
|
||||
PMD_INIT_LOG(ERR, "Failed to register mem event"
|
||||
" callback\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user