From patchwork Wed Jul 1 06:06:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72502 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 377EBA0350; Wed, 1 Jul 2020 08:06:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6ACF21BFA9; Wed, 1 Jul 2020 08:06:39 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id F12571BF93; Wed, 1 Jul 2020 08:06:37 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C88B61A056F; Wed, 1 Jul 2020 08:06:37 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2E0F01A0593; Wed, 1 Jul 2020 08:06:34 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 25CD2402A0; Wed, 1 Jul 2020 14:06:30 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:21 +0530 Message-Id: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 1/6] app/test-eventdev: Enhancing perf-queue packet flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The event ethernet Tx adapter provides data path for the ethernet transmit stage. Enqueue a burst of events objects supplied on an event device. Fixes: 2369f73329 ("app/testeventdev: add perf queue worker functions") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- app/test-eventdev/test_perf_common.c | 11 ++++++++ app/test-eventdev/test_perf_common.h | 1 + app/test-eventdev/test_perf_queue.c | 42 ++++++++++++++++++++-------- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index b3af4bfeca..341e16eade 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -687,9 +687,20 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) return -ENODEV; } + t->internal_port = 1; RTE_ETH_FOREACH_DEV(i) { struct rte_eth_dev_info dev_info; struct rte_eth_conf local_port_conf = port_conf; + uint32_t caps = 0; + + ret = rte_event_eth_tx_adapter_caps_get(opt->dev_id, i, &caps); + if (ret != 0) { + evt_err("failed to get event tx adapter[%d] caps", i); + return ret; + } + + if (!(caps & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) + t->internal_port = 0; ret = rte_eth_dev_info_get(i, &dev_info); if (ret != 0) { diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index d8fbee6d89..716199d8c9 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -48,6 +48,7 @@ struct test_perf { int done; uint64_t outstand_pkts; uint8_t nb_workers; + uint8_t internal_port; enum evt_test_result result; uint32_t nb_flows; uint64_t nb_pkts; diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index 29098580e7..f79e4a4164 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -71,10 +71,12 @@ perf_queue_worker(void *arg, const int enable_fwd_latency) } static int -perf_queue_worker_burst(void *arg, const int enable_fwd_latency) +perf_queue_worker_burst(void *arg, const int enable_fwd_latency, + const uint32_t flags) { PERF_WORKER_INIT; uint16_t i; + uint16_t nb_tx; /* +1 to avoid prefetch out of array check */ struct rte_event ev[BURST_SIZE + 1]; @@ -111,12 +113,20 @@ perf_queue_worker_burst(void *arg, const int enable_fwd_latency) } } - uint16_t enq; - - enq = rte_event_enqueue_burst(dev, port, ev, nb_rx); - while (enq < nb_rx) { - enq += rte_event_enqueue_burst(dev, port, + if (flags == TEST_PERF_EVENT_TX_DIRECT) { + nb_tx = rte_event_eth_tx_adapter_enqueue(dev, port, + ev, nb_rx, 0); + while (nb_tx < nb_rx && !t->done) + nb_tx += rte_event_eth_tx_adapter_enqueue(dev, + port, ev + nb_tx, + nb_rx - nb_tx, 0); + } else { + uint16_t enq; + enq = rte_event_enqueue_burst(dev, port, ev, nb_rx); + while (enq < nb_rx) { + enq += rte_event_enqueue_burst(dev, port, ev + enq, nb_rx - enq); + } } } return 0; @@ -130,16 +140,26 @@ worker_wrapper(void *arg) const bool burst = evt_has_burst_mode(w->dev_id); const int fwd_latency = opt->fwd_latency; - + const bool internal_port = w->t->internal_port; + uint32_t flags; /* allow compiler to optimize */ if (!burst && !fwd_latency) return perf_queue_worker(arg, 0); else if (!burst && fwd_latency) return perf_queue_worker(arg, 1); - else if (burst && !fwd_latency) - return perf_queue_worker_burst(arg, 0); - else if (burst && fwd_latency) - return perf_queue_worker_burst(arg, 1); + else if (burst && !fwd_latency && internal_port) { + flags = TEST_PERF_EVENT_TX_DIRECT; + return perf_queue_worker_burst(arg, 0, flags); + } else if (burst && !fwd_latency && !internal_port) { + flags = TEST_PERF_EVENT_TX_ENQ; + return perf_queue_worker_burst(arg, 1, flags); + } else if (burst && fwd_latency && internal_port) { + flags = TEST_PERF_EVENT_TX_DIRECT; + return perf_queue_worker_burst(arg, 0, flags); + } else if (burst && fwd_latency && !internal_port) { + flags = TEST_PERF_EVENT_TX_ENQ; + return perf_queue_worker_burst(arg, 1, flags); + } rte_panic("invalid worker\n"); } From patchwork Wed Jul 1 06:06:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72503 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08156A0350; Wed, 1 Jul 2020 08:06:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D57B1BFA2; Wed, 1 Jul 2020 08:06:41 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 750DE1BF93; Wed, 1 Jul 2020 08:06:38 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4ED9E20081B; Wed, 1 Jul 2020 08:06:38 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D17F12006CB; Wed, 1 Jul 2020 08:06:34 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C1743402DD; Wed, 1 Jul 2020 14:06:30 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:22 +0530 Message-Id: <20200701060626.28627-2-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> References: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/6] app/test-eventdev: Removed unwanted checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In pipeline_queue test case, for single_stage_burst_tx sched_type condition checks are not required. Fixes: 314bcf58ca8 ("app/eventdev: add pipeline queue worker functions") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- app/test-eventdev/test_pipeline_queue.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 7bebac34fc..bee4ac0344 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -81,20 +81,11 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg) for (i = 0; i < nb_rx; i++) { 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); - } - return 0; } From patchwork Wed Jul 1 06:06:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72504 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 65877A0350; Wed, 1 Jul 2020 08:06:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B0121BFE6; Wed, 1 Jul 2020 08:06:43 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 20F501BF93; Wed, 1 Jul 2020 08:06:39 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id EE5212006CB; Wed, 1 Jul 2020 08:06:38 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 80F452003ED; Wed, 1 Jul 2020 08:06:35 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 70B21402F0; Wed, 1 Jul 2020 14:06:31 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:23 +0530 Message-Id: <20200701060626.28627-3-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> References: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 3/6] event/dpaa2: Add all type queue capability flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Event device capability flag added in event driver, Event device is capable of enqueuing events of any type to any queue. Fixes: 8f4a294c23 ("event/dpaa2: apply new capability flags") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- drivers/event/dpaa2/dpaa2_eventdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 0072db153b..14dcc50d4a 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -407,7 +407,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev, RTE_EVENT_DEV_CAP_BURST_MODE| RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK | RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT | - RTE_EVENT_DEV_CAP_NONSEQ_MODE; + RTE_EVENT_DEV_CAP_NONSEQ_MODE | + RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES; } From patchwork Wed Jul 1 06:06:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72505 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 915FFA0350; Wed, 1 Jul 2020 08:07:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70D531BFFD; Wed, 1 Jul 2020 08:06:44 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id B553E1BFB3; Wed, 1 Jul 2020 08:06:39 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 991642003ED; Wed, 1 Jul 2020 08:06:39 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2A1CA200416; Wed, 1 Jul 2020 08:06:36 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1C6B9402E7; Wed, 1 Jul 2020 14:06:32 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:24 +0530 Message-Id: <20200701060626.28627-4-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> References: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 4/6] app/test-eventdev: Fix pipeline atq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" if-check is required to check the capabilitiy of all type queue. Fixes: 6bf570a9911 ("app/eventdev: add pipeline atq test") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- app/test-eventdev/test_pipeline_atq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c index 8e8686c145..0872b25b53 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -495,6 +495,8 @@ pipeline_atq_capability_check(struct evt_options *opt) evt_nr_active_lcores(opt->wlcores), dev_info.max_event_ports); } + if (!evt_has_all_types_queue(opt->dev_id)) + return false; return true; } From patchwork Wed Jul 1 06:06:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72506 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8B62A0350; Wed, 1 Jul 2020 08:07:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A0C511C01F; Wed, 1 Jul 2020 08:06:45 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 8ADD91BFB4; Wed, 1 Jul 2020 08:06:40 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D2B0200416; Wed, 1 Jul 2020 08:06:40 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BCDED20041D; Wed, 1 Jul 2020 08:06:36 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id BD302402EE; Wed, 1 Jul 2020 14:06:32 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:25 +0530 Message-Id: <20200701060626.28627-5-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> References: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 5/6] app/test-eventdev: Enhancing perf-atq packet flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The event ethernet Tx adapter provides data path for the ethernet transmit stage. Enqueue a burst of events objects supplied on an event device. Fixes: 1eb10ad8db8 ("app/testeventdev: add perf all types queue worker") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- app/test-eventdev/test_perf_atq.c | 43 ++++++++++++++++++++-------- app/test-eventdev/test_perf_common.h | 4 +++ 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index d0241ec4ae..23e9ad4a29 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -70,10 +70,12 @@ perf_atq_worker(void *arg, const int enable_fwd_latency) } static int -perf_atq_worker_burst(void *arg, const int enable_fwd_latency) +perf_atq_worker_burst(void *arg, const int enable_fwd_latency, + const uint32_t flags) { PERF_WORKER_INIT; uint16_t i; + uint16_t nb_tx; /* +1 to avoid prefetch out of array check */ struct rte_event ev[BURST_SIZE + 1]; @@ -110,13 +112,21 @@ perf_atq_worker_burst(void *arg, const int enable_fwd_latency) nb_stages); } } + if (flags == TEST_PERF_EVENT_TX_DIRECT) { + nb_tx = rte_event_eth_tx_adapter_enqueue(dev, port, + ev, nb_rx, 0); + while (nb_tx < nb_rx && !t->done) + nb_tx += rte_event_eth_tx_adapter_enqueue(dev, + port, ev + nb_tx, + nb_rx - nb_tx, 0); + } else { + uint16_t enq; - uint16_t enq; - - enq = rte_event_enqueue_burst(dev, port, ev, nb_rx); - while (enq < nb_rx) { - enq += rte_event_enqueue_burst(dev, port, + enq = rte_event_enqueue_burst(dev, port, ev, nb_rx); + while (enq < nb_rx) { + enq += rte_event_enqueue_burst(dev, port, ev + enq, nb_rx - enq); + } } } return 0; @@ -127,20 +137,29 @@ worker_wrapper(void *arg) { struct worker_data *w = arg; struct evt_options *opt = w->t->opt; - + const bool internal_port = w->t->internal_port; const bool burst = evt_has_burst_mode(w->dev_id); const int fwd_latency = opt->fwd_latency; + uint32_t flags; /* allow compiler to optimize */ if (!burst && !fwd_latency) return perf_atq_worker(arg, 0); else if (!burst && fwd_latency) return perf_atq_worker(arg, 1); - else if (burst && !fwd_latency) - return perf_atq_worker_burst(arg, 0); - else if (burst && fwd_latency) - return perf_atq_worker_burst(arg, 1); - + else if (burst && !fwd_latency && internal_port) { + flags = TEST_PERF_EVENT_TX_DIRECT; + return perf_atq_worker_burst(arg, 0, flags); + } else if (burst && !fwd_latency && !internal_port) { + flags = TEST_PERF_EVENT_TX_ENQ; + return perf_atq_worker_burst(arg, 1, flags); + } else if (burst && fwd_latency && internal_port) { + flags = TEST_PERF_EVENT_TX_DIRECT; + return perf_atq_worker_burst(arg, 0, flags); + } else if (burst && fwd_latency && !internal_port) { + flags = TEST_PERF_EVENT_TX_ENQ; + return perf_atq_worker_burst(arg, 1, flags); + } rte_panic("invalid worker\n"); } diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index 716199d8c9..c86be385ad 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,9 @@ #include "evt_options.h" #include "evt_test.h" +#define TEST_PERF_EVENT_TX_ENQ 0x1 +#define TEST_PERF_EVENT_TX_DIRECT 0X2 + struct test_perf; struct worker_data { From patchwork Wed Jul 1 06:06:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Apeksha Gupta X-Patchwork-Id: 72507 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CE89A0350; Wed, 1 Jul 2020 08:07:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11CDE1C031; Wed, 1 Jul 2020 08:06:47 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 4B1371BFB8; Wed, 1 Jul 2020 08:06:41 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F71520041D; Wed, 1 Jul 2020 08:06:41 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B4B06200522; Wed, 1 Jul 2020 08:06:37 +0200 (CEST) Received: from lsv03186.swis.in-blr01.nxp.com (lsv03186.swis.in-blr01.nxp.com [92.120.146.182]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 5AC5D402F7; Wed, 1 Jul 2020 14:06:33 +0800 (SGT) From: Apeksha Gupta To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, thomas@monjalon.net, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, akhil.goyal@nxp.com, Apeksha Gupta , stable@dpdk.org Date: Wed, 1 Jul 2020 11:36:26 +0530 Message-Id: <20200701060626.28627-6-apeksha.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701060626.28627-1-apeksha.gupta@nxp.com> References: <20200701060626.28627-1-apeksha.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 6/6] app/test-eventdev: fix eventdev queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In pipeline_queue test case, if event queues are greater than the max event queues it will fail. To handle this check is added. Fixes: 032a965a8f1 ("app/eventdev: support Tx adapter") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- app/test-eventdev/test_pipeline_queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index bee4ac0344..b958953bf9 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -325,6 +325,9 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) memset(queue_arr, 0, sizeof(uint8_t) * RTE_EVENT_MAX_QUEUES_PER_DEV); rte_event_dev_info_get(opt->dev_id, &info); + if (nb_queues > info.max_event_queues) + nb_queues = nb_stages; + ret = evt_configure_eventdev(opt, nb_queues, nb_ports); if (ret) { evt_err("failed to configure eventdev %d", opt->dev_id);