ethdev: remove useless check in detach capability

This capability is not bound to which driver is handling the device, but
whether the bus is able to unplug it.

This check is already performed in rte_eal_dev_detach, there is no need
to do it in the ethdev layer.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
Gaetan Rivet 2017-07-26 15:35:53 +02:00 committed by Thomas Monjalon
parent f2b24fb03e
commit 8e04becc94

View File

@ -367,16 +367,6 @@ rte_eth_dev_is_detachable(uint8_t port_id)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
switch (rte_eth_devices[port_id].data->kdrv) {
case RTE_KDRV_IGB_UIO:
case RTE_KDRV_UIO_GENERIC:
case RTE_KDRV_NIC_UIO:
case RTE_KDRV_NONE:
case RTE_KDRV_VFIO:
break;
default:
return -ENOTSUP;
}
dev_flags = rte_eth_devices[port_id].data->dev_flags;
if ((dev_flags & RTE_ETH_DEV_DETACHABLE) &&
(!(dev_flags & RTE_ETH_DEV_BONDED_SLAVE)))