mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
netdev-dpdk: Don't try to unregister empty vhost_id.
If 'vhost-server-path' not provided for vhostuserclient port,
'netdev_dpdk_vhost_destruct()' will try to unregister an empty string.
This leads to error message in log:
netdev_dpdk|ERR|vhost2: Unable to unregister vhost driver for socket ''.
CC: Ciara Loftus <ciara.loftus@intel.com>
Fixes: 2d24d165d6
("netdev-dpdk: Add new 'dpdkvhostuserclient' port type")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
This commit is contained in:
committed by
Daniele Di Proietto
parent
888782c766
commit
821b86649a
@@ -1027,6 +1027,10 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
|
||||
ovs_mutex_unlock(&dev->mutex);
|
||||
ovs_mutex_unlock(&dpdk_mutex);
|
||||
|
||||
if (!strlen(dev->vhost_id)) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (dpdk_vhost_driver_unregister(dev, vhost_id)) {
|
||||
VLOG_ERR("%s: Unable to unregister vhost driver for socket '%s'.\n",
|
||||
netdev->name, vhost_id);
|
||||
@@ -1034,6 +1038,7 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
|
||||
/* OVS server mode - remove this socket from list for deletion */
|
||||
fatal_signal_remove_file_to_unlink(vhost_id);
|
||||
}
|
||||
out:
|
||||
free(vhost_id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user