[dpdk-dev,v2] app/bbdev: remove improper WARNING printouts

Message ID 20180418092616.33568-1-kamilx.chalupnik@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kamil Chalupnik April 18, 2018, 9:26 a.m. UTC
  Improper WARNING printouts in BBDev Test Application removed

Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>

v2:
- apply patch failure fixed

---
 app/test-bbdev/test_bbdev_perf.c   |  2 +-
 app/test-bbdev/test_bbdev_vector.c | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
  

Comments

Mokhtar, Amr April 18, 2018, 2:16 p.m. UTC | #1
> -----Original Message-----
> From: Chalupnik, KamilX
> Sent: Wednesday 18 April 2018 10:26
> To: dev@dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: [PATCH v2] app/bbdev: remove improper WARNING printouts
> 
> Improper WARNING printouts in BBDev Test Application removed
> 
> Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
> 
> v2:
> - apply patch failure fixed
> 

Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
  
De Lara Guarch, Pablo April 24, 2018, 2:10 p.m. UTC | #2
Hi Kamil,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of KamilX Chalupnik
> Sent: Wednesday, April 18, 2018 10:26 AM
> To: dev@dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: [dpdk-dev] [PATCH v2] app/bbdev: remove improper WARNING
> printouts
> 
> Improper WARNING printouts in BBDev Test Application removed
> 
> Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
> 
> v2:
> - apply patch failure fixed
> 
> ---
>  app/test-bbdev/test_bbdev_perf.c   |  2 +-
>  app/test-bbdev/test_bbdev_vector.c | 12 ++++++------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-
> bbdev/test_bbdev_perf.c
> index 00f3b08..84a5393 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -138,7 +138,7 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)
>  					!(cap->capability_flags &
>  					RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
>  				printf(
> -					"WARNING: Device \"%s\" does not
> support soft output - soft output flags will be ignored.\n",
> +					"INFO: Device \"%s\" does not support
> soft output - soft output
> +flags will be ignored.\n",

I think, instead of using "printf", you should use RTE_LOG, ideally with a dynamic log type,
so a user can change the level and decide which messages to show (like what was done
in TestPMD, with TESTPMD_LOG).

Thanks,
Pablo
  

Patch

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 00f3b08..84a5393 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -138,7 +138,7 @@  check_dev_cap(const struct rte_bbdev_info *dev_info)
 					!(cap->capability_flags &
 					RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
 				printf(
-					"WARNING: Device \"%s\" does not support soft output - soft output flags will be ignored.\n",
+					"INFO: Device \"%s\" does not support soft output - soft output flags will be ignored.\n",
 					dev_info->dev_name);
 				clear_soft_out_cap(
 					&test_vector.turbo_dec.op_flags);
diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c
index addef05..0f19912 100644
--- a/app/test-bbdev/test_bbdev_vector.c
+++ b/app/test-bbdev/test_bbdev_vector.c
@@ -642,7 +642,7 @@  check_decoder_llr_spec(struct test_bbdev_vector *vector)
 			!(turbo_dec->op_flags &
 			RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN)) {
 		printf(
-			"WARNING: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n");
+			"INFO: input LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n");
 		turbo_dec->op_flags |= RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN;
 	}
 
@@ -661,7 +661,7 @@  check_decoder_llr_spec(struct test_bbdev_vector *vector)
 			!(turbo_dec->op_flags &
 			RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT)) {
 		printf(
-			"WARNING: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n");
+			"INFO: soft output LLR sign formalism was not specified and will be set to negative LLR for '1' bit\n");
 		turbo_dec->op_flags |=
 				RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT;
 	}
@@ -722,7 +722,7 @@  check_decoder(struct test_bbdev_vector *vector)
 	}
 	if (!(mask & TEST_BBDEV_VF_RV_INDEX))
 		printf(
-			"WARNING: rv_index was not specified in vector file and will be set to 0\n");
+			"INFO: rv_index was not specified in vector file and will be set to 0\n");
 	if (!(mask & TEST_BBDEV_VF_ITER_MIN))
 		printf(
 			"WARNING: iter_min was not specified in vector file and will be set to 0\n");
@@ -742,7 +742,7 @@  check_decoder(struct test_bbdev_vector *vector)
 	} else if (!(turbo_dec->op_flags & RTE_BBDEV_TURBO_MAP_DEC) &&
 			mask & TEST_BBDEV_VF_NUM_MAPS) {
 		printf(
-			"WARNING: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n");
+			"INFO: RTE_BBDEV_TURBO_MAP_DEC was not set in vector file and num_maps will be set to 0\n");
 		turbo_dec->num_maps = 0;
 	}
 	if (!(mask & TEST_BBDEV_VF_EXPECTED_STATUS))
@@ -827,10 +827,10 @@  check_encoder(struct test_bbdev_vector *vector)
 	}
 	if (!(mask & TEST_BBDEV_VF_RV_INDEX))
 		printf(
-			"WARNING: rv_index was not specified in vector file and will be set to 0\n");
+			"INFO: rv_index was not specified in vector file and will be set to 0\n");
 	if (!(mask & TEST_BBDEV_VF_OP_FLAGS))
 		printf(
-			"WARNING: op_flags was not specified in vector file and capabilities will not be validated\n");
+			"INFO: op_flags was not specified in vector file and capabilities will not be validated\n");
 	if (!(mask & TEST_BBDEV_VF_EXPECTED_STATUS))
 		printf(
 			"WARNING: expected_status was not specified in vector file and will be set to 0\n");