From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Srikanth Yalavarthi <syalavarthi@marvell.com>,
Jerin Jacob <jerinj@marvell.com>
Cc: <dev@dpdk.org>, <aprabhu@marvell.com>, <sshankarnara@marvell.com>,
<ptakkar@marvell.com>
Subject: [PATCH 08/11] event/ml: add support to get adapter service ID
Date: Sun, 7 Jan 2024 07:34:47 -0800 [thread overview]
Message-ID: <20240107153454.3909-9-syalavarthi@marvell.com> (raw)
In-Reply-To: <20240107153454.3909-1-syalavarthi@marvell.com>
Added support to get ML adapter service ID.
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
lib/eventdev/rte_event_ml_adapter.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/lib/eventdev/rte_event_ml_adapter.c b/lib/eventdev/rte_event_ml_adapter.c
index 60c10caef68..474aeb6325b 100644
--- a/lib/eventdev/rte_event_ml_adapter.c
+++ b/lib/eventdev/rte_event_ml_adapter.c
@@ -1080,6 +1080,26 @@ rte_event_ml_adapter_queue_pair_del(uint8_t id, int16_t mldev_id, int32_t queue_
return ret;
}
+int
+rte_event_ml_adapter_service_id_get(uint8_t id, uint32_t *service_id)
+{
+ struct event_ml_adapter *adapter;
+
+ if (!emla_valid_id(id)) {
+ RTE_EDEV_LOG_ERR("Invalid ML adapter id = %d", id);
+ return -EINVAL;
+ }
+
+ adapter = emla_id_to_adapter(id);
+ if (adapter == NULL || service_id == NULL)
+ return -EINVAL;
+
+ if (adapter->service_initialized)
+ *service_id = adapter->service_id;
+
+ return adapter->service_initialized ? 0 : -ESRCH;
+}
+
static int
emla_adapter_ctrl(uint8_t id, int start)
{
--
2.42.0
next prev parent reply other threads:[~2024-01-07 15:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-07 15:34 [PATCH 00/11] Introduce Event ML Adapter Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 01/11] eventdev: introduce ML event adapter library Srikanth Yalavarthi
2024-02-02 8:51 ` Jerin Jacob
2024-02-07 9:17 ` Naga Harish K, S V
2024-01-07 15:34 ` [PATCH 02/11] event/ml: add ml adapter capabilities get Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 03/11] event/ml: add adapter create and free Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 04/11] event/ml: add adapter port get Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 05/11] event/ml: add adapter queue pair add and delete Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 06/11] event/ml: add support for service function Srikanth Yalavarthi
2024-01-07 15:34 ` [PATCH 07/11] event/ml: add adapter start and stop Srikanth Yalavarthi
2024-01-07 15:34 ` Srikanth Yalavarthi [this message]
2024-01-07 15:34 ` [PATCH 09/11] event/ml: add support for runtime params Srikanth Yalavarthi
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=20240107153454.3909-9-syalavarthi@marvell.com \
--to=syalavarthi@marvell.com \
--cc=aprabhu@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ptakkar@marvell.com \
--cc=sshankarnara@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).