Thread (33 messages) 33 messages, 6 authors, 2021-07-08

Re: [dpdk-dev] [RFC] lib/ethdev: add dev configured flag

From: Thomas Monjalon <hidden>
Date: 2021-07-04 20:05:15

08/05/2021 10:00, Huisong Li:
Currently, if dev_configure is not invoked or fails to be invoked, users
can still invoke dev_start successfully. This patch adds a "dev_configured"
flag in "rte_eth_dev_data" to control whether dev_start can be invoked.
[...]
quoted hunk ↗ jump to hunk
--- a/lib/ethdev/rte_ethdev_core.h
+++ b/lib/ethdev/rte_ethdev_core.h
@@ -167,7 +167,11 @@ struct rte_eth_dev_data {
 		scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
 		all_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */
 		dev_started : 1,   /**< Device state: STARTED(1) / STOPPED(0). */
-		lro         : 1;   /**< RX LRO is ON(1) / OFF(0) */
+		lro         : 1,  /**< RX LRO is ON(1) / OFF(0) */
+		dev_configured : 1;
+		/**< Device configuration state:
+		 * CONFIGURED(1) / NOT CONFIGURED(0).
+		 */
Why not using "enum rte_eth_dev_state"?
Because rte_eth_dev.state is not shared between processes?


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help