app/eventdev: remove redundant enqueue in burst Tx
authorFeifei Wang <feifei.wang2@arm.com>
Fri, 22 Jan 2021 05:19:16 +0000 (13:19 +0800)
committerJerin Jacob <jerinj@marvell.com>
Tue, 26 Jan 2021 11:00:29 +0000 (12:00 +0100)
For eventdev pipeline test, in burst_tx cases, there is no needed to
set ev.op as RTE_EVENT_OP_RELEASE and call pipeline_event_enqueue_burst
to release events. This is because for tx mode(internal_port=true),
the capability "implicit_release" of dev is enabled, and the app can
release events by "rte_event_dequeue_burst" rather than enqueue.

Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions")
Cc: stable@dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
app/test-eventdev/test_pipeline_queue.c

index 01f33e3..9a9febb 100644 (file)
@@ -83,16 +83,15 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)
                        rte_prefetch0(ev[i + 1].mbuf);
                        if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {
                                pipeline_event_tx(dev, port, &ev[i]);
-                               ev[i].op = RTE_EVENT_OP_RELEASE;
                                w->processed_pkts++;
                        } else {
                                ev[i].queue_id++;
                                pipeline_fwd_event(&ev[i],
                                                RTE_SCHED_TYPE_ATOMIC);
+                               pipeline_event_enqueue_burst(dev, port, ev,
+                                               nb_rx);
                        }
                }
-
-               pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
        }
 
        return 0;
@@ -213,7 +212,6 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
 
                        if (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) {
                                pipeline_event_tx(dev, port, &ev[i]);
-                               ev[i].op = RTE_EVENT_OP_RELEASE;
                                w->processed_pkts++;
                                continue;
                        }
@@ -222,9 +220,8 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
                        pipeline_fwd_event(&ev[i], cq_id != last_queue ?
                                        sched_type_list[cq_id] :
                                        RTE_SCHED_TYPE_ATOMIC);
+                       pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
                }
-
-               pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
        }
 
        return 0;