From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FC40A04B6; Sun, 11 Oct 2020 09:35:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6DC91D426; Sun, 11 Oct 2020 09:35:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9A32E1D423 for ; Sun, 11 Oct 2020 09:35:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09B7Z0Y5004529; Sun, 11 Oct 2020 00:35:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=f7N/47Wh5ReovdK7R9FXajcMli1NPlfBPRA39qOTi0w=; b=GUgkNikzIFRzs1jr0YXko055auscm+Lu22809mJTsPAKEAYXK7Y8nRWTZ0ar8ILpsE7B AQyT5vRtUwn5y2Wl7lRXsEEWyqxXIxFCHsMGkqmz4+8qDOP9GJzCFa+mwYkHhIjm9rUQ ctvY1xwpr5caQ8kOK8XPmILGruuJrQP2bUN+PfXQZtfZXVYsGh5ji3/BrW/2MXbkq3PZ eOqUHKbOaHBOmSHnXxkIu/L1KPb6jEyCBPouEOaRG2HYSjWGzHgORtI75PMtqEbaTQdz fm7dXcDaayQMQHFry3JNS7p23lmomgE8XG3XGRfqS03sv/YKg3PqassIkwb+YoLg1XwI 0Q== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 343aana8ga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 11 Oct 2020 00:35:19 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 11 Oct 2020 00:35:18 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 11 Oct 2020 00:35:17 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 11 Oct 2020 00:35:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=chcaTEke3QbvzVERDDL01UZYvXfzdR2BSvCBYNkDKu/Wwlh1l+fAcxi3Zc2ZB6WNNY+Kk+vFNkqJn2QSENQ/wDnlwfFY2PuC2Vq5K4j4TIW5OJOVT8HrfU5G8JyHoNhzX6v1Ywczgs+gQQ3l8pkH0eE8MohUQlckl5oOHGWb+8yShuN03iRsO5CczUIdOTf9b6awRMn+28lFNgljZKFFREviRchJkwKPSzdsd1cIpOpK/nC6bXWbLfG8lRJh0U31BU64u4FQF7LVDmChtEyrbZaKt3c0Zrbz+ElIVs/1UFEMBCLIaLG397X5D+lpkmk56Tslrh4381PQWqq+yw0/sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f7N/47Wh5ReovdK7R9FXajcMli1NPlfBPRA39qOTi0w=; b=VQwQvH0pYgICyHs8GG0fi6L05Lm3w2DKjtCk4XcGF98s/tuJ9IN0ITZaCv27RgIqBOVWpqzf1C9W9tM8eeh47NQh4ydz/rB5mx8X1bJvGWvnpNQ1SbZkrmvYu2PpgYwxfqnJa2FWF9fqJXEga1EUx+J5lSvECVik6VMqVGuK9jic+DD32KBdnrxk7btZi/IxgJiq0UsNVMDnIiyGeCyiqdJrU5YpZrf/ATqG0THyd5LsgTU/bvtGT8eVv7EqEt+OuvKNmXc2jmInUTg/XFQPfw3ECgfsavQE9Ul0FwyHOQ+LbRXlHywcAY9cyTSDV74eOJWmzXmRtFygzNg7QG8K5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f7N/47Wh5ReovdK7R9FXajcMli1NPlfBPRA39qOTi0w=; b=hUHiYj74tSzLRn4AZ8lFNx/rwzkWnX2oZ38XJuZzwPRAQZqSH7mbN1x3J0x/C/D0GIUJ/fxwasoThbArjXec8aCl7lzLl+TxLxZJ4k3Q0FqKcXOI1xr/S7delKU89W0PmrQZ0askTlOhJeJ0UvZFMzDpoQVjolbw05pDSycBLHQ= Received: from DM5PR18MB2214.namprd18.prod.outlook.com (2603:10b6:4:b9::21) by DM5PR18MB1321.namprd18.prod.outlook.com (2603:10b6:3:14f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Sun, 11 Oct 2020 07:35:16 +0000 Received: from DM5PR18MB2214.namprd18.prod.outlook.com ([fe80::48c2:9ca9:3159:368e]) by DM5PR18MB2214.namprd18.prod.outlook.com ([fe80::48c2:9ca9:3159:368e%5]) with mapi id 15.20.3455.029; Sun, 11 Oct 2020 07:35:16 +0000 From: Liron Himi To: Guy Kaneti , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram , "thomas@monjalon.net" , "mdr@ashroe.eu" , "nhorman@tuxdriver.com" , "bruce.richardson@intel.com" , "anatoly.burakov@intel.com" , "john.mcnamara@intel.com" , "marko.kovacevic@intel.com" CC: "dev@dpdk.org" , Smadar Fuks , "Dovrat Zifroni" , Guy Kaneti , "orika@mellanox.com" , Liron Himi Thread-Topic: [dpdk-dev] [PATCH 1/4] common/octeontx2: add REE definitions and logging support Thread-Index: AQHWgFsn/N+VOOLUf0ORj+PEYKoeWamSP2DQ Date: Sun, 11 Oct 2020 07:35:16 +0000 Message-ID: References: <20200901122436.17748-1-guyk@marvell.com> <20200901122436.17748-2-guyk@marvell.com> In-Reply-To: <20200901122436.17748-2-guyk@marvell.com> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [89.139.26.150] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 268833ee-2fad-4f45-af53-08d86db832a6 x-ms-traffictypediagnostic: DM5PR18MB1321: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:88; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zo17fy6UqWRZpAxO5ivTht7Fe+MsnrPu6DkiksqE3sXObD5MVc9xwVZBKUvODFVfngRzEm7ZFa0G9vX80qJDqowQb9LgcDn0XzOR1eJ4tNifuZqG4F3io+0qFo7FLQq1ScA/CXH8CTEirxJ1BkJvU3RkFbcOiVgrBrdI3DXfzVMD+JMAA2lBa6MDe3iargxpYvpCgqGManRvlsB3PrNiajr7b4gGP34so06qSzo6abyGV82wwUw13YKjPzCxsMTTSEZCtPGYTL/5rpeQPUb3xaqoyOwhr7N3a9/YCIWoDwkhG2HZpwZpYrIIonjeK9BQvpeVqBmi55+RnKoOkI6TpznkzcPhYodLw+ON2V3FzuL2u+EVcjTxEHuCEuSQoAuE x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR18MB2214.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(396003)(376002)(366004)(346002)(71200400001)(86362001)(66446008)(478600001)(66476007)(66946007)(8936002)(64756008)(26005)(186003)(9686003)(66556008)(4326008)(110136005)(7696005)(54906003)(53546011)(52536014)(2906002)(5660300002)(6506007)(55016002)(76116006)(316002)(83380400001)(107886003)(33656002)(921003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: +B/wC9qPAWO0grrRxBbIVYxP4BetNtjYlMySjR+Dh3cKltVfQi99i2rhVoIsMNCUXBhRlOxxOnptE+m6/Z6B9fqzGYm1n7pQa33fIipaO10tGQI8dgr9jZyor9iDIlOJx0+9U6VZ9kuE4Ks/lM3q3uigVWsyDYwkZuU/Vk8mEA6pvGoGWso513/anhfrwzBkxyJbjRc5fVHmcW8SqVWEVrUpWfrnQruOQfIpdpKev0En7LGlWQwEZJ+fFrPz0rK+j9xNeUmAGeKg2YEygeJaKruulmkd0srjGdp+tZ1qp1TK9QCQclXGMSf+qglxwc7qyXDuQR5EEy/+ddD8jbXGCJXvXxZLpe/MS2PuU0PtHNcMXPcvlFqeikvNMb/TsCHJK6oeAO/MXHQG03o5WEnKceQ7IyFA4NXrnKbJtcPYninu9znJBXDpaYAqqvwS0TuQUkMQZG0ExIU3veclDaE89Bm+F24UfhYxRopFl/N4Mg/pIMMymlFBNdAwq7OzUaSWFVUgWxqJsEiWFzrNiE9SJk84NZSEznP9oGfzGSOZzsMlEijpCqehC7OmRjh1VjTEZ6KO6RDNQNWwEeM2mXbiVwNfOFSadVMU+vIN9af6KYOBmsom40bI0l00XKnQJNUT5w/slYMkzQ9XNBNqwpAA6w== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR18MB2214.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 268833ee-2fad-4f45-af53-08d86db832a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2020 07:35:16.2790 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: K19wfrBTphY897ZtO2MPpZlOBAlRJWHB4uqI4nOU9ywnVct4jxiLUfrUhgWpq5C8RUZFPcwZ+WPVYO4WpZ4ueQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB1321 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-10_07:2020-10-09, 2020-10-10 signatures=0 Subject: Re: [dpdk-dev] [PATCH 1/4] common/octeontx2: add REE definitions and logging support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Reviewed-by: Liron Himi -----Original Message----- From: dev On Behalf Of guyk@marvell.com Sent: Tuesday, 1 September 2020 15:25 To: Jerin Jacob Kollanukkaran ; Nithin Kumar Dabilpuram= ; thomas@monjalon.net; mdr@ashroe.eu; nhorman@tux= driver.com; bruce.richardson@intel.com; anatoly.burakov@intel.com; john.mcn= amara@intel.com; marko.kovacevic@intel.com Cc: dev@dpdk.org; Smadar Fuks ; Dovrat Zifroni ; Guy Kaneti ; orika@mellanox.com Subject: [dpdk-dev] [PATCH 1/4] common/octeontx2: add REE definitions and l= ogging support From: Guy Kaneti Add REE mbox msg definitions, RVU and REE HW definitions Signed-off-by: Guy Kaneti --- drivers/common/octeontx2/hw/otx2_ree.h | 27 +++++ drivers/common/octeontx2/hw/otx2_rvu.h | 5 + drivers/common/octeontx2/otx2_common.c | 1 + drivers/common/octeontx2/otx2_common.h | 5 + drivers/common/octeontx2/otx2_mbox.h | 103 ++++++++++++++++++ .../rte_common_octeontx2_version.map | 1 + 6 files changed, 142 insertions(+) create mode 100644 drivers/common/octeontx2/hw/otx2_ree.h diff --git a/drivers/common/octeontx2/hw/otx2_ree.h b/drivers/common/octeon= tx2/hw/otx2_ree.h new file mode 100644 index 000000000..b7481f125 --- /dev/null +++ b/drivers/common/octeontx2/hw/otx2_ree.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (C) 2020 Marvell International Ltd. + */ + +#ifndef __OTX2_REE_HW_H__ +#define __OTX2_REE_HW_H__ + +/* REE BAR0*/ +#define REE_AF_REEXM_MAX_MATCH (0x80c8) + +/* REE BAR02 */ +#define REE_LF_MISC_INT (0x300) +#define REE_LF_DONE_INT (0x120) + +#define REE_AF_QUEX_GMCTL(a) (0x800 | (a) << 3) + +#define REE_AF_INT_VEC_RAS (0x0ull) +#define REE_AF_INT_VEC_RVU (0x1ull) +#define REE_AF_INT_VEC_QUE_DONE (0x2ull) +#define REE_AF_INT_VEC_AQ (0x3ull) + +/* ENUMS */ + +#define REE_LF_INT_VEC_QUE_DONE (0x0ull) +#define REE_LF_INT_VEC_MISC (0x1ull) + +#endif /* __OTX2_REE_HW_H__*/ diff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeon= tx2/hw/otx2_rvu.h index 330bfb37f..072515207 100644 --- a/drivers/common/octeontx2/hw/otx2_rvu.h +++ b/drivers/common/octeontx2/hw/otx2_rvu.h @@ -130,6 +130,7 @@ #define RVU_BLOCK_TYPE_RAD (0xdull) #define RVU_BLOCK_TYPE_DFA (0xeull) #define RVU_BLOCK_TYPE_HNA (0xfull) +#define RVU_BLOCK_TYPE_REE (0xeull) =20 #define RVU_BLOCK_ADDR_RVUM (0x0ull) #define RVU_BLOCK_ADDR_LMT (0x1ull) @@ -146,6 +147,8 @@ #define RVU_BLOCK_ADDR_NDC2 (0xeull) #define RVU_BLOCK_ADDR_R_END (0x1full) #define RVU_BLOCK_ADDR_R_START (0x14ull) +#define RVU_BLOCK_ADDR_REE0 (0x14ull) +#define RVU_BLOCK_ADDR_REE1 (0x15ull) =20 #define RVU_VF_INT_VEC_MBOX (0x0ull) =20 @@ -167,6 +170,7 @@ #define NPA_AF_BAR2_SEL (0x9000000ull) #define CPT_AF_BAR2_SEL (0x9000000ull) #define RVU_AF_BAR2_SEL (0x9000000ull) +#define REE_AF_BAR2_SEL (0x9000000ull) =20 #define AF_BAR2_ALIASX(a, b) \ (0x9100000ull | (uint64_t)(a) << 12 | (uint64_t)(b)) @@ -177,6 +181,7 @@ #define NPA_AF_BAR2_ALIASX(a, b) AF_BAR2_ALIASX(0, b) #define CPT_AF_BAR2_ALIASX(a, b) AF_BAR2_ALIASX(a, b) #define RVU_AF_BAR2_ALIASX(a, b) AF_BAR2_ALIASX(a, b) +#define REE_AF_BAR2_ALIASX(a, b) AF_BAR2_ALIASX(a, b) =20 /* Structures definitions */ =20 diff --git a/drivers/common/octeontx2/otx2_common.c b/drivers/common/octeon= tx2/otx2_common.c index b292e999a..d23c50242 100644 --- a/drivers/common/octeontx2/otx2_common.c +++ b/drivers/common/octeontx2/otx2_common.c @@ -213,3 +213,4 @@ RTE_LOG_REGISTER(otx2_logtype_sso, pmd.event.octeontx2,= NOTICE); RTE_LOG_REGISTER(otx2_logtype_tim, pmd.event.octeontx2.timer, NO= TICE); RTE_LOG_REGISTER(otx2_logtype_dpi, pmd.raw.octeontx2.dpi, NOTICE); = RTE_LOG_REGISTER(otx2_logtype_ep, pmd.raw.octeontx2.ep, NOTICE); +RTE_LOG_REGISTER(otx2_logtype_ree, pmd.regex.octeontx2, NOTICE); diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeon= tx2/otx2_common.h index 2168cde4d..b6779f710 100644 --- a/drivers/common/octeontx2/otx2_common.h +++ b/drivers/common/octeontx2/otx2_common.h @@ -21,6 +21,7 @@ #include "hw/otx2_sso.h" #include "hw/otx2_ssow.h" #include "hw/otx2_tim.h" +#include "hw/otx2_ree.h" =20 /* Alignment */ #define OTX2_ALIGN 128 @@ -96,6 +97,7 @@ extern int otx2_logtype_tm; extern int otx2_logtype_tim;= extern int otx2_logtype_dpi; extern int otx2_logtype_ep; +extern int otx2_logtype_ree; =20 #define otx2_err(fmt, args...) \ RTE_LOG(ERR, PMD, "%s():%u " fmt "\n", \ @@ -119,6 +121,7 @@ extern int otx2_logtype_ep; #define otx2_tim_dbg(fmt, = ...) otx2_dbg(tim, fmt, ##__VA_ARGS__) #define otx2_dpi_dbg(fmt, ...) otx2= _dbg(dpi, fmt, ##__VA_ARGS__) #define otx2_sdp_dbg(fmt, ...) otx2_dbg(ep, = fmt, ##__VA_ARGS__) +#define otx2_ree_dbg(fmt, ...) otx2_dbg(ree, fmt, ##__VA_ARGS__) =20 /* PCI IDs */ #define PCI_VENDOR_ID_CAVIUM 0x177D @@ -136,6 +139,8 @@ extern int otx2_logtype_ep; #define PCI_DEVID_OCTEONTX2_EP_VF 0xB203 /* OCTEON TX2 EP mode */ #define PCI_DEVID_OCTEONTX2_RVU_SDP_PF 0xA0f6 #define PCI_DEVID_OCTEONTX2_RVU_SDP_VF 0xA0f7 +#define PCI_DEVID_OCTEONTX2_RVU_REE_PF 0xA0f4 +#define PCI_DEVID_OCTEONTX2_RVU_REE_VF 0xA0f5 =20 /* * REVID for RVU PCIe devices. diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx= 2/otx2_mbox.h index 34b1d0663..b3c32e9a4 100644 --- a/drivers/common/octeontx2/otx2_mbox.h +++ b/drivers/common/octeontx2/otx2_mbox.h @@ -199,6 +199,19 @@ M(CPT_INLINE_IPSEC_CFG, 0xA04, cpt_inline_ipsec_cfg, = \ M(CPT_RX_INLINE_LF_CFG, 0xBFE, cpt_rx_inline_lf_cfg, \ cpt_rx_inline_lf_cfg_msg, msg_rsp) \ M(CPT_GET_CAPS, 0xBFD, cpt_caps_get, msg_req, cpt_caps_rsp_msg) \ +/* REE mbox IDs (range 0xE00 - 0xFFF) */ \ +M(REE_CONFIG_LF, 0xE01, ree_config_lf, ree_lf_req_msg, \ + msg_rsp) \ +M(REE_RD_WR_REGISTER, 0xE02, ree_rd_wr_register, ree_rd_wr_reg_msg, \ + ree_rd_wr_reg_msg) \ +M(REE_RULE_DB_PROG, 0xE03, ree_rule_db_prog, \ + ree_rule_db_prog_req_msg, \ + msg_rsp) \ +M(REE_RULE_DB_LEN_GET, 0xE04, ree_rule_db_len_get, ree_req_msg, \ + ree_rule_db_len_rsp_msg) \ +M(REE_RULE_DB_GET, 0xE05, ree_rule_db_get, \ + ree_rule_db_get_req_msg, \ + ree_rule_db_get_rsp_msg) \ /* NPC mbox IDs (range 0x6000 - 0x7FFF) */ \ M(NPC_MCAM_ALLOC_ENTRY, 0x6000, npc_mcam_alloc_entry, \ npc_mcam_alloc_entry_req, \ @@ -1650,6 +1663,96 @@ struct tim_enable_rsp { uint32_t __otx2_io currentbucket; }; =20 +/* REE mailbox error codes + * Range 1001 - 1100. + */ +enum ree_af_status { + REE_AF_ERR_RULE_UNKNOWN_VALUE =3D -1001, + REE_AF_ERR_LF_NO_MORE_RESOURCES =3D -1002, + REE_AF_ERR_LF_INVALID =3D -1003, + REE_AF_ERR_ACCESS_DENIED =3D -1004, + REE_AF_ERR_RULE_DB_PARTIAL =3D -1005, + REE_AF_ERR_RULE_DB_EQ_BAD_VALUE =3D -1006, + REE_AF_ERR_RULE_DB_BLOCK_ALLOC_FAILED =3D -1007, + REE_AF_ERR_BLOCK_NOT_IMPLEMENTED =3D -1008, + REE_AF_ERR_RULE_DB_INC_OFFSET_TOO_BIG =3D -1009, + REE_AF_ERR_RULE_DB_OFFSET_TOO_BIG =3D -1010, + REE_AF_ERR_Q_IS_GRACEFUL_DIS =3D -1011, + REE_AF_ERR_Q_NOT_GRACEFUL_DIS =3D -1012, + REE_AF_ERR_RULE_DB_ALLOC_FAILED =3D -1013, + REE_AF_ERR_RULE_DB_TOO_BIG =3D -1014, + REE_AF_ERR_RULE_DB_GEQ_BAD_VALUE =3D -1015, + REE_AF_ERR_RULE_DB_LEQ_BAD_VALUE =3D -1016, + REE_AF_ERR_RULE_DB_WRONG_LENGTH =3D -1017, + REE_AF_ERR_RULE_DB_WRONG_OFFSET =3D -1018, + REE_AF_ERR_RULE_DB_BLOCK_TOO_BIG =3D -1019, + REE_AF_ERR_RULE_DB_SHOULD_FILL_REQUEST =3D -1020, + REE_AF_ERR_RULE_DBI_ALLOC_FAILED =3D -1021, + REE_AF_ERR_LF_WRONG_PRIORITY =3D -1022, + REE_AF_ERR_LF_SIZE_TOO_BIG =3D -1023, +}; + +/* REE mbox message formats */ + +struct ree_req_msg { + struct mbox_msghdr hdr; + uint32_t __otx2_io blkaddr; +}; + +struct ree_lf_req_msg { + struct mbox_msghdr hdr; + uint32_t __otx2_io blkaddr; + uint32_t __otx2_io size; + uint8_t __otx2_io lf; + uint8_t __otx2_io pri; +}; + +struct ree_rule_db_prog_req_msg { + struct mbox_msghdr hdr; +#define REE_RULE_DB_REQ_BLOCK_SIZE (MBOX_SIZE >> 1) + uint8_t __otx2_io rule_db[REE_RULE_DB_REQ_BLOCK_SIZE]; + uint32_t __otx2_io blkaddr; /* REE0 or REE1 */ + uint32_t __otx2_io total_len; /* total len of rule db */ + uint32_t __otx2_io offset; /* offset of current rule db block */ + uint16_t __otx2_io len; /* length of rule db block */ + uint8_t __otx2_io is_last; /* is this the last block */ + uint8_t __otx2_io is_incremental; /* is incremental flow */ + uint8_t __otx2_io is_dbi; /* is rule db incremental */ }; + +struct ree_rule_db_get_req_msg { + struct mbox_msghdr hdr; + uint32_t __otx2_io blkaddr; + uint32_t __otx2_io offset; /* retrieve db from this offset */ + uint8_t __otx2_io is_dbi; /* is request for rule db incremental */ }; + +struct ree_rd_wr_reg_msg { + struct mbox_msghdr hdr; + uint64_t __otx2_io reg_offset; + uint64_t __otx2_io *ret_val; + uint64_t __otx2_io val; + uint32_t __otx2_io blkaddr; + uint8_t __otx2_io is_write; +}; + +struct ree_rule_db_len_rsp_msg { + struct mbox_msghdr hdr; + uint32_t __otx2_io blkaddr; + uint32_t __otx2_io len; + uint32_t __otx2_io inc_len; +}; + +struct ree_rule_db_get_rsp_msg { + struct mbox_msghdr hdr; +#define REE_RULE_DB_RSP_BLOCK_SIZE (MBOX_DOWN_TX_SIZE - SZ_1K) + uint8_t __otx2_io rule_db[REE_RULE_DB_RSP_BLOCK_SIZE]; + uint32_t __otx2_io total_len; /* total len of rule db */ + uint32_t __otx2_io offset; /* offset of current rule db block */ + uint16_t __otx2_io len; /* length of rule db block */ + uint8_t __otx2_io is_last; /* is this the last block */ }; + __rte_internal const char *otx2_mbox_id2name(uint16_t id); int otx2_mbox_id2size(uint16_= t id); diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.m= ap b/drivers/common/octeontx2/rte_common_octeontx2_version.map index 9a9969613..d269d70d8 100644 --- a/drivers/common/octeontx2/rte_common_octeontx2_version.map +++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map @@ -38,6 +38,7 @@ INTERNAL { otx2_sso_pf_func_get; otx2_sso_pf_func_set; otx2_unregister_irq; + otx2_logtype_ree; =20 local: *; }; -- 2.28.0