[dpdk-dev,v2,03/11] ethdev: add doxygen comments for each state

Message ID 20180509224313.27289-4-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Thomas Monjalon May 9, 2018, 10:43 p.m. UTC
  The enum rte_eth_dev_state was not properly documented.
Its values did not appear in the doxygen output,
and may be misunderstood.

The state RTE_ETH_DEV_DEFERRED has no interest anymore
since the ownership mechanism brings a more flexible categorization.
This state could be removed later.

Fixes: d52268a8b24b ("ethdev: expose device states")
Fixes: cb894d99eceb ("ethdev: add deferred intermediate device state")
Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Fixes: 7106edc12380 ("ethdev: add devop to check removal status")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Andrew Rybchenko May 10, 2018, 9:56 a.m. UTC | #1
On 05/10/2018 01:43 AM, Thomas Monjalon wrote:
> The enum rte_eth_dev_state was not properly documented.
> Its values did not appear in the doxygen output,
> and may be misunderstood.
>
> The state RTE_ETH_DEV_DEFERRED has no interest anymore
> since the ownership mechanism brings a more flexible categorization.
> This state could be removed later.
>
> Fixes: d52268a8b24b ("ethdev: expose device states")
> Fixes: cb894d99eceb ("ethdev: add deferred intermediate device state")
> Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
> Fixes: 7106edc12380 ("ethdev: add devop to check removal status")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Matan Azrad <matan@mellanox.com>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 7ccf4bae6..2271337dc 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1269,12 +1269,16 @@  typedef uint16_t (*rte_tx_callback_fn)(uint16_t port_id, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
 
 /**
- * A set of values to describe the possible states of an eth device.
+ * Possible states of an ethdev port.
  */
 enum rte_eth_dev_state {
+	/** Device is unused before being probed. */
 	RTE_ETH_DEV_UNUSED = 0,
+	/** Device is attached when allocated in probing. */
 	RTE_ETH_DEV_ATTACHED,
+	/** The deferred state is useless and replaced by ownership. */
 	RTE_ETH_DEV_DEFERRED,
+	/** Device is in removed state when plug-out is detected. */
 	RTE_ETH_DEV_REMOVED,
 };