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 13010A0524; Mon, 31 May 2021 23:44:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2782B4116D; Mon, 31 May 2021 23:42:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D1B914116B for ; Mon, 31 May 2021 23:42:56 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14VLeJBQ002825; Mon, 31 May 2021 14:42:54 -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=oSGSHFeYgxcuerirOXqESOg43oIRhE2jFL1q9SCsFhI=; b=JjKbMCrH2ZZ5tazoltKBByjNfbDws0B2te8xUH5unNZsrtjFBQHFgymvt5W9ZdGim0jD 80hDnKSkzZeJN/6r160NES0GyO7J4b1J9eHrY9Crb6P3ttXIfDG+i23/VAxsjqWE3vef NYHAcnXiMO3SNSt5VLhI/x+EpWG41WoMRK639MR21GMdOiMSxmYKuFaMuLBq8TUTUr81 YxsQm2+c3k6lpCX+2xXAXEHWyfuxTW7VOb1ibqra6rT9R+REHpiMmZHrywCdkP/vuNMd zfcI9mIorSM8BVhMJs0ywYLumpd0LpUTE4wLKYxC2n0QSFL/oYM2w3Oa+riPbc7Uvinx cw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 38vtnja14g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 31 May 2021 14:42:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 31 May 2021 14:42:52 -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.2 via Frontend Transport; Mon, 31 May 2021 14:42:52 -0700 Received: from EH-LT0048.marvell.com (unknown [10.193.32.52]) by maili.marvell.com (Postfix) with ESMTP id 6D8743F703F; Mon, 31 May 2021 14:42:51 -0700 (PDT) From: Tomasz Duszynski To: CC: , , Tomasz Duszynski , Ray Kinsella , Neil Horman Date: Mon, 31 May 2021 23:41:40 +0200 Message-ID: <20210531214142.30167-27-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210531214142.30167-1-tduszynski@marvell.com> References: <20210531214142.30167-1-tduszynski@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: Cd0CPT02LtsQJ8s6pD-Rv6Lsedq0-AmE X-Proofpoint-ORIG-GUID: Cd0CPT02LtsQJ8s6pD-Rv6Lsedq0-AmE X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-31_15:2021-05-31, 2021-05-31 signatures=0 Subject: [dpdk-dev] [PATCH 26/28] raw/cnxk_bphy: add support for retrieving device memory 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 Sender: "dev" Allow user to retrieve bphy memory resources. Signed-off-by: Jakub Palider Signed-off-by: Tomasz Duszynski --- drivers/raw/cnxk_bphy/cnxk_bphy.c | 6 ++++++ drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 8 ++++++++ drivers/raw/cnxk_bphy/cnxk_bphy_irq.h | 2 ++ drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 4 ++++ drivers/raw/cnxk_bphy/version.map | 2 ++ 5 files changed, 22 insertions(+) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index e3a065b30..c3aed3018 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -34,6 +34,12 @@ rte_pmd_bphy_intr_fini(uint16_t dev_id) return cnxk_bphy_intr_fini(dev_id); } +struct cnxk_bphy_mem * +rte_pmd_bphy_intr_mem_get(uint16_t dev_id) +{ + return cnxk_bphy_mem_get(dev_id); +} + static const struct rte_rawdev_ops bphy_rawdev_ops = { }; diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index 6a68db8a9..5a7698f23 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c @@ -57,3 +57,11 @@ cnxk_bphy_intr_fini(uint16_t dev_id) roc_bphy_intr_fini(irq_chip); bphy_dev->irq_chip = NULL; } + +struct bphy_mem * +cnxk_bphy_mem_get(uint16_t dev_id) +{ + struct bphy_device *bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id); + + return &bphy_dev->mem; +} diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h index d18fbd69e..e52106bc8 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h @@ -26,5 +26,7 @@ __rte_internal void cnxk_bphy_intr_fini(uint16_t dev_id); __rte_internal uint64_t cnxk_bphy_irq_max_get(uint16_t dev_id); +__rte_internal +struct bphy_mem *cnxk_bphy_mem_get(uint16_t dev_id); #endif /* _CNXK_BPHY_IRQ_ */ diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h index edc146685..783b63471 100644 --- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h +++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h @@ -103,9 +103,13 @@ struct cnxk_bphy_cgx_msg { void *data; }; +#define cnxk_bphy_mem bphy_mem + __rte_experimental int rte_pmd_bphy_intr_init(uint16_t dev_id); __rte_experimental +struct cnxk_bphy_mem *rte_pmd_bphy_intr_mem_get(uint16_t dev_id); +__rte_experimental void rte_pmd_bphy_intr_fini(uint16_t dev_id); #endif /* _CNXK_BPHY_H_ */ diff --git a/drivers/raw/cnxk_bphy/version.map b/drivers/raw/cnxk_bphy/version.map index 6c5e9639a..c7600a863 100644 --- a/drivers/raw/cnxk_bphy/version.map +++ b/drivers/raw/cnxk_bphy/version.map @@ -7,10 +7,12 @@ INTERNAL { cnxk_bphy_intr_init; cnxk_bphy_intr_fini; cnxk_bphy_irq_max_get; + cnxk_bphy_mem_get; }; EXPERIMENTAL { global: rte_pmd_bphy_intr_fini; rte_pmd_bphy_intr_init; + rte_pmd_bphy_intr_mem_get; }; -- 2.25.1