app/procinfo: hide EAL info messages
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 24 Sep 2020 05:34:29 +0000 (22:34 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 19 Oct 2020 22:41:22 +0000 (00:41 +0200)
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

index 0f43ca1..5824d94 100644 (file)
@@ -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");