diff mbox series

[1/3] test/hash: replace macro with log-level approach

Message ID 20181129203112.12222-2-dharmik.thakkar@arm.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Replace compilation time options with log level | expand


Context Check Description
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Dharmik Thakkar Nov. 29, 2018, 8:31 p.m. UTC
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(-)
diff mbox series


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;
  * 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 (rte_log_get_level(RTE_LOGTYPE_HASH) == RTE_LOG_DEBUG) {
 		const uint8_t *p = (const uint8_t *)key;
 		unsigned int i;