fix bugs of app eventdev
cover fix bugs of app eventdev
Fix bugs of app eventdev
Feifei Wang (2):
app/eventdev: adjust event count order for pipeline test app/eventdev: remove redundant enqueue in burst Tx
app/test-eventdev/test_pipeline_queue.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 app/eventdev: adjust event count order for pipeline test
For the fwd mode (internal_port = false) in pipeline test, processed-pkts increment should after enqueue. However, in multi_stage_fwd and multi_stage_burst_fwd, "w->processed_pkts" is increased before enqueue.
To fix this, move "w->processed_pkts" increment after enqueue, and then the main core can load the correct number of processed packets.
--- app/test-eventdev/test_pipeline_queue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
app/test-eventdev/test_pipeline_queue.c +5 -3
@@ -180,13 +180,13 @@ pipeline_queue_worker_multi_stage_fwd(void *arg) ev.queue_id = tx_queue[ev.mbuf->port];rte_event_eth_tx_adapter_txq_set (ev.mbuf,0 );pipeline_fwd_event (&ev,RTE_SCHED_TYPE_ATOMIC ); +pipeline_event_enqueue (dev, port, &ev); w->processed_pkts++; }else { ev.queue_id++;pipeline_fwd_event (&ev, sched_type_list[cq_id]); +pipeline_event_enqueue (dev, port, &ev); } - -pipeline_event_enqueue (dev, port, &ev); }return 0 ;
@@ -237,6 +237,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)const uint8_t *tx_queue = t->tx_evqueue_id;while (t->done == false) { +uint16_t processed_pkts =0 ;uint16_t nb_rx =rte_event_dequeue_burst (dev, port, ev,BURST_SIZE ,0 );
@@ -254,7 +255,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)rte_event_eth_tx_adapter_txq_set (ev[i].mbuf,0 );pipeline_fwd_event (&ev[i],RTE_SCHED_TYPE_ATOMIC ); - w->processed_pkts++; + processed_pkts++; }else { ev[i].queue_id++; pipeline_fwd_event(&ev[i],
@@ -263,6 +264,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg) }pipeline_event_enqueue_burst (dev, port, ev, nb_rx); + w->processed_pkts += processed_pkts; }return 0 ;
Signature · 1 line
2.25.1
PATCH 2/2 app/eventdev: remove redundant enqueue in burst Tx
In reply to Feifei WangFor 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.
--- app/test-eventdev/test_pipeline_queue.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
app/test-eventdev/test_pipeline_queue.c +3 -6
@@ -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 ;
Signature · 1 line
2.25.1
Quoted 6 lines · Feifei Wang
Fix bugs of app eventdev
Feifei Wang (2):
app/eventdev: adjust event count order for pipeline test app/eventdev: remove redundant enqueue in burst Tx
Applied to dpdk-next-net-eventdev/for-main. Thanks
Quoted 7 lines
app/test-eventdev/test_pipeline_queue.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)--
2.25.1