[PATCH v3 13/44] net/nfp: use rte_bsd_queue.h

Stephen Hemminger
2025-11-03T16:50:55Z

Can use common macro.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/nfp/nfp_mtr.c | 7 -------
drivers/net/nfp/nfp_mtr.h | 1 +
2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/nfp/nfp_mtr.c b/drivers/net/nfp/nfp_mtr.c
index 4833ebd881..904d2126e7 100644
--- a/drivers/net/nfp/nfp_mtr.c
+++ b/drivers/net/nfp/nfp_mtr.c
@@ -12,13 +12,6 @@
#include "flower/nfp_flower_representor.h"
#include "nfp_logs.h"

-#ifndef LIST_FOREACH_SAFE
-#define LIST_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = LIST_FIRST((head)); \
- (var) && ((tvar) = LIST_NEXT((var), field), 1); \
- (var) = (tvar))
-#endif
-
#define NFP_MAX_POLICY_CNT NFP_MAX_MTR_CNT
#define NFP_MAX_PROFILE_CNT NFP_MAX_MTR_CNT

diff --git a/drivers/net/nfp/nfp_mtr.h b/drivers/net/nfp/nfp_mtr.h
index 7ab0324721..c8ce03385c 100644
--- a/drivers/net/nfp/nfp_mtr.h
+++ b/drivers/net/nfp/nfp_mtr.h
@@ -7,6 +7,7 @@
#define __NFP_MTR_H__

#include <rte_mtr.h>
+#include <rte_bsd_queue.h>

#include "flower/nfp_flower_cmsg.h"

--
2.51.0