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 5BD1942624; Sat, 23 Sep 2023 15:36:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FD1A402D5; Sat, 23 Sep 2023 15:36:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 25359402C0 for ; Sat, 23 Sep 2023 15:36:14 +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 38NBon9A006266; Sat, 23 Sep 2023 06:36:14 -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=kOydk9QV/W4ME/7MES6DQk57XMeASQ1JEOSqFmk3G8A=; b=WvTVJt1B2hSP19VZhYeilxf5neXeTlXtp9m2VIvbh/NUXJbUkjAODIT1+YuCooCSno9D rGBZLX9+HPhFp8OaXGnG7DAwslZvnxLO1wQC8a0Wiy8LW2VXvN7tV3/hKll1SlrkI/UQ ZGCmz4aBHmofUaeLkAbrM5MCK1tyw2TLyn6pmw9cBJf3LUW0dz08AE2uxvW78kHMjKA2 ZcVYXa5Q5du58+zGUt2zK60NpaPDjIiV5I3jOSJsC1PeK0pRtLHX8PIaqlKAGISIAoBZ E3tz/xHL+MTrUhohMR3LgQ8KcFiJGv/fAzBQQjKEWTe9uFbVeoojVgKwLP3A/0UxENXX gA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t9wcqgckk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2023 06:36:14 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 23 Sep 2023 06:36:12 -0700 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; Sat, 23 Sep 2023 06:36:12 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 534353F7069; Sat, 23 Sep 2023 06:36:08 -0700 (PDT) From: Amit Prakash Shukla To: Amit Prakash Shukla , Jerin Jacob CC: , , , , , , , , , , , , Subject: [PATCH v3 11/12] eventdev: add DMA adapter event port get Date: Sat, 23 Sep 2023 19:04:48 +0530 Message-ID: <20230923133449.3780841-12-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: 6CYZMUELocLtJmtjS9LNR7XTiwCd4-Es X-Proofpoint-GUID: 6CYZMUELocLtJmtjS9LNR7XTiwCd4-Es 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 support for DMA adapter event port get. Signed-off-by: Amit Prakash Shukla --- lib/eventdev/rte_event_dma_adapter.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c index 9770b0b8df..2b0919d705 100644 --- a/lib/eventdev/rte_event_dma_adapter.c +++ b/lib/eventdev/rte_event_dma_adapter.c @@ -472,6 +472,22 @@ rte_event_dma_adapter_free(uint8_t id) return 0; } +int +rte_event_dma_adapter_event_port_get(uint8_t id, uint8_t *event_port_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 || event_port_id == NULL) + return -EINVAL; + + *event_port_id = adapter->event_port_id; + + return 0; +} + static inline unsigned int edma_enq_to_dma_dev(struct event_dma_adapter *adapter, struct rte_event *ev, unsigned int cnt) { -- 2.25.1