[RFC 3/3] net/ntnic: make flow_lock local
Stephen Hemminger
stephen at networkplumber.org
Fri Sep 26 18:24:48 CEST 2025
The variable flow_lock is only used in one file.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/net/ntnic/include/create_elements.h | 2 --
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ntnic/include/create_elements.h b/drivers/net/ntnic/include/create_elements.h
index 7593ab4687..7d9d8d1d89 100644
--- a/drivers/net/ntnic/include/create_elements.h
+++ b/drivers/net/ntnic/include/create_elements.h
@@ -58,6 +58,4 @@ enum nt_rte_flow_item_type {
NT_RTE_FLOW_ITEM_TYPE_TUNNEL,
};
-extern rte_spinlock_t flow_lock;
-
#endif /* __CREATE_ELEMENTS_H__ */
diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index b68838461d..647edd6359 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -28,7 +28,7 @@
static struct rte_flow nt_flows[MAX_RTE_FLOWS];
-rte_spinlock_t flow_lock = RTE_SPINLOCK_INITIALIZER;
+static rte_spinlock_t flow_lock = RTE_SPINLOCK_INITIALIZER;
static struct rte_flow nt_flows[MAX_RTE_FLOWS];
static int nthw_interpret_raw_data(uint8_t *data, uint8_t *preserve, int size,
--
2.47.3
More information about the dev
mailing list