ethdev: add devop to check removal status
authorMatan Azrad <matan@mellanox.com>
Sat, 20 Jan 2018 21:12:19 +0000 (21:12 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sun, 21 Jan 2018 20:09:25 +0000 (21:09 +0100)
commit7106edc123804fc0af5ca257d7a7e58eb7d0b53d
tree452aeb022f7e22f3feb2dfca75bb875d454ca4f3
parent584f7e9fd9ce341ac1693f7b8abdb9920909553c
ethdev: add devop to check removal status

There is time between the physical removal of the device until PMDs get
a RMV interrupt. At this time DPDK PMDs and applications still don't
know about the removal.

Current removal detection is achieved only by registration to device RMV
event and the notification comes asynchronously. So, there is no option
to detect a device removal synchronously.
Applications and other DPDK entities may want to check a device removal
synchronously and to take an immediate decision accordingly.

Add new dev op called is_removed to allow DPDK entities to check an
Ethernet device removal status immediately.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h
lib/librte_ether/rte_ethdev_version.map