From: <pbhagavatula@marvell.com>
To: <jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>,
"Shijith Thotton" <sthotton@marvell.com>,
Anatoly Burakov <anatoly.burakov@intel.com>
Cc: <dev@dpdk.org>
Subject: [PATCH] event/cnxk: fix timer ops init in secondary
Date: Sun, 5 Feb 2023 12:03:47 +0530 [thread overview]
Message-ID: <20230205063347.6469-1-pbhagavatula@marvell.com> (raw)
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
next reply other threads:[~2023-02-05 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-05 6:33 pbhagavatula [this message]
2023-02-07 9:27 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230205063347.6469-1-pbhagavatula@marvell.com \
--to=pbhagavatula@marvell.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=sthotton@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).