From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 63292A0C41;
	Tue, 23 Nov 2021 20:14:32 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id A61EA4117E;
	Tue, 23 Nov 2021 20:14:12 +0100 (CET)
Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com
 [67.231.148.174])
 by mails.dpdk.org (Postfix) with ESMTP id 4861A41172
 for <dev@dpdk.org>; Tue, 23 Nov 2021 20:14:11 +0100 (CET)
Received: from pps.filterd (m0045849.ppops.net [127.0.0.1])
 by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1ANGjHQ6009923
 for <dev@dpdk.org>; Tue, 23 Nov 2021 11:14:10 -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=1V1r4JoCp7EPIRmUN5lYAG42eh/RBa4aKTfvxh1OL5w=;
 b=Am0DoEvU2l7dI1mM/g2L7wClyXn5oTdbEtodbqIFwQose7Wgg0LTpiLtJFM5xmlp3tK+
 EnsvKxY+uqWEmNbWjwuDfg0H11jl8i78BD3shBZtXpKpSQ0b/DlcAVDX4a56jxDkwE6P
 U7a5WV2jjF/VwC3n1fgbV8kDOv5GWjYmnUR1BjBJpjgCjmwsiVzRCDPxrK2ph6seLqFq
 Yg86dz8gYwHkzwkWqjble/c65v9AwoyqYKtAwjSolFf14Y4sB936fgxhK5PbbkMMHALO
 9v67n9Dgi6Ovui5J41xP2X2YA7pSl/M64D5E9JFHjXAaMqINwjVfzEN2clqb5UCElMkU Ng== 
Received: from dc5-exch02.marvell.com ([199.233.59.182])
 by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cgumjb5pv-2
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)
 for <dev@dpdk.org>; Tue, 23 Nov 2021 11:14:10 -0800
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.18;
 Tue, 23 Nov 2021 11:14:08 -0800
Received: from pt-lxl0023.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; Tue, 23 Nov 2021 11:14:07 -0800
From: <lironh@marvell.com>
To: <jerinj@marvell.com>
CC: <dev@dpdk.org>, Liron Himi <lironh@marvell.com>
Subject: [PATCH v2 4/5] common/cnxk: link REE support to ROC files
Date: Tue, 23 Nov 2021 21:13:47 +0200
Message-ID: <20211123191348.31239-5-lironh@marvell.com>
X-Mailer: git-send-email 2.28.0
In-Reply-To: <20211123191348.31239-1-lironh@marvell.com>
References: <20211003062309.20486-1-lironh@marvell.com>
 <20211123191348.31239-1-lironh@marvell.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Proofpoint-GUID: uyxYlm87kkHHJ45p6-YIRQOm5p-hJ-p2
X-Proofpoint-ORIG-GUID: uyxYlm87kkHHJ45p6-YIRQOm5p-hJ-p2
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475
 definitions=2021-11-23_06,2021-11-23_01,2020-04-07_01
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

From: Liron Himi <lironh@marvell.com>

add references to REE files from ROC files

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/common/cnxk/meson.build     |  1 +
 drivers/common/cnxk/roc_api.h       |  4 ++++
 drivers/common/cnxk/roc_constants.h |  2 ++
 drivers/common/cnxk/roc_platform.c  |  1 +
 drivers/common/cnxk/roc_platform.h  |  2 ++
 drivers/common/cnxk/roc_priv.h      |  3 +++
 drivers/common/cnxk/version.map     | 18 +++++++++++++++++-
 7 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build
index 4928f7e549..7e27b3cc0a 100644
--- a/drivers/common/cnxk/meson.build
+++ b/drivers/common/cnxk/meson.build
@@ -61,6 +61,7 @@ sources = files(
         'roc_tim.c',
         'roc_tim_irq.c',
         'roc_utils.c',
+        'roc_ree.c',
 )
 
 # Security common code
diff --git a/drivers/common/cnxk/roc_api.h b/drivers/common/cnxk/roc_api.h
index e7aaa07563..1b46c21f7f 100644
--- a/drivers/common/cnxk/roc_api.h
+++ b/drivers/common/cnxk/roc_api.h
@@ -37,6 +37,7 @@
 #include "hw/nix.h"
 #include "hw/npa.h"
 #include "hw/npc.h"
+#include "hw/ree.h"
 #include "hw/rvu.h"
 #include "hw/sdp.h"
 #include "hw/sso.h"
@@ -90,6 +91,9 @@
 /* DPI */
 #include "roc_dpi.h"
 
+/* REE */
+#include "roc_ree.h"
+
 /* HASH computation */
 #include "roc_hash.h"
 
diff --git a/drivers/common/cnxk/roc_constants.h b/drivers/common/cnxk/roc_constants.h
index ac7335061c..5f78823642 100644
--- a/drivers/common/cnxk/roc_constants.h
+++ b/drivers/common/cnxk/roc_constants.h
@@ -37,6 +37,8 @@
 #define PCI_DEVID_CNXK_BPHY	      0xA089
 #define PCI_DEVID_CNXK_RVU_NIX_INL_PF 0xA0F0
 #define PCI_DEVID_CNXK_RVU_NIX_INL_VF 0xA0F1
+#define PCI_DEVID_CNXK_RVU_REE_PF     0xA0f4
+#define PCI_DEVID_CNXK_RVU_REE_VF     0xA0f5
 
 #define PCI_DEVID_CN9K_CGX  0xA059
 #define PCI_DEVID_CN10K_RPM 0xA060
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index 74dbdeceb9..ebb6225f4d 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -65,3 +65,4 @@ RTE_LOG_REGISTER(cnxk_logtype_npc, pmd.net.cnxk.flow, NOTICE);
 RTE_LOG_REGISTER(cnxk_logtype_sso, pmd.event.cnxk, NOTICE);
 RTE_LOG_REGISTER(cnxk_logtype_tim, pmd.event.cnxk.timer, NOTICE);
 RTE_LOG_REGISTER(cnxk_logtype_tm, pmd.net.cnxk.tm, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(cnxk_logtype_ree, NOTICE);
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 61d4781209..85aa6dcebc 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -197,6 +197,7 @@ extern int cnxk_logtype_npc;
 extern int cnxk_logtype_sso;
 extern int cnxk_logtype_tim;
 extern int cnxk_logtype_tm;
+extern int cnxk_logtype_ree;
 
 #define plt_err(fmt, args...)                                                  \
 	RTE_LOG(ERR, PMD, "%s():%u " fmt "\n", __func__, __LINE__, ##args)
@@ -222,6 +223,7 @@ extern int cnxk_logtype_tm;
 #define plt_sso_dbg(fmt, ...)	plt_dbg(sso, fmt, ##__VA_ARGS__)
 #define plt_tim_dbg(fmt, ...)	plt_dbg(tim, fmt, ##__VA_ARGS__)
 #define plt_tm_dbg(fmt, ...)	plt_dbg(tm, fmt, ##__VA_ARGS__)
+#define plt_ree_dbg(fmt, ...)	plt_dbg(ree, fmt, ##__VA_ARGS__)
 
 /* Datapath logs */
 #define plt_dp_err(fmt, args...)                                               \
diff --git a/drivers/common/cnxk/roc_priv.h b/drivers/common/cnxk/roc_priv.h
index 782b90cf8d..122d411fe7 100644
--- a/drivers/common/cnxk/roc_priv.h
+++ b/drivers/common/cnxk/roc_priv.h
@@ -44,4 +44,7 @@
 /* DPI */
 #include "roc_dpi_priv.h"
 
+/* REE */
+#include "roc_ree_priv.h"
+
 #endif /* _ROC_PRIV_H_ */
diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map
index 07c6720f0c..5a03b91784 100644
--- a/drivers/common/cnxk/version.map
+++ b/drivers/common/cnxk/version.map
@@ -11,6 +11,7 @@ INTERNAL {
 	cnxk_logtype_nix;
 	cnxk_logtype_npa;
 	cnxk_logtype_npc;
+	cnxk_logtype_ree;
 	cnxk_logtype_sso;
 	cnxk_logtype_tim;
 	cnxk_logtype_tm;
@@ -347,6 +348,21 @@ INTERNAL {
 	roc_tim_lf_enable;
 	roc_tim_lf_free;
 	roc_se_ctx_swap;
-
+	roc_ree_af_reg_read;
+	roc_ree_af_reg_write;
+	roc_ree_config_lf;
+	roc_ree_dev_fini;
+	roc_ree_dev_init;
+	roc_ree_err_intr_register;
+	roc_ree_err_intr_unregister;
+	roc_ree_iq_disable;
+	roc_ree_iq_enable;
+	roc_ree_msix_offsets_get;
+	roc_ree_qp_get_base;
+	roc_ree_queues_attach;
+	roc_ree_queues_detach;
+	roc_ree_rule_db_get;
+	roc_ree_rule_db_len_get;
+	roc_ree_rule_db_prog;
 	local: *;
 };
-- 
2.28.0