[1/3] test/hash: replace macro with log-level approach
Checks
Commit Message
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@monjalon.net>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
---
test/test/test_hash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -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;