app/crypto-perf: check lcore job failure
authorTomasz Jozwiak <tjozwiakgm@gmail.com>
Fri, 14 Jun 2019 20:56:45 +0000 (22:56 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 5 Jul 2019 13:28:14 +0000 (15:28 +0200)
Currently, there's no return status check from lcore's jobs.
In case of fail - crypto-perf tool returns success anyway.
This patch adds such a detection and returns proper status at the end.

Fixes: ce8af1a4398d ("app/crypto-perf: wait for cores launched by app")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Jozwiak <tjozwiakgm@gmail.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
app/test-crypto-perf/main.c

index db02907..ce92a96 100644 (file)
@@ -665,9 +665,12 @@ main(int argc, char **argv)
 
                        if (i == total_nb_qps)
                                break;
-                       rte_eal_wait_lcore(lcore_id);
+                       ret |= rte_eal_wait_lcore(lcore_id);
                        i++;
                }
+
+               if (ret != EXIT_SUCCESS)
+                       goto err;
        } else {
 
                /* Get next size from range or list */
@@ -692,10 +695,13 @@ main(int argc, char **argv)
 
                                if (i == total_nb_qps)
                                        break;
-                               rte_eal_wait_lcore(lcore_id);
+                               ret |= rte_eal_wait_lcore(lcore_id);
                                i++;
                        }
 
+                       if (ret != EXIT_SUCCESS)
+                               goto err;
+
                        /* Get next size from range or list */
                        if (opts.inc_buffer_size != 0)
                                opts.test_buffer_size += opts.inc_buffer_size;