From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Christian Koue Muf <ckm@napatech.com>,
Serhii Iliushyk <sil-plv@napatech.com>
Subject: [RFC 3/3] net/ntnic: make flow_lock local
Date: Fri, 26 Sep 2025 09:24:48 -0700 [thread overview]
Message-ID: <20250926162534.401577-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20250926162534.401577-1-stephen@networkplumber.org>
The variable flow_lock is only used in one file.
Signed-off-by: Stephen Hemminger <stephen@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
prev parent reply other threads:[~2025-09-26 16:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 16:24 [RFC 0/3] net/ntnic: prefix global symbols Stephen Hemminger
2025-09-26 16:24 ` [RFC 1/3] net/ntnic: rename nt_log_ types Stephen Hemminger
2025-09-26 16:24 ` [RFC 2/3] net/ntnic: rename hwlock Stephen Hemminger
2025-09-26 16:24 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250926162534.401577-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=sil-plv@napatech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).