From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DE2543857; Sun, 7 Jan 2024 16:35:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE5C640A67; Sun, 7 Jan 2024 16:35:23 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 814AC40691 for ; Sun, 7 Jan 2024 16:35:20 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 407EpvRG002858 for ; Sun, 7 Jan 2024 07:35:19 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=1jT/wN9vsaC5fmAO6qPQLK2S53Bnehv1ODarHU1dfEo=; b=kwV 7yloEyKleiTcoEZfUT0G3xqd9rY2x/MeQNy4NS3yNKxJls5JruVoUa36n2qTWZmg CykhmynpxFL9Gr+uwGEwrVhDtU47xmiWhrA5rol0IXpNqbkiQ1QHxmcE76+UG43P VATmTmdqM81YpxUp9trGZ16HwNh2GMtIE9wkBOafV7G1Wyo0KptHYJ92aHkZaX03 tRVtnQT9IlEzkmhWb0l49Qb2KBR+rlF3tvux1h9u0vXj5Xy3+txrvjVl8gxCy7Fs gSy+NNzN41PMEZQRGresbYFc2Bea3OxC6LMvDtO4KF8NceIao207OgtElokKisgy GvZZXFglayJ1Y4gpGUg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vf53qjka0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 07 Jan 2024 07:35:19 -0800 (PST) Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 7 Jan 2024 07:35:17 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 7 Jan 2024 07:35:17 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id AA9163F7093; Sun, 7 Jan 2024 07:35:17 -0800 (PST) From: Srikanth Yalavarthi To: Srikanth Yalavarthi , Jerin Jacob CC: , , , Subject: [PATCH 04/11] event/ml: add adapter port get Date: Sun, 7 Jan 2024 07:34:43 -0800 Message-ID: <20240107153454.3909-5-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240107153454.3909-1-syalavarthi@marvell.com> References: <20240107153454.3909-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 112zlTZFlKswMH-_1Hfjiy_OvVPMHIjL X-Proofpoint-GUID: 112zlTZFlKswMH-_1Hfjiy_OvVPMHIjL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Added ML adapter port get function. Signed-off-by: Srikanth Yalavarthi --- lib/eventdev/rte_event_ml_adapter.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/eventdev/rte_event_ml_adapter.c b/lib/eventdev/rte_event_ml_adapter.c index fed3b67c858..93ba58b3e9e 100644 --- a/lib/eventdev/rte_event_ml_adapter.c +++ b/lib/eventdev/rte_event_ml_adapter.c @@ -321,3 +321,22 @@ rte_event_ml_adapter_free(uint8_t id) return 0; } + +int +rte_event_ml_adapter_event_port_get(uint8_t id, uint8_t *event_port_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 || event_port_id == NULL) + return -EINVAL; + + *event_port_id = adapter->event_port_id; + + return 0; +} -- 2.42.0