[RFC 25/47] net/mlx5: remove unnecessary include of sys/queue.h

Stephen Hemminger
2025-08-18T23:35:10Z

Already handled by rte_tailq.h in most places.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/mlx5/hws/mlx5dr_internal.h | 1 -
drivers/net/mlx5/linux/mlx5_verbs.c | 1 -
drivers/net/mlx5/mlx5.h | 2 +-
drivers/net/mlx5/mlx5_devx.c | 1 -
drivers/net/mlx5/mlx5_flow.c | 2 +-
drivers/net/mlx5/mlx5_flow.h | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 1 -
drivers/net/mlx5/mlx5_flow_verbs.c | 2 +-
drivers/net/mlx5/mlx5_rx.h | 1 -
drivers/net/mlx5/mlx5_rxq.c | 2 +-
drivers/net/mlx5/mlx5_rxtx.h | 1 -
drivers/net/mlx5/mlx5_tx.h | 1 -
12 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_internal.h b/drivers/net/mlx5/hws/mlx5dr_internal.h
index 2abc516b5e..4687e16dbe 100644
--- a/drivers/net/mlx5/hws/mlx5dr_internal.h
+++ b/drivers/net/mlx5/hws/mlx5dr_internal.h
@@ -6,7 +6,6 @@
#define MLX5DR_INTERNAL_H_

#include <stdint.h>
-#include <sys/queue.h>
/* Verbs headers do not support -pedantic. */
#ifdef PEDANTIC
#pragma GCC diagnostic ignored "-Wpedantic"
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 9011319a3e..6d5864ae3d 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -8,7 +8,6 @@
#include <stdint.h>
#include <unistd.h>
#include <inttypes.h>
-#include <sys/queue.h>

#include "mlx5_autoconf.h"

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index c08894cd03..f79052a2b9 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -10,7 +10,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
-#include <sys/queue.h>
+#include <bsd_queue.h>

#include <rte_pci.h>
#include <rte_ether.h>
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 10bd93c29a..c549f917c3 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -7,7 +7,6 @@
#include <stdbool.h>
#include <string.h>
#include <stdint.h>
-#include <sys/queue.h>

#include <rte_malloc.h>
#include <rte_common.h>
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8db372123c..55721f96d5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
-#include <sys/queue.h>
+#include <bsd_queue.h>

#include <eal_export.h>
#include <rte_common.h>
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index e890e732c3..9026de9419 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -8,7 +8,7 @@
#include <stdalign.h>
#include <stdint.h>
#include <string.h>
-#include <sys/queue.h>
+#include <bsd_queue.h>

#include <rte_alarm.h>
#include <rte_mtr.h>
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 7b9e5018b8..f968b0febb 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -2,7 +2,6 @@
* Copyright 2018 Mellanox Technologies, Ltd
*/

-#include <sys/queue.h>
#include <stdalign.h>
#include <stdint.h>
#include <string.h>
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 5b4a4eda3b..774fc3b27a 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -3,7 +3,7 @@
*/

#include <netinet/in.h>
-#include <sys/queue.h>
+#include <bsd_queue.h>
#include <stdalign.h>
#include <stdint.h>
#include <string.h>
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index 4f3d73e3c4..1ff01f710c 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -7,7 +7,6 @@
#define RTE_PMD_MLX5_RX_H_

#include <stdint.h>
-#include <sys/queue.h>

#include <rte_mbuf.h>
#include <rte_mempool.h>
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 77c5848c37..79f664fa06 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -8,7 +8,7 @@
#include <string.h>
#include <stdint.h>
#include <fcntl.h>
-#include <sys/queue.h>
+#include <bsd_queue.h>

#include <eal_export.h>
#include <rte_mbuf.h>
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 3fa9245769..c999ca9052 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -8,7 +8,6 @@

#include <stddef.h>
#include <stdint.h>
-#include <sys/queue.h>

#include <rte_mbuf.h>
#include <rte_mempool.h>
diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 16307206e2..f320b18481 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -7,7 +7,6 @@
#define RTE_PMD_MLX5_TX_H_

#include <stdint.h>
-#include <sys/queue.h>

#include <rte_mbuf.h>
#include <rte_mempool.h>
--
2.47.2