ethdev: expose device states
authorGaetan Rivet <gaetan.rivet@6wind.com>
Fri, 31 Mar 2017 12:04:37 +0000 (14:04 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 5 Apr 2017 20:47:57 +0000 (22:47 +0200)
commitd52268a8b24b503e00fdeee62c887062ee805b0f
tree05e78af19650e07937145200ceaeeb0aab74bbd3
parentfa865c012b4bd67e0d26902f5255a10a13b89919
ethdev: expose device states

The hotplug API introduced multiple states for a device with possible
values defined internally, while the related field in struct rte_eth_dev
was made public.

Exposing those states improves consistency because applications have to
deal with the device list directly.

"DEV_DETACHED" is renamed "RTE_ETH_DEV_UNUSED" to better reflect that
the emptiness of a slot is not necessarily the result of detaching a
device.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h