DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] event/cnxk: fix timer ops init in secondary
@ 2023-02-05  6:33 pbhagavatula
  2023-02-07  9:27 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2023-02-05  6:33 UTC (permalink / raw)
  To: jerinj, Pavan Nikhilesh, Shijith Thotton, Anatoly Burakov; +Cc: dev

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Fix event timer fast-path ops not being initialized in secondary
process.

Fixes: dd519f83dd96 ("event/cnxk: add timer adapter capabilities")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cnxk_tim_evdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c
index 5dd79cbd47..c155764b77 100644
--- a/drivers/event/cnxk/cnxk_tim_evdev.c
+++ b/drivers/event/cnxk/cnxk_tim_evdev.c
@@ -381,6 +381,7 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
 		  cnxk_sso_set_priv_mem_t priv_mem_fn)
 {
 	struct cnxk_tim_evdev *dev = cnxk_tim_priv_get();
+	struct cnxk_tim_ring *tim_ring;
 
 	RTE_SET_USED(flags);
 
@@ -403,6 +404,12 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,
 	dev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;
 	*caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT |
 		RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC;
+
+	tim_ring = ((struct rte_event_timer_adapter_data
+			     *)((char *)caps - offsetof(struct rte_event_timer_adapter_data, caps)))
+			   ->adapter_priv;
+	if (tim_ring != NULL && rte_eal_process_type() == RTE_PROC_SECONDARY)
+		cnxk_tim_set_fp_ops(tim_ring);
 	*ops = &cnxk_tim_ops;
 
 	return 0;
-- 
2.25.1


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

end of thread, other threads:[~2023-02-07  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05  6:33 [PATCH] event/cnxk: fix timer ops init in secondary pbhagavatula
2023-02-07  9:27 ` 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).