* [PATCH] event/cnxk: fix dequeue timeout configuration
@ 2023-12-07 6:55 pbhagavatula
2023-12-11 13:49 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2023-12-07 6:55 UTC (permalink / raw)
To: jerinj, Pavan Nikhilesh, Shijith Thotton; +Cc: dev, stable
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Allow dequeue timeout to be configured as zero, when
RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT is disabled.
Fixes: 5512c7de85cd ("event/cnxk: add common configuration validation")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_eventdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 0c61f4c20e..2ffa686f93 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -162,16 +162,17 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev, uint32_t deq_depth,
deq_tmo_ns = conf->dequeue_timeout_ns;
- if (deq_tmo_ns == 0)
- deq_tmo_ns = dev->min_dequeue_timeout_ns;
- if (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
- deq_tmo_ns > dev->max_dequeue_timeout_ns) {
+ if (deq_tmo_ns && (deq_tmo_ns < dev->min_dequeue_timeout_ns ||
+ deq_tmo_ns > dev->max_dequeue_timeout_ns)) {
plt_err("Unsupported dequeue timeout requested");
return -EINVAL;
}
- if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
+ if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
+ if (deq_tmo_ns == 0)
+ deq_tmo_ns = dev->min_dequeue_timeout_ns;
dev->is_timeout_deq = 1;
+ }
dev->deq_tmo_ns = deq_tmo_ns;
@@ -663,7 +664,7 @@ cnxk_sso_init(struct rte_eventdev *event_dev)
}
dev->is_timeout_deq = 0;
- dev->min_dequeue_timeout_ns = 0;
+ dev->min_dequeue_timeout_ns = USEC2NSEC(1);
dev->max_dequeue_timeout_ns = USEC2NSEC(0x3FF);
dev->max_num_events = -1;
dev->nb_event_queues = 0;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] event/cnxk: fix dequeue timeout configuration
2023-12-07 6:55 [PATCH] event/cnxk: fix dequeue timeout configuration pbhagavatula
@ 2023-12-11 13:49 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2023-12-11 13:49 UTC (permalink / raw)
To: pbhagavatula; +Cc: jerinj, Shijith Thotton, dev, stable
On Thu, Dec 7, 2023 at 1:43 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Allow dequeue timeout to be configured as zero, when
> RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT is disabled.
>
> Fixes: 5512c7de85cd ("event/cnxk: add common configuration validation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Applied to dpdk-next-eventdev/for-main. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-11 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 6:55 [PATCH] event/cnxk: fix dequeue timeout configuration pbhagavatula
2023-12-11 13:49 ` 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).