[v6,3/7] app/proc-info: hide EAL info messages

Message ID 20200924053433.12648-4-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series app/proc-info: enhancements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Sept. 24, 2020, 5:34 a.m. UTC
  The DPDK EAL info messages at the start of a diagnostic application
are not helpful to end user. Suppress them by setting log-level
by default.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/proc-info/main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 6cf5bb4ea48a..66918a834877 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1243,7 +1243,8 @@  main(int argc, char **argv)
 	char c_flag[] = "-c1";
 	char n_flag[] = "-n4";
 	char mp_flag[] = "--proc-type=secondary";
-	char *argp[argc + 3];
+	char log_flag[] = "--log-level=6";
+	char *argp[argc + 4];
 	uint16_t nb_ports;
 
 	/* preparse app arguments */
@@ -1257,18 +1258,19 @@  main(int argc, char **argv)
 	argp[1] = c_flag;
 	argp[2] = n_flag;
 	argp[3] = mp_flag;
+	argp[4] = log_flag;
 
 	for (i = 1; i < argc; i++)
-		argp[i + 3] = argv[i];
+		argp[i + 4] = argv[i];
 
-	argc += 3;
+	argc += 4;
 
 	ret = rte_eal_init(argc, argp);
 	if (ret < 0)
 		rte_panic("Cannot init EAL\n");
 
 	argc -= ret;
-	argv += (ret - 3);
+	argv += ret - 4;
 
 	if (!rte_eal_primary_proc_alive(NULL))
 		rte_exit(EXIT_FAILURE, "No primary DPDK process is running.\n");