* [PATCH 1/2] event/cnxk: fix ns to ticks conversion
@ 2023-05-24 8:52 pbhagavatula
2023-05-24 8:52 ` [PATCH 2/2] event/cnxk: honor event limit set by config pbhagavatula
2023-05-26 10:31 ` [PATCH 1/2] event/cnxk: fix ns to ticks conversion Jerin Jacob
0 siblings, 2 replies; 3+ messages in thread
From: pbhagavatula @ 2023-05-24 8:52 UTC (permalink / raw)
To: jerinj, Pavan Nikhilesh, Shijith Thotton; +Cc: dev
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
The number of timeout ticks is dependent on the global dequeue
timeout configured.
Fixes: 6223ede20361 ("event/cnxk: add event port link and unlink")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_eventdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 99f9cdcd0d..3a05a59c75 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -323,9 +323,9 @@ int
cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,
uint64_t *tmo_ticks)
{
- RTE_SET_USED(event_dev);
- *tmo_ticks = NSEC2TICK(ns, rte_get_timer_hz());
+ struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
+ *tmo_ticks = dev->deq_tmo_ns ? ns / dev->deq_tmo_ns : 0;
return 0;
}
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] event/cnxk: honor event limit set by config
2023-05-24 8:52 [PATCH 1/2] event/cnxk: fix ns to ticks conversion pbhagavatula
@ 2023-05-24 8:52 ` pbhagavatula
2023-05-26 10:31 ` [PATCH 1/2] event/cnxk: fix ns to ticks conversion Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: pbhagavatula @ 2023-05-24 8:52 UTC (permalink / raw)
To: jerinj, Pavan Nikhilesh, Shijith Thotton; +Cc: dev
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Honor the number of events configured during event device
configuration.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_eventdev.c | 7 ++++++-
drivers/event/cnxk/cnxk_eventdev.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index 3a05a59c75..f356913384 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -39,7 +39,11 @@ cnxk_sso_xaq_allocate(struct cnxk_sso_evdev *dev)
uint32_t xae_cnt;
int rc;
- xae_cnt = dev->sso.iue;
+ if (dev->num_events > 0)
+ xae_cnt = dev->num_events;
+ else
+ xae_cnt = dev->sso.iue;
+
if (dev->xae_cnt)
xae_cnt += dev->xae_cnt;
if (dev->adptr_xae_cnt)
@@ -189,6 +193,7 @@ cnxk_sso_dev_validate(const struct rte_eventdev *event_dev, uint32_t deq_depth,
dev->nb_event_queues = conf->nb_event_queues;
dev->nb_event_ports = conf->nb_event_ports;
+ dev->num_events = conf->nb_events_limit;
return 0;
}
diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h
index e612a77425..be3923b213 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -89,6 +89,7 @@ struct cnxk_sso_evdev {
uint32_t min_dequeue_timeout_ns;
uint32_t max_dequeue_timeout_ns;
int32_t max_num_events;
+ int32_t num_events;
uint64_t xaq_lmt;
int64_t *fc_cache_space;
rte_iova_t fc_iova;
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] event/cnxk: fix ns to ticks conversion
2023-05-24 8:52 [PATCH 1/2] event/cnxk: fix ns to ticks conversion pbhagavatula
2023-05-24 8:52 ` [PATCH 2/2] event/cnxk: honor event limit set by config pbhagavatula
@ 2023-05-26 10:31 ` Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2023-05-26 10:31 UTC (permalink / raw)
To: pbhagavatula; +Cc: jerinj, Shijith Thotton, dev
On Wed, May 24, 2023 at 2:22 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> The number of timeout ticks is dependent on the global dequeue
> timeout configured.
>
> Fixes: 6223ede20361 ("event/cnxk: add event port link and unlink")
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Series applied to dpdk-next-net-eventdev/for-main. Thanks
> ---
> drivers/event/cnxk/cnxk_eventdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
> index 99f9cdcd0d..3a05a59c75 100644
> --- a/drivers/event/cnxk/cnxk_eventdev.c
> +++ b/drivers/event/cnxk/cnxk_eventdev.c
> @@ -323,9 +323,9 @@ int
> cnxk_sso_timeout_ticks(struct rte_eventdev *event_dev, uint64_t ns,
> uint64_t *tmo_ticks)
> {
> - RTE_SET_USED(event_dev);
> - *tmo_ticks = NSEC2TICK(ns, rte_get_timer_hz());
> + struct cnxk_sso_evdev *dev = cnxk_sso_pmd_priv(event_dev);
>
> + *tmo_ticks = dev->deq_tmo_ns ? ns / dev->deq_tmo_ns : 0;
> return 0;
> }
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-26 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 8:52 [PATCH 1/2] event/cnxk: fix ns to ticks conversion pbhagavatula
2023-05-24 8:52 ` [PATCH 2/2] event/cnxk: honor event limit set by config pbhagavatula
2023-05-26 10:31 ` [PATCH 1/2] event/cnxk: fix ns to ticks conversion 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).