app/eventdev: detect deadlock for timer event producer
authorErik Gabriel Carrillo <erik.g.carrillo@intel.com>
Mon, 3 Dec 2018 17:48:14 +0000 (11:48 -0600)
committerJerin Jacob <jerinj@marvell.com>
Sun, 16 Dec 2018 16:58:06 +0000 (17:58 +0100)
If timer events get dropped for some reason, the thread that launched
producer and worker cores will never exit, because the deadlock check
doesn't currently apply to the event timer adapter case. This commit
fixes this.

Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
Cc: stable@dpdk.org
Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
app/test-eventdev/test_perf_common.c

index 8618775..f99a6a6 100644 (file)
@@ -327,7 +327,8 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt,
                }
 
                if (new_cycles - dead_lock_cycles > dead_lock_sample &&
-                               opt->prod_type == EVT_PROD_TYPE_SYNT) {
+                   (opt->prod_type == EVT_PROD_TYPE_SYNT ||
+                    opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR)) {
                        remaining = t->outstand_pkts - processed_pkts(t);
                        if (dead_lock_remaining == remaining) {
                                rte_event_dev_dump(opt->dev_id, stdout);