netdev-dpdk: Print the reason of device detaching failure.
Useful for debugging.
Acked-by: Ian Stokes
@@ -1395,8 +1395,11 @@ netdev_dpdk_destruct(struct netdev *netdev)
* device are closed.
*/
if (!remove_on_close || !netdev_dpdk_get_num_ports(rte_dev)) {
- if (rte_dev_remove(rte_dev) < 0) {
- VLOG_ERR("Device '%s' can not be detached", dev->devargs);
+ int ret = rte_dev_remove(rte_dev);
+
+ if (ret < 0) {
+ VLOG_ERR("Device '%s' can not be detached: %s.",
+ dev->devargs, rte_strerror(-ret));
} else {
/* Device was closed and detached. */
VLOG_INFO("Device '%s' has been removed and detached",
