In legacy-mem mode, memory event callback registering is not supported,
we should not return error in dev_init on this case.
Fixes:
12ecb2f63b12 ("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>
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;