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 6B6C342624; Sat, 23 Sep 2023 15:36:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5A924064A; Sat, 23 Sep 2023 15:35:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 08C4040648 for ; Sat, 23 Sep 2023 15:35:48 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38NDNkLQ023257; Sat, 23 Sep 2023 06:35:48 -0700 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=/FwEiQTUH3JaVWgVwHSvUc5SX6VvAJDL+wsuVuWt/qM=; b=f3XXull0ckOw6e+OkF18VQHDQSJHAYXNQS6uZoN6qSxhsWnwbQKK1d/JLqQPmya/MOPX uNcgEHdcufGHYXxtk4ng5NNSTenFooVtCzwj22ALv/kZX4CoTeJDA58kwsZ3oRoST1Nx xUZP1aVO5Sm19MjX/pzGh3+34wv0KVRQ4Pb7GBFVhT8zhaau4RQyoHO3xz5faSioryys rVqR41xXBeZtBpWuLGoULv25HFnlEle+XXvr8NQrfTeJN+zuYJzpmJi5ELo89iBv99Ti d6hf09inE7IhzD6PSkuSA5Mc1DIXyLu2VCMMXiVIxuJxfFUSyjUIgnxXXAoDIgwQzX5W pQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t9wcqgcje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2023 06:35:48 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 23 Sep 2023 06:35:46 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sat, 23 Sep 2023 06:35:46 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 4EAB03F7069; Sat, 23 Sep 2023 06:35:42 -0700 (PDT) From: Amit Prakash Shukla To: Amit Prakash Shukla , Jerin Jacob CC: , , , , , , , , , , , , Subject: [PATCH v3 07/12] eventdev: add support for DMA adapter service ID get Date: Sat, 23 Sep 2023 19:04:44 +0530 Message-ID: <20230923133449.3780841-8-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230923133449.3780841-1-amitprakashs@marvell.com> References: <20230922201337.3347666-1-amitprakashs@marvell.com> <20230923133449.3780841-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: sauL2A7wr0g_5bsEDaQaDC74FoiKKOWq X-Proofpoint-GUID: sauL2A7wr0g_5bsEDaQaDC74FoiKKOWq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-23_10,2023-09-21_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 API support to get DMA adapter service ID. Service id returned in the variable by the API call shall be used by application to map a service core. Signed-off-by: Amit Prakash Shukla --- lib/eventdev/rte_event_dma_adapter.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c index e5c2be3a2f..9e7ed622f2 100644 --- a/lib/eventdev/rte_event_dma_adapter.c +++ b/lib/eventdev/rte_event_dma_adapter.c @@ -1134,6 +1134,23 @@ rte_event_dma_adapter_vchan_del(uint8_t id, int16_t dma_dev_id, uint16_t vchan) return ret; } +int +rte_event_dma_adapter_service_id_get(uint8_t id, uint32_t *service_id) +{ + struct event_dma_adapter *adapter; + + EVENT_DMA_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL); + + adapter = edma_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 edma_adapter_ctrl(uint8_t id, int start) { -- 2.25.1