[6/6] app/test-eventdev: fix eventdev queues
Checks
Commit Message
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 <apeksha.gupta@nxp.com>
---
app/test-eventdev/test_pipeline_queue.c | 3 +++
1 file changed, 3 insertions(+)
Comments
>Subject: [dpdk-dev] [PATCH 6/6] app/test-eventdev: fix eventdev
>queues
>
>In pipeline_queue test case, if event queues are greater than the
>max event queues it will fail.
Nak, it should fail. If sufficient queues are not available how would the pipeline work?
/*
* The pipelines are setup in the following manner:
*
* eth_dev_count = 2, nb_stages = 2.
*
* queues = 6
* stride = 3
*
* event queue pipelines:
* eth0 -> q0 -> q1 -> (q2->tx)
* eth1 -> q3 -> q4 -> (q5->tx)
*
* q2, q5 configured as ATOMIC | SINGLE_LINK
*
*/
>To handle this check is added.
>
>Fixes: 032a965a8f1 ("app/eventdev: support Tx adapter")
>Cc: stable@dpdk.org
>
>Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
>---
> 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);
>--
>2.17.1
> -----Original Message-----
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> Sent: Thursday, July 2, 2020 8:57 AM
> To: Apeksha Gupta <apeksha.gupta@nxp.com>;
> jerin.jacob@caviumnetworks.com
> Cc: dev@dpdk.org; thomas@monjalon.net; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Akhil
> Goyal <akhil.goyal@nxp.com>; stable@dpdk.org
> Subject: [EXT] RE: [dpdk-dev] [PATCH 6/6] app/test-eventdev: fix eventdev
> queues
>
> Caution: EXT Email
>
> >Subject: [dpdk-dev] [PATCH 6/6] app/test-eventdev: fix eventdev
> >queues
> >
> >In pipeline_queue test case, if event queues are greater than the
> >max event queues it will fail.
>
> Nak, it should fail. If sufficient queues are not available how would the
> pipeline work?
>
> /*
> * The pipelines are setup in the following manner:
> *
> * eth_dev_count = 2, nb_stages = 2.
> *
> * queues = 6
> * stride = 3
> *
> * event queue pipelines:
> * eth0 -> q0 -> q1 -> (q2->tx)
> * eth1 -> q3 -> q4 -> (q5->tx)
> *
> * q2, q5 configured as ATOMIC | SINGLE_LINK
> *
> */
>
[Apeksha] Okay.
>
> >To handle this check is added.
> >
> >Fixes: 032a965a8f1 ("app/eventdev: support Tx adapter")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> >---
> > 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);
> >--
> >2.17.1
@@ -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);