[v4,01/15] ethdev: move queue state defines to private file

Message ID 1571326337-42692-2-git-send-email-orika@mellanox.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add hairpin feature |

Checks

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

Commit Message

Ori Kam Oct. 17, 2019, 3:32 p.m. UTC
The queue state defines are internal to the DPDK.
This commit moves them to a private header file.

Signed-off-by: Ori Kam <orika@mellanox.com>

---
V4:
 - new file, created due to ML comments.

---
 lib/librte_ethdev/rte_ethdev.h        | 6 ------
 lib/librte_ethdev/rte_ethdev_driver.h | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
  

Comments

Stephen Hemminger Oct. 17, 2019, 3:37 p.m. UTC | #1
On Thu, 17 Oct 2019 15:32:03 +0000
Ori Kam <orika@mellanox.com> wrote:

>  /**
> + * RX/TX queue states
> + */
> +#define RTE_ETH_QUEUE_STATE_STOPPED 0
> +#define RTE_ETH_QUEUE_STATE_STARTED 1

Why not make it an enum?
  
Andrew Rybchenko Oct. 22, 2019, 10:59 a.m. UTC | #2
On 10/17/19 6:32 PM, Ori Kam wrote:
> The queue state defines are internal to the DPDK.
> This commit moves them to a private header file.
>
> Signed-off-by: Ori Kam <orika@mellanox.com>

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

Yes, there is a lot of space for improvements in queue state
management etc, but this one is a step in a right direction to
remove it from public API.
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d937fb4..187a2bb 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1272,12 +1272,6 @@  struct rte_eth_dcb_info {
 	struct rte_eth_dcb_tc_queue_mapping tc_queue;
 };
 
-/**
- * RX/TX queue states
- */
-#define RTE_ETH_QUEUE_STATE_STOPPED 0
-#define RTE_ETH_QUEUE_STATE_STARTED 1
-
 #define RTE_ETH_ALL RTE_MAX_ETHPORTS
 
 /* Macros to check for valid port */
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 936ff8c..c404f17 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -22,6 +22,12 @@ 
 #endif
 
 /**
+ * RX/TX queue states
+ */
+#define RTE_ETH_QUEUE_STATE_STOPPED 0
+#define RTE_ETH_QUEUE_STATE_STARTED 1
+
+/**
  * @internal
  * Returns a ethdev slot specified by the unique identifier name.
  *