From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F50CA0A0A for ; Fri, 22 Jan 2021 06:19:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39080140E3E; Fri, 22 Jan 2021 06:19:31 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 418E5140E33; Fri, 22 Jan 2021 06:19:29 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8798911B3; Thu, 21 Jan 2021 21:19:28 -0800 (PST) Received: from net-x86-dell-8268.shanghai.arm.com (net-x86-dell-8268.shanghai.arm.com [10.169.210.127]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 966A13F68F; Thu, 21 Jan 2021 21:19:25 -0800 (PST) From: Feifei Wang To: Jerin Jacob , Harry van Haaren , Pavan Nikhilesh Cc: dev@dpdk.org, nd@arm.com, Feifei Wang , pbhagavatula@marvell.com, stable@dpdk.org, Ruifeng Wang Date: Fri, 22 Jan 2021 13:19:15 +0800 Message-Id: <20210122051916.1408093-2-feifei.wang2@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210122051916.1408093-1-feifei.wang2@arm.com> References: <20210122051916.1408093-1-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v1 1/2] app/eventdev: adjust event count order for pipeline test X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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. Fixes: 314bcf58ca8f ("app/eventdev: add pipeline queue worker functions") Cc: pbhagavatula@marvell.com Cc: stable@dpdk.org Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- app/test-eventdev/test_pipeline_queue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 7bebac34f..01f33e3b4 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -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; -- 2.25.1