ethdev: count devices consistently
authorGaetan Rivet <gaetan.rivet@6wind.com>
Tue, 18 Jul 2017 12:48:13 +0000 (14:48 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Jul 2017 08:59:39 +0000 (11:59 +0300)
commitd1fe33bfc7979b13b3ac39f7cbd114b1fc4ee52c
treef560f86e7d8e6af13bb4480e88917b37fecada5b
parentcb894d99eceb8233bc6555f4cda751940609e778
ethdev: count devices consistently

Make the rte_eth_dev_count() return the number of available devices even
after some are detached by the hotplug API or put in a deferred state.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h