[dpdk-dev] [PATCH 1/3] test/hash: replace macro with log-level approach
Dharmik Thakkar
dharmik.thakkar at arm.com
Thu Nov 29 21:31:10 CET 2018
Need to set hash log type to debug to print debug information, using
following eal parameter: --log-type=hash,8
Suggested-by: Thomas Monjalon <thomas at monjalon.net>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Reviewed-by: Gavin Hu <gavin.hu at arm.com>
Reviewed-by: Phil Yang <phil.yang at arm.com>
---
test/test/test_hash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/test/test/test_hash.c b/test/test/test_hash.c
index fe607fadf262..67b8e54bdf13 100644
--- a/test/test/test_hash.c
+++ b/test/test/test_hash.c
@@ -80,14 +80,13 @@ static uint32_t pseudo_hash(__attribute__((unused)) const void *keys,
return 3;
}
-#define UNIT_TEST_HASH_VERBOSE 0
/*
* Print out result of unit test hash operation.
*/
static void print_key_info(const char *msg, const struct flow_key *key,
int32_t pos)
{
- if (UNIT_TEST_HASH_VERBOSE) {
+ if (rte_log_get_level(RTE_LOGTYPE_HASH) == RTE_LOG_DEBUG) {
const uint8_t *p = (const uint8_t *)key;
unsigned int i;
--
2.17.1
More information about the dev
mailing list