From: Serhii Iliushyk <sil-plv@napatech.com>
To: dev@dpdk.org
Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com,
stephen@networkplumber.org
Subject: [PATCH v1 08/16] net/ntnic: change prefix ntlog_ to prefix nthw_log
Date: Fri, 19 Sep 2025 11:14:53 +0200 [thread overview]
Message-ID: <20250919091504.1548351-9-sil-plv@napatech.com> (raw)
In-Reply-To: <20250919091504.1548351-1-sil-plv@napatech.com>
Change prefix ntlog_ to prefix nthw_log for logging functions.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
.../net/ntnic/nthw/model/nthw_fpga_model.c | 20 +++++++++----------
drivers/net/ntnic/nthw/nthw_rac.c | 20 +++++++++----------
drivers/net/ntnic/ntlog/ntlog.c | 6 +++---
drivers/net/ntnic/ntlog/ntlog.h | 6 +++---
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index b9d03b4982..1dc604fe65 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -727,17 +727,17 @@ void nthw_register_update(const nthw_register_t *p)
uint32_t i = len;
uint32_t *ptr = p_data;
(void)ptr;
- char *tmp_string = ntlog_helper_str_alloc("Register::read");
- ntlog_helper_str_add(tmp_string,
+ char *tmp_string = nthw_log_helper_str_alloc("Register::read");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: %s, Bus: %s, Addr: 0x%08X, Cnt: %d, Data:",
p_dev_name, p_bus_name, addr, len);
while (i--)
- ntlog_helper_str_add(tmp_string, " 0x%08X", *ptr++);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", *ptr++);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
}
@@ -780,18 +780,18 @@ void nthw_register_flush(const nthw_register_t *p, uint32_t cnt)
if (p->mn_debug_mode & NTHW_REG_DEBUG_ON_WRITE) {
uint32_t i = len * cnt;
uint32_t *ptr = p_data;
- char *tmp_string = ntlog_helper_str_alloc("Register::write");
+ char *tmp_string = nthw_log_helper_str_alloc("Register::write");
- ntlog_helper_str_add(tmp_string,
+ nthw_log_helper_str_add(tmp_string,
"(Dev: %s, Bus: %s, Addr: 0x%08X, Cnt: %d, Data:",
p_dev_name, p_bus_name, addr, i);
while (i--)
- ntlog_helper_str_add(tmp_string, " 0x%08X", *ptr++);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", *ptr++);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
rc = nthw_register_write_data(p, cnt);
diff --git a/drivers/net/ntnic/nthw/nthw_rac.c b/drivers/net/ntnic/nthw/nthw_rac.c
index 4845c2b0c9..a2a96794da 100644
--- a/drivers/net/ntnic/nthw/nthw_rac.c
+++ b/drivers/net/ntnic/nthw/nthw_rac.c
@@ -654,8 +654,8 @@ int nthw_rac_rab_write32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint
char *tmp_string;
if (trc) {
- tmp_string = ntlog_helper_str_alloc("Register::write");
- ntlog_helper_str_add(tmp_string,
+ tmp_string = nthw_log_helper_str_alloc("Register::write");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: NA, Bus: RAB%u, Addr: 0x%08X, Cnt: %d, Data:",
bus_id, address, word_cnt);
}
@@ -669,13 +669,13 @@ int nthw_rac_rab_write32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint
}
if (trc)
- ntlog_helper_str_add(tmp_string, " 0x%08X", data);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", data);
}
if (trc) {
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
@@ -840,17 +840,17 @@ int nthw_rac_rab_read32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint3
}
if (trc) {
- char *tmp_string = ntlog_helper_str_alloc("Register::read");
- ntlog_helper_str_add(tmp_string,
+ char *tmp_string = nthw_log_helper_str_alloc("Register::read");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: NA, Bus: RAB%u, Addr: 0x%08X, Cnt: %d, Data:",
bus_id, address, word_cnt);
for (i = 0; i < word_cnt; i++)
- ntlog_helper_str_add(tmp_string, " 0x%08X", p_data[i]);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", p_data[i]);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
diff --git a/drivers/net/ntnic/ntlog/ntlog.c b/drivers/net/ntnic/ntlog/ntlog.c
index 7b7f583364..1ee0f40286 100644
--- a/drivers/net/ntnic/ntlog/ntlog.c
+++ b/drivers/net/ntnic/ntlog/ntlog.c
@@ -16,7 +16,7 @@
#define NTLOG_HELPER_STR_SIZE_MAX (1024)
-char *ntlog_helper_str_alloc(const char *sinit)
+char *nthw_log_helper_str_alloc(const char *sinit)
{
char *s = malloc(NTLOG_HELPER_STR_SIZE_MAX);
@@ -33,7 +33,7 @@ char *ntlog_helper_str_alloc(const char *sinit)
}
__rte_format_printf(2, 0)
-void ntlog_helper_str_add(char *s, const char *format, ...)
+void nthw_log_helper_str_add(char *s, const char *format, ...)
{
if (!s)
return;
@@ -45,7 +45,7 @@ void ntlog_helper_str_add(char *s, const char *format, ...)
va_end(args);
}
-void ntlog_helper_str_free(char *s)
+void nthw_log_helper_str_free(char *s)
{
free(s);
}
diff --git a/drivers/net/ntnic/ntlog/ntlog.h b/drivers/net/ntnic/ntlog/ntlog.h
index fd839e5cff..810b07efd0 100644
--- a/drivers/net/ntnic/ntlog/ntlog.h
+++ b/drivers/net/ntnic/ntlog/ntlog.h
@@ -65,8 +65,8 @@ extern int nt_log_ntnic;
* to use when one single function call to NT_LOG is not optimal - that is
* you do not know the number of parameters at programming time or it is variable
*/
-char *ntlog_helper_str_alloc(const char *sinit);
-void ntlog_helper_str_add(char *s, const char *format, ...);
-void ntlog_helper_str_free(char *s);
+char *nthw_log_helper_str_alloc(const char *sinit);
+void nthw_log_helper_str_add(char *s, const char *format, ...);
+void nthw_log_helper_str_free(char *s);
#endif /* NTOSS_SYSTEM_NTLOG_H */
--
2.45.0
next prev parent reply other threads:[~2025-09-19 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 01/16] net/ntnic: single file function as static Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 02/16] net/ntnic: remove unused functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 03/16] net/ntnic: move nthw_ to prefix Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 04/16] net/ntnic: change prefix hw_ to prefix nthw_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 05/16] net/ntnic: modify prefix flow_ with " Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 06/16] net/ntnic: change prefix flm_ to prefix nthw_flm_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 07/16] net/ntnic: change prefix nt_ to prefix nthw_ Serhii Iliushyk
2025-09-19 9:14 ` Serhii Iliushyk [this message]
2025-09-19 9:14 ` [PATCH v1 09/16] net/ntnic: change prefix km_ to prefix nthw_km_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 10/16] net/ntnic: change prefix set_ to prefix nthw_set_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 11/16] net/ntnic: rename common hash and flow functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 12/16] net/ntnic: rename register ops function Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 13/16] net/ntnic: rename get ops functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 14/16] net/ntnic: rename ops_init functions Serhii Iliushyk
2025-09-19 9:15 ` [PATCH v1 15/16] net/ntnic: rename nim agx setup function Serhii Iliushyk
2025-09-19 9:15 ` [PATCH v1 16/16] net/ntnic: rename table id functions Serhii Iliushyk
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=20250919091504.1548351-9-sil-plv@napatech.com \
--to=sil-plv@napatech.com \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=mko-plv@napatech.com \
--cc=stephen@networkplumber.org \
/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).