DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] app/eventdev: fix event device queue count
@ 2017-12-28 10:56 Pavan Nikhilesh
  2018-01-08 13:36 ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2017-12-28 10:56 UTC (permalink / raw)
  To: jerin.jacob, harry.van.haaren, gage.eads; +Cc: dev, Pavan Nikhilesh

Fix the event device queue count reported when producer type is Rx
adapter for perfomance queue and atq test.

Fixes: 20eb154e0435 ("app/testeventdev: add perf queue test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 app/test-eventdev/test_perf_atq.c   |  6 +++---
 app/test-eventdev/test_perf_queue.c | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c
index 8ca07d4f8..8e8e2fa87 100644
--- a/app/test-eventdev/test_perf_atq.c
+++ b/app/test-eventdev/test_perf_atq.c
@@ -38,7 +38,8 @@ static inline int
 atq_nb_event_queues(struct evt_options *opt)
 {
 	/* nb_queues = number of producers */
-	return evt_nr_active_lcores(opt->plcores);
+	return opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ?
+		rte_eth_dev_count() : evt_nr_active_lcores(opt->plcores);
 }
 
 static inline __attribute__((always_inline)) void
@@ -193,8 +194,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 	nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 :
 		evt_nr_active_lcores(opt->plcores);
 
-	nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ?
-		rte_eth_dev_count() : atq_nb_event_queues(opt);
+	nb_queues = atq_nb_event_queues(opt);
 
 	memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
 	ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c
index 4583122b3..86eb1f0b5 100644
--- a/app/test-eventdev/test_perf_queue.c
+++ b/app/test-eventdev/test_perf_queue.c
@@ -38,7 +38,9 @@ static inline int
 perf_queue_nb_event_queues(struct evt_options *opt)
 {
 	/* nb_queues = number of producers * number of stages */
-	return evt_nr_active_lcores(opt->plcores) * opt->nb_stages;
+	uint8_t nb_prod = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ?
+		rte_eth_dev_count() : evt_nr_active_lcores(opt->plcores);
+	return nb_prod * opt->nb_stages;
 }
 
 static inline __attribute__((always_inline)) void
@@ -190,9 +192,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 	nb_ports += opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ? 0 :
 		evt_nr_active_lcores(opt->plcores);
 
-	nb_queues = opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR ?
-		rte_eth_dev_count() * nb_stages :
-		perf_queue_nb_event_queues(opt);
+	nb_queues = perf_queue_nb_event_queues(opt);
 
 	memset(&dev_info, 0, sizeof(struct rte_event_dev_info));
 	ret = rte_event_dev_info_get(opt->dev_id, &dev_info);
@@ -224,7 +224,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 			.nb_atomic_order_sequences = opt->nb_flows,
 	};
 	/* queue configurations */
-	for (queue = 0; queue < perf_queue_nb_event_queues(opt); queue++) {
+	for (queue = 0; queue < nb_queues; queue++) {
 		q_conf.schedule_type =
 			(opt->sched_type_list[queue % nb_stages]);
 
-- 
2.15.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count
  2017-12-28 10:56 [dpdk-dev] [PATCH] app/eventdev: fix event device queue count Pavan Nikhilesh
@ 2018-01-08 13:36 ` Jerin Jacob
  2018-01-10 19:11   ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2018-01-08 13:36 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: harry.van.haaren, gage.eads, dev

-----Original Message-----
> Date: Thu, 28 Dec 2017 16:26:53 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com,
>  gage.eads@intel.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count
> X-Mailer: git-send-email 2.14.1
> 
> Fix the event device queue count reported when producer type is Rx
> adapter for perfomance queue and atq test.
> 
> Fixes: 20eb154e0435 ("app/testeventdev: add perf queue test")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count
  2018-01-08 13:36 ` Jerin Jacob
@ 2018-01-10 19:11   ` Jerin Jacob
  0 siblings, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2018-01-10 19:11 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: harry.van.haaren, gage.eads, dev, stable

-----Original Message-----
> Date: Mon, 8 Jan 2018 19:06:01 +0530
> From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> CC: harry.van.haaren@intel.com, gage.eads@intel.com, dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count
> User-Agent: Mutt/1.9.2 (2017-12-15)
> 
> -----Original Message-----
> > Date: Thu, 28 Dec 2017 16:26:53 +0530
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > To: jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com,
> >  gage.eads@intel.com
> > Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH] app/eventdev: fix event device queue count
> > X-Mailer: git-send-email 2.14.1
> > 
> > Fix the event device queue count reported when producer type is Rx
> > adapter for perfomance queue and atq test.
> > 
> > Fixes: 20eb154e0435 ("app/testeventdev: add perf queue test")
> > 
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Cc: stable@dpdk.org

Applied to dpdk-next-eventdev/master. Thanks.

> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-10 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-28 10:56 [dpdk-dev] [PATCH] app/eventdev: fix event device queue count Pavan Nikhilesh
2018-01-08 13:36 ` Jerin Jacob
2018-01-10 19:11   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).