ethdev: remove assumption that port will not be detached
To remove assumption, do like followings.
This patch adds "RTE_PCI_DRV_DETACHABLE" to drv_flags of rte_pci_driver
structure. The flags indicate the driver can detach devices at runtime.
Also, remove assumption that port will not be detached.
To remove the assumption.
- Add 'attached' member to rte_eth_dev structure.
This member is used for indicating the port is attached, or not.
DEV_ATTACHED indicates a port is attached.
DEV_DETACHED indicates a port is detached.
- Add rte_eth_dev_allocate_new_port().
This function is used for allocating new port.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>