Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53972/?format=api
http://patches.dpdk.org/api/patches/53972/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190601014905.45531-2-jerinj@marvell.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190601014905.45531-2-jerinj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190601014905.45531-2-jerinj@marvell.com", "date": "2019-06-01T01:48:39", "name": "[v2,01/27] common/octeontx2: add build infrastructure and HW definition", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0edff58bb6930ca16a92d285a1f154c61e906cd2", "submitter": { "id": 1188, "url": "http://patches.dpdk.org/api/people/1188/?format=api", "name": "Jerin Jacob Kollanukkaran", "email": "jerinj@marvell.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190601014905.45531-2-jerinj@marvell.com/mbox/", "series": [ { "id": 4844, "url": "http://patches.dpdk.org/api/series/4844/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4844", "date": "2019-06-01T01:48:38", "name": "OCTEON TX2 common and mempool driver", "version": 2, "mbox": "http://patches.dpdk.org/series/4844/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53972/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/53972/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5F6871B948;\n\tSat, 1 Jun 2019 03:49:21 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 98B4C1B948\n\tfor <dev@dpdk.org>; Sat, 1 Jun 2019 03:49:19 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx511kFUm001055; Fri, 31 May 2019 18:49:18 -0700", "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2sufgn82v0-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tFri, 31 May 2019 18:49:17 -0700", "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tFri, 31 May 2019 18:49:16 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Fri, 31 May 2019 18:49:16 -0700", "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n\tby maili.marvell.com (Postfix) with ESMTP id 3825E3F7040;\n\tFri, 31 May 2019 18:49:14 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=wYEbjruFVpuz0hq9eW0jNi1Wh4iphBXckrGOMCOZqsw=;\n\tb=xs8qT/e025u22AsXi1L1ajSTVVAUGCPrCqpWdbAcUkBaLx41BABx+QRRXZ1RNn24Wsi5\n\tdyERB60lapMEKwFyoNZkMUW3V9FsUWb1oIXiZZfyLJB4hWEfom4+2pu3mla6i9LHYA0Y\n\tMtglXsMMON6wBz+pYXtWU70L2g3DipF/HcRGAb6tnCW9WL52pL5/xXi92w8Ds94fmHSa\n\tmVNEkMhylfsuamVU1YkMTEHrzA9PGYJa/yWyC7yDNo6iCPZHRnt5IDLfZZ/JEYBnFAyG\n\trPU85MPlCgSXiJLjmpVuePZEiNzS6D1DyGBi5aIiR9oKMVp7dYY5fNnYPQwEU+DkyJcD\n\tIg== ", "From": "<jerinj@marvell.com>", "To": "<dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>, Jerin Jacob\n\t<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, \"Vamsi\n\tAttunuru\" <vattunuru@marvell.com>", "CC": "Pavan Nikhilesh <pbhagavatula@marvell.com>", "Date": "Sat, 1 Jun 2019 07:18:39 +0530", "Message-ID": "<20190601014905.45531-2-jerinj@marvell.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190601014905.45531-1-jerinj@marvell.com>", "References": "<20190523081339.56348-1-jerinj@marvell.com>\n\t<20190601014905.45531-1-jerinj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-01_02:, , signatures=0", "Subject": "[dpdk-dev] [PATCH v2 01/27] common/octeontx2: add build\n\tinfrastructure and HW definition", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Jerin Jacob <jerinj@marvell.com>\n\nAdd the make and meson based build infrastructure along with\nHW definition header file.\n\nThis patch adds skeleton otx2_mbox.c file to make sure\nall header files are intact, subsequent patches add content\nto otx2_mbox.c\n\nThis patch also updates CONFIG_RTE_MAX_VFIO_GROUPS\nvalue to 128 as the system can have up to 128 PFs/VFs.\nFor octeontx2 meson build target, CONFIG_RTE_MAX_VFIO_GROUPS\ndefined as 128 so no additional changes required.\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n config/defconfig_arm64-octeontx2-linuxapp-gcc | 3 +\n drivers/common/Makefile | 2 +\n drivers/common/meson.build | 2 +-\n drivers/common/octeontx2/Makefile | 32 +\n drivers/common/octeontx2/hw/otx2_nix.h | 1376 +++++++++++++++++\n drivers/common/octeontx2/hw/otx2_npa.h | 305 ++++\n drivers/common/octeontx2/hw/otx2_npc.h | 467 ++++++\n drivers/common/octeontx2/hw/otx2_rvu.h | 212 +++\n drivers/common/octeontx2/hw/otx2_sso.h | 209 +++\n drivers/common/octeontx2/hw/otx2_ssow.h | 56 +\n drivers/common/octeontx2/hw/otx2_tim.h | 34 +\n drivers/common/octeontx2/meson.build | 23 +\n drivers/common/octeontx2/otx2_common.h | 34 +\n drivers/common/octeontx2/otx2_mbox.c | 5 +\n drivers/common/octeontx2/otx2_mbox.h | 10 +\n .../rte_common_octeontx2_version.map | 4 +\n mk/rte.app.mk | 2 +\n 17 files changed, 2775 insertions(+), 1 deletion(-)\n create mode 100644 drivers/common/octeontx2/Makefile\n create mode 100644 drivers/common/octeontx2/hw/otx2_nix.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_npa.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_npc.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_rvu.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_sso.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_ssow.h\n create mode 100644 drivers/common/octeontx2/hw/otx2_tim.h\n create mode 100644 drivers/common/octeontx2/meson.build\n create mode 100644 drivers/common/octeontx2/otx2_common.h\n create mode 100644 drivers/common/octeontx2/otx2_mbox.c\n create mode 100644 drivers/common/octeontx2/otx2_mbox.h\n create mode 100644 drivers/common/octeontx2/rte_common_octeontx2_version.map", "diff": "diff --git a/config/defconfig_arm64-octeontx2-linuxapp-gcc b/config/defconfig_arm64-octeontx2-linuxapp-gcc\nindex 9eae84538..f20da2442 100644\n--- a/config/defconfig_arm64-octeontx2-linuxapp-gcc\n+++ b/config/defconfig_arm64-octeontx2-linuxapp-gcc\n@@ -16,3 +16,6 @@ CONFIG_RTE_LIBRTE_VHOST_NUMA=n\n \n # Recommend to use VFIO as co-processors needs SMMU/IOMMU\n CONFIG_RTE_EAL_IGB_UIO=n\n+\n+# Max supported NIX LFs\n+CONFIG_RTE_MAX_VFIO_GROUPS=128\ndiff --git a/drivers/common/Makefile b/drivers/common/Makefile\nindex 87b8a59a4..e7abe210e 100644\n--- a/drivers/common/Makefile\n+++ b/drivers/common/Makefile\n@@ -23,4 +23,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_COMMON_DPAAX),y)\n DIRS-y += dpaax\n endif\n \n+DIRS-y += octeontx2\n+\n include $(RTE_SDK)/mk/rte.subdir.mk\ndiff --git a/drivers/common/meson.build b/drivers/common/meson.build\nindex a50934108..7b5e566f3 100644\n--- a/drivers/common/meson.build\n+++ b/drivers/common/meson.build\n@@ -2,6 +2,6 @@\n # Copyright(c) 2018 Cavium, Inc\n \n std_deps = ['eal']\n-drivers = ['cpt', 'dpaax', 'mvep', 'octeontx', 'qat']\n+drivers = ['cpt', 'dpaax', 'mvep', 'octeontx', 'octeontx2', 'qat']\n config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'\n driver_name_fmt = 'rte_common_@0@'\ndiff --git a/drivers/common/octeontx2/Makefile b/drivers/common/octeontx2/Makefile\nnew file mode 100644\nindex 000000000..e5737532a\n--- /dev/null\n+++ b/drivers/common/octeontx2/Makefile\n@@ -0,0 +1,32 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(C) 2019 Marvell International Ltd.\n+#\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+#\n+# library name\n+#\n+LIB = librte_common_octeontx2.a\n+\n+CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -I$(RTE_SDK)/drivers/common/octeontx2\n+\n+ifneq ($(CONFIG_RTE_ARCH_64),y)\n+CFLAGS += -Wno-int-to-pointer-cast\n+CFLAGS += -Wno-pointer-to-int-cast\n+endif\n+\n+EXPORT_MAP := rte_common_octeontx2_version.map\n+\n+LIBABIVER := 1\n+\n+#\n+# all source are stored in SRCS-y\n+#\n+SRCS-y += otx2_mbox.c\n+\n+LDLIBS += -lrte_eal\n+LDLIBS += -lrte_ethdev\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/common/octeontx2/hw/otx2_nix.h b/drivers/common/octeontx2/hw/otx2_nix.h\nnew file mode 100644\nindex 000000000..e7d32a6b3\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_nix.h\n@@ -0,0 +1,1376 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_NIX_HW_H__\n+#define __OTX2_NIX_HW_H__\n+\n+/* Register offsets */\n+\n+#define NIX_AF_CFG (0x0ull)\n+#define NIX_AF_STATUS (0x10ull)\n+#define NIX_AF_NDC_CFG (0x18ull)\n+#define NIX_AF_CONST (0x20ull)\n+#define NIX_AF_CONST1 (0x28ull)\n+#define NIX_AF_CONST2 (0x30ull)\n+#define NIX_AF_CONST3 (0x38ull)\n+#define NIX_AF_SQ_CONST (0x40ull)\n+#define NIX_AF_CQ_CONST (0x48ull)\n+#define NIX_AF_RQ_CONST (0x50ull)\n+#define NIX_AF_PSE_CONST (0x60ull)\n+#define NIX_AF_TL1_CONST (0x70ull)\n+#define NIX_AF_TL2_CONST (0x78ull)\n+#define NIX_AF_TL3_CONST (0x80ull)\n+#define NIX_AF_TL4_CONST (0x88ull)\n+#define NIX_AF_MDQ_CONST (0x90ull)\n+#define NIX_AF_MC_MIRROR_CONST (0x98ull)\n+#define NIX_AF_LSO_CFG (0xa8ull)\n+#define NIX_AF_BLK_RST (0xb0ull)\n+#define NIX_AF_TX_TSTMP_CFG (0xc0ull)\n+#define NIX_AF_RX_CFG (0xd0ull)\n+#define NIX_AF_AVG_DELAY (0xe0ull)\n+#define NIX_AF_CINT_DELAY (0xf0ull)\n+#define NIX_AF_RX_MCAST_BASE (0x100ull)\n+#define NIX_AF_RX_MCAST_CFG (0x110ull)\n+#define NIX_AF_RX_MCAST_BUF_BASE (0x120ull)\n+#define NIX_AF_RX_MCAST_BUF_CFG (0x130ull)\n+#define NIX_AF_RX_MIRROR_BUF_BASE (0x140ull)\n+#define NIX_AF_RX_MIRROR_BUF_CFG (0x148ull)\n+#define NIX_AF_LF_RST (0x150ull)\n+#define NIX_AF_GEN_INT (0x160ull)\n+#define NIX_AF_GEN_INT_W1S (0x168ull)\n+#define NIX_AF_GEN_INT_ENA_W1S (0x170ull)\n+#define NIX_AF_GEN_INT_ENA_W1C (0x178ull)\n+#define NIX_AF_ERR_INT (0x180ull)\n+#define NIX_AF_ERR_INT_W1S (0x188ull)\n+#define NIX_AF_ERR_INT_ENA_W1S (0x190ull)\n+#define NIX_AF_ERR_INT_ENA_W1C (0x198ull)\n+#define NIX_AF_RAS (0x1a0ull)\n+#define NIX_AF_RAS_W1S (0x1a8ull)\n+#define NIX_AF_RAS_ENA_W1S (0x1b0ull)\n+#define NIX_AF_RAS_ENA_W1C (0x1b8ull)\n+#define NIX_AF_RVU_INT (0x1c0ull)\n+#define NIX_AF_RVU_INT_W1S (0x1c8ull)\n+#define NIX_AF_RVU_INT_ENA_W1S (0x1d0ull)\n+#define NIX_AF_RVU_INT_ENA_W1C (0x1d8ull)\n+#define NIX_AF_TCP_TIMER (0x1e0ull)\n+#define NIX_AF_RX_DEF_OL2 (0x200ull)\n+#define NIX_AF_RX_DEF_OIP4 (0x210ull)\n+#define NIX_AF_RX_DEF_IIP4 (0x220ull)\n+#define NIX_AF_RX_DEF_OIP6 (0x230ull)\n+#define NIX_AF_RX_DEF_IIP6 (0x240ull)\n+#define NIX_AF_RX_DEF_OTCP (0x250ull)\n+#define NIX_AF_RX_DEF_ITCP (0x260ull)\n+#define NIX_AF_RX_DEF_OUDP (0x270ull)\n+#define NIX_AF_RX_DEF_IUDP (0x280ull)\n+#define NIX_AF_RX_DEF_OSCTP (0x290ull)\n+#define NIX_AF_RX_DEF_ISCTP (0x2a0ull)\n+#define NIX_AF_RX_DEF_IPSECX(a) (0x2b0ull | (uint64_t)(a) << 3)\n+#define NIX_AF_RX_IPSEC_GEN_CFG (0x300ull)\n+#define NIX_AF_RX_CPTX_INST_QSEL(a) (0x320ull | (uint64_t)(a) << 3)\n+#define NIX_AF_RX_CPTX_CREDIT(a) (0x360ull | (uint64_t)(a) << 3)\n+#define NIX_AF_NDC_RX_SYNC (0x3e0ull)\n+#define NIX_AF_NDC_TX_SYNC (0x3f0ull)\n+#define NIX_AF_AQ_CFG (0x400ull)\n+#define NIX_AF_AQ_BASE (0x410ull)\n+#define NIX_AF_AQ_STATUS (0x420ull)\n+#define NIX_AF_AQ_DOOR (0x430ull)\n+#define NIX_AF_AQ_DONE_WAIT (0x440ull)\n+#define NIX_AF_AQ_DONE (0x450ull)\n+#define NIX_AF_AQ_DONE_ACK (0x460ull)\n+#define NIX_AF_AQ_DONE_TIMER (0x470ull)\n+#define NIX_AF_AQ_DONE_ENA_W1S (0x490ull)\n+#define NIX_AF_AQ_DONE_ENA_W1C (0x498ull)\n+#define NIX_AF_RX_LINKX_CFG(a) (0x540ull | (uint64_t)(a) << 16)\n+#define NIX_AF_RX_SW_SYNC (0x550ull)\n+#define NIX_AF_RX_LINKX_WRR_CFG(a) (0x560ull | (uint64_t)(a) << 16)\n+#define NIX_AF_EXPR_TX_FIFO_STATUS (0x640ull)\n+#define NIX_AF_NORM_TX_FIFO_STATUS (0x648ull)\n+#define NIX_AF_SDP_TX_FIFO_STATUS (0x650ull)\n+#define NIX_AF_TX_NPC_CAPTURE_CONFIG (0x660ull)\n+#define NIX_AF_TX_NPC_CAPTURE_INFO (0x668ull)\n+#define NIX_AF_TX_NPC_CAPTURE_RESPX(a) (0x680ull | (uint64_t)(a) << 3)\n+#define NIX_AF_SEB_ACTIVE_CYCLES_PCX(a) (0x6c0ull | (uint64_t)(a) << 3)\n+#define NIX_AF_SMQX_CFG(a) (0x700ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SMQX_HEAD(a) (0x710ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SMQX_TAIL(a) (0x720ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SMQX_STATUS(a) (0x730ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SMQX_NXT_HEAD(a) (0x740ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SQM_ACTIVE_CYCLES_PC (0x770ull)\n+#define NIX_AF_PSE_CHANNEL_LEVEL (0x800ull)\n+#define NIX_AF_PSE_SHAPER_CFG (0x810ull)\n+#define NIX_AF_PSE_ACTIVE_CYCLES_PC (0x8c0ull)\n+#define NIX_AF_MARK_FORMATX_CTL(a) (0x900ull | (uint64_t)(a) << 18)\n+#define NIX_AF_TX_LINKX_NORM_CREDIT(a) (0xa00ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TX_LINKX_EXPR_CREDIT(a) (0xa10ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TX_LINKX_SW_XOFF(a) (0xa20ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TX_LINKX_HW_XOFF(a) (0xa30ull | (uint64_t)(a) << 16)\n+#define NIX_AF_SDP_LINK_CREDIT (0xa40ull)\n+#define NIX_AF_SDP_SW_XOFFX(a) (0xa60ull | (uint64_t)(a) << 3)\n+#define NIX_AF_SDP_HW_XOFFX(a) (0xac0ull | (uint64_t)(a) << 3)\n+#define NIX_AF_TL4X_BP_STATUS(a) (0xb00ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SDP_LINK_CFG(a) (0xb10ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_SCHEDULE(a) (0xc00ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_SHAPE(a) (0xc10ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_CIR(a) (0xc20ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_SHAPE_STATE(a) (0xc50ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_SW_XOFF(a) (0xc70ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_TOPOLOGY(a) (0xc80ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_MD_DEBUG0(a) (0xcc0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_MD_DEBUG1(a) (0xcc8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_MD_DEBUG2(a) (0xcd0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_MD_DEBUG3(a) (0xcd8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_DROPPED_PACKETS(a) (0xd20ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_DROPPED_BYTES(a) (0xd30ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_RED_PACKETS(a) (0xd40ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_RED_BYTES(a) (0xd50ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_YELLOW_PACKETS(a) (0xd60ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_YELLOW_BYTES(a) (0xd70ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_GREEN_PACKETS(a) (0xd80ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL1X_GREEN_BYTES(a) (0xd90ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_SCHEDULE(a) (0xe00ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_SHAPE(a) (0xe10ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_CIR(a) (0xe20ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_PIR(a) (0xe30ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_SCHED_STATE(a) (0xe40ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_SHAPE_STATE(a) (0xe50ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_SW_XOFF(a) (0xe70ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_TOPOLOGY(a) (0xe80ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_PARENT(a) (0xe88ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_MD_DEBUG0(a) (0xec0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_MD_DEBUG1(a) (0xec8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_MD_DEBUG2(a) (0xed0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL2X_MD_DEBUG3(a) (0xed8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_SCHEDULE(a) \\\n+\t(0x1000ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_SHAPE(a) \\\n+\t(0x1010ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_CIR(a) \\\n+\t(0x1020ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_PIR(a) \\\n+\t(0x1030ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_SCHED_STATE(a) \\\n+\t(0x1040ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_SHAPE_STATE(a) \\\n+\t(0x1050ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_SW_XOFF(a) \\\n+\t(0x1070ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_TOPOLOGY(a) \\\n+\t(0x1080ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_PARENT(a) \\\n+\t(0x1088ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_MD_DEBUG0(a) \\\n+\t(0x10c0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_MD_DEBUG1(a) \\\n+\t(0x10c8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_MD_DEBUG2(a) \\\n+\t(0x10d0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3X_MD_DEBUG3(a) \\\n+\t(0x10d8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SCHEDULE(a) \\\n+\t(0x1200ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SHAPE(a) \\\n+\t(0x1210ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_CIR(a) \\\n+\t(0x1220ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_PIR(a) \\\n+\t(0x1230ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SCHED_STATE(a) \\\n+\t(0x1240ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SHAPE_STATE(a) \\\n+\t(0x1250ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_SW_XOFF(a) \\\n+\t(0x1270ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_TOPOLOGY(a) \\\n+\t(0x1280ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_PARENT(a) \\\n+\t(0x1288ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_MD_DEBUG0(a) \\\n+\t(0x12c0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_MD_DEBUG1(a) \\\n+\t(0x12c8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_MD_DEBUG2(a) \\\n+\t(0x12d0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL4X_MD_DEBUG3(a) \\\n+\t(0x12d8ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_SCHEDULE(a) \\\n+\t(0x1400ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_SHAPE(a) \\\n+\t(0x1410ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_CIR(a) \\\n+\t(0x1420ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_PIR(a) \\\n+\t(0x1430ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_SCHED_STATE(a) \\\n+\t(0x1440ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_SHAPE_STATE(a) \\\n+\t(0x1450ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_SW_XOFF(a) \\\n+\t(0x1470ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_PARENT(a) \\\n+\t(0x1480ull | (uint64_t)(a) << 16)\n+#define NIX_AF_MDQX_MD_DEBUG(a) \\\n+\t(0x14c0ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3_TL2X_CFG(a) \\\n+\t(0x1600ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3_TL2X_BP_STATUS(a) \\\n+\t(0x1610ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) \\\n+\t(0x1700ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+#define NIX_AF_RX_FLOW_KEY_ALGX_FIELDX(a, b) \\\n+\t(0x1800ull | (uint64_t)(a) << 18 | (uint64_t)(b) << 3)\n+#define NIX_AF_TX_MCASTX(a) \\\n+\t(0x1900ull | (uint64_t)(a) << 15)\n+#define NIX_AF_TX_VTAG_DEFX_CTL(a) \\\n+\t(0x1a00ull | (uint64_t)(a) << 16)\n+#define NIX_AF_TX_VTAG_DEFX_DATA(a) \\\n+\t(0x1a10ull | (uint64_t)(a) << 16)\n+#define NIX_AF_RX_BPIDX_STATUS(a) \\\n+\t(0x1a20ull | (uint64_t)(a) << 17)\n+#define NIX_AF_RX_CHANX_CFG(a) \\\n+\t(0x1a30ull | (uint64_t)(a) << 15)\n+#define NIX_AF_CINT_TIMERX(a) \\\n+\t(0x1a40ull | (uint64_t)(a) << 18)\n+#define NIX_AF_LSO_FORMATX_FIELDX(a, b) \\\n+\t(0x1b00ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+#define NIX_AF_LFX_CFG(a) \\\n+\t(0x4000ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_SQS_CFG(a) \\\n+\t(0x4020ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_TX_CFG2(a) \\\n+\t(0x4028ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_SQS_BASE(a) \\\n+\t(0x4030ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RQS_CFG(a) \\\n+\t(0x4040ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RQS_BASE(a) \\\n+\t(0x4050ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_CQS_CFG(a) \\\n+\t(0x4060ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_CQS_BASE(a) \\\n+\t(0x4070ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_TX_CFG(a) \\\n+\t(0x4080ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_TX_PARSE_CFG(a) \\\n+\t(0x4090ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_CFG(a) \\\n+\t(0x40a0ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RSS_CFG(a) \\\n+\t(0x40c0ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RSS_BASE(a) \\\n+\t(0x40d0ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_QINTS_CFG(a) \\\n+\t(0x4100ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_QINTS_BASE(a) \\\n+\t(0x4110ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_CINTS_CFG(a) \\\n+\t(0x4120ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_CINTS_BASE(a) \\\n+\t(0x4130ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_IPSEC_CFG0(a) \\\n+\t(0x4140ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_IPSEC_CFG1(a) \\\n+\t(0x4148ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_IPSEC_DYNO_CFG(a) \\\n+\t(0x4150ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_IPSEC_DYNO_BASE(a) \\\n+\t(0x4158ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_IPSEC_SA_BASE(a) \\\n+\t(0x4170ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_TX_STATUS(a) \\\n+\t(0x4180ull | (uint64_t)(a) << 17)\n+#define NIX_AF_LFX_RX_VTAG_TYPEX(a, b) \\\n+\t(0x4200ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3)\n+#define NIX_AF_LFX_LOCKX(a, b) \\\n+\t(0x4300ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3)\n+#define NIX_AF_LFX_TX_STATX(a, b) \\\n+\t(0x4400ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3)\n+#define NIX_AF_LFX_RX_STATX(a, b) \\\n+\t(0x4500ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3)\n+#define NIX_AF_LFX_RSS_GRPX(a, b) \\\n+\t(0x4600ull | (uint64_t)(a) << 17 | (uint64_t)(b) << 3)\n+#define NIX_AF_RX_NPC_MC_RCV (0x4700ull)\n+#define NIX_AF_RX_NPC_MC_DROP (0x4710ull)\n+#define NIX_AF_RX_NPC_MIRROR_RCV (0x4720ull)\n+#define NIX_AF_RX_NPC_MIRROR_DROP (0x4730ull)\n+#define NIX_AF_RX_ACTIVE_CYCLES_PCX(a) \\\n+\t(0x4800ull | (uint64_t)(a) << 16)\n+#define NIX_PRIV_AF_INT_CFG (0x8000000ull)\n+#define NIX_PRIV_LFX_CFG(a) \\\n+\t(0x8000010ull | (uint64_t)(a) << 8)\n+#define NIX_PRIV_LFX_INT_CFG(a) \\\n+\t(0x8000020ull | (uint64_t)(a) << 8)\n+#define NIX_AF_RVU_LF_CFG_DEBUG (0x8000030ull)\n+\n+#define NIX_LF_RX_SECRETX(a) (0x0ull | (uint64_t)(a) << 3)\n+#define NIX_LF_CFG (0x100ull)\n+#define NIX_LF_GINT (0x200ull)\n+#define NIX_LF_GINT_W1S (0x208ull)\n+#define NIX_LF_GINT_ENA_W1C (0x210ull)\n+#define NIX_LF_GINT_ENA_W1S (0x218ull)\n+#define NIX_LF_ERR_INT (0x220ull)\n+#define NIX_LF_ERR_INT_W1S (0x228ull)\n+#define NIX_LF_ERR_INT_ENA_W1C (0x230ull)\n+#define NIX_LF_ERR_INT_ENA_W1S (0x238ull)\n+#define NIX_LF_RAS (0x240ull)\n+#define NIX_LF_RAS_W1S (0x248ull)\n+#define NIX_LF_RAS_ENA_W1C (0x250ull)\n+#define NIX_LF_RAS_ENA_W1S (0x258ull)\n+#define NIX_LF_SQ_OP_ERR_DBG (0x260ull)\n+#define NIX_LF_MNQ_ERR_DBG (0x270ull)\n+#define NIX_LF_SEND_ERR_DBG (0x280ull)\n+#define NIX_LF_TX_STATX(a) (0x300ull | (uint64_t)(a) << 3)\n+#define NIX_LF_RX_STATX(a) (0x400ull | (uint64_t)(a) << 3)\n+#define NIX_LF_OP_SENDX(a) (0x800ull | (uint64_t)(a) << 3)\n+#define NIX_LF_RQ_OP_INT (0x900ull)\n+#define NIX_LF_RQ_OP_OCTS (0x910ull)\n+#define NIX_LF_RQ_OP_PKTS (0x920ull)\n+#define NIX_LF_RQ_OP_DROP_OCTS (0x930ull)\n+#define NIX_LF_RQ_OP_DROP_PKTS (0x940ull)\n+#define NIX_LF_RQ_OP_RE_PKTS (0x950ull)\n+#define NIX_LF_OP_IPSEC_DYNO_CNT (0x980ull)\n+#define NIX_LF_SQ_OP_INT (0xa00ull)\n+#define NIX_LF_SQ_OP_OCTS (0xa10ull)\n+#define NIX_LF_SQ_OP_PKTS (0xa20ull)\n+#define NIX_LF_SQ_OP_STATUS (0xa30ull)\n+#define NIX_LF_SQ_OP_DROP_OCTS (0xa40ull)\n+#define NIX_LF_SQ_OP_DROP_PKTS (0xa50ull)\n+#define NIX_LF_CQ_OP_INT (0xb00ull)\n+#define NIX_LF_CQ_OP_DOOR (0xb30ull)\n+#define NIX_LF_CQ_OP_STATUS (0xb40ull)\n+#define NIX_LF_QINTX_CNT(a) (0xc00ull | (uint64_t)(a) << 12)\n+#define NIX_LF_QINTX_INT(a) (0xc10ull | (uint64_t)(a) << 12)\n+#define NIX_LF_QINTX_ENA_W1S(a) (0xc20ull | (uint64_t)(a) << 12)\n+#define NIX_LF_QINTX_ENA_W1C(a) (0xc30ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_CNT(a) (0xd00ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_WAIT(a) (0xd10ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_INT(a) (0xd20ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_INT_W1S(a) (0xd30ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_ENA_W1S(a) (0xd40ull | (uint64_t)(a) << 12)\n+#define NIX_LF_CINTX_ENA_W1C(a) (0xd50ull | (uint64_t)(a) << 12)\n+\n+\n+/* Enum offsets */\n+\n+#define NIX_TX_VTAGOP_NOP (0x0ull)\n+#define NIX_TX_VTAGOP_INSERT (0x1ull)\n+#define NIX_TX_VTAGOP_REPLACE (0x2ull)\n+\n+#define NIX_TX_ACTIONOP_DROP (0x0ull)\n+#define NIX_TX_ACTIONOP_UCAST_DEFAULT (0x1ull)\n+#define NIX_TX_ACTIONOP_UCAST_CHAN (0x2ull)\n+#define NIX_TX_ACTIONOP_MCAST (0x3ull)\n+#define NIX_TX_ACTIONOP_DROP_VIOL (0x5ull)\n+\n+#define NIX_INTF_RX (0x0ull)\n+#define NIX_INTF_TX (0x1ull)\n+\n+#define NIX_TXLAYER_OL3 (0x0ull)\n+#define NIX_TXLAYER_OL4 (0x1ull)\n+#define NIX_TXLAYER_IL3 (0x2ull)\n+#define NIX_TXLAYER_IL4 (0x3ull)\n+\n+#define NIX_SUBDC_NOP (0x0ull)\n+#define NIX_SUBDC_EXT (0x1ull)\n+#define NIX_SUBDC_CRC (0x2ull)\n+#define NIX_SUBDC_IMM (0x3ull)\n+#define NIX_SUBDC_SG (0x4ull)\n+#define NIX_SUBDC_MEM (0x5ull)\n+#define NIX_SUBDC_JUMP (0x6ull)\n+#define NIX_SUBDC_WORK (0x7ull)\n+#define NIX_SUBDC_SOD (0xfull)\n+\n+#define NIX_STYPE_STF (0x0ull)\n+#define NIX_STYPE_STT (0x1ull)\n+#define NIX_STYPE_STP (0x2ull)\n+\n+#define NIX_STAT_LF_TX_TX_UCAST (0x0ull)\n+#define NIX_STAT_LF_TX_TX_BCAST (0x1ull)\n+#define NIX_STAT_LF_TX_TX_MCAST (0x2ull)\n+#define NIX_STAT_LF_TX_TX_DROP (0x3ull)\n+#define NIX_STAT_LF_TX_TX_OCTS (0x4ull)\n+\n+#define NIX_STAT_LF_RX_RX_OCTS (0x0ull)\n+#define NIX_STAT_LF_RX_RX_UCAST (0x1ull)\n+#define NIX_STAT_LF_RX_RX_BCAST (0x2ull)\n+#define NIX_STAT_LF_RX_RX_MCAST (0x3ull)\n+#define NIX_STAT_LF_RX_RX_DROP (0x4ull)\n+#define NIX_STAT_LF_RX_RX_DROP_OCTS (0x5ull)\n+#define NIX_STAT_LF_RX_RX_FCS (0x6ull)\n+#define NIX_STAT_LF_RX_RX_ERR (0x7ull)\n+#define NIX_STAT_LF_RX_RX_DRP_BCAST (0x8ull)\n+#define NIX_STAT_LF_RX_RX_DRP_MCAST (0x9ull)\n+#define NIX_STAT_LF_RX_RX_DRP_L3BCAST (0xaull)\n+#define NIX_STAT_LF_RX_RX_DRP_L3MCAST (0xbull)\n+\n+#define NIX_SQOPERR_SQ_OOR (0x0ull)\n+#define NIX_SQOPERR_SQ_CTX_FAULT (0x1ull)\n+#define NIX_SQOPERR_SQ_CTX_POISON (0x2ull)\n+#define NIX_SQOPERR_SQ_DISABLED (0x3ull)\n+#define NIX_SQOPERR_MAX_SQE_SIZE_ERR (0x4ull)\n+#define NIX_SQOPERR_SQE_OFLOW (0x5ull)\n+#define NIX_SQOPERR_SQB_NULL (0x6ull)\n+#define NIX_SQOPERR_SQB_FAULT (0x7ull)\n+\n+#define NIX_XQESZ_W64 (0x0ull)\n+#define NIX_XQESZ_W16 (0x1ull)\n+\n+#define NIX_VTAGSIZE_T4 (0x0ull)\n+#define NIX_VTAGSIZE_T8 (0x1ull)\n+\n+#define NIX_RX_ACTIONOP_DROP (0x0ull)\n+#define NIX_RX_ACTIONOP_UCAST (0x1ull)\n+#define NIX_RX_ACTIONOP_UCAST_IPSEC (0x2ull)\n+#define NIX_RX_ACTIONOP_MCAST (0x3ull)\n+#define NIX_RX_ACTIONOP_RSS (0x4ull)\n+#define NIX_RX_ACTIONOP_PF_FUNC_DROP (0x5ull)\n+#define NIX_RX_ACTIONOP_MIRROR (0x6ull)\n+\n+#define NIX_RX_VTAGACTION_VTAG0_RELPTR (0x0ull)\n+#define NIX_RX_VTAGACTION_VTAG1_RELPTR (0x4ull)\n+#define NIX_RX_VTAGACTION_VTAG_VALID (0x1ull)\n+\n+#define NIX_RQINT_DROP (0x0ull)\n+#define NIX_RQINT_RED (0x1ull)\n+#define NIX_RQINT_R2 (0x2ull)\n+#define NIX_RQINT_R3 (0x3ull)\n+#define NIX_RQINT_R4 (0x4ull)\n+#define NIX_RQINT_R5 (0x5ull)\n+#define NIX_RQINT_R6 (0x6ull)\n+#define NIX_RQINT_R7 (0x7ull)\n+\n+#define NIX_MAXSQESZ_W16 (0x0ull)\n+#define NIX_MAXSQESZ_W8 (0x1ull)\n+\n+#define NIX_LSOALG_NOP (0x0ull)\n+#define NIX_LSOALG_ADD_SEGNUM (0x1ull)\n+#define NIX_LSOALG_ADD_PAYLEN (0x2ull)\n+#define NIX_LSOALG_ADD_OFFSET (0x3ull)\n+#define NIX_LSOALG_TCP_FLAGS (0x4ull)\n+\n+#define NIX_MNQERR_SQ_CTX_FAULT (0x0ull)\n+#define NIX_MNQERR_SQ_CTX_POISON (0x1ull)\n+#define NIX_MNQERR_SQB_FAULT (0x2ull)\n+#define NIX_MNQERR_SQB_POISON (0x3ull)\n+#define NIX_MNQERR_TOTAL_ERR (0x4ull)\n+#define NIX_MNQERR_LSO_ERR (0x5ull)\n+#define NIX_MNQERR_CQ_QUERY_ERR (0x6ull)\n+#define NIX_MNQERR_MAX_SQE_SIZE_ERR (0x7ull)\n+#define NIX_MNQERR_MAXLEN_ERR (0x8ull)\n+#define NIX_MNQERR_SQE_SIZEM1_ZERO (0x9ull)\n+\n+#define NIX_MDTYPE_RSVD (0x0ull)\n+#define NIX_MDTYPE_FLUSH (0x1ull)\n+#define NIX_MDTYPE_PMD (0x2ull)\n+\n+#define NIX_NDC_TX_PORT_LMT (0x0ull)\n+#define NIX_NDC_TX_PORT_ENQ (0x1ull)\n+#define NIX_NDC_TX_PORT_MNQ (0x2ull)\n+#define NIX_NDC_TX_PORT_DEQ (0x3ull)\n+#define NIX_NDC_TX_PORT_DMA (0x4ull)\n+#define NIX_NDC_TX_PORT_XQE (0x5ull)\n+\n+#define NIX_NDC_RX_PORT_AQ (0x0ull)\n+#define NIX_NDC_RX_PORT_CQ (0x1ull)\n+#define NIX_NDC_RX_PORT_CINT (0x2ull)\n+#define NIX_NDC_RX_PORT_MC (0x3ull)\n+#define NIX_NDC_RX_PORT_PKT (0x4ull)\n+#define NIX_NDC_RX_PORT_RQ (0x5ull)\n+\n+#define NIX_RE_OPCODE_RE_NONE (0x0ull)\n+#define NIX_RE_OPCODE_RE_PARTIAL (0x1ull)\n+#define NIX_RE_OPCODE_RE_JABBER (0x2ull)\n+#define NIX_RE_OPCODE_RE_FCS (0x7ull)\n+#define NIX_RE_OPCODE_RE_FCS_RCV (0x8ull)\n+#define NIX_RE_OPCODE_RE_TERMINATE (0x9ull)\n+#define NIX_RE_OPCODE_RE_RX_CTL (0xbull)\n+#define NIX_RE_OPCODE_RE_SKIP (0xcull)\n+#define NIX_RE_OPCODE_RE_DMAPKT (0xfull)\n+#define NIX_RE_OPCODE_UNDERSIZE (0x10ull)\n+#define NIX_RE_OPCODE_OVERSIZE (0x11ull)\n+#define NIX_RE_OPCODE_OL2_LENMISM (0x12ull)\n+\n+#define NIX_REDALG_STD (0x0ull)\n+#define NIX_REDALG_SEND (0x1ull)\n+#define NIX_REDALG_STALL (0x2ull)\n+#define NIX_REDALG_DISCARD (0x3ull)\n+\n+#define NIX_RX_MCOP_RQ (0x0ull)\n+#define NIX_RX_MCOP_RSS (0x1ull)\n+\n+#define NIX_RX_PERRCODE_NPC_RESULT_ERR (0x2ull)\n+#define NIX_RX_PERRCODE_MCAST_FAULT (0x4ull)\n+#define NIX_RX_PERRCODE_MIRROR_FAULT (0x5ull)\n+#define NIX_RX_PERRCODE_MCAST_POISON (0x6ull)\n+#define NIX_RX_PERRCODE_MIRROR_POISON (0x7ull)\n+#define NIX_RX_PERRCODE_DATA_FAULT (0x8ull)\n+#define NIX_RX_PERRCODE_MEMOUT (0x9ull)\n+#define NIX_RX_PERRCODE_BUFS_OFLOW (0xaull)\n+#define NIX_RX_PERRCODE_OL3_LEN (0x10ull)\n+#define NIX_RX_PERRCODE_OL4_LEN (0x11ull)\n+#define NIX_RX_PERRCODE_OL4_CHK (0x12ull)\n+#define NIX_RX_PERRCODE_OL4_PORT (0x13ull)\n+#define NIX_RX_PERRCODE_IL3_LEN (0x20ull)\n+#define NIX_RX_PERRCODE_IL4_LEN (0x21ull)\n+#define NIX_RX_PERRCODE_IL4_CHK (0x22ull)\n+#define NIX_RX_PERRCODE_IL4_PORT (0x23ull)\n+\n+#define NIX_SENDCRCALG_CRC32 (0x0ull)\n+#define NIX_SENDCRCALG_CRC32C (0x1ull)\n+#define NIX_SENDCRCALG_ONES16 (0x2ull)\n+\n+#define NIX_SENDL3TYPE_NONE (0x0ull)\n+#define NIX_SENDL3TYPE_IP4 (0x2ull)\n+#define NIX_SENDL3TYPE_IP4_CKSUM (0x3ull)\n+#define NIX_SENDL3TYPE_IP6 (0x4ull)\n+\n+#define NIX_SENDL4TYPE_NONE (0x0ull)\n+#define NIX_SENDL4TYPE_TCP_CKSUM (0x1ull)\n+#define NIX_SENDL4TYPE_SCTP_CKSUM (0x2ull)\n+#define NIX_SENDL4TYPE_UDP_CKSUM (0x3ull)\n+\n+#define NIX_SENDLDTYPE_LDD (0x0ull)\n+#define NIX_SENDLDTYPE_LDT (0x1ull)\n+#define NIX_SENDLDTYPE_LDWB (0x2ull)\n+\n+#define NIX_SENDMEMALG_SET (0x0ull)\n+#define NIX_SENDMEMALG_SETTSTMP (0x1ull)\n+#define NIX_SENDMEMALG_SETRSLT (0x2ull)\n+#define NIX_SENDMEMALG_ADD (0x8ull)\n+#define NIX_SENDMEMALG_SUB (0x9ull)\n+#define NIX_SENDMEMALG_ADDLEN (0xaull)\n+#define NIX_SENDMEMALG_SUBLEN (0xbull)\n+#define NIX_SENDMEMALG_ADDMBUF (0xcull)\n+#define NIX_SENDMEMALG_SUBMBUF (0xdull)\n+\n+#define NIX_SENDMEMDSZ_B64 (0x0ull)\n+#define NIX_SENDMEMDSZ_B32 (0x1ull)\n+#define NIX_SENDMEMDSZ_B16 (0x2ull)\n+#define NIX_SENDMEMDSZ_B8 (0x3ull)\n+\n+#define NIX_SEND_STATUS_GOOD (0x0ull)\n+#define NIX_SEND_STATUS_SQ_CTX_FAULT (0x1ull)\n+#define NIX_SEND_STATUS_SQ_CTX_POISON (0x2ull)\n+#define NIX_SEND_STATUS_SQB_FAULT (0x3ull)\n+#define NIX_SEND_STATUS_SQB_POISON (0x4ull)\n+#define NIX_SEND_STATUS_SEND_HDR_ERR (0x5ull)\n+#define NIX_SEND_STATUS_SEND_EXT_ERR (0x6ull)\n+#define NIX_SEND_STATUS_JUMP_FAULT (0x7ull)\n+#define NIX_SEND_STATUS_JUMP_POISON (0x8ull)\n+#define NIX_SEND_STATUS_SEND_CRC_ERR (0x10ull)\n+#define NIX_SEND_STATUS_SEND_IMM_ERR (0x11ull)\n+#define NIX_SEND_STATUS_SEND_SG_ERR (0x12ull)\n+#define NIX_SEND_STATUS_SEND_MEM_ERR (0x13ull)\n+#define NIX_SEND_STATUS_INVALID_SUBDC (0x14ull)\n+#define NIX_SEND_STATUS_SUBDC_ORDER_ERR (0x15ull)\n+#define NIX_SEND_STATUS_DATA_FAULT (0x16ull)\n+#define NIX_SEND_STATUS_DATA_POISON (0x17ull)\n+#define NIX_SEND_STATUS_NPC_DROP_ACTION (0x20ull)\n+#define NIX_SEND_STATUS_LOCK_VIOL (0x21ull)\n+#define NIX_SEND_STATUS_NPC_UCAST_CHAN_ERR (0x22ull)\n+#define NIX_SEND_STATUS_NPC_MCAST_CHAN_ERR (0x23ull)\n+#define NIX_SEND_STATUS_NPC_MCAST_ABORT (0x24ull)\n+#define NIX_SEND_STATUS_NPC_VTAG_PTR_ERR (0x25ull)\n+#define NIX_SEND_STATUS_NPC_VTAG_SIZE_ERR (0x26ull)\n+#define NIX_SEND_STATUS_SEND_MEM_FAULT (0x27ull)\n+\n+#define NIX_SQINT_LMT_ERR (0x0ull)\n+#define NIX_SQINT_MNQ_ERR (0x1ull)\n+#define NIX_SQINT_SEND_ERR (0x2ull)\n+#define NIX_SQINT_SQB_ALLOC_FAIL (0x3ull)\n+\n+#define NIX_XQE_TYPE_INVALID (0x0ull)\n+#define NIX_XQE_TYPE_RX (0x1ull)\n+#define NIX_XQE_TYPE_RX_IPSECS (0x2ull)\n+#define NIX_XQE_TYPE_RX_IPSECH (0x3ull)\n+#define NIX_XQE_TYPE_RX_IPSECD (0x4ull)\n+#define NIX_XQE_TYPE_SEND (0x8ull)\n+\n+#define NIX_AQ_COMP_NOTDONE (0x0ull)\n+#define NIX_AQ_COMP_GOOD (0x1ull)\n+#define NIX_AQ_COMP_SWERR (0x2ull)\n+#define NIX_AQ_COMP_CTX_POISON (0x3ull)\n+#define NIX_AQ_COMP_CTX_FAULT (0x4ull)\n+#define NIX_AQ_COMP_LOCKERR (0x5ull)\n+#define NIX_AQ_COMP_SQB_ALLOC_FAIL (0x6ull)\n+\n+#define NIX_AF_INT_VEC_RVU (0x0ull)\n+#define NIX_AF_INT_VEC_GEN (0x1ull)\n+#define NIX_AF_INT_VEC_AQ_DONE (0x2ull)\n+#define NIX_AF_INT_VEC_AF_ERR (0x3ull)\n+#define NIX_AF_INT_VEC_POISON (0x4ull)\n+\n+#define NIX_AQINT_GEN_RX_MCAST_DROP (0x0ull)\n+#define NIX_AQINT_GEN_RX_MIRROR_DROP (0x1ull)\n+#define NIX_AQINT_GEN_TL1_DRAIN (0x3ull)\n+#define NIX_AQINT_GEN_SMQ_FLUSH_DONE (0x4ull)\n+\n+#define NIX_AQ_INSTOP_NOP (0x0ull)\n+#define NIX_AQ_INSTOP_INIT (0x1ull)\n+#define NIX_AQ_INSTOP_WRITE (0x2ull)\n+#define NIX_AQ_INSTOP_READ (0x3ull)\n+#define NIX_AQ_INSTOP_LOCK (0x4ull)\n+#define NIX_AQ_INSTOP_UNLOCK (0x5ull)\n+\n+#define NIX_AQ_CTYPE_RQ (0x0ull)\n+#define NIX_AQ_CTYPE_SQ (0x1ull)\n+#define NIX_AQ_CTYPE_CQ (0x2ull)\n+#define NIX_AQ_CTYPE_MCE (0x3ull)\n+#define NIX_AQ_CTYPE_RSS (0x4ull)\n+#define NIX_AQ_CTYPE_DYNO (0x5ull)\n+\n+#define NIX_COLORRESULT_GREEN (0x0ull)\n+#define NIX_COLORRESULT_YELLOW (0x1ull)\n+#define NIX_COLORRESULT_RED_SEND (0x2ull)\n+#define NIX_COLORRESULT_RED_DROP (0x3ull)\n+\n+#define NIX_CHAN_LBKX_CHX(a, b) \\\n+\t(0x000ull | ((uint64_t)(a) << 8) | (uint64_t)(b))\n+#define NIX_CHAN_R4 (0x400ull)\n+#define NIX_CHAN_R5 (0x500ull)\n+#define NIX_CHAN_R6 (0x600ull)\n+#define NIX_CHAN_SDP_CH_END (0x7ffull)\n+#define NIX_CHAN_SDP_CH_START (0x700ull)\n+#define NIX_CHAN_CGXX_LMACX_CHX(a, b, c) \\\n+\t(0x800ull | ((uint64_t)(a) << 8) | ((uint64_t)(b) << 4) | \\\n+\t(uint64_t)(c))\n+\n+#define NIX_INTF_SDP (0x4ull)\n+#define NIX_INTF_CGX0 (0x0ull)\n+#define NIX_INTF_CGX1 (0x1ull)\n+#define NIX_INTF_CGX2 (0x2ull)\n+#define NIX_INTF_LBK0 (0x3ull)\n+\n+#define NIX_CQERRINT_DOOR_ERR (0x0ull)\n+#define NIX_CQERRINT_WR_FULL (0x1ull)\n+#define NIX_CQERRINT_CQE_FAULT (0x2ull)\n+\n+#define NIX_LF_INT_VEC_GINT (0x80ull)\n+#define NIX_LF_INT_VEC_ERR_INT (0x81ull)\n+#define NIX_LF_INT_VEC_POISON (0x82ull)\n+#define NIX_LF_INT_VEC_QINT_END (0x3full)\n+#define NIX_LF_INT_VEC_QINT_START (0x0ull)\n+#define NIX_LF_INT_VEC_CINT_END (0x7full)\n+#define NIX_LF_INT_VEC_CINT_START (0x40ull)\n+\n+/* Enums definitions */\n+\n+/* Structures definitions */\n+\n+/* NIX admin queue instruction structure */\n+struct nix_aq_inst_s {\n+\tuint64_t op : 4;\n+\tuint64_t ctype : 4;\n+\tuint64_t lf : 7;\n+\tuint64_t rsvd_23_15 : 9;\n+\tuint64_t cindex : 20;\n+\tuint64_t rsvd_62_44 : 19;\n+\tuint64_t doneint : 1;\n+\tuint64_t res_addr : 64; /* W1 */\n+};\n+\n+/* NIX admin queue result structure */\n+struct nix_aq_res_s {\n+\tuint64_t op : 4;\n+\tuint64_t ctype : 4;\n+\tuint64_t compcode : 8;\n+\tuint64_t doneint : 1;\n+\tuint64_t rsvd_63_17 : 47;\n+\tuint64_t rsvd_127_64 : 64; /* W1 */\n+};\n+\n+/* NIX completion interrupt context hardware structure */\n+struct nix_cint_hw_s {\n+\tuint64_t ecount : 32;\n+\tuint64_t qcount : 16;\n+\tuint64_t intr : 1;\n+\tuint64_t ena : 1;\n+\tuint64_t timer_idx : 8;\n+\tuint64_t rsvd_63_58 : 6;\n+\tuint64_t ecount_wait : 32;\n+\tuint64_t qcount_wait : 16;\n+\tuint64_t time_wait : 8;\n+\tuint64_t rsvd_127_120 : 8;\n+};\n+\n+/* NIX completion queue entry header structure */\n+struct nix_cqe_hdr_s {\n+\tuint64_t tag : 32;\n+\tuint64_t q : 20;\n+\tuint64_t rsvd_57_52 : 6;\n+\tuint64_t node : 2;\n+\tuint64_t cqe_type : 4;\n+};\n+\n+/* NIX completion queue context structure */\n+struct nix_cq_ctx_s {\n+\tuint64_t base : 64;/* W0 */\n+\tuint64_t rsvd_67_64 : 4;\n+\tuint64_t bp_ena : 1;\n+\tuint64_t rsvd_71_69 : 3;\n+\tuint64_t bpid : 9;\n+\tuint64_t rsvd_83_81 : 3;\n+\tuint64_t qint_idx : 7;\n+\tuint64_t cq_err : 1;\n+\tuint64_t cint_idx : 7;\n+\tuint64_t avg_con : 9;\n+\tuint64_t wrptr : 20;\n+\tuint64_t tail : 20;\n+\tuint64_t head : 20;\n+\tuint64_t avg_level : 8;\n+\tuint64_t update_time : 16;\n+\tuint64_t bp : 8;\n+\tuint64_t drop : 8;\n+\tuint64_t drop_ena : 1;\n+\tuint64_t ena : 1;\n+\tuint64_t rsvd_211_210 : 2;\n+\tuint64_t substream : 20;\n+\tuint64_t caching : 1;\n+\tuint64_t rsvd_235_233 : 3;\n+\tuint64_t qsize : 4;\n+\tuint64_t cq_err_int : 8;\n+\tuint64_t cq_err_int_ena : 8;\n+};\n+\n+/* NIX instruction header structure */\n+struct nix_inst_hdr_s {\n+\tuint64_t pf_func : 16;\n+\tuint64_t sq : 20;\n+\tuint64_t rsvd_63_36 : 28;\n+};\n+\n+/* NIX i/o virtual address structure */\n+struct nix_iova_s {\n+\tuint64_t addr : 64; /* W0 */\n+};\n+\n+/* NIX IPsec dynamic ordering counter structure */\n+struct nix_ipsec_dyno_s {\n+\tuint32_t count : 32; /* W0 */\n+};\n+\n+/* NIX memory value structure */\n+struct nix_mem_result_s {\n+\tuint64_t v : 1;\n+\tuint64_t color : 2;\n+\tuint64_t rsvd_63_3 : 61;\n+};\n+\n+/* NIX statistics operation write data structure */\n+struct nix_op_q_wdata_s {\n+\tuint64_t rsvd_31_0 : 32;\n+\tuint64_t q : 20;\n+\tuint64_t rsvd_63_52 : 12;\n+};\n+\n+/* NIX queue interrupt context hardware structure */\n+struct nix_qint_hw_s {\n+\tuint32_t count : 22;\n+\tuint32_t rsvd_30_22 : 9;\n+\tuint32_t ena : 1;\n+};\n+\n+/* NIX receive queue context structure */\n+struct nix_rq_ctx_hw_s {\n+\tuint64_t ena : 1;\n+\tuint64_t sso_ena : 1;\n+\tuint64_t ipsech_ena : 1;\n+\tuint64_t ena_wqwd : 1;\n+\tuint64_t cq : 20;\n+\tuint64_t substream : 20;\n+\tuint64_t wqe_aura : 20;\n+\tuint64_t spb_aura : 20;\n+\tuint64_t lpb_aura : 20;\n+\tuint64_t sso_grp : 10;\n+\tuint64_t sso_tt : 2;\n+\tuint64_t pb_caching : 2;\n+\tuint64_t wqe_caching : 1;\n+\tuint64_t xqe_drop_ena : 1;\n+\tuint64_t spb_drop_ena : 1;\n+\tuint64_t lpb_drop_ena : 1;\n+\tuint64_t wqe_skip : 2;\n+\tuint64_t rsvd_127_124 : 4;\n+\tuint64_t rsvd_139_128 : 12;\n+\tuint64_t spb_sizem1 : 6;\n+\tuint64_t rsvd_150_146 : 5;\n+\tuint64_t spb_ena : 1;\n+\tuint64_t lpb_sizem1 : 12;\n+\tuint64_t first_skip : 7;\n+\tuint64_t rsvd_171 : 1;\n+\tuint64_t later_skip : 6;\n+\tuint64_t xqe_imm_size : 6;\n+\tuint64_t rsvd_189_184 : 6;\n+\tuint64_t xqe_imm_copy : 1;\n+\tuint64_t xqe_hdr_split : 1;\n+\tuint64_t xqe_drop : 8;\n+\tuint64_t xqe_pass : 8;\n+\tuint64_t wqe_pool_drop : 8;\n+\tuint64_t wqe_pool_pass : 8;\n+\tuint64_t spb_aura_drop : 8;\n+\tuint64_t spb_aura_pass : 8;\n+\tuint64_t spb_pool_drop : 8;\n+\tuint64_t spb_pool_pass : 8;\n+\tuint64_t lpb_aura_drop : 8;\n+\tuint64_t lpb_aura_pass : 8;\n+\tuint64_t lpb_pool_drop : 8;\n+\tuint64_t lpb_pool_pass : 8;\n+\tuint64_t rsvd_319_288 : 32;\n+\tuint64_t ltag : 24;\n+\tuint64_t good_utag : 8;\n+\tuint64_t bad_utag : 8;\n+\tuint64_t flow_tagw : 6;\n+\tuint64_t rsvd_383_366 : 18;\n+\tuint64_t octs : 48;\n+\tuint64_t rsvd_447_432 : 16;\n+\tuint64_t pkts : 48;\n+\tuint64_t rsvd_511_496 : 16;\n+\tuint64_t drop_octs : 48;\n+\tuint64_t rsvd_575_560 : 16;\n+\tuint64_t drop_pkts : 48;\n+\tuint64_t rsvd_639_624 : 16;\n+\tuint64_t re_pkts : 48;\n+\tuint64_t rsvd_702_688 : 15;\n+\tuint64_t ena_copy : 1;\n+\tuint64_t rsvd_739_704 : 36;\n+\tuint64_t rq_int : 8;\n+\tuint64_t rq_int_ena : 8;\n+\tuint64_t qint_idx : 7;\n+\tuint64_t rsvd_767_763 : 5;\n+\tuint64_t rsvd_831_768 : 64;/* W12 */\n+\tuint64_t rsvd_895_832 : 64;/* W13 */\n+\tuint64_t rsvd_959_896 : 64;/* W14 */\n+\tuint64_t rsvd_1023_960 : 64;/* W15 */\n+};\n+\n+/* NIX receive queue context structure */\n+struct nix_rq_ctx_s {\n+\tuint64_t ena : 1;\n+\tuint64_t sso_ena : 1;\n+\tuint64_t ipsech_ena : 1;\n+\tuint64_t ena_wqwd : 1;\n+\tuint64_t cq : 20;\n+\tuint64_t substream : 20;\n+\tuint64_t wqe_aura : 20;\n+\tuint64_t spb_aura : 20;\n+\tuint64_t lpb_aura : 20;\n+\tuint64_t sso_grp : 10;\n+\tuint64_t sso_tt : 2;\n+\tuint64_t pb_caching : 2;\n+\tuint64_t wqe_caching : 1;\n+\tuint64_t xqe_drop_ena : 1;\n+\tuint64_t spb_drop_ena : 1;\n+\tuint64_t lpb_drop_ena : 1;\n+\tuint64_t rsvd_127_122 : 6;\n+\tuint64_t rsvd_139_128 : 12;\n+\tuint64_t spb_sizem1 : 6;\n+\tuint64_t wqe_skip : 2;\n+\tuint64_t rsvd_150_148 : 3;\n+\tuint64_t spb_ena : 1;\n+\tuint64_t lpb_sizem1 : 12;\n+\tuint64_t first_skip : 7;\n+\tuint64_t rsvd_171 : 1;\n+\tuint64_t later_skip : 6;\n+\tuint64_t xqe_imm_size : 6;\n+\tuint64_t rsvd_189_184 : 6;\n+\tuint64_t xqe_imm_copy : 1;\n+\tuint64_t xqe_hdr_split : 1;\n+\tuint64_t xqe_drop : 8;\n+\tuint64_t xqe_pass : 8;\n+\tuint64_t wqe_pool_drop : 8;\n+\tuint64_t wqe_pool_pass : 8;\n+\tuint64_t spb_aura_drop : 8;\n+\tuint64_t spb_aura_pass : 8;\n+\tuint64_t spb_pool_drop : 8;\n+\tuint64_t spb_pool_pass : 8;\n+\tuint64_t lpb_aura_drop : 8;\n+\tuint64_t lpb_aura_pass : 8;\n+\tuint64_t lpb_pool_drop : 8;\n+\tuint64_t lpb_pool_pass : 8;\n+\tuint64_t rsvd_291_288 : 4;\n+\tuint64_t rq_int : 8;\n+\tuint64_t rq_int_ena : 8;\n+\tuint64_t qint_idx : 7;\n+\tuint64_t rsvd_319_315 : 5;\n+\tuint64_t ltag : 24;\n+\tuint64_t good_utag : 8;\n+\tuint64_t bad_utag : 8;\n+\tuint64_t flow_tagw : 6;\n+\tuint64_t rsvd_383_366 : 18;\n+\tuint64_t octs : 48;\n+\tuint64_t rsvd_447_432 : 16;\n+\tuint64_t pkts : 48;\n+\tuint64_t rsvd_511_496 : 16;\n+\tuint64_t drop_octs : 48;\n+\tuint64_t rsvd_575_560 : 16;\n+\tuint64_t drop_pkts : 48;\n+\tuint64_t rsvd_639_624 : 16;\n+\tuint64_t re_pkts : 48;\n+\tuint64_t rsvd_703_688 : 16;\n+\tuint64_t rsvd_767_704 : 64;/* W11 */\n+\tuint64_t rsvd_831_768 : 64;/* W12 */\n+\tuint64_t rsvd_895_832 : 64;/* W13 */\n+\tuint64_t rsvd_959_896 : 64;/* W14 */\n+\tuint64_t rsvd_1023_960 : 64;/* W15 */\n+};\n+\n+/* NIX receive side scaling entry structure */\n+struct nix_rsse_s {\n+\tuint32_t rq : 20;\n+\tuint32_t rsvd_31_20 : 12;\n+};\n+\n+/* NIX receive action structure */\n+struct nix_rx_action_s {\n+\tuint64_t op : 4;\n+\tuint64_t pf_func : 16;\n+\tuint64_t index : 20;\n+\tuint64_t match_id : 16;\n+\tuint64_t flow_key_alg : 5;\n+\tuint64_t rsvd_63_61 : 3;\n+};\n+\n+/* NIX receive immediate sub descriptor structure */\n+struct nix_rx_imm_s {\n+\tuint64_t size : 16;\n+\tuint64_t apad : 3;\n+\tuint64_t rsvd_59_19 : 41;\n+\tuint64_t subdc : 4;\n+};\n+\n+/* NIX receive multicast/mirror entry structure */\n+struct nix_rx_mce_s {\n+\tuint64_t op : 2;\n+\tuint64_t rsvd_2 : 1;\n+\tuint64_t eol : 1;\n+\tuint64_t index : 20;\n+\tuint64_t rsvd_31_24 : 8;\n+\tuint64_t pf_func : 16;\n+\tuint64_t next : 16;\n+};\n+\n+/* NIX receive parse structure */\n+struct nix_rx_parse_s {\n+\tuint64_t chan : 12;\n+\tuint64_t desc_sizem1 : 5;\n+\tuint64_t imm_copy : 1;\n+\tuint64_t express : 1;\n+\tuint64_t wqwd : 1;\n+\tuint64_t errlev : 4;\n+\tuint64_t errcode : 8;\n+\tuint64_t latype : 4;\n+\tuint64_t lbtype : 4;\n+\tuint64_t lctype : 4;\n+\tuint64_t ldtype : 4;\n+\tuint64_t letype : 4;\n+\tuint64_t lftype : 4;\n+\tuint64_t lgtype : 4;\n+\tuint64_t lhtype : 4;\n+\tuint64_t pkt_lenm1 : 16;\n+\tuint64_t l2m : 1;\n+\tuint64_t l2b : 1;\n+\tuint64_t l3m : 1;\n+\tuint64_t l3b : 1;\n+\tuint64_t vtag0_valid : 1;\n+\tuint64_t vtag0_gone : 1;\n+\tuint64_t vtag1_valid : 1;\n+\tuint64_t vtag1_gone : 1;\n+\tuint64_t pkind : 6;\n+\tuint64_t rsvd_95_94 : 2;\n+\tuint64_t vtag0_tci : 16;\n+\tuint64_t vtag1_tci : 16;\n+\tuint64_t laflags : 8;\n+\tuint64_t lbflags : 8;\n+\tuint64_t lcflags : 8;\n+\tuint64_t ldflags : 8;\n+\tuint64_t leflags : 8;\n+\tuint64_t lfflags : 8;\n+\tuint64_t lgflags : 8;\n+\tuint64_t lhflags : 8;\n+\tuint64_t eoh_ptr : 8;\n+\tuint64_t wqe_aura : 20;\n+\tuint64_t pb_aura : 20;\n+\tuint64_t match_id : 16;\n+\tuint64_t laptr : 8;\n+\tuint64_t lbptr : 8;\n+\tuint64_t lcptr : 8;\n+\tuint64_t ldptr : 8;\n+\tuint64_t leptr : 8;\n+\tuint64_t lfptr : 8;\n+\tuint64_t lgptr : 8;\n+\tuint64_t lhptr : 8;\n+\tuint64_t vtag0_ptr : 8;\n+\tuint64_t vtag1_ptr : 8;\n+\tuint64_t flow_key_alg : 5;\n+\tuint64_t rsvd_383_341 : 43;\n+\tuint64_t rsvd_447_384 : 64; /* W6 */\n+};\n+\n+/* NIX receive scatter/gather sub descriptor structure */\n+struct nix_rx_sg_s {\n+\tuint64_t seg1_size : 16;\n+\tuint64_t seg2_size : 16;\n+\tuint64_t seg3_size : 16;\n+\tuint64_t segs : 2;\n+\tuint64_t rsvd_59_50 : 10;\n+\tuint64_t subdc : 4;\n+};\n+\n+/* NIX receive vtag action structure */\n+struct nix_rx_vtag_action_s {\n+\tuint64_t vtag0_relptr : 8;\n+\tuint64_t vtag0_lid : 3;\n+\tuint64_t rsvd_11 : 1;\n+\tuint64_t vtag0_type : 3;\n+\tuint64_t vtag0_valid : 1;\n+\tuint64_t rsvd_31_16 : 16;\n+\tuint64_t vtag1_relptr : 8;\n+\tuint64_t vtag1_lid : 3;\n+\tuint64_t rsvd_43 : 1;\n+\tuint64_t vtag1_type : 3;\n+\tuint64_t vtag1_valid : 1;\n+\tuint64_t rsvd_63_48 : 16;\n+};\n+\n+/* NIX send completion structure */\n+struct nix_send_comp_s {\n+\tuint64_t status : 8;\n+\tuint64_t sqe_id : 16;\n+\tuint64_t rsvd_63_24 : 40;\n+};\n+\n+/* NIX send CRC sub descriptor structure */\n+struct nix_send_crc_s {\n+\tuint64_t size : 16;\n+\tuint64_t start : 16;\n+\tuint64_t insert : 16;\n+\tuint64_t rsvd_57_48 : 10;\n+\tuint64_t alg : 2;\n+\tuint64_t subdc : 4;\n+\tuint64_t iv : 32;\n+\tuint64_t rsvd_127_96 : 32;\n+};\n+\n+/* NIX send extended header sub descriptor structure */\n+RTE_STD_C11\n+union nix_send_ext_w0_u {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t lso_mps : 14;\n+\t\tuint64_t lso : 1;\n+\t\tuint64_t tstmp : 1;\n+\t\tuint64_t lso_sb : 8;\n+\t\tuint64_t lso_format : 5;\n+\t\tuint64_t rsvd_31_29 : 3;\n+\t\tuint64_t shp_chg : 9;\n+\t\tuint64_t shp_dis : 1;\n+\t\tuint64_t shp_ra : 2;\n+\t\tuint64_t markptr : 8;\n+\t\tuint64_t markform : 7;\n+\t\tuint64_t mark_en : 1;\n+\t\tuint64_t subdc : 4;\n+\t};\n+};\n+\n+RTE_STD_C11\n+union nix_send_ext_w1_u {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t vlan0_ins_ptr : 8;\n+\t\tuint64_t vlan0_ins_tci : 16;\n+\t\tuint64_t vlan1_ins_ptr : 8;\n+\t\tuint64_t vlan1_ins_tci : 16;\n+\t\tuint64_t vlan0_ins_ena : 1;\n+\t\tuint64_t vlan1_ins_ena : 1;\n+\t\tuint64_t rsvd_127_114 : 14;\n+\t};\n+};\n+\n+struct nix_send_ext_s {\n+\tunion nix_send_ext_w0_u w0;\n+\tunion nix_send_ext_w1_u w1;\n+};\n+\n+/* NIX send header sub descriptor structure */\n+RTE_STD_C11\n+union nix_send_hdr_w0_u {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t total : 18;\n+\t\tuint64_t rsvd_18 : 1;\n+\t\tuint64_t df : 1;\n+\t\tuint64_t aura : 20;\n+\t\tuint64_t sizem1 : 3;\n+\t\tuint64_t pnc : 1;\n+\t\tuint64_t sq : 20;\n+\t};\n+};\n+\n+RTE_STD_C11\n+union nix_send_hdr_w1_u {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t ol3ptr : 8;\n+\t\tuint64_t ol4ptr : 8;\n+\t\tuint64_t il3ptr : 8;\n+\t\tuint64_t il4ptr : 8;\n+\t\tuint64_t ol3type : 4;\n+\t\tuint64_t ol4type : 4;\n+\t\tuint64_t il3type : 4;\n+\t\tuint64_t il4type : 4;\n+\t\tuint64_t sqe_id : 16;\n+\t};\n+};\n+\n+struct nix_send_hdr_s {\n+\tunion nix_send_hdr_w0_u w0;\n+\tunion nix_send_hdr_w1_u w1;\n+};\n+\n+/* NIX send immediate sub descriptor structure */\n+struct nix_send_imm_s {\n+\tuint64_t size : 16;\n+\tuint64_t apad : 3;\n+\tuint64_t rsvd_59_19 : 41;\n+\tuint64_t subdc : 4;\n+};\n+\n+/* NIX send jump sub descriptor structure */\n+struct nix_send_jump_s {\n+\tuint64_t sizem1 : 7;\n+\tuint64_t rsvd_13_7 : 7;\n+\tuint64_t ld_type : 2;\n+\tuint64_t aura : 20;\n+\tuint64_t rsvd_58_36 : 23;\n+\tuint64_t f : 1;\n+\tuint64_t subdc : 4;\n+\tuint64_t addr : 64; /* W1 */\n+};\n+\n+/* NIX send memory sub descriptor structure */\n+struct nix_send_mem_s {\n+\tuint64_t offset : 16;\n+\tuint64_t rsvd_52_16 : 37;\n+\tuint64_t wmem : 1;\n+\tuint64_t dsz : 2;\n+\tuint64_t alg : 4;\n+\tuint64_t subdc : 4;\n+\tuint64_t addr : 64; /* W1 */\n+};\n+\n+/* NIX send scatter/gather sub descriptor structure */\n+RTE_STD_C11\n+union nix_send_sg_s {\n+\tuint64_t u;\n+\tstruct {\n+\t\tuint64_t seg1_size : 16;\n+\t\tuint64_t seg2_size : 16;\n+\t\tuint64_t seg3_size : 16;\n+\t\tuint64_t segs : 2;\n+\t\tuint64_t rsvd_54_50 : 5;\n+\t\tuint64_t i1 : 1;\n+\t\tuint64_t i2 : 1;\n+\t\tuint64_t i3 : 1;\n+\t\tuint64_t ld_type : 2;\n+\t\tuint64_t subdc : 4;\n+\t};\n+};\n+\n+/* NIX send work sub descriptor structure */\n+struct nix_send_work_s {\n+\tuint64_t tag : 32;\n+\tuint64_t tt : 2;\n+\tuint64_t grp : 10;\n+\tuint64_t rsvd_59_44 : 16;\n+\tuint64_t subdc : 4;\n+\tuint64_t addr : 64; /* W1 */\n+};\n+\n+/* NIX sq context hardware structure */\n+struct nix_sq_ctx_hw_s {\n+\tuint64_t ena : 1;\n+\tuint64_t substream : 20;\n+\tuint64_t max_sqe_size : 2;\n+\tuint64_t sqe_way_mask : 16;\n+\tuint64_t sqb_aura : 20;\n+\tuint64_t gbl_rsvd1 : 5;\n+\tuint64_t cq_id : 20;\n+\tuint64_t cq_ena : 1;\n+\tuint64_t qint_idx : 6;\n+\tuint64_t gbl_rsvd2 : 1;\n+\tuint64_t sq_int : 8;\n+\tuint64_t sq_int_ena : 8;\n+\tuint64_t xoff : 1;\n+\tuint64_t sqe_stype : 2;\n+\tuint64_t gbl_rsvd : 17;\n+\tuint64_t head_sqb : 64;/* W2 */\n+\tuint64_t head_offset : 6;\n+\tuint64_t sqb_dequeue_count : 16;\n+\tuint64_t default_chan : 12;\n+\tuint64_t sdp_mcast : 1;\n+\tuint64_t sso_ena : 1;\n+\tuint64_t dse_rsvd1 : 28;\n+\tuint64_t sqb_enqueue_count : 16;\n+\tuint64_t tail_offset : 6;\n+\tuint64_t lmt_dis : 1;\n+\tuint64_t smq_rr_quantum : 24;\n+\tuint64_t dnq_rsvd1 : 17;\n+\tuint64_t tail_sqb : 64;/* W5 */\n+\tuint64_t next_sqb : 64;/* W6 */\n+\tuint64_t mnq_dis : 1;\n+\tuint64_t smq : 9;\n+\tuint64_t smq_pend : 1;\n+\tuint64_t smq_next_sq : 20;\n+\tuint64_t smq_next_sq_vld : 1;\n+\tuint64_t scm1_rsvd2 : 32;\n+\tuint64_t smenq_sqb : 64;/* W8 */\n+\tuint64_t smenq_offset : 6;\n+\tuint64_t cq_limit : 8;\n+\tuint64_t smq_rr_count : 25;\n+\tuint64_t scm_lso_rem : 18;\n+\tuint64_t scm_dq_rsvd0 : 7;\n+\tuint64_t smq_lso_segnum : 8;\n+\tuint64_t vfi_lso_total : 18;\n+\tuint64_t vfi_lso_sizem1 : 3;\n+\tuint64_t vfi_lso_sb : 8;\n+\tuint64_t vfi_lso_mps : 14;\n+\tuint64_t vfi_lso_vlan0_ins_ena : 1;\n+\tuint64_t vfi_lso_vlan1_ins_ena : 1;\n+\tuint64_t vfi_lso_vld : 1;\n+\tuint64_t smenq_next_sqb_vld : 1;\n+\tuint64_t scm_dq_rsvd1 : 9;\n+\tuint64_t smenq_next_sqb : 64;/* W11 */\n+\tuint64_t seb_rsvd1 : 64;/* W12 */\n+\tuint64_t drop_pkts : 48;\n+\tuint64_t drop_octs_lsw : 16;\n+\tuint64_t drop_octs_msw : 32;\n+\tuint64_t pkts_lsw : 32;\n+\tuint64_t pkts_msw : 16;\n+\tuint64_t octs : 48;\n+};\n+\n+/* NIX send queue context structure */\n+struct nix_sq_ctx_s {\n+\tuint64_t ena : 1;\n+\tuint64_t qint_idx : 6;\n+\tuint64_t substream : 20;\n+\tuint64_t sdp_mcast : 1;\n+\tuint64_t cq : 20;\n+\tuint64_t sqe_way_mask : 16;\n+\tuint64_t smq : 9;\n+\tuint64_t cq_ena : 1;\n+\tuint64_t xoff : 1;\n+\tuint64_t sso_ena : 1;\n+\tuint64_t smq_rr_quantum : 24;\n+\tuint64_t default_chan : 12;\n+\tuint64_t sqb_count : 16;\n+\tuint64_t smq_rr_count : 25;\n+\tuint64_t sqb_aura : 20;\n+\tuint64_t sq_int : 8;\n+\tuint64_t sq_int_ena : 8;\n+\tuint64_t sqe_stype : 2;\n+\tuint64_t rsvd_191 : 1;\n+\tuint64_t max_sqe_size : 2;\n+\tuint64_t cq_limit : 8;\n+\tuint64_t lmt_dis : 1;\n+\tuint64_t mnq_dis : 1;\n+\tuint64_t smq_next_sq : 20;\n+\tuint64_t smq_lso_segnum : 8;\n+\tuint64_t tail_offset : 6;\n+\tuint64_t smenq_offset : 6;\n+\tuint64_t head_offset : 6;\n+\tuint64_t smenq_next_sqb_vld : 1;\n+\tuint64_t smq_pend : 1;\n+\tuint64_t smq_next_sq_vld : 1;\n+\tuint64_t rsvd_255_253 : 3;\n+\tuint64_t next_sqb : 64;/* W4 */\n+\tuint64_t tail_sqb : 64;/* W5 */\n+\tuint64_t smenq_sqb : 64;/* W6 */\n+\tuint64_t smenq_next_sqb : 64;/* W7 */\n+\tuint64_t head_sqb : 64;/* W8 */\n+\tuint64_t rsvd_583_576 : 8;\n+\tuint64_t vfi_lso_total : 18;\n+\tuint64_t vfi_lso_sizem1 : 3;\n+\tuint64_t vfi_lso_sb : 8;\n+\tuint64_t vfi_lso_mps : 14;\n+\tuint64_t vfi_lso_vlan0_ins_ena : 1;\n+\tuint64_t vfi_lso_vlan1_ins_ena : 1;\n+\tuint64_t vfi_lso_vld : 1;\n+\tuint64_t rsvd_639_630 : 10;\n+\tuint64_t scm_lso_rem : 18;\n+\tuint64_t rsvd_703_658 : 46;\n+\tuint64_t octs : 48;\n+\tuint64_t rsvd_767_752 : 16;\n+\tuint64_t pkts : 48;\n+\tuint64_t rsvd_831_816 : 16;\n+\tuint64_t rsvd_895_832 : 64;/* W13 */\n+\tuint64_t drop_octs : 48;\n+\tuint64_t rsvd_959_944 : 16;\n+\tuint64_t drop_pkts : 48;\n+\tuint64_t rsvd_1023_1008 : 16;\n+};\n+\n+/* NIX transmit action structure */\n+struct nix_tx_action_s {\n+\tuint64_t op : 4;\n+\tuint64_t rsvd_11_4 : 8;\n+\tuint64_t index : 20;\n+\tuint64_t match_id : 16;\n+\tuint64_t rsvd_63_48 : 16;\n+};\n+\n+/* NIX transmit vtag action structure */\n+struct nix_tx_vtag_action_s {\n+\tuint64_t vtag0_relptr : 8;\n+\tuint64_t vtag0_lid : 3;\n+\tuint64_t rsvd_11 : 1;\n+\tuint64_t vtag0_op : 2;\n+\tuint64_t rsvd_15_14 : 2;\n+\tuint64_t vtag0_def : 10;\n+\tuint64_t rsvd_31_26 : 6;\n+\tuint64_t vtag1_relptr : 8;\n+\tuint64_t vtag1_lid : 3;\n+\tuint64_t rsvd_43 : 1;\n+\tuint64_t vtag1_op : 2;\n+\tuint64_t rsvd_47_46 : 2;\n+\tuint64_t vtag1_def : 10;\n+\tuint64_t rsvd_63_58 : 6;\n+};\n+\n+/* NIX work queue entry header structure */\n+struct nix_wqe_hdr_s {\n+\tuint64_t tag : 32;\n+\tuint64_t tt : 2;\n+\tuint64_t grp : 10;\n+\tuint64_t node : 2;\n+\tuint64_t q : 14;\n+\tuint64_t wqe_type : 4;\n+};\n+\n+/* NIX Rx flow key algorithm field structure */\n+struct nix_rx_flowkey_alg {\n+\tuint64_t key_offset :6;\n+\tuint64_t ln_mask :1;\n+\tuint64_t fn_mask :1;\n+\tuint64_t hdr_offset :8;\n+\tuint64_t bytesm1 :5;\n+\tuint64_t lid :3;\n+\tuint64_t reserved_24_24 :1;\n+\tuint64_t ena :1;\n+\tuint64_t sel_chan :1;\n+\tuint64_t ltype_mask :4;\n+\tuint64_t ltype_match :4;\n+\tuint64_t reserved_35_63 :29;\n+};\n+\n+/* NIX LSO format field structure */\n+struct nix_lso_format {\n+\tuint64_t offset : 8;\n+\tuint64_t layer : 2;\n+\tuint64_t rsvd_10_11 : 2;\n+\tuint64_t sizem1 : 2;\n+\tuint64_t rsvd_14_15 : 2;\n+\tuint64_t alg : 3;\n+\tuint64_t rsvd_19_63 : 45;\n+};\n+\n+#endif /* __OTX2_NIX_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_npa.h b/drivers/common/octeontx2/hw/otx2_npa.h\nnew file mode 100644\nindex 000000000..2224216c9\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_npa.h\n@@ -0,0 +1,305 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_NPA_HW_H__\n+#define __OTX2_NPA_HW_H__\n+\n+/* Register offsets */\n+\n+#define NPA_AF_BLK_RST (0x0ull)\n+#define NPA_AF_CONST (0x10ull)\n+#define NPA_AF_CONST1 (0x18ull)\n+#define NPA_AF_LF_RST (0x20ull)\n+#define NPA_AF_GEN_CFG (0x30ull)\n+#define NPA_AF_NDC_CFG (0x40ull)\n+#define NPA_AF_NDC_SYNC (0x50ull)\n+#define NPA_AF_INP_CTL (0xd0ull)\n+#define NPA_AF_ACTIVE_CYCLES_PC (0xf0ull)\n+#define NPA_AF_AVG_DELAY (0x100ull)\n+#define NPA_AF_GEN_INT (0x140ull)\n+#define NPA_AF_GEN_INT_W1S (0x148ull)\n+#define NPA_AF_GEN_INT_ENA_W1S (0x150ull)\n+#define NPA_AF_GEN_INT_ENA_W1C (0x158ull)\n+#define NPA_AF_RVU_INT (0x160ull)\n+#define NPA_AF_RVU_INT_W1S (0x168ull)\n+#define NPA_AF_RVU_INT_ENA_W1S (0x170ull)\n+#define NPA_AF_RVU_INT_ENA_W1C (0x178ull)\n+#define NPA_AF_ERR_INT (0x180ull)\n+#define NPA_AF_ERR_INT_W1S (0x188ull)\n+#define NPA_AF_ERR_INT_ENA_W1S (0x190ull)\n+#define NPA_AF_ERR_INT_ENA_W1C (0x198ull)\n+#define NPA_AF_RAS (0x1a0ull)\n+#define NPA_AF_RAS_W1S (0x1a8ull)\n+#define NPA_AF_RAS_ENA_W1S (0x1b0ull)\n+#define NPA_AF_RAS_ENA_W1C (0x1b8ull)\n+#define NPA_AF_AQ_CFG (0x600ull)\n+#define NPA_AF_AQ_BASE (0x610ull)\n+#define NPA_AF_AQ_STATUS (0x620ull)\n+#define NPA_AF_AQ_DOOR (0x630ull)\n+#define NPA_AF_AQ_DONE_WAIT (0x640ull)\n+#define NPA_AF_AQ_DONE (0x650ull)\n+#define NPA_AF_AQ_DONE_ACK (0x660ull)\n+#define NPA_AF_AQ_DONE_TIMER (0x670ull)\n+#define NPA_AF_AQ_DONE_INT (0x680ull)\n+#define NPA_AF_AQ_DONE_ENA_W1S (0x690ull)\n+#define NPA_AF_AQ_DONE_ENA_W1C (0x698ull)\n+#define NPA_AF_LFX_AURAS_CFG(a) (0x4000ull | (uint64_t)(a) << 18)\n+#define NPA_AF_LFX_LOC_AURAS_BASE(a) (0x4010ull | (uint64_t)(a) << 18)\n+#define NPA_AF_LFX_QINTS_CFG(a) (0x4100ull | (uint64_t)(a) << 18)\n+#define NPA_AF_LFX_QINTS_BASE(a) (0x4110ull | (uint64_t)(a) << 18)\n+#define NPA_PRIV_AF_INT_CFG (0x10000ull)\n+#define NPA_PRIV_LFX_CFG(a) (0x10010ull | (uint64_t)(a) << 8)\n+#define NPA_PRIV_LFX_INT_CFG(a) (0x10020ull | (uint64_t)(a) << 8)\n+#define NPA_AF_RVU_LF_CFG_DEBUG (0x10030ull)\n+#define NPA_AF_DTX_FILTER_CTL (0x10040ull)\n+\n+#define NPA_LF_AURA_OP_ALLOCX(a) (0x10ull | (uint64_t)(a) << 3)\n+#define NPA_LF_AURA_OP_FREE0 (0x20ull)\n+#define NPA_LF_AURA_OP_FREE1 (0x28ull)\n+#define NPA_LF_AURA_OP_CNT (0x30ull)\n+#define NPA_LF_AURA_OP_LIMIT (0x50ull)\n+#define NPA_LF_AURA_OP_INT (0x60ull)\n+#define NPA_LF_AURA_OP_THRESH (0x70ull)\n+#define NPA_LF_POOL_OP_PC (0x100ull)\n+#define NPA_LF_POOL_OP_AVAILABLE (0x110ull)\n+#define NPA_LF_POOL_OP_PTR_START0 (0x120ull)\n+#define NPA_LF_POOL_OP_PTR_START1 (0x128ull)\n+#define NPA_LF_POOL_OP_PTR_END0 (0x130ull)\n+#define NPA_LF_POOL_OP_PTR_END1 (0x138ull)\n+#define NPA_LF_POOL_OP_INT (0x160ull)\n+#define NPA_LF_POOL_OP_THRESH (0x170ull)\n+#define NPA_LF_ERR_INT (0x200ull)\n+#define NPA_LF_ERR_INT_W1S (0x208ull)\n+#define NPA_LF_ERR_INT_ENA_W1C (0x210ull)\n+#define NPA_LF_ERR_INT_ENA_W1S (0x218ull)\n+#define NPA_LF_RAS (0x220ull)\n+#define NPA_LF_RAS_W1S (0x228ull)\n+#define NPA_LF_RAS_ENA_W1C (0x230ull)\n+#define NPA_LF_RAS_ENA_W1S (0x238ull)\n+#define NPA_LF_QINTX_CNT(a) (0x300ull | (uint64_t)(a) << 12)\n+#define NPA_LF_QINTX_INT(a) (0x310ull | (uint64_t)(a) << 12)\n+#define NPA_LF_QINTX_ENA_W1S(a) (0x320ull | (uint64_t)(a) << 12)\n+#define NPA_LF_QINTX_ENA_W1C(a) (0x330ull | (uint64_t)(a) << 12)\n+\n+\n+/* Enum offsets */\n+\n+#define NPA_AQ_COMP_NOTDONE (0x0ull)\n+#define NPA_AQ_COMP_GOOD (0x1ull)\n+#define NPA_AQ_COMP_SWERR (0x2ull)\n+#define NPA_AQ_COMP_CTX_POISON (0x3ull)\n+#define NPA_AQ_COMP_CTX_FAULT (0x4ull)\n+#define NPA_AQ_COMP_LOCKERR (0x5ull)\n+\n+#define NPA_AF_INT_VEC_RVU (0x0ull)\n+#define NPA_AF_INT_VEC_GEN (0x1ull)\n+#define NPA_AF_INT_VEC_AQ_DONE (0x2ull)\n+#define NPA_AF_INT_VEC_AF_ERR (0x3ull)\n+#define NPA_AF_INT_VEC_POISON (0x4ull)\n+\n+#define NPA_AQ_INSTOP_NOP (0x0ull)\n+#define NPA_AQ_INSTOP_INIT (0x1ull)\n+#define NPA_AQ_INSTOP_WRITE (0x2ull)\n+#define NPA_AQ_INSTOP_READ (0x3ull)\n+#define NPA_AQ_INSTOP_LOCK (0x4ull)\n+#define NPA_AQ_INSTOP_UNLOCK (0x5ull)\n+\n+#define NPA_AQ_CTYPE_AURA (0x0ull)\n+#define NPA_AQ_CTYPE_POOL (0x1ull)\n+\n+#define NPA_BPINTF_NIX0_RX (0x0ull)\n+#define NPA_BPINTF_NIX1_RX (0x1ull)\n+\n+#define NPA_AURA_ERR_INT_AURA_FREE_UNDER (0x0ull)\n+#define NPA_AURA_ERR_INT_AURA_ADD_OVER (0x1ull)\n+#define NPA_AURA_ERR_INT_AURA_ADD_UNDER (0x2ull)\n+#define NPA_AURA_ERR_INT_POOL_DIS (0x3ull)\n+#define NPA_AURA_ERR_INT_R4 (0x4ull)\n+#define NPA_AURA_ERR_INT_R5 (0x5ull)\n+#define NPA_AURA_ERR_INT_R6 (0x6ull)\n+#define NPA_AURA_ERR_INT_R7 (0x7ull)\n+\n+#define NPA_LF_INT_VEC_ERR_INT (0x40ull)\n+#define NPA_LF_INT_VEC_POISON (0x41ull)\n+#define NPA_LF_INT_VEC_QINT_END (0x3full)\n+#define NPA_LF_INT_VEC_QINT_START (0x0ull)\n+\n+#define NPA_INPQ_SSO (0x4ull)\n+#define NPA_INPQ_TIM (0x5ull)\n+#define NPA_INPQ_DPI (0x6ull)\n+#define NPA_INPQ_AURA_OP (0xeull)\n+#define NPA_INPQ_INTERNAL_RSV (0xfull)\n+#define NPA_INPQ_NIX0_RX (0x0ull)\n+#define NPA_INPQ_NIX1_RX (0x2ull)\n+#define NPA_INPQ_NIX0_TX (0x1ull)\n+#define NPA_INPQ_NIX1_TX (0x3ull)\n+#define NPA_INPQ_R_END (0xdull)\n+#define NPA_INPQ_R_START (0x7ull)\n+\n+#define NPA_POOL_ERR_INT_OVFLS (0x0ull)\n+#define NPA_POOL_ERR_INT_RANGE (0x1ull)\n+#define NPA_POOL_ERR_INT_PERR (0x2ull)\n+#define NPA_POOL_ERR_INT_R3 (0x3ull)\n+#define NPA_POOL_ERR_INT_R4 (0x4ull)\n+#define NPA_POOL_ERR_INT_R5 (0x5ull)\n+#define NPA_POOL_ERR_INT_R6 (0x6ull)\n+#define NPA_POOL_ERR_INT_R7 (0x7ull)\n+\n+#define NPA_NDC0_PORT_AURA0 (0x0ull)\n+#define NPA_NDC0_PORT_AURA1 (0x1ull)\n+#define NPA_NDC0_PORT_POOL0 (0x2ull)\n+#define NPA_NDC0_PORT_POOL1 (0x3ull)\n+#define NPA_NDC0_PORT_STACK0 (0x4ull)\n+#define NPA_NDC0_PORT_STACK1 (0x5ull)\n+\n+#define NPA_LF_ERR_INT_AURA_DIS (0x0ull)\n+#define NPA_LF_ERR_INT_AURA_OOR (0x1ull)\n+#define NPA_LF_ERR_INT_AURA_FAULT (0xcull)\n+#define NPA_LF_ERR_INT_POOL_FAULT (0xdull)\n+#define NPA_LF_ERR_INT_STACK_FAULT (0xeull)\n+#define NPA_LF_ERR_INT_QINT_FAULT (0xfull)\n+\n+/* Structures definitions */\n+\n+/* NPA admin queue instruction structure */\n+struct npa_aq_inst_s {\n+\tuint64_t op : 4;\n+\tuint64_t ctype : 4;\n+\tuint64_t lf : 9;\n+\tuint64_t rsvd_23_17 : 7;\n+\tuint64_t cindex : 20;\n+\tuint64_t rsvd_62_44 : 19;\n+\tuint64_t doneint : 1;\n+\tuint64_t res_addr : 64; /* W1 */\n+};\n+\n+/* NPA admin queue result structure */\n+struct npa_aq_res_s {\n+\tuint64_t op : 4;\n+\tuint64_t ctype : 4;\n+\tuint64_t compcode : 8;\n+\tuint64_t doneint : 1;\n+\tuint64_t rsvd_63_17 : 47;\n+\tuint64_t rsvd_127_64 : 64; /* W1 */\n+};\n+\n+/* NPA aura operation write data structure */\n+struct npa_aura_op_wdata_s {\n+\tuint64_t aura : 20;\n+\tuint64_t rsvd_62_20 : 43;\n+\tuint64_t drop : 1;\n+};\n+\n+/* NPA aura context structure */\n+struct npa_aura_s {\n+\tuint64_t pool_addr : 64;/* W0 */\n+\tuint64_t ena : 1;\n+\tuint64_t rsvd_66_65 : 2;\n+\tuint64_t pool_caching : 1;\n+\tuint64_t pool_way_mask : 16;\n+\tuint64_t avg_con : 9;\n+\tuint64_t rsvd_93 : 1;\n+\tuint64_t pool_drop_ena : 1;\n+\tuint64_t aura_drop_ena : 1;\n+\tuint64_t bp_ena : 2;\n+\tuint64_t rsvd_103_98 : 6;\n+\tuint64_t aura_drop : 8;\n+\tuint64_t shift : 6;\n+\tuint64_t rsvd_119_118 : 2;\n+\tuint64_t avg_level : 8;\n+\tuint64_t count : 36;\n+\tuint64_t rsvd_167_164 : 4;\n+\tuint64_t nix0_bpid : 9;\n+\tuint64_t rsvd_179_177 : 3;\n+\tuint64_t nix1_bpid : 9;\n+\tuint64_t rsvd_191_189 : 3;\n+\tuint64_t limit : 36;\n+\tuint64_t rsvd_231_228 : 4;\n+\tuint64_t bp : 8;\n+\tuint64_t rsvd_243_240 : 4;\n+\tuint64_t fc_ena : 1;\n+\tuint64_t fc_up_crossing : 1;\n+\tuint64_t fc_stype : 2;\n+\tuint64_t fc_hyst_bits : 4;\n+\tuint64_t rsvd_255_252 : 4;\n+\tuint64_t fc_addr : 64;/* W4 */\n+\tuint64_t pool_drop : 8;\n+\tuint64_t update_time : 16;\n+\tuint64_t err_int : 8;\n+\tuint64_t err_int_ena : 8;\n+\tuint64_t thresh_int : 1;\n+\tuint64_t thresh_int_ena : 1;\n+\tuint64_t thresh_up : 1;\n+\tuint64_t rsvd_363 : 1;\n+\tuint64_t thresh_qint_idx : 7;\n+\tuint64_t rsvd_371 : 1;\n+\tuint64_t err_qint_idx : 7;\n+\tuint64_t rsvd_383_379 : 5;\n+\tuint64_t thresh : 36;\n+\tuint64_t rsvd_447_420 : 28;\n+\tuint64_t rsvd_511_448 : 64;/* W7 */\n+};\n+\n+/* NPA pool context structure */\n+struct npa_pool_s {\n+\tuint64_t stack_base : 64;/* W0 */\n+\tuint64_t ena : 1;\n+\tuint64_t nat_align : 1;\n+\tuint64_t rsvd_67_66 : 2;\n+\tuint64_t stack_caching : 1;\n+\tuint64_t rsvd_71_69 : 3;\n+\tuint64_t stack_way_mask : 16;\n+\tuint64_t buf_offset : 12;\n+\tuint64_t rsvd_103_100 : 4;\n+\tuint64_t buf_size : 11;\n+\tuint64_t rsvd_127_115 : 13;\n+\tuint64_t stack_max_pages : 32;\n+\tuint64_t stack_pages : 32;\n+\tuint64_t op_pc : 48;\n+\tuint64_t rsvd_255_240 : 16;\n+\tuint64_t stack_offset : 4;\n+\tuint64_t rsvd_263_260 : 4;\n+\tuint64_t shift : 6;\n+\tuint64_t rsvd_271_270 : 2;\n+\tuint64_t avg_level : 8;\n+\tuint64_t avg_con : 9;\n+\tuint64_t fc_ena : 1;\n+\tuint64_t fc_stype : 2;\n+\tuint64_t fc_hyst_bits : 4;\n+\tuint64_t fc_up_crossing : 1;\n+\tuint64_t rsvd_299_297 : 3;\n+\tuint64_t update_time : 16;\n+\tuint64_t rsvd_319_316 : 4;\n+\tuint64_t fc_addr : 64;/* W5 */\n+\tuint64_t ptr_start : 64;/* W6 */\n+\tuint64_t ptr_end : 64;/* W7 */\n+\tuint64_t rsvd_535_512 : 24;\n+\tuint64_t err_int : 8;\n+\tuint64_t err_int_ena : 8;\n+\tuint64_t thresh_int : 1;\n+\tuint64_t thresh_int_ena : 1;\n+\tuint64_t thresh_up : 1;\n+\tuint64_t rsvd_555 : 1;\n+\tuint64_t thresh_qint_idx : 7;\n+\tuint64_t rsvd_563 : 1;\n+\tuint64_t err_qint_idx : 7;\n+\tuint64_t rsvd_575_571 : 5;\n+\tuint64_t thresh : 36;\n+\tuint64_t rsvd_639_612 : 28;\n+\tuint64_t rsvd_703_640 : 64;/* W10 */\n+\tuint64_t rsvd_767_704 : 64;/* W11 */\n+\tuint64_t rsvd_831_768 : 64;/* W12 */\n+\tuint64_t rsvd_895_832 : 64;/* W13 */\n+\tuint64_t rsvd_959_896 : 64;/* W14 */\n+\tuint64_t rsvd_1023_960 : 64;/* W15 */\n+};\n+\n+/* NPA queue interrupt context hardware structure */\n+struct npa_qint_hw_s {\n+\tuint32_t count : 22;\n+\tuint32_t rsvd_30_22 : 9;\n+\tuint32_t ena : 1;\n+};\n+\n+#endif /* __OTX2_NPA_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h\nnew file mode 100644\nindex 000000000..3f98967b4\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_npc.h\n@@ -0,0 +1,467 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_NPC_HW_H__\n+#define __OTX2_NPC_HW_H__\n+\n+/* Register offsets */\n+\n+#define NPC_AF_CFG (0x0ull)\n+#define NPC_AF_ACTIVE_PC (0x10ull)\n+#define NPC_AF_CONST (0x20ull)\n+#define NPC_AF_CONST1 (0x30ull)\n+#define NPC_AF_BLK_RST (0x40ull)\n+#define NPC_AF_MCAM_SCRUB_CTL (0xa0ull)\n+#define NPC_AF_KCAM_SCRUB_CTL (0xb0ull)\n+#define NPC_AF_KPUX_CFG(a) \\\n+\t(0x500ull | (uint64_t)(a) << 3)\n+#define NPC_AF_PCK_CFG (0x600ull)\n+#define NPC_AF_PCK_DEF_OL2 (0x610ull)\n+#define NPC_AF_PCK_DEF_OIP4 (0x620ull)\n+#define NPC_AF_PCK_DEF_OIP6 (0x630ull)\n+#define NPC_AF_PCK_DEF_IIP4 (0x640ull)\n+#define NPC_AF_KEX_LDATAX_FLAGS_CFG(a) \\\n+\t(0x800ull | (uint64_t)(a) << 3)\n+#define NPC_AF_INTFX_KEX_CFG(a) \\\n+\t(0x1010ull | (uint64_t)(a) << 8)\n+#define NPC_AF_PKINDX_ACTION0(a) \\\n+\t(0x80000ull | (uint64_t)(a) << 6)\n+#define NPC_AF_PKINDX_ACTION1(a) \\\n+\t(0x80008ull | (uint64_t)(a) << 6)\n+#define NPC_AF_PKINDX_CPI_DEFX(a, b) \\\n+\t(0x80020ull | (uint64_t)(a) << 6 | (uint64_t)(b) << 3)\n+#define NPC_AF_KPUX_ENTRYX_CAMX(a, b, c) \\\n+\t(0x100000ull | (uint64_t)(a) << 14 | (uint64_t)(b) << 6 | \\\n+\t(uint64_t)(c) << 3)\n+#define NPC_AF_KPUX_ENTRYX_ACTION0(a, b) \\\n+\t(0x100020ull | (uint64_t)(a) << 14 | (uint64_t)(b) << 6)\n+#define NPC_AF_KPUX_ENTRYX_ACTION1(a, b) \\\n+\t(0x100028ull | (uint64_t)(a) << 14 | (uint64_t)(b) << 6)\n+#define NPC_AF_KPUX_ENTRY_DISX(a, b) \\\n+\t(0x180000ull | (uint64_t)(a) << 6 | (uint64_t)(b) << 3)\n+#define NPC_AF_CPIX_CFG(a) \\\n+\t(0x200000ull | (uint64_t)(a) << 3)\n+#define NPC_AF_INTFX_LIDX_LTX_LDX_CFG(a, b, c, d) \\\n+\t(0x900000ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 12 | \\\n+\t(uint64_t)(c) << 5 | (uint64_t)(d) << 3)\n+#define NPC_AF_INTFX_LDATAX_FLAGSX_CFG(a, b, c) \\\n+\t(0x980000ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 12 | \\\n+\t(uint64_t)(c) << 3)\n+#define NPC_AF_MCAMEX_BANKX_CAMX_INTF(a, b, c) \\\n+\t(0x1000000ull | (uint64_t)(a) << 10 | (uint64_t)(b) << 6 | \\\n+\t(uint64_t)(c) << 3)\n+#define NPC_AF_MCAMEX_BANKX_CAMX_W0(a, b, c) \\\n+\t(0x1000010ull | (uint64_t)(a) << 10 | (uint64_t)(b) << 6 | \\\n+\t(uint64_t)(c) << 3)\n+#define NPC_AF_MCAMEX_BANKX_CAMX_W1(a, b, c) \\\n+\t(0x1000020ull | (uint64_t)(a) << 10 | (uint64_t)(b) << 6 | \\\n+\t(uint64_t)(c) << 3)\n+#define NPC_AF_MCAMEX_BANKX_CFG(a, b) \\\n+\t(0x1800000ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define NPC_AF_MCAMEX_BANKX_STAT_ACT(a, b) \\\n+\t(0x1880000ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define NPC_AF_MATCH_STATX(a) \\\n+\t(0x1880008ull | (uint64_t)(a) << 8)\n+#define NPC_AF_INTFX_MISS_STAT_ACT(a) \\\n+\t(0x1880040ull + (uint64_t)(a) * 0x8)\n+#define NPC_AF_MCAMEX_BANKX_ACTION(a, b) \\\n+\t(0x1900000ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define NPC_AF_MCAMEX_BANKX_TAG_ACT(a, b) \\\n+\t(0x1900008ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define NPC_AF_INTFX_MISS_ACT(a) \\\n+\t(0x1a00000ull | (uint64_t)(a) << 4)\n+#define NPC_AF_INTFX_MISS_TAG_ACT(a) \\\n+\t(0x1b00008ull | (uint64_t)(a) << 4)\n+#define NPC_AF_MCAM_BANKX_HITX(a, b) \\\n+\t(0x1c80000ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define NPC_AF_LKUP_CTL (0x2000000ull)\n+#define NPC_AF_LKUP_DATAX(a) \\\n+\t(0x2000200ull | (uint64_t)(a) << 4)\n+#define NPC_AF_LKUP_RESULTX(a) \\\n+\t(0x2000400ull | (uint64_t)(a) << 4)\n+#define NPC_AF_INTFX_STAT(a) \\\n+\t(0x2000800ull | (uint64_t)(a) << 4)\n+#define NPC_AF_DBG_CTL (0x3000000ull)\n+#define NPC_AF_DBG_STATUS (0x3000010ull)\n+#define NPC_AF_KPUX_DBG(a) \\\n+\t(0x3000020ull | (uint64_t)(a) << 8)\n+#define NPC_AF_IKPU_ERR_CTL (0x3000080ull)\n+#define NPC_AF_KPUX_ERR_CTL(a) \\\n+\t(0x30000a0ull | (uint64_t)(a) << 8)\n+#define NPC_AF_MCAM_DBG (0x3001000ull)\n+#define NPC_AF_DBG_DATAX(a) \\\n+\t(0x3001400ull | (uint64_t)(a) << 4)\n+#define NPC_AF_DBG_RESULTX(a) \\\n+\t(0x3001800ull | (uint64_t)(a) << 4)\n+\n+\n+/* Enum offsets */\n+\n+#define NPC_INTF_NIX0_RX (0x0ull)\n+#define NPC_INTF_NIX0_TX (0x1ull)\n+\n+#define NPC_LKUPOP_PKT (0x0ull)\n+#define NPC_LKUPOP_KEY (0x1ull)\n+\n+#define NPC_MCAM_KEY_X1 (0x0ull)\n+#define NPC_MCAM_KEY_X2 (0x1ull)\n+#define NPC_MCAM_KEY_X4 (0x2ull)\n+\n+enum NPC_ERRLEV_E {\n+\tNPC_ERRLEV_RE = 0,\n+\tNPC_ERRLEV_LA = 1,\n+\tNPC_ERRLEV_LB = 2,\n+\tNPC_ERRLEV_LC = 3,\n+\tNPC_ERRLEV_LD = 4,\n+\tNPC_ERRLEV_LE = 5,\n+\tNPC_ERRLEV_LF = 6,\n+\tNPC_ERRLEV_LG = 7,\n+\tNPC_ERRLEV_LH = 8,\n+\tNPC_ERRLEV_R9 = 9,\n+\tNPC_ERRLEV_R10 = 10,\n+\tNPC_ERRLEV_R11 = 11,\n+\tNPC_ERRLEV_R12 = 12,\n+\tNPC_ERRLEV_R13 = 13,\n+\tNPC_ERRLEV_R14 = 14,\n+\tNPC_ERRLEV_NIX = 15,\n+\tNPC_ERRLEV_ENUM_LAST = 16,\n+};\n+\n+enum npc_kpu_err_code {\n+\tNPC_EC_NOERR = 0, /* has to be zero */\n+\tNPC_EC_UNK,\n+\tNPC_EC_IH_LENGTH,\n+\tNPC_EC_L2_K1,\n+\tNPC_EC_L2_K2,\n+\tNPC_EC_L2_K3,\n+\tNPC_EC_L2_K3_ETYPE_UNK,\n+\tNPC_EC_L2_MPLS_2MANY,\n+\tNPC_EC_L2_K4,\n+\tNPC_EC_IP_TTL_0,\n+\tNPC_EC_IP_FRAG_OFFSET_1,\n+\tNPC_EC_IP_VER,\n+\tNPC_EC_IP6_HOP_0,\n+\tNPC_EC_IP6_VER,\n+\tNPC_EC_TCP_FLAGS_FIN_ONLY,\n+\tNPC_EC_TCP_FLAGS_ZERO,\n+\tNPC_EC_TCP_FLAGS_RST_FIN,\n+\tNPC_EC_TCP_FLAGS_URG_SYN,\n+\tNPC_EC_TCP_FLAGS_RST_SYN,\n+\tNPC_EC_TCP_FLAGS_SYN_FIN,\n+\tNPC_EC_VXLAN,\n+\tNPC_EC_NVGRE,\n+\tNPC_EC_GRE,\n+\tNPC_EC_GRE_VER1,\n+\tNPC_EC_L4,\n+\tNPC_EC_OIP4_CSUM,\n+\tNPC_EC_IIP4_CSUM,\n+\tNPC_EC_LAST /* has to be the last item */\n+};\n+\n+enum NPC_LID_E {\n+\tNPC_LID_LA = 0,\n+\tNPC_LID_LB,\n+\tNPC_LID_LC,\n+\tNPC_LID_LD,\n+\tNPC_LID_LE,\n+\tNPC_LID_LF,\n+\tNPC_LID_LG,\n+\tNPC_LID_LH,\n+};\n+\n+#define NPC_LT_NA 0\n+\n+enum npc_kpu_la_ltype {\n+\tNPC_LT_LA_8023 = 1,\n+\tNPC_LT_LA_ETHER,\n+\tNPC_LT_LA_IH_8_ETHER,\n+\tNPC_LT_LA_IH_4_ETHER,\n+\tNPC_LT_LA_IH_2_ETHER,\n+};\n+\n+enum npc_kpu_lb_ltype {\n+\tNPC_LT_LB_ETAG = 1,\n+\tNPC_LT_LB_CTAG,\n+\tNPC_LT_LB_STAG,\n+\tNPC_LT_LB_BTAG,\n+\tNPC_LT_LB_QINQ,\n+\tNPC_LT_LB_ITAG,\n+};\n+\n+enum npc_kpu_lc_ltype {\n+\tNPC_LT_LC_IP = 1,\n+\tNPC_LT_LC_IP_OPT,\n+\tNPC_LT_LC_IP6,\n+\tNPC_LT_LC_IP6_EXT,\n+\tNPC_LT_LC_ARP,\n+\tNPC_LT_LC_RARP,\n+\tNPC_LT_LC_MPLS,\n+\tNPC_LT_LC_NSH,\n+\tNPC_LT_LC_PTP,\n+\tNPC_LT_LC_FCOE,\n+};\n+\n+/* Don't modify Ltypes upto SCTP, otherwise it will\n+ * effect flow tag calculation and thus RSS.\n+ */\n+enum npc_kpu_ld_ltype {\n+\tNPC_LT_LD_TCP = 1,\n+\tNPC_LT_LD_UDP,\n+\tNPC_LT_LD_ICMP,\n+\tNPC_LT_LD_SCTP,\n+\tNPC_LT_LD_IGMP,\n+\tNPC_LT_LD_ICMP6,\n+\tNPC_LT_LD_TU_MPLS,\n+\tNPC_LT_LD_ESP,\n+\tNPC_LT_LD_AH,\n+\tNPC_LT_LD_GRE,\n+\tNPC_LT_LD_NVGRE,\n+\tNPC_LT_LD_UDP_VXLAN,\n+\tNPC_LT_LD_UDP_GENEVE,\n+\tNPC_LT_LD_UDP_GTPU,\n+};\n+\n+enum npc_kpu_le_ltype {\n+\tNPC_LT_LE_TU_ETHER = 1,\n+\tNPC_LT_LE_TU_PPP,\n+\tNPC_LT_LE_TU_MPLS_IN_NSH,\n+\tNPC_LT_LE_TU_3RD_NSH,\n+};\n+\n+enum npc_kpu_lf_ltype {\n+\tNPC_LT_LF_TU_IP = 1,\n+\tNPC_LT_LF_TU_IP6,\n+\tNPC_LT_LF_TU_ARP,\n+\tNPC_LT_LF_TU_MPLS_IP,\n+\tNPC_LT_LF_TU_MPLS_IP6,\n+\tNPC_LT_LF_TU_MPLS_ETHER,\n+};\n+\n+/* Don't modify Ltypes upto SCTP, otherwise it will\n+ * effect flow tag calculation and thus RSS.\n+ */\n+enum npc_kpu_lg_ltype {\n+\tNPC_LT_LG_TU_TCP = 1,\n+\tNPC_LT_LG_TU_UDP,\n+\tNPC_LT_LG_TU_ICMP,\n+\tNPC_LT_LG_TU_SCTP,\n+\tNPC_LT_LG_TU_IGMP,\n+\tNPC_LT_LG_TU_ICMP6,\n+\tNPC_LT_LG_TU_ESP,\n+\tNPC_LT_LG_TU_AH,\n+};\n+\n+enum npc_kpu_lh_ltype {\n+\tNPC_LT_LH_TCP_DATA = 1,\n+\tNPC_LT_LH_HTTP_DATA,\n+\tNPC_LT_LH_HTTPS_DATA,\n+\tNPC_LT_LH_PPTP_DATA,\n+\tNPC_LT_LH_UDP_DATA,\n+\tNPC_LT_LH_UDP_PTP,\n+};\n+\n+/* Structures definitions */\n+struct npc_kpu_profile_cam {\n+\tuint8_t state;\n+\tuint8_t state_mask;\n+\tuint16_t dp0;\n+\tuint16_t dp0_mask;\n+\tuint16_t dp1;\n+\tuint16_t dp1_mask;\n+\tuint16_t dp2;\n+\tuint16_t dp2_mask;\n+};\n+\n+struct npc_kpu_profile_action {\n+\tuint8_t errlev;\n+\tuint8_t errcode;\n+\tuint8_t dp0_offset;\n+\tuint8_t dp1_offset;\n+\tuint8_t dp2_offset;\n+\tuint8_t bypass_count;\n+\tuint8_t parse_done;\n+\tuint8_t next_state;\n+\tuint8_t ptr_advance;\n+\tuint8_t cap_ena;\n+\tuint8_t lid;\n+\tuint8_t ltype;\n+\tuint8_t flags;\n+\tuint8_t offset;\n+\tuint8_t mask;\n+\tuint8_t right;\n+\tuint8_t shift;\n+};\n+\n+struct npc_kpu_profile {\n+\tint cam_entries;\n+\tint action_entries;\n+\tstruct npc_kpu_profile_cam *cam;\n+\tstruct npc_kpu_profile_action *action;\n+};\n+\n+/* NPC KPU register formats */\n+struct npc_kpu_cam {\n+\tuint64_t dp0_data : 16;\n+\tuint64_t dp1_data : 16;\n+\tuint64_t dp2_data : 16;\n+\tuint64_t state : 8;\n+\tuint64_t rsvd_63_56 : 8;\n+};\n+\n+struct npc_kpu_action0 {\n+\tuint64_t var_len_shift : 3;\n+\tuint64_t var_len_right : 1;\n+\tuint64_t var_len_mask : 8;\n+\tuint64_t var_len_offset : 8;\n+\tuint64_t ptr_advance : 8;\n+\tuint64_t capture_flags : 8;\n+\tuint64_t capture_ltype : 4;\n+\tuint64_t capture_lid : 3;\n+\tuint64_t rsvd_43 : 1;\n+\tuint64_t next_state : 8;\n+\tuint64_t parse_done : 1;\n+\tuint64_t capture_ena : 1;\n+\tuint64_t byp_count : 3;\n+\tuint64_t rsvd_63_57 : 7;\n+};\n+\n+struct npc_kpu_action1 {\n+\tuint64_t dp0_offset : 8;\n+\tuint64_t dp1_offset : 8;\n+\tuint64_t dp2_offset : 8;\n+\tuint64_t errcode : 8;\n+\tuint64_t errlev : 4;\n+\tuint64_t rsvd_63_36 : 28;\n+};\n+\n+struct npc_kpu_pkind_cpi_def {\n+\tuint64_t cpi_base : 10;\n+\tuint64_t rsvd_11_10 : 2;\n+\tuint64_t add_shift : 3;\n+\tuint64_t rsvd_15 : 1;\n+\tuint64_t add_mask : 8;\n+\tuint64_t add_offset : 8;\n+\tuint64_t flags_mask : 8;\n+\tuint64_t flags_match : 8;\n+\tuint64_t ltype_mask : 4;\n+\tuint64_t ltype_match : 4;\n+\tuint64_t lid : 3;\n+\tuint64_t rsvd_62_59 : 4;\n+\tuint64_t ena : 1;\n+};\n+\n+struct nix_rx_action {\n+\tuint64_t op :4;\n+\tuint64_t pf_func :16;\n+\tuint64_t index :20;\n+\tuint64_t match_id :16;\n+\tuint64_t flow_key_alg :5;\n+\tuint64_t rsvd_63_61 :3;\n+};\n+\n+struct nix_tx_action {\n+\tuint64_t\top\t\t:4;\n+\tuint64_t\trsvd_11_4\t:8;\n+\tuint64_t\tindex\t\t:20;\n+\tuint64_t\tmatch_id\t:16;\n+\tuint64_t\trsvd_63_48\t:16;\n+};\n+\n+/* NPC layer parse information structure */\n+struct npc_layer_info_s {\n+\tuint32_t lptr : 8;\n+\tuint32_t flags : 8;\n+\tuint32_t ltype : 4;\n+\tuint32_t rsvd_31_20 : 12;\n+};\n+\n+/* NPC layer mcam search key extract structure */\n+struct npc_layer_kex_s {\n+\tuint16_t flags : 8;\n+\tuint16_t ltype : 4;\n+\tuint16_t rsvd_15_12 : 4;\n+};\n+\n+/* NPC mcam search key x1 structure */\n+struct npc_mcam_key_x1_s {\n+\tuint64_t intf : 2;\n+\tuint64_t rsvd_63_2 : 62;\n+\tuint64_t kw0 : 64; /* W1 */\n+\tuint64_t kw1 : 48;\n+\tuint64_t rsvd_191_176 : 16;\n+};\n+\n+/* NPC mcam search key x2 structure */\n+struct npc_mcam_key_x2_s {\n+\tuint64_t intf : 2;\n+\tuint64_t rsvd_63_2 : 62;\n+\tuint64_t kw0 : 64; /* W1 */\n+\tuint64_t kw1 : 64; /* W2 */\n+\tuint64_t kw2 : 64; /* W3 */\n+\tuint64_t kw3 : 32;\n+\tuint64_t rsvd_319_288 : 32;\n+};\n+\n+/* NPC mcam search key x4 structure */\n+struct npc_mcam_key_x4_s {\n+\tuint64_t intf : 2;\n+\tuint64_t rsvd_63_2 : 62;\n+\tuint64_t kw0 : 64; /* W1 */\n+\tuint64_t kw1 : 64; /* W2 */\n+\tuint64_t kw2 : 64; /* W3 */\n+\tuint64_t kw3 : 64; /* W4 */\n+\tuint64_t kw4 : 64; /* W5 */\n+\tuint64_t kw5 : 64; /* W6 */\n+\tuint64_t kw6 : 64; /* W7 */\n+};\n+\n+/* NPC parse key extract structure */\n+struct npc_parse_kex_s {\n+\tuint64_t chan : 12;\n+\tuint64_t errlev : 4;\n+\tuint64_t errcode : 8;\n+\tuint64_t l2m : 1;\n+\tuint64_t l2b : 1;\n+\tuint64_t l3m : 1;\n+\tuint64_t l3b : 1;\n+\tuint64_t la : 12;\n+\tuint64_t lb : 12;\n+\tuint64_t lc : 12;\n+\tuint64_t ld : 12;\n+\tuint64_t le : 12;\n+\tuint64_t lf : 12;\n+\tuint64_t lg : 12;\n+\tuint64_t lh : 12;\n+\tuint64_t rsvd_127_124 : 4;\n+};\n+\n+/* NPC result structure */\n+struct npc_result_s {\n+\tuint64_t intf : 2;\n+\tuint64_t pkind : 6;\n+\tuint64_t chan : 12;\n+\tuint64_t errlev : 4;\n+\tuint64_t errcode : 8;\n+\tuint64_t l2m : 1;\n+\tuint64_t l2b : 1;\n+\tuint64_t l3m : 1;\n+\tuint64_t l3b : 1;\n+\tuint64_t eoh_ptr : 8;\n+\tuint64_t rsvd_63_44 : 20;\n+\tuint64_t action : 64; /* W1 */\n+\tuint64_t vtag_action : 64; /* W2 */\n+\tuint64_t la : 20;\n+\tuint64_t lb : 20;\n+\tuint64_t lc : 20;\n+\tuint64_t rsvd_255_252 : 4;\n+\tuint64_t ld : 20;\n+\tuint64_t le : 20;\n+\tuint64_t lf : 20;\n+\tuint64_t rsvd_319_316 : 4;\n+\tuint64_t lg : 20;\n+\tuint64_t lh : 20;\n+\tuint64_t rsvd_383_360 : 24;\n+};\n+\n+#endif /* __OTX2_NPC_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_rvu.h b/drivers/common/octeontx2/hw/otx2_rvu.h\nnew file mode 100644\nindex 000000000..f2037ec57\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_rvu.h\n@@ -0,0 +1,212 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_RVU_HW_H__\n+#define __OTX2_RVU_HW_H__\n+\n+/* Register offsets */\n+\n+#define RVU_AF_MSIXTR_BASE (0x10ull)\n+#define RVU_AF_BLK_RST (0x30ull)\n+#define RVU_AF_PF_BAR4_ADDR (0x40ull)\n+#define RVU_AF_RAS (0x100ull)\n+#define RVU_AF_RAS_W1S (0x108ull)\n+#define RVU_AF_RAS_ENA_W1S (0x110ull)\n+#define RVU_AF_RAS_ENA_W1C (0x118ull)\n+#define RVU_AF_GEN_INT (0x120ull)\n+#define RVU_AF_GEN_INT_W1S (0x128ull)\n+#define RVU_AF_GEN_INT_ENA_W1S (0x130ull)\n+#define RVU_AF_GEN_INT_ENA_W1C (0x138ull)\n+#define RVU_AF_AFPFX_MBOXX(a, b) \\\n+\t(0x2000ull | (uint64_t)(a) << 4 | (uint64_t)(b) << 3)\n+#define RVU_AF_PFME_STATUS (0x2800ull)\n+#define RVU_AF_PFTRPEND (0x2810ull)\n+#define RVU_AF_PFTRPEND_W1S (0x2820ull)\n+#define RVU_AF_PF_RST (0x2840ull)\n+#define RVU_AF_HWVF_RST (0x2850ull)\n+#define RVU_AF_PFAF_MBOX_INT (0x2880ull)\n+#define RVU_AF_PFAF_MBOX_INT_W1S (0x2888ull)\n+#define RVU_AF_PFAF_MBOX_INT_ENA_W1S (0x2890ull)\n+#define RVU_AF_PFAF_MBOX_INT_ENA_W1C (0x2898ull)\n+#define RVU_AF_PFFLR_INT (0x28a0ull)\n+#define RVU_AF_PFFLR_INT_W1S (0x28a8ull)\n+#define RVU_AF_PFFLR_INT_ENA_W1S (0x28b0ull)\n+#define RVU_AF_PFFLR_INT_ENA_W1C (0x28b8ull)\n+#define RVU_AF_PFME_INT (0x28c0ull)\n+#define RVU_AF_PFME_INT_W1S (0x28c8ull)\n+#define RVU_AF_PFME_INT_ENA_W1S (0x28d0ull)\n+#define RVU_AF_PFME_INT_ENA_W1C (0x28d8ull)\n+#define RVU_PRIV_CONST (0x8000000ull)\n+#define RVU_PRIV_GEN_CFG (0x8000010ull)\n+#define RVU_PRIV_CLK_CFG (0x8000020ull)\n+#define RVU_PRIV_ACTIVE_PC (0x8000030ull)\n+#define RVU_PRIV_PFX_CFG(a) (0x8000100ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_MSIX_CFG(a) (0x8000110ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_ID_CFG(a) (0x8000120ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_INT_CFG(a) (0x8000200ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_NIXX_CFG(a, b) \\\n+\t(0x8000300ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+#define RVU_PRIV_PFX_NPA_CFG(a) (0x8000310ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_SSO_CFG(a) (0x8000320ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_SSOW_CFG(a) (0x8000330ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_TIM_CFG(a) (0x8000340ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_PFX_CPTX_CFG(a, b) \\\n+\t(0x8000350ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+#define RVU_PRIV_BLOCK_TYPEX_REV(a) (0x8000400ull | (uint64_t)(a) << 3)\n+#define RVU_PRIV_HWVFX_INT_CFG(a) (0x8001280ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_HWVFX_NIXX_CFG(a, b) \\\n+\t(0x8001300ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+#define RVU_PRIV_HWVFX_NPA_CFG(a) (0x8001310ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_HWVFX_SSO_CFG(a) (0x8001320ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_HWVFX_SSOW_CFG(a) (0x8001330ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_HWVFX_TIM_CFG(a) (0x8001340ull | (uint64_t)(a) << 16)\n+#define RVU_PRIV_HWVFX_CPTX_CFG(a, b) \\\n+\t(0x8001350ull | (uint64_t)(a) << 16 | (uint64_t)(b) << 3)\n+\n+#define RVU_PF_VFX_PFVF_MBOXX(a, b) \\\n+\t(0x0ull | (uint64_t)(a) << 12 | (uint64_t)(b) << 3)\n+#define RVU_PF_VF_BAR4_ADDR (0x10ull)\n+#define RVU_PF_BLOCK_ADDRX_DISC(a) (0x200ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFME_STATUSX(a) (0x800ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFTRPENDX(a) (0x820ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFTRPEND_W1SX(a) (0x840ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFPF_MBOX_INTX(a) (0x880ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFPF_MBOX_INT_W1SX(a) (0x8a0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFPF_MBOX_INT_ENA_W1SX(a) (0x8c0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFPF_MBOX_INT_ENA_W1CX(a) (0x8e0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFFLR_INTX(a) (0x900ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFFLR_INT_W1SX(a) (0x920ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFFLR_INT_ENA_W1SX(a) (0x940ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFFLR_INT_ENA_W1CX(a) (0x960ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFME_INTX(a) (0x980ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFME_INT_W1SX(a) (0x9a0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFME_INT_ENA_W1SX(a) (0x9c0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_VFME_INT_ENA_W1CX(a) (0x9e0ull | (uint64_t)(a) << 3)\n+#define RVU_PF_PFAF_MBOXX(a) (0xc00ull | (uint64_t)(a) << 3)\n+#define RVU_PF_INT (0xc20ull)\n+#define RVU_PF_INT_W1S (0xc28ull)\n+#define RVU_PF_INT_ENA_W1S (0xc30ull)\n+#define RVU_PF_INT_ENA_W1C (0xc38ull)\n+#define RVU_PF_MSIX_VECX_ADDR(a) (0x80000ull | (uint64_t)(a) << 4)\n+#define RVU_PF_MSIX_VECX_CTL(a) (0x80008ull | (uint64_t)(a) << 4)\n+#define RVU_PF_MSIX_PBAX(a) (0xf0000ull | (uint64_t)(a) << 3)\n+#define RVU_VF_VFPF_MBOXX(a) (0x0ull | (uint64_t)(a) << 3)\n+#define RVU_VF_INT (0x20ull)\n+#define RVU_VF_INT_W1S (0x28ull)\n+#define RVU_VF_INT_ENA_W1S (0x30ull)\n+#define RVU_VF_INT_ENA_W1C (0x38ull)\n+#define RVU_VF_BLOCK_ADDRX_DISC(a) (0x200ull | (uint64_t)(a) << 3)\n+#define RVU_VF_MSIX_VECX_ADDR(a) (0x80000ull | (uint64_t)(a) << 4)\n+#define RVU_VF_MSIX_VECX_CTL(a) (0x80008ull | (uint64_t)(a) << 4)\n+#define RVU_VF_MSIX_PBAX(a) (0xf0000ull | (uint64_t)(a) << 3)\n+\n+\n+/* Enum offsets */\n+\n+#define RVU_BAR_RVU_PF_END_BAR0 (0x84f000000000ull)\n+#define RVU_BAR_RVU_PF_START_BAR0 (0x840000000000ull)\n+#define RVU_BAR_RVU_PFX_FUNCX_BAR2(a, b) \\\n+\t(0x840200000000ull | ((uint64_t)(a) << 36) | ((uint64_t)(b) << 25))\n+\n+#define RVU_AF_INT_VEC_POISON (0x0ull)\n+#define RVU_AF_INT_VEC_PFFLR (0x1ull)\n+#define RVU_AF_INT_VEC_PFME (0x2ull)\n+#define RVU_AF_INT_VEC_GEN (0x3ull)\n+#define RVU_AF_INT_VEC_MBOX (0x4ull)\n+\n+#define RVU_BLOCK_TYPE_RVUM (0x0ull)\n+#define RVU_BLOCK_TYPE_LMT (0x2ull)\n+#define RVU_BLOCK_TYPE_NIX (0x3ull)\n+#define RVU_BLOCK_TYPE_NPA (0x4ull)\n+#define RVU_BLOCK_TYPE_NPC (0x5ull)\n+#define RVU_BLOCK_TYPE_SSO (0x6ull)\n+#define RVU_BLOCK_TYPE_SSOW (0x7ull)\n+#define RVU_BLOCK_TYPE_TIM (0x8ull)\n+#define RVU_BLOCK_TYPE_CPT (0x9ull)\n+#define RVU_BLOCK_TYPE_NDC (0xaull)\n+#define RVU_BLOCK_TYPE_DDF (0xbull)\n+#define RVU_BLOCK_TYPE_ZIP (0xcull)\n+#define RVU_BLOCK_TYPE_RAD (0xdull)\n+#define RVU_BLOCK_TYPE_DFA (0xeull)\n+#define RVU_BLOCK_TYPE_HNA (0xfull)\n+\n+#define RVU_BLOCK_ADDR_RVUM (0x0ull)\n+#define RVU_BLOCK_ADDR_LMT (0x1ull)\n+#define RVU_BLOCK_ADDR_NPA (0x3ull)\n+#define RVU_BLOCK_ADDR_NPC (0x6ull)\n+#define RVU_BLOCK_ADDR_SSO (0x7ull)\n+#define RVU_BLOCK_ADDR_SSOW (0x8ull)\n+#define RVU_BLOCK_ADDR_TIM (0x9ull)\n+#define RVU_BLOCK_ADDR_NIX0 (0x4ull)\n+#define RVU_BLOCK_ADDR_CPT0 (0xaull)\n+#define RVU_BLOCK_ADDR_NDC0 (0xcull)\n+#define RVU_BLOCK_ADDR_NDC1 (0xdull)\n+#define RVU_BLOCK_ADDR_NDC2 (0xeull)\n+#define RVU_BLOCK_ADDR_R_END (0x1full)\n+#define RVU_BLOCK_ADDR_R_START (0x14ull)\n+\n+#define RVU_VF_INT_VEC_MBOX (0x0ull)\n+\n+#define RVU_PF_INT_VEC_AFPF_MBOX (0x6ull)\n+#define RVU_PF_INT_VEC_VFFLR0 (0x0ull)\n+#define RVU_PF_INT_VEC_VFFLR1 (0x1ull)\n+#define RVU_PF_INT_VEC_VFME0 (0x2ull)\n+#define RVU_PF_INT_VEC_VFME1 (0x3ull)\n+#define RVU_PF_INT_VEC_VFPF_MBOX0 (0x4ull)\n+#define RVU_PF_INT_VEC_VFPF_MBOX1 (0x5ull)\n+\n+\n+#define AF_BAR2_ALIASX_SIZE\t\t(0x100000ull)\n+\n+#define TIM_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+#define SSO_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+#define NIX_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+#define SSOW_AF_BAR2_SEL\t\t(0x9000000ull)\n+#define NPA_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+#define CPT_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+#define RVU_AF_BAR2_SEL\t\t\t(0x9000000ull)\n+\n+#define AF_BAR2_ALIASX(a, b) \\\n+\t(0x9100000ull | (uint64_t)(a) << 12 | (uint64_t)(b))\n+#define TIM_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(a, b)\n+#define SSO_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(a, b)\n+#define NIX_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(0, b)\n+#define SSOW_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(a, b)\n+#define NPA_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(0, b)\n+#define CPT_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(a, b)\n+#define RVU_AF_BAR2_ALIASX(a, b)\t\tAF_BAR2_ALIASX(a, b)\n+\n+/* Structures definitions */\n+\n+/* RVU admin function register address structure */\n+struct rvu_af_addr_s {\n+\tuint64_t addr : 28;\n+\tuint64_t block : 5;\n+\tuint64_t rsvd_63_33 : 31;\n+};\n+\n+/* RVU function-unique address structure */\n+struct rvu_func_addr_s {\n+\tuint32_t addr : 12;\n+\tuint32_t lf_slot : 8;\n+\tuint32_t block : 5;\n+\tuint32_t rsvd_31_25 : 7;\n+};\n+\n+/* RVU msi-x vector structure */\n+struct rvu_msix_vec_s {\n+\tuint64_t addr : 64; /* W0 */\n+\tuint64_t data : 32;\n+\tuint64_t mask : 1;\n+\tuint64_t pend : 1;\n+\tuint64_t rsvd_127_98 : 30;\n+};\n+\n+/* RVU pf function identification structure */\n+struct rvu_pf_func_s {\n+\tuint16_t func : 10;\n+\tuint16_t pf : 6;\n+};\n+\n+#endif /* __OTX2_RVU_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_sso.h b/drivers/common/octeontx2/hw/otx2_sso.h\nnew file mode 100644\nindex 000000000..98a8130b1\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_sso.h\n@@ -0,0 +1,209 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_SSO_HW_H__\n+#define __OTX2_SSO_HW_H__\n+\n+/* Register offsets */\n+\n+#define SSO_AF_CONST (0x1000ull)\n+#define SSO_AF_CONST1 (0x1008ull)\n+#define SSO_AF_WQ_INT_PC (0x1020ull)\n+#define SSO_AF_NOS_CNT (0x1050ull)\n+#define SSO_AF_AW_WE (0x1080ull)\n+#define SSO_AF_WS_CFG (0x1088ull)\n+#define SSO_AF_GWE_CFG (0x1098ull)\n+#define SSO_AF_GWE_RANDOM (0x10b0ull)\n+#define SSO_AF_LF_HWGRP_RST (0x10e0ull)\n+#define SSO_AF_AW_CFG (0x10f0ull)\n+#define SSO_AF_BLK_RST (0x10f8ull)\n+#define SSO_AF_ACTIVE_CYCLES0 (0x1100ull)\n+#define SSO_AF_ACTIVE_CYCLES1 (0x1108ull)\n+#define SSO_AF_ACTIVE_CYCLES2 (0x1110ull)\n+#define SSO_AF_ERR0 (0x1220ull)\n+#define SSO_AF_ERR0_W1S (0x1228ull)\n+#define SSO_AF_ERR0_ENA_W1C (0x1230ull)\n+#define SSO_AF_ERR0_ENA_W1S (0x1238ull)\n+#define SSO_AF_ERR2 (0x1260ull)\n+#define SSO_AF_ERR2_W1S (0x1268ull)\n+#define SSO_AF_ERR2_ENA_W1C (0x1270ull)\n+#define SSO_AF_ERR2_ENA_W1S (0x1278ull)\n+#define SSO_AF_UNMAP_INFO (0x12f0ull)\n+#define SSO_AF_UNMAP_INFO2 (0x1300ull)\n+#define SSO_AF_UNMAP_INFO3 (0x1310ull)\n+#define SSO_AF_RAS (0x1420ull)\n+#define SSO_AF_RAS_W1S (0x1430ull)\n+#define SSO_AF_RAS_ENA_W1C (0x1460ull)\n+#define SSO_AF_RAS_ENA_W1S (0x1470ull)\n+#define SSO_AF_AW_INP_CTL (0x2070ull)\n+#define SSO_AF_AW_ADD (0x2080ull)\n+#define SSO_AF_AW_READ_ARB (0x2090ull)\n+#define SSO_AF_XAQ_REQ_PC (0x20b0ull)\n+#define SSO_AF_XAQ_LATENCY_PC (0x20b8ull)\n+#define SSO_AF_TAQ_CNT (0x20c0ull)\n+#define SSO_AF_TAQ_ADD (0x20e0ull)\n+#define SSO_AF_POISONX(a) (0x2100ull | (uint64_t)(a) << 3)\n+#define SSO_AF_POISONX_W1S(a) (0x2200ull | (uint64_t)(a) << 3)\n+#define SSO_PRIV_AF_INT_CFG (0x3000ull)\n+#define SSO_AF_RVU_LF_CFG_DEBUG (0x3800ull)\n+#define SSO_PRIV_LFX_HWGRP_CFG(a) (0x10000ull | (uint64_t)(a) << 3)\n+#define SSO_PRIV_LFX_HWGRP_INT_CFG(a) (0x20000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IU_ACCNTX_CFG(a) (0x50000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IU_ACCNTX_RST(a) (0x60000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQX_HEAD_PTR(a) (0x80000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQX_TAIL_PTR(a) (0x90000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQX_HEAD_NEXT(a) (0xa0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQX_TAIL_NEXT(a) (0xb0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_TIAQX_STATUS(a) (0xc0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_TOAQX_STATUS(a) (0xd0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQX_GMCTL(a) (0xe0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_HWGRPX_IAQ_THR(a) (0x200000ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_TAQ_THR(a) (0x200010ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_PRI(a) (0x200020ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_WS_PC(a) (0x200050ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_EXT_PC(a) (0x200060ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_WA_PC(a) (0x200070ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_TS_PC(a) (0x200080ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_DS_PC(a) (0x200090ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_DQ_PC(a) (0x2000A0ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_PAGE_CNT(a) (0x200100ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_AW_STATUS(a) (0x200110ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_AW_CFG(a) (0x200120ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_AW_TAGSPACE(a) (0x200130ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_XAQ_AURA(a) (0x200140ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_XAQ_LIMIT(a) (0x200220ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWGRPX_IU_ACCNT(a) (0x200230ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWSX_ARB(a) (0x400100ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWSX_INV(a) (0x400180ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWSX_GMCTL(a) (0x400200ull | (uint64_t)(a) << 12)\n+#define SSO_AF_HWSX_SX_GRPMSKX(a, b, c) \\\n+\t(0x400400ull | (uint64_t)(a) << 12 | (uint64_t)(b) << 5 | \\\n+\t(uint64_t)(c) << 3)\n+#define SSO_AF_IPL_FREEX(a) (0x800000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IPL_IAQX(a) (0x840000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IPL_DESCHEDX(a) (0x860000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IPL_CONFX(a) (0x880000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_NPA_DIGESTX(a) (0x900000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_NPA_DIGESTX_W1S(a) (0x900100ull | (uint64_t)(a) << 3)\n+#define SSO_AF_BFP_DIGESTX(a) (0x900200ull | (uint64_t)(a) << 3)\n+#define SSO_AF_BFP_DIGESTX_W1S(a) (0x900300ull | (uint64_t)(a) << 3)\n+#define SSO_AF_BFPN_DIGESTX(a) (0x900400ull | (uint64_t)(a) << 3)\n+#define SSO_AF_BFPN_DIGESTX_W1S(a) (0x900500ull | (uint64_t)(a) << 3)\n+#define SSO_AF_GRPDIS_DIGESTX(a) (0x900600ull | (uint64_t)(a) << 3)\n+#define SSO_AF_GRPDIS_DIGESTX_W1S(a) (0x900700ull | (uint64_t)(a) << 3)\n+#define SSO_AF_AWEMPTY_DIGESTX(a) (0x900800ull | (uint64_t)(a) << 3)\n+#define SSO_AF_AWEMPTY_DIGESTX_W1S(a) (0x900900ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WQP0_DIGESTX(a) (0x900a00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WQP0_DIGESTX_W1S(a) (0x900b00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_AW_DROPPED_DIGESTX(a) (0x900c00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_AW_DROPPED_DIGESTX_W1S(a) (0x900d00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_QCTLDIS_DIGESTX(a) (0x900e00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_QCTLDIS_DIGESTX_W1S(a) (0x900f00ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQDIS_DIGESTX(a) (0x901000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_XAQDIS_DIGESTX_W1S(a) (0x901100ull | (uint64_t)(a) << 3)\n+#define SSO_AF_FLR_AQ_DIGESTX(a) (0x901200ull | (uint64_t)(a) << 3)\n+#define SSO_AF_FLR_AQ_DIGESTX_W1S(a) (0x901300ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GMULTI_DIGESTX(a) (0x902000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GMULTI_DIGESTX_W1S(a) (0x902100ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GUNMAP_DIGESTX(a) (0x902200ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GUNMAP_DIGESTX_W1S(a) (0x902300ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_AWE_DIGESTX(a) (0x902400ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_AWE_DIGESTX_W1S(a) (0x902500ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GWI_DIGESTX(a) (0x902600ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_GWI_DIGESTX_W1S(a) (0x902700ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_NE_DIGESTX(a) (0x902800ull | (uint64_t)(a) << 3)\n+#define SSO_AF_WS_NE_DIGESTX_W1S(a) (0x902900ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_TAG(a) (0xa00000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_GRP(a) (0xa20000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_PENDTAG(a) (0xa40000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_LINKS(a) (0xa60000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_QLINKS(a) (0xa80000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_IENTX_WQP(a) (0xaa0000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_TAQX_LINK(a) (0xc00000ull | (uint64_t)(a) << 3)\n+#define SSO_AF_TAQX_WAEX_TAG(a, b) \\\n+\t(0xe00000ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+#define SSO_AF_TAQX_WAEX_WQP(a, b) \\\n+\t(0xe00008ull | (uint64_t)(a) << 8 | (uint64_t)(b) << 4)\n+\n+#define SSO_LF_GGRP_OP_ADD_WORK0 (0x0ull)\n+#define SSO_LF_GGRP_OP_ADD_WORK1 (0x8ull)\n+#define SSO_LF_GGRP_QCTL (0x20ull)\n+#define SSO_LF_GGRP_EXE_DIS (0x80ull)\n+#define SSO_LF_GGRP_INT (0x100ull)\n+#define SSO_LF_GGRP_INT_W1S (0x108ull)\n+#define SSO_LF_GGRP_INT_ENA_W1S (0x110ull)\n+#define SSO_LF_GGRP_INT_ENA_W1C (0x118ull)\n+#define SSO_LF_GGRP_INT_THR (0x140ull)\n+#define SSO_LF_GGRP_INT_CNT (0x180ull)\n+#define SSO_LF_GGRP_XAQ_CNT (0x1b0ull)\n+#define SSO_LF_GGRP_AQ_CNT (0x1c0ull)\n+#define SSO_LF_GGRP_AQ_THR (0x1e0ull)\n+#define SSO_LF_GGRP_MISC_CNT (0x200ull)\n+\n+#define SSO_AF_IAQ_FREE_CNT_MASK 0x3FFFull\n+#define SSO_AF_IAQ_RSVD_FREE_MASK 0x3FFFull\n+#define SSO_AF_IAQ_RSVD_FREE_SHIFT 16\n+#define SSO_AF_IAQ_FREE_CNT_MAX SSO_AF_IAQ_FREE_CNT_MASK\n+#define SSO_AF_AW_ADD_RSVD_FREE_MASK 0x3FFFull\n+#define SSO_AF_AW_ADD_RSVD_FREE_SHIFT 16\n+#define SSO_HWGRP_IAQ_MAX_THR_MASK 0x3FFFull\n+#define SSO_HWGRP_IAQ_RSVD_THR_MASK 0x3FFFull\n+#define SSO_HWGRP_IAQ_MAX_THR_SHIFT 32\n+#define SSO_HWGRP_IAQ_RSVD_THR 0x2\n+\n+#define SSO_AF_TAQ_FREE_CNT_MASK 0x7FFull\n+#define SSO_AF_TAQ_RSVD_FREE_MASK 0x7FFull\n+#define SSO_AF_TAQ_RSVD_FREE_SHIFT 16\n+#define SSO_AF_TAQ_FREE_CNT_MAX SSO_AF_TAQ_FREE_CNT_MASK\n+#define SSO_AF_TAQ_ADD_RSVD_FREE_MASK 0x1FFFull\n+#define SSO_AF_TAQ_ADD_RSVD_FREE_SHIFT 16\n+#define SSO_HWGRP_TAQ_MAX_THR_MASK 0x7FFull\n+#define SSO_HWGRP_TAQ_RSVD_THR_MASK 0x7FFull\n+#define SSO_HWGRP_TAQ_MAX_THR_SHIFT 32\n+#define SSO_HWGRP_TAQ_RSVD_THR 0x3\n+\n+#define SSO_HWGRP_PRI_AFF_MASK 0xFull\n+#define SSO_HWGRP_PRI_AFF_SHIFT 8\n+#define SSO_HWGRP_PRI_WGT_MASK 0x3Full\n+#define SSO_HWGRP_PRI_WGT_SHIFT 16\n+#define SSO_HWGRP_PRI_WGT_LEFT_MASK 0x3Full\n+#define SSO_HWGRP_PRI_WGT_LEFT_SHIFT 24\n+\n+#define SSO_HWGRP_AW_CFG_RWEN BIT_ULL(0)\n+#define SSO_HWGRP_AW_CFG_LDWB BIT_ULL(1)\n+#define SSO_HWGRP_AW_CFG_LDT BIT_ULL(2)\n+#define SSO_HWGRP_AW_CFG_STT BIT_ULL(3)\n+#define SSO_HWGRP_AW_CFG_XAQ_BYP_DIS BIT_ULL(4)\n+\n+#define SSO_HWGRP_AW_STS_TPTR_VLD BIT_ULL(8)\n+#define SSO_HWGRP_AW_STS_NPA_FETCH BIT_ULL(9)\n+#define SSO_HWGRP_AW_STS_XAQ_BUFSC_MASK 0x7ull\n+#define SSO_HWGRP_AW_STS_INIT_STS 0x18ull\n+\n+/* Enum offsets */\n+\n+#define SSO_LF_INT_VEC_GRP (0x0ull)\n+\n+#define SSO_AF_INT_VEC_ERR0 (0x0ull)\n+#define SSO_AF_INT_VEC_ERR2 (0x1ull)\n+#define SSO_AF_INT_VEC_RAS (0x2ull)\n+\n+#define SSO_WA_IOBN (0x0ull)\n+#define SSO_WA_NIXRX (0x1ull)\n+#define SSO_WA_CPT (0x2ull)\n+#define SSO_WA_ADDWQ (0x3ull)\n+#define SSO_WA_DPI (0x4ull)\n+#define SSO_WA_NIXTX (0x5ull)\n+#define SSO_WA_TIM (0x6ull)\n+#define SSO_WA_ZIP (0x7ull)\n+\n+#define SSO_TT_ORDERED (0x0ull)\n+#define SSO_TT_ATOMIC (0x1ull)\n+#define SSO_TT_UNTAGGED (0x2ull)\n+#define SSO_TT_EMPTY (0x3ull)\n+\n+\n+/* Structures definitions */\n+\n+#endif /* __OTX2_SSO_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_ssow.h b/drivers/common/octeontx2/hw/otx2_ssow.h\nnew file mode 100644\nindex 000000000..8a4457803\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_ssow.h\n@@ -0,0 +1,56 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_SSOW_HW_H__\n+#define __OTX2_SSOW_HW_H__\n+\n+/* Register offsets */\n+\n+#define SSOW_AF_RVU_LF_HWS_CFG_DEBUG (0x10ull)\n+#define SSOW_AF_LF_HWS_RST (0x30ull)\n+#define SSOW_PRIV_LFX_HWS_CFG(a) (0x1000ull | (uint64_t)(a) << 3)\n+#define SSOW_PRIV_LFX_HWS_INT_CFG(a) (0x2000ull | (uint64_t)(a) << 3)\n+#define SSOW_AF_SCRATCH_WS (0x100000ull)\n+#define SSOW_AF_SCRATCH_GW (0x200000ull)\n+#define SSOW_AF_SCRATCH_AW (0x300000ull)\n+\n+#define SSOW_LF_GWS_LINKS (0x10ull)\n+#define SSOW_LF_GWS_PENDWQP (0x40ull)\n+#define SSOW_LF_GWS_PENDSTATE (0x50ull)\n+#define SSOW_LF_GWS_NW_TIM (0x70ull)\n+#define SSOW_LF_GWS_GRPMSK_CHG (0x80ull)\n+#define SSOW_LF_GWS_INT (0x100ull)\n+#define SSOW_LF_GWS_INT_W1S (0x108ull)\n+#define SSOW_LF_GWS_INT_ENA_W1S (0x110ull)\n+#define SSOW_LF_GWS_INT_ENA_W1C (0x118ull)\n+#define SSOW_LF_GWS_TAG (0x200ull)\n+#define SSOW_LF_GWS_WQP (0x210ull)\n+#define SSOW_LF_GWS_SWTP (0x220ull)\n+#define SSOW_LF_GWS_PENDTAG (0x230ull)\n+#define SSOW_LF_GWS_OP_ALLOC_WE (0x400ull)\n+#define SSOW_LF_GWS_OP_GET_WORK (0x600ull)\n+#define SSOW_LF_GWS_OP_SWTAG_FLUSH (0x800ull)\n+#define SSOW_LF_GWS_OP_SWTAG_UNTAG (0x810ull)\n+#define SSOW_LF_GWS_OP_SWTP_CLR (0x820ull)\n+#define SSOW_LF_GWS_OP_UPD_WQP_GRP0 (0x830ull)\n+#define SSOW_LF_GWS_OP_UPD_WQP_GRP1 (0x838ull)\n+#define SSOW_LF_GWS_OP_DESCHED (0x880ull)\n+#define SSOW_LF_GWS_OP_DESCHED_NOSCH (0x8c0ull)\n+#define SSOW_LF_GWS_OP_SWTAG_DESCHED (0x980ull)\n+#define SSOW_LF_GWS_OP_SWTAG_NOSCHED (0x9c0ull)\n+#define SSOW_LF_GWS_OP_CLR_NSCHED0 (0xa00ull)\n+#define SSOW_LF_GWS_OP_CLR_NSCHED1 (0xa08ull)\n+#define SSOW_LF_GWS_OP_SWTP_SET (0xc00ull)\n+#define SSOW_LF_GWS_OP_SWTAG_NORM (0xc10ull)\n+#define SSOW_LF_GWS_OP_SWTAG_FULL0 (0xc20ull)\n+#define SSOW_LF_GWS_OP_SWTAG_FULL1 (0xc28ull)\n+#define SSOW_LF_GWS_OP_GWC_INVAL (0xe00ull)\n+\n+\n+/* Enum offsets */\n+\n+#define SSOW_LF_INT_VEC_IOP (0x0ull)\n+\n+\n+#endif /* __OTX2_SSOW_HW_H__ */\ndiff --git a/drivers/common/octeontx2/hw/otx2_tim.h b/drivers/common/octeontx2/hw/otx2_tim.h\nnew file mode 100644\nindex 000000000..41442ad0a\n--- /dev/null\n+++ b/drivers/common/octeontx2/hw/otx2_tim.h\n@@ -0,0 +1,34 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_TIM_HW_H__\n+#define __OTX2_TIM_HW_H__\n+\n+/* TIM */\n+#define TIM_AF_CONST (0x90)\n+#define TIM_PRIV_LFX_CFG(a) (0x20000 | (a) << 3)\n+#define TIM_PRIV_LFX_INT_CFG(a) (0x24000 | (a) << 3)\n+#define TIM_AF_RVU_LF_CFG_DEBUG (0x30000)\n+#define TIM_AF_BLK_RST (0x10)\n+#define TIM_AF_LF_RST (0x20)\n+#define TIM_AF_BLK_RST (0x10)\n+#define TIM_AF_RINGX_GMCTL(a) (0x2000 | (a) << 3)\n+#define TIM_AF_RINGX_CTL0(a) (0x4000 | (a) << 3)\n+#define TIM_AF_RINGX_CTL1(a) (0x6000 | (a) << 3)\n+#define TIM_AF_RINGX_CTL2(a) (0x8000 | (a) << 3)\n+#define TIM_AF_FLAGS_REG (0x80)\n+#define TIM_AF_FLAGS_REG_ENA_TIM BIT_ULL(0)\n+#define TIM_AF_RINGX_CTL1_ENA BIT_ULL(47)\n+#define TIM_AF_RINGX_CTL1_RCF_BUSY BIT_ULL(50)\n+#define TIM_AF_RINGX_CLT1_CLK_10NS (0)\n+#define TIM_AF_RINGX_CLT1_CLK_GPIO (1)\n+#define TIM_AF_RINGX_CLT1_CLK_GTI (2)\n+#define TIM_AF_RINGX_CLT1_CLK_PTP (3)\n+\n+/* ENUMS */\n+\n+#define TIM_LF_INT_VEC_NRSPERR_INT\t(0x0ull)\n+#define TIM_LF_INT_VEC_RAS_INT\t\t(0x1ull)\n+\n+#endif /* __OTX2_TIM_HW_H__ */\ndiff --git a/drivers/common/octeontx2/meson.build b/drivers/common/octeontx2/meson.build\nnew file mode 100644\nindex 000000000..34f8aaea7\n--- /dev/null\n+++ b/drivers/common/octeontx2/meson.build\n@@ -0,0 +1,23 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(C) 2019 Marvell International Ltd.\n+#\n+\n+sources= files(\n+\t\t'otx2_mbox.c',\n+\t )\n+\n+extra_flags = []\n+# This integrated controller runs only on a arm64 machine, remove 32bit warnings\n+if not dpdk_conf.get('RTE_ARCH_64')\n+\textra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']\n+endif\n+\n+foreach flag: extra_flags\n+\tif cc.has_argument(flag)\n+\t\tcflags += flag\n+\tendif\n+endforeach\n+\n+deps = ['eal', 'ethdev']\n+includes += include_directories('../../common/octeontx2',\n+\t\t'../../bus/pci')\ndiff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h\nnew file mode 100644\nindex 000000000..b4e008b14\n--- /dev/null\n+++ b/drivers/common/octeontx2/otx2_common.h\n@@ -0,0 +1,34 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef _OTX2_COMMON_H_\n+#define _OTX2_COMMON_H_\n+\n+#include <rte_common.h>\n+\n+#include \"hw/otx2_rvu.h\"\n+#include \"hw/otx2_nix.h\"\n+#include \"hw/otx2_npc.h\"\n+#include \"hw/otx2_npa.h\"\n+#include \"hw/otx2_sso.h\"\n+#include \"hw/otx2_ssow.h\"\n+#include \"hw/otx2_tim.h\"\n+\n+/* Alignment */\n+#define OTX2_ALIGN 128\n+\n+/* Bits manipulation */\n+#ifndef BIT_ULL\n+#define BIT_ULL(nr) (1ULL << (nr))\n+#endif\n+#ifndef BIT\n+#define BIT(nr) (1UL << (nr))\n+#endif\n+\n+/* Compiler attributes */\n+#ifndef __hot\n+#define __hot __attribute__((hot))\n+#endif\n+\n+#endif /* _OTX2_COMMON_H_ */\ndiff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c\nnew file mode 100644\nindex 000000000..c9cdbdbbc\n--- /dev/null\n+++ b/drivers/common/octeontx2/otx2_mbox.c\n@@ -0,0 +1,5 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include \"otx2_mbox.h\"\ndiff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h\nnew file mode 100644\nindex 000000000..6d7b77ed9\n--- /dev/null\n+++ b/drivers/common/octeontx2/otx2_mbox.h\n@@ -0,0 +1,10 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_MBOX_H__\n+#define __OTX2_MBOX_H__\n+\n+#include <otx2_common.h>\n+\n+#endif /* __OTX2_MBOX_H__ */\ndiff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map\nnew file mode 100644\nindex 000000000..fc8c95e91\n--- /dev/null\n+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map\n@@ -0,0 +1,4 @@\n+DPDK_19.05 {\n+\n+\tlocal: *;\n+};\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 7c9b4b538..1e9dcd5a1 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -125,6 +125,8 @@ ifeq ($(CONFIG_RTE_LIBRTE_FSLMC_BUS),y)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_COMMON_DPAAX) += -lrte_common_dpaax\n endif\n \n+_LDLIBS-y += -lrte_common_octeontx2\n+\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += -lrte_bus_pci\n _LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += -lrte_bus_vdev\n _LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += -lrte_bus_dpaa\n", "prefixes": [ "v2", "01/27" ] }{ "id": 53972, "url": "