[RFC 20/47] bus/fslmc: use rte_tailq.h
Stephen Hemminger
stephen at networkplumber.org
Tue Aug 19 01:27:31 CEST 2025
Use macros from rte_tailq.h instead using sys/queue.h directly.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/bus/fslmc/bus_fslmc_driver.h | 1 -
drivers/bus/fslmc/fslmc_vfio.c | 1 +
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 11 ++---------
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 442de1a3fb..211864f945 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -17,7 +17,6 @@
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
-#include <sys/queue.h>
#include <stdint.h>
#include <inttypes.h>
#include <linux/vfio.h>
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 68439cbd8c..d69bbb236c 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -21,6 +21,7 @@
#include <sys/eventfd.h>
#include <ctype.h>
+#include <bsd_queue.h>
#include <eal_export.h>
#include <eal_filesystem.h>
#include <rte_mbuf.h>
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index e32471d8b5..8c87d35742 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -15,7 +15,6 @@
#include <signal.h>
#include <pthread.h>
#include <sys/types.h>
-#include <sys/queue.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -32,6 +31,7 @@
#include <rte_cycles.h>
#include <rte_kvargs.h>
#include <dev_driver.h>
+#include <rte_tailq.h>
#include <fslmc_logs.h>
#include <bus_fslmc_driver.h>
@@ -39,13 +39,6 @@
#include "dpaa2_hw_dpio.h"
#include <mc/fsl_dpmng.h>
-#ifndef TAILQ_FOREACH_SAFE
-#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = TAILQ_FIRST((head)); \
- (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
- (var) = (tvar))
-#endif
-
#define NUM_HOST_CPUS RTE_MAX_LCORE
RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_io_portal)
@@ -105,7 +98,7 @@ static struct dpaa2_dpio_dev *get_dpio_dev_from_id(int32_t dpio_id)
struct dpaa2_dpio_dev *dpio_dev = NULL;
/* Get DPIO dev handle from list using index */
- TAILQ_FOREACH(dpio_dev, &dpio_dev_list, next) {
+ RTE_TAILQ_FOREACH(dpio_dev, &dpio_dev_list, next) {
if (dpio_dev->hw_id == dpio_id)
break;
}
--
2.47.2
More information about the dev
mailing list