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.
[...]
> --- 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?



Reply via email to