summaryrefslogtreecommitdiff
path: root/lib/hash/rte_thash_gfni.c
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2023-12-08 10:44:13 +0100
committerDavid Marchand <david.marchand@redhat.com>2023-12-21 10:23:23 +0100
commitae67895b507bb6af22263c79ba0d5c374b396485 (patch)
tree0751d92bc0efb30c9716e40a69c31d8ae8c22500 /lib/hash/rte_thash_gfni.c
parentf286e83491789a787b59a571f7672d70c6159c12 (diff)
lib: add more logging helpers
Add helpers for logging messages in libraries instead of calling RTE_LOG() directly. Those helpers take care of adding a \n: this will make the transition to RTE_LOG_LINE trivial. Note: - for acl and sched libraries that still has some debug multilines messages, a direct call to RTE_LOG is used: this will make it easier to notice such special cases, Signed-off-by: David Marchand <david.marchand@redhat.com>
Diffstat (limited to 'lib/hash/rte_thash_gfni.c')
-rw-r--r--lib/hash/rte_thash_gfni.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/hash/rte_thash_gfni.c b/lib/hash/rte_thash_gfni.c
index c863789b51..cd22a649f7 100644
--- a/lib/hash/rte_thash_gfni.c
+++ b/lib/hash/rte_thash_gfni.c
@@ -11,6 +11,8 @@
RTE_LOG_REGISTER_SUFFIX(hash_gfni_logtype, gfni, INFO);
#define RTE_LOGTYPE_HASH hash_gfni_logtype
+#define HASH_LOG(level, fmt, ...) \
+ RTE_LOG(level, HASH, fmt "\n", ## __VA_ARGS__)
uint32_t
rte_thash_gfni(const uint64_t *mtrx __rte_unused,
@@ -20,8 +22,8 @@ rte_thash_gfni(const uint64_t *mtrx __rte_unused,
if (!warned) {
warned = true;
- RTE_LOG(ERR, HASH,
- "%s is undefined under given arch\n", __func__);
+ HASH_LOG(ERR,
+ "%s is undefined under given arch", __func__);
}
return 0;
@@ -38,8 +40,8 @@ rte_thash_gfni_bulk(const uint64_t *mtrx __rte_unused,
if (!warned) {
warned = true;
- RTE_LOG(ERR, HASH,
- "%s is undefined under given arch\n", __func__);
+ HASH_LOG(ERR,
+ "%s is undefined under given arch", __func__);
}
for (i = 0; i < num; i++)